From 1d39eba32d7558fb4936cdd6194b82f99bd94712 Mon Sep 17 00:00:00 2001 From: Rune Vaernes Date: Mon, 23 Jan 2023 08:22:34 +0100 Subject: [PATCH 1/5] SDK v3 support --- .gitignore | 5 ++ app.js | 11 ++- app.json | 5 +- drivers/mill/device.js | 72 ++++++++--------- drivers/mill/driver.js | 9 +-- lib/mill.js | 2 +- lib/util.js | 48 +----------- package-lock.json | 172 ++++++++++++++++++++--------------------- package.json | 5 +- 9 files changed, 136 insertions(+), 193 deletions(-) diff --git a/.gitignore b/.gitignore index 06118bb..ecd9a56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ npm-debug.log* .DS_Store .idea +node_modules + + +# Added by Homey CLI +/.homeybuild/ \ No newline at end of file diff --git a/app.js b/app.js index ea8be42..0e939a9 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,6 @@ // eslint-disable-next-line import/no-unresolved const Homey = require('homey'); const Mill = require('./lib/mill'); -const { debug } = require('./lib/util'); class MillApp extends Homey.App { onInit() { @@ -9,13 +8,13 @@ class MillApp extends Homey.App { this.user = null; this.isAuthenticated = false; this.isAuthenticating = false; - - debug(`${Homey.manifest.id} is running..`); + + this.log(`${Homey.manifest.id} is running..`); } async connectToMill() { - const username = Homey.ManagerSettings.get('username'); - const password = Homey.ManagerSettings.get('password'); + const username = this.homey.settings.get('username'); + const password = this.homey.settings.get('password'); return this.authenticate(username, password); } @@ -26,7 +25,7 @@ class MillApp extends Homey.App { this.isAuthenticating = true; this.user = await this.millApi.login(username, password) || null; this.isAuthenticated = true; - debug('Mill authenticated'); + this.log('Mill authenticated'); return true; } finally { this.isAuthenticating = false; diff --git a/app.json b/app.json index ccd59d9..f31a817 100644 --- a/app.json +++ b/app.json @@ -1,11 +1,12 @@ { "id": "com.mill", "version": "1.0.8", - "compatibility": ">=1.5.0", - "sdk": 2, + "compatibility": ">=5.0.0", + "sdk": 3, "name": { "en": "Mill WiFi" }, + "brandColor": "#20DFCB", "tags": { "en": [ "mill", diff --git a/drivers/mill/device.js b/drivers/mill/device.js index ec2635f..7b74b36 100644 --- a/drivers/mill/device.js +++ b/drivers/mill/device.js @@ -1,14 +1,12 @@ // eslint-disable-next-line import/no-unresolved const Homey = require('homey'); -const { Log } = require('./../../lib/log'); -const { debug, error } = require('./../../lib/util'); const Room = require('./../../lib/models'); class MillDevice extends Homey.Device { onInit() { this.deviceId = this.getData().id; - debug(`[${this.getName()}] ${this.getClass()} (${this.deviceId}) initialized`); + this.log(`[${this.getName()}] ${this.getClass()} (${this.deviceId}) initialized`); // Add new capailities for devices that don't have them yet if (!this.getCapabilities().includes('onoff')) { @@ -24,31 +22,26 @@ class MillDevice extends Homey.Device { this.registerCapabilityListener('onoff', this.onCapabilityOnOff.bind(this)); // triggers - this.modeChangedTrigger = new Homey.FlowCardTriggerDevice('mill_mode_changed'); - this.modeChangedTrigger.register(); - - this.modeChangedToTrigger = new Homey.FlowCardTriggerDevice('mill_mode_changed_to'); + this.modeChangedTrigger = this.homey.flow.getDeviceTriggerCard('mill_mode_changed'); + + this.modeChangedToTrigger = this.homey.flow.getDeviceTriggerCard('mill_mode_changed_to'); this.modeChangedToTrigger - .register() .registerRunListener((args, state) => args.mill_mode === state.mill_mode); // conditions - this.isHeatingCondition = new Homey.FlowCardCondition('mill_is_heating'); + this.isHeatingCondition =this.homey.flow.getConditionCard('mill_is_heating'); this.isHeatingCondition - .register() .registerRunListener(() => (this.room && this.room.heatStatus === 1)); - this.isMatchingModeCondition = new Homey.FlowCardCondition('mill_mode_matching'); + this.isMatchingModeCondition = this.homey.flow.getConditionCard('mill_mode_matching'); this.isMatchingModeCondition - .register() .registerRunListener(args => (args.mill_mode === this.room.modeName)); // actions - this.setProgramAction = new Homey.FlowCardAction('mill_set_mode'); + this.setProgramAction = this.homey.flow.getActionCard('mill_set_mode'); this.setProgramAction - .register() .registerRunListener((args) => { - debug(`[${args.device.getName()}] Flow changed mode to ${args.mill_mode}`); + this.log(`[${args.device.getName()}] Flow changed mode to ${args.mill_mode}`); return args.device.setThermostatMode(args.mill_mode); }); @@ -58,7 +51,7 @@ class MillDevice extends Homey.Device { } async refreshState() { - debug(`[${this.getName()}] Refreshing state`); + this.log(`[${this.getName()}] Refreshing state`); if (this.refreshTimeout) { clearTimeout(this.refreshTimeout); @@ -66,21 +59,20 @@ class MillDevice extends Homey.Device { } try { - if (Homey.app.isConnected()) { + if (this.homey.app.isConnected()) { await this.refreshMillService(); this.setAvailable(); } else { - debug(`[${this.getName()}] Mill not connected`); + this.log(`[${this.getName()}] Mill not connected`); this.setUnavailable(); - await Homey.app.connectToMill().then(() => { + await this.homey.app.connectToMill().then(() => { this.scheduleRefresh(10); }).catch((err) => { - error('Error caught while refreshing state', err); + this.error('Error caught while refreshing state', err); }); } } catch (e) { - error('Exception caught', e); - Log.captureException(e); + this.error('Exception caught', e); } finally { if (this.refreshTimeout === null) { this.scheduleRefresh(); @@ -89,17 +81,17 @@ class MillDevice extends Homey.Device { } scheduleRefresh(interval) { - const refreshInterval = interval || Homey.ManagerSettings.get('interval'); + const refreshInterval = interval || this.homey.settings.get('interval'); this.refreshTimeout = setTimeout(this.refreshState.bind(this), refreshInterval * 1000); - debug(`[${this.getName()}] Next refresh in ${refreshInterval} seconds`); + this.log(`[${this.getName()}] Next refresh in ${refreshInterval} seconds`); } async refreshMillService() { - const millApi = Homey.app.getMillApi(); + const millApi = this.homey.app.getMillApi(); return millApi.listDevices(this.getData().id) .then((room) => { - debug(`[${this.getName()}] Mill state refreshed`, { + this.log(`[${this.getName()}] Mill state refreshed`, { comfortTemp: room.comfortTemp, awayTemp: room.awayTemp, holidayTemp: room.holidayTemp, @@ -112,7 +104,7 @@ class MillDevice extends Homey.Device { if (room.programMode !== undefined) { if (this.room && !this.room.modesMatch(room) && this.room.modeName !== room.modeName) { - debug(`[${this.getName()}] Triggering mode change from ${this.room.modeName} to ${room.modeName}`); + this.log(`[${this.getName()}] Triggering mode change from ${this.room.modeName} to ${room.modeName}`); // not needed, setCapabilityValue will trigger // this.modeChangedTrigger.trigger(this, { mill_mode: room.modeName }) // .catch(this.error); @@ -138,47 +130,47 @@ class MillDevice extends Homey.Device { jobs.push(this.setCapabilityValue('target_temperature', room.targetTemp)); } return Promise.all(jobs).catch((err) => { - Log.captureException(err); + this.error(err); }); } }).catch((err) => { - error(`[${this.getName()}] Error caught while refreshing state`, err); + this.error(`[${this.getName()}] Error caught while refreshing state`, err); }); } onAdded() { - debug('device added', this.getState()); + this.log('device added', this.getState()); } onDeleted() { clearTimeout(this.refreshTimeout); - debug('device deleted', this.getState()); + this.log('device deleted', this.getState()); } onCapabilityTargetTemperature(value, opts, callback) { - debug(`onCapabilityTargetTemperature(${value})`); + this.log(`onCapabilityTargetTemperature(${value})`); const temp = Math.ceil(value); if (temp !== value && this.room.modeName !== 'Off') { // half degrees isn't supported by Mill, need to round it up this.setCapabilityValue('target_temperature', temp); - debug(`onCapabilityTargetTemperature(${value}=>${temp})`); + this.log(`onCapabilityTargetTemperature(${value}=>${temp})`); } - const millApi = Homey.app.getMillApi(); + const millApi = this.homey.app.getMillApi(); this.room.targetTemp = temp; millApi.changeRoomTemperature(this.deviceId, this.room) .then(() => { - debug(`onCapabilityTargetTemperature(${temp}) done`); - debug(`[${this.getName()}] Changed temp to ${temp}: currentMode: ${this.room.currentMode}/${this.room.programMode}, comfortTemp: ${this.room.comfortTemp}, awayTemp: ${this.room.awayTemp}, avgTemp: ${this.room.avgTemp}, sleepTemp: ${this.room.sleepTemp}`); + this.log(`onCapabilityTargetTemperature(${temp}) done`); + this.log(`[${this.getName()}] Changed temp to ${temp}: currentMode: ${this.room.currentMode}/${this.room.programMode}, comfortTemp: ${this.room.comfortTemp}, awayTemp: ${this.room.awayTemp}, avgTemp: ${this.room.avgTemp}, sleepTemp: ${this.room.sleepTemp}`); callback(null, temp); }).catch((err) => { - debug(`onCapabilityTargetTemperature(${temp}) error`); - debug(`[${this.getName()}] Change temp to ${temp} resultet in error`, err); + this.log(`onCapabilityTargetTemperature(${temp}) error`); + this.log(`[${this.getName()}] Change temp to ${temp} resultet in error`, err); callback(err); }); } setThermostatMode(value) { return new Promise((resolve, reject) => { - const millApi = Homey.app.getMillApi(); + const millApi = this.homey.app.getMillApi(); this.room.modeName = value; const jobs = []; if (this.room.modeName !== 'Off') { @@ -190,7 +182,7 @@ class MillDevice extends Homey.Device { debug(`[${this.getName()}] Changed mode to ${value}: currentMode: ${this.room.currentMode}/${this.room.programMode}, comfortTemp: ${this.room.comfortTemp}, awayTemp: ${this.room.awayTemp}, avgTemp: ${this.room.avgTemp}, sleepTemp: ${this.room.sleepTemp}`); resolve(value); }).catch((err) => { - error(`[${this.getName()}] Change mode to ${value} resulted in error`, err); + this.error(`[${this.getName()}] Change mode to ${value} resulted in error`, err); reject(err); }); }); diff --git a/drivers/mill/driver.js b/drivers/mill/driver.js index 0c792ca..84a674c 100644 --- a/drivers/mill/driver.js +++ b/drivers/mill/driver.js @@ -1,6 +1,5 @@ // eslint-disable-next-line import/no-unresolved const Homey = require('homey'); -const { debug } = require('./../../lib/util'); class MillDriver extends Homey.Driver { async onInit() { @@ -9,17 +8,17 @@ class MillDriver extends Homey.Driver { async onPairListDevices(data, callback) { if (!Homey.app.isConnected()) { // eslint-disable-next-line no-underscore-dangle - debug('Unable to pair, not authenticated'); + this.log('Unable to pair, not authenticated'); callback(new Error(Homey.__('pair.messages.notAuthorized'))); } else { - debug('Pairing'); + this.log('Pairing'); const millApi = Homey.app.getMillApi(); const homes = await millApi.listHomes(); - debug(`Found following homes: ${homes.homeList.map(home => `${home.homeName} (${home.homeId})`).join(', ')}`); + this.log(`Found following homes: ${homes.homeList.map(home => `${home.homeName} (${home.homeId})`).join(', ')}`); const rooms = await Promise.all(homes.homeList.map(async (home) => { const rooms = await millApi.listRooms(home.homeId); - debug(`Found following rooms in ${home.homeName}: ${rooms.roomInfo.map(room => `${room.roomName} (${room.roomId})`).join(', ')}`); + this.log(`Found following rooms in ${home.homeName}: ${rooms.roomInfo.map(room => `${room.roomName} (${room.roomId})`).join(', ')}`); return rooms.roomInfo.map(room => ( { diff --git a/lib/mill.js b/lib/mill.js index 96c42e4..338dd95 100644 --- a/lib/mill.js +++ b/lib/mill.js @@ -1,6 +1,6 @@ const crypto = require('crypto'); const Room = require('./models'); -const { fetchJSON } = require('./util'); +const fetchJSON = require('./util'); const TOKEN_SAFE_ZONE = 5 * 60 * 1000; diff --git a/lib/util.js b/lib/util.js index 5cc69f6..c33dde8 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,50 +1,6 @@ // eslint-disable-next-line import/no-unresolved const fetch = require('node-fetch'); -const log = (severity, message, data) => { - // Homey will not be available in tests - let Homey; - try { Homey = require('homey'); } catch (e) {} - if (!Homey) { - console.log(`${severity}: ${message}`, data || ''); - return; - } - - if (Homey.ManagerSettings.get('debug')) { - const debugLog = Homey.ManagerSettings.get('debugLog') || []; - const entry = { registered: new Date().toLocaleString(), severity, message }; - if (data) { - if (typeof data === 'string') { - entry.data = { data }; - } else if (data.message) { - entry.data = { error: data.message, stacktrace: data.stack }; - } else { - entry.data = data; - } - } - - debugLog.push(entry); - if (debugLog.length > 100) { - debugLog.splice(0, 1); - } - Homey.app.log(`${severity}: ${message}`, data || ''); - Homey.ManagerSettings.set('debugLog', debugLog); - Homey.ManagerApi.realtime('debugLog', entry); - } -}; - -const debug = (message, data) => { - log('DEBUG', message, data); -}; - -const warn = (message, data) => { - log('WARN', message, data); -}; - -const error = (message, data) => { - log('ERROR', message, data); -}; - const fetchJSON = async (endpoint, options) => { try { const result = await fetch(endpoint, options); @@ -56,7 +12,5 @@ const fetchJSON = async (endpoint, options) => { }; } }; +module.exports = fetchJSON; -module.exports = { - debug, warn, error, fetchJSON -}; diff --git a/package-lock.json b/package-lock.json index 59a12eb..5ad7010 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,89 +30,41 @@ "integrity": "sha1-fw93ZdhaSPgMIpbJ2BYC7GYSWTI=", "dev": true }, - "@sentry/apm": { - "version": "5.14.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/apm/-/apm-5.14.1.tgz", - "integrity": "sha1-mWBcTPkzlirtpKGwPpklYhPlHX0=", - "requires": { - "@sentry/browser": "5.14.1", - "@sentry/hub": "5.14.1", - "@sentry/minimal": "5.14.1", - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "tslib": "^1.9.3" - } - }, - "@sentry/browser": { - "version": "5.14.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/browser/-/browser-5.14.1.tgz", - "integrity": "sha1-zNgG13tO/xrmyh7DoIObm7td0kE=", - "requires": { - "@sentry/core": "5.14.1", - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "tslib": "^1.9.3" - } - }, "@sentry/core": { - "version": "5.14.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/core/-/core-5.14.1.tgz", - "integrity": "sha1-IafBTKCLDyKAI/nG85nbHjXNZDg=", - "requires": { - "@sentry/hub": "5.14.1", - "@sentry/minimal": "5.14.1", - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "tslib": "^1.9.3" - } - }, - "@sentry/hub": { - "version": "5.14.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/hub/-/hub-5.14.1.tgz", - "integrity": "sha1-GkUVVYcFsmgKbp88uAklVe0xMko=", + "version": "7.31.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.31.1.tgz", + "integrity": "sha512-quaNU6z8jabmatBTDi28Wpff2yzfWIp/IU4bbi2QOtEiCNT+TQJXqlRTRMu9xLrX7YzyKCL5X2gbit/85lyWUg==", "requires": { - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "tslib": "^1.9.3" - } - }, - "@sentry/minimal": { - "version": "5.14.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/minimal/-/minimal-5.14.1.tgz", - "integrity": "sha1-PsdFA81ydy3lYYjwEKNdm8lW3JQ=", - "requires": { - "@sentry/hub": "5.14.1", - "@sentry/types": "5.14.1", + "@sentry/types": "7.31.1", + "@sentry/utils": "7.31.1", "tslib": "^1.9.3" } }, "@sentry/node": { - "version": "5.14.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/node/-/node-5.14.1.tgz", - "integrity": "sha1-66w4vVA21/7voLRFaecxtZRBzic=", - "requires": { - "@sentry/apm": "5.14.1", - "@sentry/core": "5.14.1", - "@sentry/hub": "5.14.1", - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "cookie": "^0.3.1", - "https-proxy-agent": "^4.0.0", + "version": "7.31.1", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.31.1.tgz", + "integrity": "sha512-4VzfOU1YHeoGkBQmkVXlXoXITf+1NkZEREKhdzgpVAkVjb2Tk3sMoFov4wOKWnNTTj4ka50xyaw/ZmqApgQ4Pw==", + "requires": { + "@sentry/core": "7.31.1", + "@sentry/types": "7.31.1", + "@sentry/utils": "7.31.1", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", "lru_map": "^0.3.3", "tslib": "^1.9.3" } }, "@sentry/types": { - "version": "5.14.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/types/-/types-5.14.1.tgz", - "integrity": "sha1-Vk+bcDwGwql+dW9go8hzuXeyu9I=" + "version": "7.31.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.31.1.tgz", + "integrity": "sha512-1uzr2l0AxEnxUX/S0EdmXUQ15/kDsam8Nbdw4Gai8SU764XwQgA/TTjoewVP597CDI/AHKan67Y630/Ylmkx9w==" }, "@sentry/utils": { - "version": "5.14.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/utils/-/utils-5.14.1.tgz", - "integrity": "sha1-V3qd17X0s0NujihH0FhUfqsu1cQ=", + "version": "7.31.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.31.1.tgz", + "integrity": "sha512-ZsIPq29aNdP9q3R7qIzJhZ9WW+4DzE9g5SfGwx3UjTIxoRRBfdUJUbf7S+LKEdvCkKbyoDt6FLt5MiSJV43xBA==", "requires": { - "@sentry/types": "5.14.1", + "@sentry/types": "7.31.1", "tslib": "^1.9.3" } }, @@ -135,9 +87,27 @@ "dev": true }, "agent-base": { - "version": "5.1.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/agent-base/-/agent-base-5.1.1.tgz", - "integrity": "sha1-6Ps/JClZ20TWO+Zl23qOc5U3oyw=" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } }, "ajv": { "version": "6.12.0", @@ -453,9 +423,9 @@ "dev": true }, "cookie": { - "version": "0.3.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" }, "cross-spawn": { "version": "6.0.5", @@ -1065,26 +1035,26 @@ "dev": true }, "https-proxy-agent": { - "version": "4.0.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", - "integrity": "sha1-cCtx+1UgoTKmbeH2dUHZ5iFU2Cs=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "requires": { - "agent-base": "5", + "agent-base": "6", "debug": "4" }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/debug/-/debug-4.1.1.tgz", - "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { "version": "2.1.2", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, @@ -1414,8 +1384,8 @@ }, "lru_map": { "version": "0.3.3", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=" + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==" }, "merge-descriptors": { "version": "1.0.1", @@ -1639,9 +1609,12 @@ } }, "node-fetch": { - "version": "2.6.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha1-5jNFY4bUqlWGP2dqerDaqP3ssP0=" + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", + "requires": { + "whatwg-url": "^5.0.0" + } }, "normalize-package-data": { "version": "2.5.0", @@ -2279,6 +2252,11 @@ "is-number": "^7.0.0" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "tslib": { "version": "1.9.3", "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/tslib/-/tslib-1.9.3.tgz", @@ -2330,6 +2308,20 @@ "spdx-expression-parse": "^3.0.0" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "1.3.1", "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/which/-/which-1.3.1.tgz", diff --git a/package.json b/package.json index b39efe0..d7eec27 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,12 @@ "description": "Integrate Mill WiFi heating devices with Homey", "main": "app.js", "dependencies": { - "@sentry/node": "5.14.1", - "node-fetch": "2.6.0" + "@sentry/node": "7.31.1", + "node-fetch": "^2.6.2" }, "devDependencies": { "@milanzor/homey-mock": "1.1.0", + "@types/node-fetch": "^2.6.2", "chai": "4.2.0", "chai-as-promised": "7.1.1", "eslint": "6.8.0", From 4435c4442068f559464942a4df89f2ddfc261c18 Mon Sep 17 00:00:00 2001 From: Rune Vaernes Date: Mon, 23 Jan 2023 08:24:09 +0100 Subject: [PATCH 2/5] Removed node_modules --- node_modules/@sentry/apm/README.md | 22 - .../@sentry/apm/dist/hubextensions.d.ts | 5 - .../@sentry/apm/dist/hubextensions.d.ts.map | 1 - .../@sentry/apm/dist/hubextensions.js | 78 - .../@sentry/apm/dist/hubextensions.js.map | 1 - .../@sentry/apm/dist/index.bundle.d.ts | 20 - .../@sentry/apm/dist/index.bundle.d.ts.map | 1 - node_modules/@sentry/apm/dist/index.bundle.js | 59 - .../@sentry/apm/dist/index.bundle.js.map | 1 - node_modules/@sentry/apm/dist/index.d.ts | 4 - node_modules/@sentry/apm/dist/index.d.ts.map | 1 - node_modules/@sentry/apm/dist/index.js | 10 - node_modules/@sentry/apm/dist/index.js.map | 1 - .../apm/dist/integrations/express.d.ts | 33 - .../apm/dist/integrations/express.d.ts.map | 1 - .../@sentry/apm/dist/integrations/express.js | 128 - .../apm/dist/integrations/express.js.map | 1 - .../@sentry/apm/dist/integrations/index.d.ts | 3 - .../apm/dist/integrations/index.d.ts.map | 1 - .../@sentry/apm/dist/integrations/index.js | 6 - .../apm/dist/integrations/index.js.map | 1 - .../apm/dist/integrations/tracing.d.ts | 209 - .../apm/dist/integrations/tracing.d.ts.map | 1 - .../@sentry/apm/dist/integrations/tracing.js | 631 -- .../apm/dist/integrations/tracing.js.map | 1 - node_modules/@sentry/apm/dist/span.d.ts | 143 - node_modules/@sentry/apm/dist/span.d.ts.map | 1 - node_modules/@sentry/apm/dist/span.js | 284 - node_modules/@sentry/apm/dist/span.js.map | 1 - .../@sentry/apm/esm/hubextensions.d.ts | 5 - .../@sentry/apm/esm/hubextensions.d.ts.map | 1 - node_modules/@sentry/apm/esm/hubextensions.js | 76 - .../@sentry/apm/esm/hubextensions.js.map | 1 - .../@sentry/apm/esm/index.bundle.d.ts | 20 - .../@sentry/apm/esm/index.bundle.d.ts.map | 1 - node_modules/@sentry/apm/esm/index.bundle.js | 24 - .../@sentry/apm/esm/index.bundle.js.map | 1 - node_modules/@sentry/apm/esm/index.d.ts | 4 - node_modules/@sentry/apm/esm/index.d.ts.map | 1 - node_modules/@sentry/apm/esm/index.js | 7 - node_modules/@sentry/apm/esm/index.js.map | 1 - .../@sentry/apm/esm/integrations/express.d.ts | 33 - .../apm/esm/integrations/express.d.ts.map | 1 - .../@sentry/apm/esm/integrations/express.js | 127 - .../apm/esm/integrations/express.js.map | 1 - .../@sentry/apm/esm/integrations/index.d.ts | 3 - .../apm/esm/integrations/index.d.ts.map | 1 - .../@sentry/apm/esm/integrations/index.js | 3 - .../@sentry/apm/esm/integrations/index.js.map | 1 - .../@sentry/apm/esm/integrations/tracing.d.ts | 209 - .../apm/esm/integrations/tracing.d.ts.map | 1 - .../@sentry/apm/esm/integrations/tracing.js | 630 -- .../apm/esm/integrations/tracing.js.map | 1 - node_modules/@sentry/apm/esm/span.d.ts | 143 - node_modules/@sentry/apm/esm/span.d.ts.map | 1 - node_modules/@sentry/apm/esm/span.js | 283 - node_modules/@sentry/apm/esm/span.js.map | 1 - node_modules/@sentry/apm/package.json | 121 - node_modules/@sentry/browser/LICENSE | 29 - node_modules/@sentry/browser/README.md | 64 - .../@sentry/browser/build/bundle.es6.js | 5298 --------------- .../@sentry/browser/build/bundle.es6.js.map | 1 - .../@sentry/browser/build/bundle.es6.min.js | 3 - .../browser/build/bundle.es6.min.js.map | 1 - node_modules/@sentry/browser/build/bundle.js | 5692 ----------------- .../@sentry/browser/build/bundle.js.map | 1 - .../@sentry/browser/build/bundle.min.js | 3 - .../@sentry/browser/build/bundle.min.js.map | 1 - .../@sentry/browser/dist/backend.d.ts | 39 - .../@sentry/browser/dist/backend.d.ts.map | 1 - node_modules/@sentry/browser/dist/backend.js | 70 - .../@sentry/browser/dist/backend.js.map | 1 - node_modules/@sentry/browser/dist/client.d.ts | 54 - .../@sentry/browser/dist/client.d.ts.map | 1 - node_modules/@sentry/browser/dist/client.js | 73 - .../@sentry/browser/dist/client.js.map | 1 - .../@sentry/browser/dist/eventbuilder.d.ts | 11 - .../browser/dist/eventbuilder.d.ts.map | 1 - .../@sentry/browser/dist/eventbuilder.js | 78 - .../@sentry/browser/dist/eventbuilder.js.map | 1 - .../@sentry/browser/dist/exports.d.ts | 7 - .../@sentry/browser/dist/exports.d.ts.map | 1 - node_modules/@sentry/browser/dist/exports.js | 38 - .../@sentry/browser/dist/exports.js.map | 1 - .../@sentry/browser/dist/helpers.d.ts | 21 - .../@sentry/browser/dist/helpers.d.ts.map | 1 - node_modules/@sentry/browser/dist/helpers.js | 139 - .../@sentry/browser/dist/helpers.js.map | 1 - node_modules/@sentry/browser/dist/index.d.ts | 15 - .../@sentry/browser/dist/index.d.ts.map | 1 - node_modules/@sentry/browser/dist/index.js | 19 - .../@sentry/browser/dist/index.js.map | 1 - .../dist/integrations/breadcrumbs.d.ts | 72 - .../dist/integrations/breadcrumbs.d.ts.map | 1 - .../browser/dist/integrations/breadcrumbs.js | 272 - .../dist/integrations/breadcrumbs.js.map | 1 - .../dist/integrations/globalhandlers.d.ts | 45 - .../dist/integrations/globalhandlers.d.ts.map | 1 - .../dist/integrations/globalhandlers.js | 195 - .../dist/integrations/globalhandlers.js.map | 1 - .../browser/dist/integrations/index.d.ts | 6 - .../browser/dist/integrations/index.d.ts.map | 1 - .../browser/dist/integrations/index.js | 12 - .../browser/dist/integrations/index.js.map | 1 - .../dist/integrations/linkederrors.d.ts | 40 - .../dist/integrations/linkederrors.d.ts.map | 1 - .../browser/dist/integrations/linkederrors.js | 65 - .../dist/integrations/linkederrors.js.map | 1 - .../browser/dist/integrations/trycatch.d.ts | 28 - .../dist/integrations/trycatch.d.ts.map | 1 - .../browser/dist/integrations/trycatch.js | 187 - .../browser/dist/integrations/trycatch.js.map | 1 - .../browser/dist/integrations/useragent.d.ts | 17 - .../dist/integrations/useragent.d.ts.map | 1 - .../browser/dist/integrations/useragent.js | 40 - .../dist/integrations/useragent.js.map | 1 - .../@sentry/browser/dist/parsers.d.ts | 21 - .../@sentry/browser/dist/parsers.d.ts.map | 1 - node_modules/@sentry/browser/dist/parsers.js | 96 - .../@sentry/browser/dist/parsers.js.map | 1 - node_modules/@sentry/browser/dist/sdk.d.ts | 108 - .../@sentry/browser/dist/sdk.d.ts.map | 1 - node_modules/@sentry/browser/dist/sdk.js | 168 - node_modules/@sentry/browser/dist/sdk.js.map | 1 - .../@sentry/browser/dist/tracekit.d.ts | 38 - .../@sentry/browser/dist/tracekit.d.ts.map | 1 - node_modules/@sentry/browser/dist/tracekit.js | 207 - .../@sentry/browser/dist/tracekit.js.map | 1 - .../@sentry/browser/dist/transports/base.d.ts | 22 - .../browser/dist/transports/base.d.ts.map | 1 - .../@sentry/browser/dist/transports/base.js | 27 - .../browser/dist/transports/base.js.map | 1 - .../browser/dist/transports/fetch.d.ts | 12 - .../browser/dist/transports/fetch.d.ts.map | 1 - .../@sentry/browser/dist/transports/fetch.js | 62 - .../browser/dist/transports/fetch.js.map | 1 - .../browser/dist/transports/index.d.ts | 4 - .../browser/dist/transports/index.d.ts.map | 1 - .../@sentry/browser/dist/transports/index.js | 8 - .../browser/dist/transports/index.js.map | 1 - .../@sentry/browser/dist/transports/xhr.d.ts | 12 - .../browser/dist/transports/xhr.d.ts.map | 1 - .../@sentry/browser/dist/transports/xhr.js | 57 - .../browser/dist/transports/xhr.js.map | 1 - .../@sentry/browser/dist/version.d.ts | 3 - .../@sentry/browser/dist/version.d.ts.map | 1 - node_modules/@sentry/browser/dist/version.js | 4 - .../@sentry/browser/dist/version.js.map | 1 - node_modules/@sentry/browser/esm/backend.d.ts | 39 - .../@sentry/browser/esm/backend.d.ts.map | 1 - node_modules/@sentry/browser/esm/backend.js | 69 - .../@sentry/browser/esm/backend.js.map | 1 - node_modules/@sentry/browser/esm/client.d.ts | 54 - .../@sentry/browser/esm/client.d.ts.map | 1 - node_modules/@sentry/browser/esm/client.js | 72 - .../@sentry/browser/esm/client.js.map | 1 - .../@sentry/browser/esm/eventbuilder.d.ts | 11 - .../@sentry/browser/esm/eventbuilder.d.ts.map | 1 - .../@sentry/browser/esm/eventbuilder.js | 75 - .../@sentry/browser/esm/eventbuilder.js.map | 1 - node_modules/@sentry/browser/esm/exports.d.ts | 7 - .../@sentry/browser/esm/exports.d.ts.map | 1 - node_modules/@sentry/browser/esm/exports.js | 6 - .../@sentry/browser/esm/exports.js.map | 1 - node_modules/@sentry/browser/esm/helpers.d.ts | 21 - .../@sentry/browser/esm/helpers.d.ts.map | 1 - node_modules/@sentry/browser/esm/helpers.js | 135 - .../@sentry/browser/esm/helpers.js.map | 1 - node_modules/@sentry/browser/esm/index.d.ts | 15 - .../@sentry/browser/esm/index.d.ts.map | 1 - node_modules/@sentry/browser/esm/index.js | 17 - node_modules/@sentry/browser/esm/index.js.map | 1 - .../browser/esm/integrations/breadcrumbs.d.ts | 72 - .../esm/integrations/breadcrumbs.d.ts.map | 1 - .../browser/esm/integrations/breadcrumbs.js | 271 - .../esm/integrations/breadcrumbs.js.map | 1 - .../esm/integrations/globalhandlers.d.ts | 45 - .../esm/integrations/globalhandlers.d.ts.map | 1 - .../esm/integrations/globalhandlers.js | 194 - .../esm/integrations/globalhandlers.js.map | 1 - .../browser/esm/integrations/index.d.ts | 6 - .../browser/esm/integrations/index.d.ts.map | 1 - .../@sentry/browser/esm/integrations/index.js | 6 - .../browser/esm/integrations/index.js.map | 1 - .../esm/integrations/linkederrors.d.ts | 40 - .../esm/integrations/linkederrors.d.ts.map | 1 - .../browser/esm/integrations/linkederrors.js | 64 - .../esm/integrations/linkederrors.js.map | 1 - .../browser/esm/integrations/trycatch.d.ts | 28 - .../esm/integrations/trycatch.d.ts.map | 1 - .../browser/esm/integrations/trycatch.js | 186 - .../browser/esm/integrations/trycatch.js.map | 1 - .../browser/esm/integrations/useragent.d.ts | 17 - .../esm/integrations/useragent.d.ts.map | 1 - .../browser/esm/integrations/useragent.js | 39 - .../browser/esm/integrations/useragent.js.map | 1 - node_modules/@sentry/browser/esm/parsers.d.ts | 21 - .../@sentry/browser/esm/parsers.d.ts.map | 1 - node_modules/@sentry/browser/esm/parsers.js | 91 - .../@sentry/browser/esm/parsers.js.map | 1 - node_modules/@sentry/browser/esm/sdk.d.ts | 108 - node_modules/@sentry/browser/esm/sdk.d.ts.map | 1 - node_modules/@sentry/browser/esm/sdk.js | 159 - node_modules/@sentry/browser/esm/sdk.js.map | 1 - .../@sentry/browser/esm/tracekit.d.ts | 38 - .../@sentry/browser/esm/tracekit.d.ts.map | 1 - node_modules/@sentry/browser/esm/tracekit.js | 205 - .../@sentry/browser/esm/tracekit.js.map | 1 - .../@sentry/browser/esm/transports/base.d.ts | 22 - .../browser/esm/transports/base.d.ts.map | 1 - .../@sentry/browser/esm/transports/base.js | 26 - .../browser/esm/transports/base.js.map | 1 - .../@sentry/browser/esm/transports/fetch.d.ts | 12 - .../browser/esm/transports/fetch.d.ts.map | 1 - .../@sentry/browser/esm/transports/fetch.js | 61 - .../browser/esm/transports/fetch.js.map | 1 - .../@sentry/browser/esm/transports/index.d.ts | 4 - .../browser/esm/transports/index.d.ts.map | 1 - .../@sentry/browser/esm/transports/index.js | 4 - .../browser/esm/transports/index.js.map | 1 - .../@sentry/browser/esm/transports/xhr.d.ts | 12 - .../browser/esm/transports/xhr.d.ts.map | 1 - .../@sentry/browser/esm/transports/xhr.js | 56 - .../@sentry/browser/esm/transports/xhr.js.map | 1 - node_modules/@sentry/browser/esm/version.d.ts | 3 - .../@sentry/browser/esm/version.d.ts.map | 1 - node_modules/@sentry/browser/esm/version.js | 3 - .../@sentry/browser/esm/version.js.map | 1 - node_modules/@sentry/browser/package.json | 124 - node_modules/@sentry/core/LICENSE | 37 +- node_modules/@sentry/core/README.md | 6 +- node_modules/@sentry/core/dist/api.d.ts | 33 - node_modules/@sentry/core/dist/api.d.ts.map | 1 - node_modules/@sentry/core/dist/api.js | 87 - node_modules/@sentry/core/dist/api.js.map | 1 - .../@sentry/core/dist/basebackend.d.ts | 74 - .../@sentry/core/dist/basebackend.d.ts.map | 1 - node_modules/@sentry/core/dist/basebackend.js | 52 - .../@sentry/core/dist/basebackend.js.map | 1 - .../@sentry/core/dist/baseclient.d.ts | 155 - .../@sentry/core/dist/baseclient.d.ts.map | 1 - node_modules/@sentry/core/dist/baseclient.js | 395 -- .../@sentry/core/dist/baseclient.js.map | 1 - node_modules/@sentry/core/dist/index.d.ts | 10 - node_modules/@sentry/core/dist/index.d.ts.map | 1 - node_modules/@sentry/core/dist/index.js | 33 - node_modules/@sentry/core/dist/index.js.map | 1 - .../@sentry/core/dist/integration.d.ts | 18 - .../@sentry/core/dist/integration.d.ts.map | 1 - node_modules/@sentry/core/dist/integration.js | 71 - .../@sentry/core/dist/integration.js.map | 1 - .../dist/integrations/functiontostring.d.ts | 17 - .../integrations/functiontostring.d.ts.map | 1 - .../dist/integrations/functiontostring.js | 33 - .../dist/integrations/functiontostring.js.map | 1 - .../dist/integrations/inboundfilters.d.ts | 43 - .../dist/integrations/inboundfilters.d.ts.map | 1 - .../core/dist/integrations/inboundfilters.js | 160 - .../dist/integrations/inboundfilters.js.map | 1 - .../@sentry/core/dist/integrations/index.d.ts | 3 - .../core/dist/integrations/index.d.ts.map | 1 - .../@sentry/core/dist/integrations/index.js | 6 - .../core/dist/integrations/index.js.map | 1 - node_modules/@sentry/core/dist/sdk.d.ts | 12 - node_modules/@sentry/core/dist/sdk.d.ts.map | 1 - node_modules/@sentry/core/dist/sdk.js | 18 - node_modules/@sentry/core/dist/sdk.js.map | 1 - .../@sentry/core/dist/transports/noop.d.ts | 13 - .../core/dist/transports/noop.d.ts.map | 1 - .../@sentry/core/dist/transports/noop.js | 26 - .../@sentry/core/dist/transports/noop.js.map | 1 - node_modules/@sentry/core/esm/api.d.ts | 33 - node_modules/@sentry/core/esm/api.d.ts.map | 1 - node_modules/@sentry/core/esm/api.js | 170 +- node_modules/@sentry/core/esm/api.js.map | 2 +- .../@sentry/core/esm/basebackend.d.ts | 74 - .../@sentry/core/esm/basebackend.d.ts.map | 1 - node_modules/@sentry/core/esm/basebackend.js | 51 - .../@sentry/core/esm/basebackend.js.map | 1 - node_modules/@sentry/core/esm/baseclient.d.ts | 155 - .../@sentry/core/esm/baseclient.d.ts.map | 1 - node_modules/@sentry/core/esm/baseclient.js | 957 ++- .../@sentry/core/esm/baseclient.js.map | 2 +- node_modules/@sentry/core/esm/index.d.ts | 10 - node_modules/@sentry/core/esm/index.d.ts.map | 1 - node_modules/@sentry/core/esm/index.js | 30 +- node_modules/@sentry/core/esm/index.js.map | 2 +- .../@sentry/core/esm/integration.d.ts | 18 - .../@sentry/core/esm/integration.d.ts.map | 1 - node_modules/@sentry/core/esm/integration.js | 145 +- .../@sentry/core/esm/integration.js.map | 2 +- .../esm/integrations/functiontostring.d.ts | 17 - .../integrations/functiontostring.d.ts.map | 1 - .../core/esm/integrations/functiontostring.js | 59 +- .../esm/integrations/functiontostring.js.map | 2 +- .../core/esm/integrations/inboundfilters.d.ts | 43 - .../esm/integrations/inboundfilters.d.ts.map | 1 - .../core/esm/integrations/inboundfilters.js | 329 +- .../esm/integrations/inboundfilters.js.map | 2 +- .../@sentry/core/esm/integrations/index.d.ts | 3 - .../core/esm/integrations/index.d.ts.map | 1 - .../@sentry/core/esm/integrations/index.js | 6 +- .../core/esm/integrations/index.js.map | 2 +- node_modules/@sentry/core/esm/sdk.d.ts | 12 - node_modules/@sentry/core/esm/sdk.d.ts.map | 1 - node_modules/@sentry/core/esm/sdk.js | 35 +- node_modules/@sentry/core/esm/sdk.js.map | 2 +- .../@sentry/core/esm/transports/noop.d.ts | 13 - .../@sentry/core/esm/transports/noop.d.ts.map | 1 - .../@sentry/core/esm/transports/noop.js | 25 - .../@sentry/core/esm/transports/noop.js.map | 1 - node_modules/@sentry/core/package.json | 92 +- node_modules/@sentry/hub/LICENSE | 29 - node_modules/@sentry/hub/README.md | 22 - node_modules/@sentry/hub/dist/hub.d.ts | 183 - node_modules/@sentry/hub/dist/hub.d.ts.map | 1 - node_modules/@sentry/hub/dist/hub.js | 453 -- node_modules/@sentry/hub/dist/hub.js.map | 1 - node_modules/@sentry/hub/dist/index.d.ts | 4 - node_modules/@sentry/hub/dist/index.d.ts.map | 1 - node_modules/@sentry/hub/dist/index.js | 12 - node_modules/@sentry/hub/dist/index.js.map | 1 - node_modules/@sentry/hub/dist/interfaces.d.ts | 27 - .../@sentry/hub/dist/interfaces.d.ts.map | 1 - node_modules/@sentry/hub/dist/interfaces.js | 2 - .../@sentry/hub/dist/interfaces.js.map | 1 - node_modules/@sentry/hub/dist/scope.d.ts | 142 - node_modules/@sentry/hub/dist/scope.d.ts.map | 1 - node_modules/@sentry/hub/dist/scope.js | 307 - node_modules/@sentry/hub/dist/scope.js.map | 1 - node_modules/@sentry/hub/esm/hub.d.ts | 183 - node_modules/@sentry/hub/esm/hub.d.ts.map | 1 - node_modules/@sentry/hub/esm/hub.js | 447 -- node_modules/@sentry/hub/esm/hub.js.map | 1 - node_modules/@sentry/hub/esm/index.d.ts | 4 - node_modules/@sentry/hub/esm/index.d.ts.map | 1 - node_modules/@sentry/hub/esm/index.js | 3 - node_modules/@sentry/hub/esm/index.js.map | 1 - node_modules/@sentry/hub/esm/interfaces.d.ts | 27 - .../@sentry/hub/esm/interfaces.d.ts.map | 1 - node_modules/@sentry/hub/esm/interfaces.js | 1 - .../@sentry/hub/esm/interfaces.js.map | 1 - node_modules/@sentry/hub/esm/scope.d.ts | 142 - node_modules/@sentry/hub/esm/scope.d.ts.map | 1 - node_modules/@sentry/hub/esm/scope.js | 305 - node_modules/@sentry/hub/esm/scope.js.map | 1 - node_modules/@sentry/hub/package.json | 112 - node_modules/@sentry/minimal/LICENSE | 29 - node_modules/@sentry/minimal/README.md | 63 - node_modules/@sentry/minimal/dist/index.d.ts | 104 - .../@sentry/minimal/dist/index.d.ts.map | 1 - node_modules/@sentry/minimal/dist/index.js | 179 - .../@sentry/minimal/dist/index.js.map | 1 - node_modules/@sentry/minimal/esm/index.d.ts | 104 - .../@sentry/minimal/esm/index.d.ts.map | 1 - node_modules/@sentry/minimal/esm/index.js | 165 - node_modules/@sentry/minimal/esm/index.js.map | 1 - node_modules/@sentry/minimal/package.json | 110 - node_modules/@sentry/node/LICENSE | 37 +- node_modules/@sentry/node/README.md | 6 +- node_modules/@sentry/node/dist/backend.d.ts | 41 - .../@sentry/node/dist/backend.d.ts.map | 1 - node_modules/@sentry/node/dist/backend.js | 106 - node_modules/@sentry/node/dist/backend.js.map | 1 - node_modules/@sentry/node/dist/client.d.ts | 21 - .../@sentry/node/dist/client.d.ts.map | 1 - node_modules/@sentry/node/dist/client.js | 40 - node_modules/@sentry/node/dist/client.js.map | 1 - node_modules/@sentry/node/dist/handlers.d.ts | 71 - .../@sentry/node/dist/handlers.d.ts.map | 1 - node_modules/@sentry/node/dist/handlers.js | 281 - .../@sentry/node/dist/handlers.js.map | 1 - node_modules/@sentry/node/dist/index.d.ts | 22 - node_modules/@sentry/node/dist/index.d.ts.map | 1 - node_modules/@sentry/node/dist/index.js | 43 - node_modules/@sentry/node/dist/index.js.map | 1 - .../node/dist/integrations/console.d.ts | 17 - .../node/dist/integrations/console.d.ts.map | 1 - .../@sentry/node/dist/integrations/console.js | 79 - .../node/dist/integrations/console.js.map | 1 - .../@sentry/node/dist/integrations/http.d.ts | 32 - .../node/dist/integrations/http.d.ts.map | 1 - .../@sentry/node/dist/integrations/http.js | 140 - .../node/dist/integrations/http.js.map | 1 - .../@sentry/node/dist/integrations/index.d.ts | 7 - .../node/dist/integrations/index.d.ts.map | 1 - .../@sentry/node/dist/integrations/index.js | 14 - .../node/dist/integrations/index.js.map | 1 - .../node/dist/integrations/linkederrors.d.ts | 40 - .../dist/integrations/linkederrors.d.ts.map | 1 - .../node/dist/integrations/linkederrors.js | 85 - .../dist/integrations/linkederrors.js.map | 1 - .../node/dist/integrations/modules.d.ts | 19 - .../node/dist/integrations/modules.d.ts.map | 1 - .../@sentry/node/dist/integrations/modules.js | 76 - .../node/dist/integrations/modules.js.map | 1 - .../integrations/onuncaughtexception.d.ts | 37 - .../integrations/onuncaughtexception.d.ts.map | 1 - .../dist/integrations/onuncaughtexception.js | 113 - .../integrations/onuncaughtexception.js.map | 1 - .../integrations/onunhandledrejection.d.ts | 40 - .../onunhandledrejection.d.ts.map | 1 - .../dist/integrations/onunhandledrejection.js | 81 - .../integrations/onunhandledrejection.js.map | 1 - node_modules/@sentry/node/dist/parsers.d.ts | 29 - .../@sentry/node/dist/parsers.d.ts.map | 1 - node_modules/@sentry/node/dist/parsers.js | 241 - node_modules/@sentry/node/dist/parsers.js.map | 1 - node_modules/@sentry/node/dist/sdk.d.ts | 81 - node_modules/@sentry/node/dist/sdk.d.ts.map | 1 - node_modules/@sentry/node/dist/sdk.js | 152 - node_modules/@sentry/node/dist/sdk.js.map | 1 - .../@sentry/node/dist/stacktrace.d.ts | 24 - .../@sentry/node/dist/stacktrace.d.ts.map | 1 - node_modules/@sentry/node/dist/stacktrace.js | 81 - .../@sentry/node/dist/stacktrace.js.map | 1 - .../@sentry/node/dist/transports/base.d.ts | 48 - .../node/dist/transports/base.d.ts.map | 1 - .../@sentry/node/dist/transports/base.js | 99 - .../@sentry/node/dist/transports/base.js.map | 1 - .../@sentry/node/dist/transports/http.d.ts | 13 - .../node/dist/transports/http.d.ts.map | 1 - .../@sentry/node/dist/transports/http.js | 32 - .../@sentry/node/dist/transports/http.js.map | 1 - .../@sentry/node/dist/transports/https.d.ts | 13 - .../node/dist/transports/https.d.ts.map | 1 - .../@sentry/node/dist/transports/https.js | 32 - .../@sentry/node/dist/transports/https.js.map | 1 - .../@sentry/node/dist/transports/index.d.ts | 4 - .../node/dist/transports/index.d.ts.map | 1 - .../@sentry/node/dist/transports/index.js | 8 - .../@sentry/node/dist/transports/index.js.map | 1 - node_modules/@sentry/node/dist/version.d.ts | 3 - .../@sentry/node/dist/version.d.ts.map | 1 - node_modules/@sentry/node/dist/version.js | 4 - node_modules/@sentry/node/dist/version.js.map | 1 - node_modules/@sentry/node/esm/backend.d.ts | 41 - .../@sentry/node/esm/backend.d.ts.map | 1 - node_modules/@sentry/node/esm/backend.js | 105 - node_modules/@sentry/node/esm/backend.js.map | 1 - node_modules/@sentry/node/esm/client.d.ts | 21 - node_modules/@sentry/node/esm/client.d.ts.map | 1 - node_modules/@sentry/node/esm/client.js | 186 +- node_modules/@sentry/node/esm/client.js.map | 2 +- node_modules/@sentry/node/esm/handlers.d.ts | 71 - .../@sentry/node/esm/handlers.d.ts.map | 1 - node_modules/@sentry/node/esm/handlers.js | 496 +- node_modules/@sentry/node/esm/handlers.js.map | 2 +- node_modules/@sentry/node/esm/index.d.ts | 22 - node_modules/@sentry/node/esm/index.d.ts.map | 1 - node_modules/@sentry/node/esm/index.js | 47 +- node_modules/@sentry/node/esm/index.js.map | 2 +- .../node/esm/integrations/console.d.ts | 17 - .../node/esm/integrations/console.d.ts.map | 1 - .../@sentry/node/esm/integrations/console.js | 115 +- .../node/esm/integrations/console.js.map | 2 +- .../@sentry/node/esm/integrations/http.d.ts | 32 - .../node/esm/integrations/http.d.ts.map | 1 - .../@sentry/node/esm/integrations/http.js | 373 +- .../@sentry/node/esm/integrations/http.js.map | 2 +- .../@sentry/node/esm/integrations/index.d.ts | 7 - .../node/esm/integrations/index.d.ts.map | 1 - .../@sentry/node/esm/integrations/index.js | 18 +- .../node/esm/integrations/index.js.map | 2 +- .../node/esm/integrations/linkederrors.d.ts | 40 - .../esm/integrations/linkederrors.d.ts.map | 1 - .../node/esm/integrations/linkederrors.js | 180 +- .../node/esm/integrations/linkederrors.js.map | 2 +- .../node/esm/integrations/modules.d.ts | 19 - .../node/esm/integrations/modules.d.ts.map | 1 - .../@sentry/node/esm/integrations/modules.js | 167 +- .../node/esm/integrations/modules.js.map | 2 +- .../esm/integrations/onuncaughtexception.d.ts | 37 - .../integrations/onuncaughtexception.d.ts.map | 1 - .../esm/integrations/onuncaughtexception.js | 251 +- .../integrations/onuncaughtexception.js.map | 2 +- .../integrations/onunhandledrejection.d.ts | 40 - .../onunhandledrejection.d.ts.map | 1 - .../esm/integrations/onunhandledrejection.js | 153 +- .../integrations/onunhandledrejection.js.map | 2 +- node_modules/@sentry/node/esm/parsers.d.ts | 29 - .../@sentry/node/esm/parsers.d.ts.map | 1 - node_modules/@sentry/node/esm/parsers.js | 234 - node_modules/@sentry/node/esm/parsers.js.map | 1 - node_modules/@sentry/node/esm/sdk.d.ts | 81 - node_modules/@sentry/node/esm/sdk.d.ts.map | 1 - node_modules/@sentry/node/esm/sdk.js | 276 +- node_modules/@sentry/node/esm/sdk.js.map | 2 +- node_modules/@sentry/node/esm/stacktrace.d.ts | 24 - .../@sentry/node/esm/stacktrace.d.ts.map | 1 - node_modules/@sentry/node/esm/stacktrace.js | 79 - .../@sentry/node/esm/stacktrace.js.map | 1 - .../@sentry/node/esm/transports/base.d.ts | 48 - .../@sentry/node/esm/transports/base.d.ts.map | 1 - .../@sentry/node/esm/transports/base.js | 98 - .../@sentry/node/esm/transports/base.js.map | 1 - .../@sentry/node/esm/transports/http.d.ts | 13 - .../@sentry/node/esm/transports/http.d.ts.map | 1 - .../@sentry/node/esm/transports/http.js | 182 +- .../@sentry/node/esm/transports/http.js.map | 2 +- .../@sentry/node/esm/transports/https.d.ts | 13 - .../node/esm/transports/https.d.ts.map | 1 - .../@sentry/node/esm/transports/https.js | 31 - .../@sentry/node/esm/transports/https.js.map | 1 - .../@sentry/node/esm/transports/index.d.ts | 4 - .../node/esm/transports/index.d.ts.map | 1 - .../@sentry/node/esm/transports/index.js | 8 +- .../@sentry/node/esm/transports/index.js.map | 2 +- node_modules/@sentry/node/esm/version.d.ts | 3 - .../@sentry/node/esm/version.d.ts.map | 1 - node_modules/@sentry/node/esm/version.js | 3 - node_modules/@sentry/node/esm/version.js.map | 1 - node_modules/@sentry/node/package.json | 106 +- node_modules/@sentry/types/LICENSE | 37 +- node_modules/@sentry/types/README.md | 6 +- .../@sentry/types/dist/breadcrumb.d.ts | 18 - .../@sentry/types/dist/breadcrumb.d.ts.map | 1 - node_modules/@sentry/types/dist/breadcrumb.js | 2 - .../@sentry/types/dist/breadcrumb.js.map | 1 - node_modules/@sentry/types/dist/client.d.ts | 66 - .../@sentry/types/dist/client.d.ts.map | 1 - node_modules/@sentry/types/dist/client.js | 2 - node_modules/@sentry/types/dist/client.js.map | 1 - node_modules/@sentry/types/dist/dsn.d.ts | 35 - node_modules/@sentry/types/dist/dsn.d.ts.map | 1 - node_modules/@sentry/types/dist/dsn.js | 2 - node_modules/@sentry/types/dist/dsn.js.map | 1 - node_modules/@sentry/types/dist/error.d.ts | 7 - .../@sentry/types/dist/error.d.ts.map | 1 - node_modules/@sentry/types/dist/error.js | 2 - node_modules/@sentry/types/dist/error.js.map | 1 - node_modules/@sentry/types/dist/event.d.ts | 56 - .../@sentry/types/dist/event.d.ts.map | 1 - node_modules/@sentry/types/dist/event.js | 2 - node_modules/@sentry/types/dist/event.js.map | 1 - .../@sentry/types/dist/eventprocessor.d.ts | 9 - .../types/dist/eventprocessor.d.ts.map | 1 - .../@sentry/types/dist/eventprocessor.js | 2 - .../@sentry/types/dist/eventprocessor.js.map | 1 - .../@sentry/types/dist/exception.d.ts | 12 - .../@sentry/types/dist/exception.d.ts.map | 1 - node_modules/@sentry/types/dist/exception.js | 2 - .../@sentry/types/dist/exception.js.map | 1 - node_modules/@sentry/types/dist/hub.d.ts | 170 - node_modules/@sentry/types/dist/hub.d.ts.map | 1 - node_modules/@sentry/types/dist/hub.js | 2 - node_modules/@sentry/types/dist/hub.js.map | 1 - node_modules/@sentry/types/dist/index.d.ts | 27 - .../@sentry/types/dist/index.d.ts.map | 1 - node_modules/@sentry/types/dist/index.js | 10 - node_modules/@sentry/types/dist/index.js.map | 1 - .../@sentry/types/dist/integration.d.ts | 23 - .../@sentry/types/dist/integration.d.ts.map | 1 - .../@sentry/types/dist/integration.js | 2 - .../@sentry/types/dist/integration.js.map | 1 - node_modules/@sentry/types/dist/loglevel.d.ts | 12 - .../@sentry/types/dist/loglevel.d.ts.map | 1 - node_modules/@sentry/types/dist/loglevel.js | 14 - .../@sentry/types/dist/loglevel.js.map | 1 - .../@sentry/types/dist/mechanism.d.ts | 10 - .../@sentry/types/dist/mechanism.d.ts.map | 1 - node_modules/@sentry/types/dist/mechanism.js | 2 - .../@sentry/types/dist/mechanism.js.map | 1 - node_modules/@sentry/types/dist/options.d.ts | 111 - .../@sentry/types/dist/options.d.ts.map | 1 - node_modules/@sentry/types/dist/options.js | 2 - .../@sentry/types/dist/options.js.map | 1 - node_modules/@sentry/types/dist/package.d.ts | 6 - .../@sentry/types/dist/package.d.ts.map | 1 - node_modules/@sentry/types/dist/package.js | 2 - .../@sentry/types/dist/package.js.map | 1 - node_modules/@sentry/types/dist/request.d.ts | 17 - .../@sentry/types/dist/request.d.ts.map | 1 - node_modules/@sentry/types/dist/request.js | 2 - .../@sentry/types/dist/request.js.map | 1 - node_modules/@sentry/types/dist/response.d.ts | 9 - .../@sentry/types/dist/response.d.ts.map | 1 - node_modules/@sentry/types/dist/response.js | 2 - .../@sentry/types/dist/response.js.map | 1 - node_modules/@sentry/types/dist/scope.d.ts | 86 - .../@sentry/types/dist/scope.d.ts.map | 1 - node_modules/@sentry/types/dist/scope.js | 2 - node_modules/@sentry/types/dist/scope.js.map | 1 - node_modules/@sentry/types/dist/sdkinfo.d.ts | 9 - .../@sentry/types/dist/sdkinfo.d.ts.map | 1 - node_modules/@sentry/types/dist/sdkinfo.js | 2 - .../@sentry/types/dist/sdkinfo.js.map | 1 - node_modules/@sentry/types/dist/severity.d.ts | 27 - .../@sentry/types/dist/severity.d.ts.map | 1 - node_modules/@sentry/types/dist/severity.js | 51 - .../@sentry/types/dist/severity.js.map | 1 - node_modules/@sentry/types/dist/span.d.ts | 131 - node_modules/@sentry/types/dist/span.d.ts.map | 1 - node_modules/@sentry/types/dist/span.js | 87 - node_modules/@sentry/types/dist/span.js.map | 1 - .../@sentry/types/dist/stackframe.d.ts | 18 - .../@sentry/types/dist/stackframe.d.ts.map | 1 - node_modules/@sentry/types/dist/stackframe.js | 2 - .../@sentry/types/dist/stackframe.js.map | 1 - .../@sentry/types/dist/stacktrace.d.ts | 7 - .../@sentry/types/dist/stacktrace.d.ts.map | 1 - node_modules/@sentry/types/dist/stacktrace.js | 2 - .../@sentry/types/dist/stacktrace.js.map | 1 - node_modules/@sentry/types/dist/status.d.ts | 25 - .../@sentry/types/dist/status.d.ts.map | 1 - node_modules/@sentry/types/dist/status.js | 44 - node_modules/@sentry/types/dist/status.js.map | 1 - node_modules/@sentry/types/dist/thread.d.ts | 10 - .../@sentry/types/dist/thread.d.ts.map | 1 - node_modules/@sentry/types/dist/thread.js | 2 - node_modules/@sentry/types/dist/thread.js.map | 1 - .../@sentry/types/dist/transport.d.ts | 36 - .../@sentry/types/dist/transport.d.ts.map | 1 - node_modules/@sentry/types/dist/transport.js | 2 - .../@sentry/types/dist/transport.js.map | 1 - node_modules/@sentry/types/dist/user.d.ts | 9 - node_modules/@sentry/types/dist/user.d.ts.map | 1 - node_modules/@sentry/types/dist/user.js | 2 - node_modules/@sentry/types/dist/user.js.map | 1 - .../@sentry/types/dist/wrappedfunction.d.ts | 8 - .../types/dist/wrappedfunction.d.ts.map | 1 - .../@sentry/types/dist/wrappedfunction.js | 2 - .../@sentry/types/dist/wrappedfunction.js.map | 1 - .../@sentry/types/esm/breadcrumb.d.ts | 18 - .../@sentry/types/esm/breadcrumb.d.ts.map | 1 - node_modules/@sentry/types/esm/breadcrumb.js | 1 - .../@sentry/types/esm/breadcrumb.js.map | 1 - node_modules/@sentry/types/esm/client.d.ts | 66 - .../@sentry/types/esm/client.d.ts.map | 1 - node_modules/@sentry/types/esm/client.js | 1 - node_modules/@sentry/types/esm/client.js.map | 1 - node_modules/@sentry/types/esm/dsn.d.ts | 35 - node_modules/@sentry/types/esm/dsn.d.ts.map | 1 - node_modules/@sentry/types/esm/dsn.js | 1 - node_modules/@sentry/types/esm/dsn.js.map | 1 - node_modules/@sentry/types/esm/error.d.ts | 7 - node_modules/@sentry/types/esm/error.d.ts.map | 1 - node_modules/@sentry/types/esm/error.js | 1 - node_modules/@sentry/types/esm/error.js.map | 1 - node_modules/@sentry/types/esm/event.d.ts | 56 - node_modules/@sentry/types/esm/event.d.ts.map | 1 - node_modules/@sentry/types/esm/event.js | 1 - node_modules/@sentry/types/esm/event.js.map | 1 - .../@sentry/types/esm/eventprocessor.d.ts | 9 - .../@sentry/types/esm/eventprocessor.d.ts.map | 1 - .../@sentry/types/esm/eventprocessor.js | 1 - .../@sentry/types/esm/eventprocessor.js.map | 1 - node_modules/@sentry/types/esm/exception.d.ts | 12 - .../@sentry/types/esm/exception.d.ts.map | 1 - node_modules/@sentry/types/esm/exception.js | 1 - .../@sentry/types/esm/exception.js.map | 1 - node_modules/@sentry/types/esm/hub.d.ts | 170 - node_modules/@sentry/types/esm/hub.d.ts.map | 1 - node_modules/@sentry/types/esm/hub.js | 1 - node_modules/@sentry/types/esm/hub.js.map | 1 - node_modules/@sentry/types/esm/index.d.ts | 27 - node_modules/@sentry/types/esm/index.d.ts.map | 1 - node_modules/@sentry/types/esm/index.js | 60 +- node_modules/@sentry/types/esm/index.js.map | 2 +- .../@sentry/types/esm/integration.d.ts | 23 - .../@sentry/types/esm/integration.d.ts.map | 1 - node_modules/@sentry/types/esm/integration.js | 1 - .../@sentry/types/esm/integration.js.map | 1 - node_modules/@sentry/types/esm/loglevel.d.ts | 12 - .../@sentry/types/esm/loglevel.d.ts.map | 1 - node_modules/@sentry/types/esm/loglevel.js | 13 - .../@sentry/types/esm/loglevel.js.map | 1 - node_modules/@sentry/types/esm/mechanism.d.ts | 10 - .../@sentry/types/esm/mechanism.d.ts.map | 1 - node_modules/@sentry/types/esm/mechanism.js | 1 - .../@sentry/types/esm/mechanism.js.map | 1 - node_modules/@sentry/types/esm/options.d.ts | 111 - .../@sentry/types/esm/options.d.ts.map | 1 - node_modules/@sentry/types/esm/options.js | 1 - node_modules/@sentry/types/esm/options.js.map | 1 - node_modules/@sentry/types/esm/package.d.ts | 6 - .../@sentry/types/esm/package.d.ts.map | 1 - node_modules/@sentry/types/esm/package.js | 1 - node_modules/@sentry/types/esm/package.js.map | 1 - node_modules/@sentry/types/esm/request.d.ts | 17 - .../@sentry/types/esm/request.d.ts.map | 1 - node_modules/@sentry/types/esm/request.js | 1 - node_modules/@sentry/types/esm/request.js.map | 1 - node_modules/@sentry/types/esm/response.d.ts | 9 - .../@sentry/types/esm/response.d.ts.map | 1 - node_modules/@sentry/types/esm/response.js | 1 - .../@sentry/types/esm/response.js.map | 1 - node_modules/@sentry/types/esm/scope.d.ts | 86 - node_modules/@sentry/types/esm/scope.d.ts.map | 1 - node_modules/@sentry/types/esm/scope.js | 1 - node_modules/@sentry/types/esm/scope.js.map | 1 - node_modules/@sentry/types/esm/sdkinfo.d.ts | 9 - .../@sentry/types/esm/sdkinfo.d.ts.map | 1 - node_modules/@sentry/types/esm/sdkinfo.js | 1 - node_modules/@sentry/types/esm/sdkinfo.js.map | 1 - node_modules/@sentry/types/esm/severity.d.ts | 27 - .../@sentry/types/esm/severity.d.ts.map | 1 - node_modules/@sentry/types/esm/severity.js | 50 - .../@sentry/types/esm/severity.js.map | 1 - node_modules/@sentry/types/esm/span.d.ts | 131 - node_modules/@sentry/types/esm/span.d.ts.map | 1 - node_modules/@sentry/types/esm/span.js | 86 - node_modules/@sentry/types/esm/span.js.map | 1 - .../@sentry/types/esm/stackframe.d.ts | 18 - .../@sentry/types/esm/stackframe.d.ts.map | 1 - node_modules/@sentry/types/esm/stackframe.js | 1 - .../@sentry/types/esm/stackframe.js.map | 1 - .../@sentry/types/esm/stacktrace.d.ts | 7 - .../@sentry/types/esm/stacktrace.d.ts.map | 1 - node_modules/@sentry/types/esm/stacktrace.js | 1 - .../@sentry/types/esm/stacktrace.js.map | 1 - node_modules/@sentry/types/esm/status.d.ts | 25 - .../@sentry/types/esm/status.d.ts.map | 1 - node_modules/@sentry/types/esm/status.js | 43 - node_modules/@sentry/types/esm/status.js.map | 1 - node_modules/@sentry/types/esm/thread.d.ts | 10 - .../@sentry/types/esm/thread.d.ts.map | 1 - node_modules/@sentry/types/esm/thread.js | 1 - node_modules/@sentry/types/esm/thread.js.map | 1 - node_modules/@sentry/types/esm/transport.d.ts | 36 - .../@sentry/types/esm/transport.d.ts.map | 1 - node_modules/@sentry/types/esm/transport.js | 1 - .../@sentry/types/esm/transport.js.map | 1 - node_modules/@sentry/types/esm/user.d.ts | 9 - node_modules/@sentry/types/esm/user.d.ts.map | 1 - node_modules/@sentry/types/esm/user.js | 1 - node_modules/@sentry/types/esm/user.js.map | 1 - .../@sentry/types/esm/wrappedfunction.d.ts | 8 - .../types/esm/wrappedfunction.d.ts.map | 1 - .../@sentry/types/esm/wrappedfunction.js | 1 - .../@sentry/types/esm/wrappedfunction.js.map | 1 - node_modules/@sentry/types/package.json | 64 +- node_modules/@sentry/utils/LICENSE | 37 +- node_modules/@sentry/utils/README.md | 12 +- node_modules/@sentry/utils/dist/async.d.ts | 6 - node_modules/@sentry/utils/dist/async.js | 13 - node_modules/@sentry/utils/dist/async.js.map | 1 - node_modules/@sentry/utils/dist/dsn.d.ts | 37 - node_modules/@sentry/utils/dist/dsn.js | 80 - node_modules/@sentry/utils/dist/dsn.js.map | 1 - node_modules/@sentry/utils/dist/error.d.ts | 8 - node_modules/@sentry/utils/dist/error.js | 19 - node_modules/@sentry/utils/dist/error.js.map | 1 - node_modules/@sentry/utils/dist/index.d.ts | 15 - node_modules/@sentry/utils/dist/index.js | 17 - node_modules/@sentry/utils/dist/index.js.map | 1 - .../@sentry/utils/dist/instrument.d.ts | 15 - node_modules/@sentry/utils/dist/instrument.js | 442 -- .../@sentry/utils/dist/instrument.js.map | 1 - node_modules/@sentry/utils/dist/is.d.ts | 103 - node_modules/@sentry/utils/dist/is.js | 163 - node_modules/@sentry/utils/dist/is.js.map | 1 - node_modules/@sentry/utils/dist/logger.d.ts | 20 - node_modules/@sentry/utils/dist/logger.js | 66 - node_modules/@sentry/utils/dist/logger.js.map | 1 - node_modules/@sentry/utils/dist/memo.d.ts | 21 - node_modules/@sentry/utils/dist/memo.js | 54 - node_modules/@sentry/utils/dist/memo.js.map | 1 - node_modules/@sentry/utils/dist/misc.d.ts | 129 - node_modules/@sentry/utils/dist/misc.js | 407 -- node_modules/@sentry/utils/dist/misc.js.map | 1 - node_modules/@sentry/utils/dist/object.d.ts | 59 - node_modules/@sentry/utils/dist/object.js | 325 - node_modules/@sentry/utils/dist/object.js.map | 1 - node_modules/@sentry/utils/dist/path.d.ts | 15 - node_modules/@sentry/utils/dist/path.js | 166 - node_modules/@sentry/utils/dist/path.js.map | 1 - node_modules/@sentry/utils/dist/polyfill.d.ts | 2 - node_modules/@sentry/utils/dist/polyfill.js | 23 - .../@sentry/utils/dist/polyfill.js.map | 1 - .../@sentry/utils/dist/promisebuffer.d.ts | 37 - .../@sentry/utils/dist/promisebuffer.js | 84 - .../@sentry/utils/dist/promisebuffer.js.map | 1 - node_modules/@sentry/utils/dist/string.d.ts | 31 - node_modules/@sentry/utils/dist/string.js | 96 - node_modules/@sentry/utils/dist/string.js.map | 1 - node_modules/@sentry/utils/dist/supports.d.ts | 57 - node_modules/@sentry/utils/dist/supports.js | 182 - .../@sentry/utils/dist/supports.js.map | 1 - .../@sentry/utils/dist/syncpromise.d.ts | 36 - .../@sentry/utils/dist/syncpromise.js | 194 - .../@sentry/utils/dist/syncpromise.js.map | 1 - node_modules/@sentry/utils/esm/async.d.ts | 6 - node_modules/@sentry/utils/esm/async.d.ts.map | 1 - node_modules/@sentry/utils/esm/async.js | 11 - node_modules/@sentry/utils/esm/async.js.map | 1 - node_modules/@sentry/utils/esm/dsn.d.ts | 37 - node_modules/@sentry/utils/esm/dsn.d.ts.map | 1 - node_modules/@sentry/utils/esm/dsn.js | 184 +- node_modules/@sentry/utils/esm/dsn.js.map | 2 +- node_modules/@sentry/utils/esm/error.d.ts | 8 - node_modules/@sentry/utils/esm/error.d.ts.map | 1 - node_modules/@sentry/utils/esm/error.js | 32 +- node_modules/@sentry/utils/esm/error.js.map | 2 +- node_modules/@sentry/utils/esm/index.d.ts | 15 - node_modules/@sentry/utils/esm/index.d.ts.map | 1 - node_modules/@sentry/utils/esm/index.js | 44 +- node_modules/@sentry/utils/esm/index.js.map | 2 +- .../@sentry/utils/esm/instrument.d.ts | 15 - .../@sentry/utils/esm/instrument.d.ts.map | 1 - node_modules/@sentry/utils/esm/instrument.js | 880 +-- .../@sentry/utils/esm/instrument.js.map | 2 +- node_modules/@sentry/utils/esm/is.d.ts | 103 - node_modules/@sentry/utils/esm/is.d.ts.map | 1 - node_modules/@sentry/utils/esm/is.js | 126 +- node_modules/@sentry/utils/esm/is.js.map | 2 +- node_modules/@sentry/utils/esm/logger.d.ts | 20 - .../@sentry/utils/esm/logger.d.ts.map | 1 - node_modules/@sentry/utils/esm/logger.js | 140 +- node_modules/@sentry/utils/esm/logger.js.map | 2 +- node_modules/@sentry/utils/esm/memo.d.ts | 21 - node_modules/@sentry/utils/esm/memo.d.ts.map | 1 - node_modules/@sentry/utils/esm/memo.js | 90 +- node_modules/@sentry/utils/esm/memo.js.map | 2 +- node_modules/@sentry/utils/esm/misc.d.ts | 129 - node_modules/@sentry/utils/esm/misc.d.ts.map | 1 - node_modules/@sentry/utils/esm/misc.js | 513 +- node_modules/@sentry/utils/esm/misc.js.map | 2 +- node_modules/@sentry/utils/esm/object.d.ts | 59 - .../@sentry/utils/esm/object.d.ts.map | 1 - node_modules/@sentry/utils/esm/object.js | 510 +- node_modules/@sentry/utils/esm/object.js.map | 2 +- node_modules/@sentry/utils/esm/path.d.ts | 15 - node_modules/@sentry/utils/esm/path.d.ts.map | 1 - node_modules/@sentry/utils/esm/path.js | 264 +- node_modules/@sentry/utils/esm/path.js.map | 2 +- node_modules/@sentry/utils/esm/polyfill.d.ts | 2 - .../@sentry/utils/esm/polyfill.d.ts.map | 1 - node_modules/@sentry/utils/esm/polyfill.js | 22 - .../@sentry/utils/esm/polyfill.js.map | 1 - .../@sentry/utils/esm/promisebuffer.d.ts | 37 - .../@sentry/utils/esm/promisebuffer.d.ts.map | 1 - .../@sentry/utils/esm/promisebuffer.js | 181 +- .../@sentry/utils/esm/promisebuffer.js.map | 2 +- node_modules/@sentry/utils/esm/string.d.ts | 31 - .../@sentry/utils/esm/string.d.ts.map | 1 - node_modules/@sentry/utils/esm/string.js | 182 +- node_modules/@sentry/utils/esm/string.js.map | 2 +- node_modules/@sentry/utils/esm/supports.d.ts | 57 - .../@sentry/utils/esm/supports.d.ts.map | 1 - node_modules/@sentry/utils/esm/supports.js | 230 +- .../@sentry/utils/esm/supports.js.map | 2 +- .../@sentry/utils/esm/syncpromise.d.ts | 36 - .../@sentry/utils/esm/syncpromise.d.ts.map | 1 - node_modules/@sentry/utils/esm/syncpromise.js | 364 +- .../@sentry/utils/esm/syncpromise.js.map | 2 +- node_modules/@sentry/utils/package.json | 92 +- node_modules/agent-base/README.md | 2 +- node_modules/agent-base/dist/src/index.d.ts | 49 +- node_modules/agent-base/dist/src/index.js | 123 +- node_modules/agent-base/dist/src/index.js.map | 2 +- .../agent-base/dist/src/promisify.js.map | 2 +- node_modules/agent-base/package.json | 42 +- node_modules/cookie/HISTORY.md | 16 + node_modules/cookie/README.md | 146 +- node_modules/cookie/index.js | 31 +- node_modules/cookie/package.json | 50 +- node_modules/https-proxy-agent/.editorconfig | 37 - node_modules/https-proxy-agent/.eslintrc.js | 86 - .../.github/workflows/test.yml | 46 - node_modules/https-proxy-agent/index.d.ts | 22 - node_modules/https-proxy-agent/index.js | 239 - .../node_modules/debug/CHANGELOG.md | 395 -- .../node_modules/debug/LICENSE | 19 +- .../node_modules/debug/README.md | 28 +- .../node_modules/debug/dist/debug.js | 912 --- .../node_modules/debug/package.json | 82 +- .../node_modules/debug/src/browser.js | 25 +- .../node_modules/debug/src/common.js | 68 +- .../node_modules/debug/src/node.js | 8 +- .../node_modules/ms/package.json | 17 +- node_modules/https-proxy-agent/package.json | 65 +- node_modules/lru_map/package.json | 27 +- node_modules/node-fetch/CHANGELOG.md | 266 - node_modules/node-fetch/README.md | 96 +- node_modules/node-fetch/browser.js | 14 +- node_modules/node-fetch/lib/index.es.js | 159 +- node_modules/node-fetch/lib/index.js | 159 +- node_modules/node-fetch/lib/index.mjs | 159 +- node_modules/node-fetch/package.json | 63 +- node_modules/tslib/package.json | 8 +- 881 files changed, 5775 insertions(+), 40056 deletions(-) delete mode 100644 node_modules/@sentry/apm/README.md delete mode 100644 node_modules/@sentry/apm/dist/hubextensions.d.ts delete mode 100644 node_modules/@sentry/apm/dist/hubextensions.d.ts.map delete mode 100644 node_modules/@sentry/apm/dist/hubextensions.js delete mode 100644 node_modules/@sentry/apm/dist/hubextensions.js.map delete mode 100644 node_modules/@sentry/apm/dist/index.bundle.d.ts delete mode 100644 node_modules/@sentry/apm/dist/index.bundle.d.ts.map delete mode 100644 node_modules/@sentry/apm/dist/index.bundle.js delete mode 100644 node_modules/@sentry/apm/dist/index.bundle.js.map delete mode 100644 node_modules/@sentry/apm/dist/index.d.ts delete mode 100644 node_modules/@sentry/apm/dist/index.d.ts.map delete mode 100644 node_modules/@sentry/apm/dist/index.js delete mode 100644 node_modules/@sentry/apm/dist/index.js.map delete mode 100644 node_modules/@sentry/apm/dist/integrations/express.d.ts delete mode 100644 node_modules/@sentry/apm/dist/integrations/express.d.ts.map delete mode 100644 node_modules/@sentry/apm/dist/integrations/express.js delete mode 100644 node_modules/@sentry/apm/dist/integrations/express.js.map delete mode 100644 node_modules/@sentry/apm/dist/integrations/index.d.ts delete mode 100644 node_modules/@sentry/apm/dist/integrations/index.d.ts.map delete mode 100644 node_modules/@sentry/apm/dist/integrations/index.js delete mode 100644 node_modules/@sentry/apm/dist/integrations/index.js.map delete mode 100644 node_modules/@sentry/apm/dist/integrations/tracing.d.ts delete mode 100644 node_modules/@sentry/apm/dist/integrations/tracing.d.ts.map delete mode 100644 node_modules/@sentry/apm/dist/integrations/tracing.js delete mode 100644 node_modules/@sentry/apm/dist/integrations/tracing.js.map delete mode 100644 node_modules/@sentry/apm/dist/span.d.ts delete mode 100644 node_modules/@sentry/apm/dist/span.d.ts.map delete mode 100644 node_modules/@sentry/apm/dist/span.js delete mode 100644 node_modules/@sentry/apm/dist/span.js.map delete mode 100644 node_modules/@sentry/apm/esm/hubextensions.d.ts delete mode 100644 node_modules/@sentry/apm/esm/hubextensions.d.ts.map delete mode 100644 node_modules/@sentry/apm/esm/hubextensions.js delete mode 100644 node_modules/@sentry/apm/esm/hubextensions.js.map delete mode 100644 node_modules/@sentry/apm/esm/index.bundle.d.ts delete mode 100644 node_modules/@sentry/apm/esm/index.bundle.d.ts.map delete mode 100644 node_modules/@sentry/apm/esm/index.bundle.js delete mode 100644 node_modules/@sentry/apm/esm/index.bundle.js.map delete mode 100644 node_modules/@sentry/apm/esm/index.d.ts delete mode 100644 node_modules/@sentry/apm/esm/index.d.ts.map delete mode 100644 node_modules/@sentry/apm/esm/index.js delete mode 100644 node_modules/@sentry/apm/esm/index.js.map delete mode 100644 node_modules/@sentry/apm/esm/integrations/express.d.ts delete mode 100644 node_modules/@sentry/apm/esm/integrations/express.d.ts.map delete mode 100644 node_modules/@sentry/apm/esm/integrations/express.js delete mode 100644 node_modules/@sentry/apm/esm/integrations/express.js.map delete mode 100644 node_modules/@sentry/apm/esm/integrations/index.d.ts delete mode 100644 node_modules/@sentry/apm/esm/integrations/index.d.ts.map delete mode 100644 node_modules/@sentry/apm/esm/integrations/index.js delete mode 100644 node_modules/@sentry/apm/esm/integrations/index.js.map delete mode 100644 node_modules/@sentry/apm/esm/integrations/tracing.d.ts delete mode 100644 node_modules/@sentry/apm/esm/integrations/tracing.d.ts.map delete mode 100644 node_modules/@sentry/apm/esm/integrations/tracing.js delete mode 100644 node_modules/@sentry/apm/esm/integrations/tracing.js.map delete mode 100644 node_modules/@sentry/apm/esm/span.d.ts delete mode 100644 node_modules/@sentry/apm/esm/span.d.ts.map delete mode 100644 node_modules/@sentry/apm/esm/span.js delete mode 100644 node_modules/@sentry/apm/esm/span.js.map delete mode 100644 node_modules/@sentry/apm/package.json delete mode 100644 node_modules/@sentry/browser/LICENSE delete mode 100644 node_modules/@sentry/browser/README.md delete mode 100644 node_modules/@sentry/browser/build/bundle.es6.js delete mode 100644 node_modules/@sentry/browser/build/bundle.es6.js.map delete mode 100644 node_modules/@sentry/browser/build/bundle.es6.min.js delete mode 100644 node_modules/@sentry/browser/build/bundle.es6.min.js.map delete mode 100644 node_modules/@sentry/browser/build/bundle.js delete mode 100644 node_modules/@sentry/browser/build/bundle.js.map delete mode 100644 node_modules/@sentry/browser/build/bundle.min.js delete mode 100644 node_modules/@sentry/browser/build/bundle.min.js.map delete mode 100644 node_modules/@sentry/browser/dist/backend.d.ts delete mode 100644 node_modules/@sentry/browser/dist/backend.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/backend.js delete mode 100644 node_modules/@sentry/browser/dist/backend.js.map delete mode 100644 node_modules/@sentry/browser/dist/client.d.ts delete mode 100644 node_modules/@sentry/browser/dist/client.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/client.js delete mode 100644 node_modules/@sentry/browser/dist/client.js.map delete mode 100644 node_modules/@sentry/browser/dist/eventbuilder.d.ts delete mode 100644 node_modules/@sentry/browser/dist/eventbuilder.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/eventbuilder.js delete mode 100644 node_modules/@sentry/browser/dist/eventbuilder.js.map delete mode 100644 node_modules/@sentry/browser/dist/exports.d.ts delete mode 100644 node_modules/@sentry/browser/dist/exports.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/exports.js delete mode 100644 node_modules/@sentry/browser/dist/exports.js.map delete mode 100644 node_modules/@sentry/browser/dist/helpers.d.ts delete mode 100644 node_modules/@sentry/browser/dist/helpers.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/helpers.js delete mode 100644 node_modules/@sentry/browser/dist/helpers.js.map delete mode 100644 node_modules/@sentry/browser/dist/index.d.ts delete mode 100644 node_modules/@sentry/browser/dist/index.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/index.js delete mode 100644 node_modules/@sentry/browser/dist/index.js.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/breadcrumbs.d.ts delete mode 100644 node_modules/@sentry/browser/dist/integrations/breadcrumbs.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/breadcrumbs.js delete mode 100644 node_modules/@sentry/browser/dist/integrations/breadcrumbs.js.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/globalhandlers.d.ts delete mode 100644 node_modules/@sentry/browser/dist/integrations/globalhandlers.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/globalhandlers.js delete mode 100644 node_modules/@sentry/browser/dist/integrations/globalhandlers.js.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/index.d.ts delete mode 100644 node_modules/@sentry/browser/dist/integrations/index.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/index.js delete mode 100644 node_modules/@sentry/browser/dist/integrations/index.js.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/linkederrors.d.ts delete mode 100644 node_modules/@sentry/browser/dist/integrations/linkederrors.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/linkederrors.js delete mode 100644 node_modules/@sentry/browser/dist/integrations/linkederrors.js.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/trycatch.d.ts delete mode 100644 node_modules/@sentry/browser/dist/integrations/trycatch.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/trycatch.js delete mode 100644 node_modules/@sentry/browser/dist/integrations/trycatch.js.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/useragent.d.ts delete mode 100644 node_modules/@sentry/browser/dist/integrations/useragent.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/integrations/useragent.js delete mode 100644 node_modules/@sentry/browser/dist/integrations/useragent.js.map delete mode 100644 node_modules/@sentry/browser/dist/parsers.d.ts delete mode 100644 node_modules/@sentry/browser/dist/parsers.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/parsers.js delete mode 100644 node_modules/@sentry/browser/dist/parsers.js.map delete mode 100644 node_modules/@sentry/browser/dist/sdk.d.ts delete mode 100644 node_modules/@sentry/browser/dist/sdk.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/sdk.js delete mode 100644 node_modules/@sentry/browser/dist/sdk.js.map delete mode 100644 node_modules/@sentry/browser/dist/tracekit.d.ts delete mode 100644 node_modules/@sentry/browser/dist/tracekit.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/tracekit.js delete mode 100644 node_modules/@sentry/browser/dist/tracekit.js.map delete mode 100644 node_modules/@sentry/browser/dist/transports/base.d.ts delete mode 100644 node_modules/@sentry/browser/dist/transports/base.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/transports/base.js delete mode 100644 node_modules/@sentry/browser/dist/transports/base.js.map delete mode 100644 node_modules/@sentry/browser/dist/transports/fetch.d.ts delete mode 100644 node_modules/@sentry/browser/dist/transports/fetch.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/transports/fetch.js delete mode 100644 node_modules/@sentry/browser/dist/transports/fetch.js.map delete mode 100644 node_modules/@sentry/browser/dist/transports/index.d.ts delete mode 100644 node_modules/@sentry/browser/dist/transports/index.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/transports/index.js delete mode 100644 node_modules/@sentry/browser/dist/transports/index.js.map delete mode 100644 node_modules/@sentry/browser/dist/transports/xhr.d.ts delete mode 100644 node_modules/@sentry/browser/dist/transports/xhr.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/transports/xhr.js delete mode 100644 node_modules/@sentry/browser/dist/transports/xhr.js.map delete mode 100644 node_modules/@sentry/browser/dist/version.d.ts delete mode 100644 node_modules/@sentry/browser/dist/version.d.ts.map delete mode 100644 node_modules/@sentry/browser/dist/version.js delete mode 100644 node_modules/@sentry/browser/dist/version.js.map delete mode 100644 node_modules/@sentry/browser/esm/backend.d.ts delete mode 100644 node_modules/@sentry/browser/esm/backend.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/backend.js delete mode 100644 node_modules/@sentry/browser/esm/backend.js.map delete mode 100644 node_modules/@sentry/browser/esm/client.d.ts delete mode 100644 node_modules/@sentry/browser/esm/client.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/client.js delete mode 100644 node_modules/@sentry/browser/esm/client.js.map delete mode 100644 node_modules/@sentry/browser/esm/eventbuilder.d.ts delete mode 100644 node_modules/@sentry/browser/esm/eventbuilder.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/eventbuilder.js delete mode 100644 node_modules/@sentry/browser/esm/eventbuilder.js.map delete mode 100644 node_modules/@sentry/browser/esm/exports.d.ts delete mode 100644 node_modules/@sentry/browser/esm/exports.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/exports.js delete mode 100644 node_modules/@sentry/browser/esm/exports.js.map delete mode 100644 node_modules/@sentry/browser/esm/helpers.d.ts delete mode 100644 node_modules/@sentry/browser/esm/helpers.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/helpers.js delete mode 100644 node_modules/@sentry/browser/esm/helpers.js.map delete mode 100644 node_modules/@sentry/browser/esm/index.d.ts delete mode 100644 node_modules/@sentry/browser/esm/index.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/index.js delete mode 100644 node_modules/@sentry/browser/esm/index.js.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/breadcrumbs.d.ts delete mode 100644 node_modules/@sentry/browser/esm/integrations/breadcrumbs.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/breadcrumbs.js delete mode 100644 node_modules/@sentry/browser/esm/integrations/breadcrumbs.js.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/globalhandlers.d.ts delete mode 100644 node_modules/@sentry/browser/esm/integrations/globalhandlers.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/globalhandlers.js delete mode 100644 node_modules/@sentry/browser/esm/integrations/globalhandlers.js.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/index.d.ts delete mode 100644 node_modules/@sentry/browser/esm/integrations/index.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/index.js delete mode 100644 node_modules/@sentry/browser/esm/integrations/index.js.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/linkederrors.d.ts delete mode 100644 node_modules/@sentry/browser/esm/integrations/linkederrors.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/linkederrors.js delete mode 100644 node_modules/@sentry/browser/esm/integrations/linkederrors.js.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/trycatch.d.ts delete mode 100644 node_modules/@sentry/browser/esm/integrations/trycatch.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/trycatch.js delete mode 100644 node_modules/@sentry/browser/esm/integrations/trycatch.js.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/useragent.d.ts delete mode 100644 node_modules/@sentry/browser/esm/integrations/useragent.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/integrations/useragent.js delete mode 100644 node_modules/@sentry/browser/esm/integrations/useragent.js.map delete mode 100644 node_modules/@sentry/browser/esm/parsers.d.ts delete mode 100644 node_modules/@sentry/browser/esm/parsers.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/parsers.js delete mode 100644 node_modules/@sentry/browser/esm/parsers.js.map delete mode 100644 node_modules/@sentry/browser/esm/sdk.d.ts delete mode 100644 node_modules/@sentry/browser/esm/sdk.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/sdk.js delete mode 100644 node_modules/@sentry/browser/esm/sdk.js.map delete mode 100644 node_modules/@sentry/browser/esm/tracekit.d.ts delete mode 100644 node_modules/@sentry/browser/esm/tracekit.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/tracekit.js delete mode 100644 node_modules/@sentry/browser/esm/tracekit.js.map delete mode 100644 node_modules/@sentry/browser/esm/transports/base.d.ts delete mode 100644 node_modules/@sentry/browser/esm/transports/base.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/transports/base.js delete mode 100644 node_modules/@sentry/browser/esm/transports/base.js.map delete mode 100644 node_modules/@sentry/browser/esm/transports/fetch.d.ts delete mode 100644 node_modules/@sentry/browser/esm/transports/fetch.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/transports/fetch.js delete mode 100644 node_modules/@sentry/browser/esm/transports/fetch.js.map delete mode 100644 node_modules/@sentry/browser/esm/transports/index.d.ts delete mode 100644 node_modules/@sentry/browser/esm/transports/index.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/transports/index.js delete mode 100644 node_modules/@sentry/browser/esm/transports/index.js.map delete mode 100644 node_modules/@sentry/browser/esm/transports/xhr.d.ts delete mode 100644 node_modules/@sentry/browser/esm/transports/xhr.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/transports/xhr.js delete mode 100644 node_modules/@sentry/browser/esm/transports/xhr.js.map delete mode 100644 node_modules/@sentry/browser/esm/version.d.ts delete mode 100644 node_modules/@sentry/browser/esm/version.d.ts.map delete mode 100644 node_modules/@sentry/browser/esm/version.js delete mode 100644 node_modules/@sentry/browser/esm/version.js.map delete mode 100644 node_modules/@sentry/browser/package.json delete mode 100644 node_modules/@sentry/core/dist/api.d.ts delete mode 100644 node_modules/@sentry/core/dist/api.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/api.js delete mode 100644 node_modules/@sentry/core/dist/api.js.map delete mode 100644 node_modules/@sentry/core/dist/basebackend.d.ts delete mode 100644 node_modules/@sentry/core/dist/basebackend.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/basebackend.js delete mode 100644 node_modules/@sentry/core/dist/basebackend.js.map delete mode 100644 node_modules/@sentry/core/dist/baseclient.d.ts delete mode 100644 node_modules/@sentry/core/dist/baseclient.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/baseclient.js delete mode 100644 node_modules/@sentry/core/dist/baseclient.js.map delete mode 100644 node_modules/@sentry/core/dist/index.d.ts delete mode 100644 node_modules/@sentry/core/dist/index.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/index.js delete mode 100644 node_modules/@sentry/core/dist/index.js.map delete mode 100644 node_modules/@sentry/core/dist/integration.d.ts delete mode 100644 node_modules/@sentry/core/dist/integration.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/integration.js delete mode 100644 node_modules/@sentry/core/dist/integration.js.map delete mode 100644 node_modules/@sentry/core/dist/integrations/functiontostring.d.ts delete mode 100644 node_modules/@sentry/core/dist/integrations/functiontostring.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/integrations/functiontostring.js delete mode 100644 node_modules/@sentry/core/dist/integrations/functiontostring.js.map delete mode 100644 node_modules/@sentry/core/dist/integrations/inboundfilters.d.ts delete mode 100644 node_modules/@sentry/core/dist/integrations/inboundfilters.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/integrations/inboundfilters.js delete mode 100644 node_modules/@sentry/core/dist/integrations/inboundfilters.js.map delete mode 100644 node_modules/@sentry/core/dist/integrations/index.d.ts delete mode 100644 node_modules/@sentry/core/dist/integrations/index.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/integrations/index.js delete mode 100644 node_modules/@sentry/core/dist/integrations/index.js.map delete mode 100644 node_modules/@sentry/core/dist/sdk.d.ts delete mode 100644 node_modules/@sentry/core/dist/sdk.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/sdk.js delete mode 100644 node_modules/@sentry/core/dist/sdk.js.map delete mode 100644 node_modules/@sentry/core/dist/transports/noop.d.ts delete mode 100644 node_modules/@sentry/core/dist/transports/noop.d.ts.map delete mode 100644 node_modules/@sentry/core/dist/transports/noop.js delete mode 100644 node_modules/@sentry/core/dist/transports/noop.js.map delete mode 100644 node_modules/@sentry/core/esm/api.d.ts delete mode 100644 node_modules/@sentry/core/esm/api.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/basebackend.d.ts delete mode 100644 node_modules/@sentry/core/esm/basebackend.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/basebackend.js delete mode 100644 node_modules/@sentry/core/esm/basebackend.js.map delete mode 100644 node_modules/@sentry/core/esm/baseclient.d.ts delete mode 100644 node_modules/@sentry/core/esm/baseclient.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/index.d.ts delete mode 100644 node_modules/@sentry/core/esm/index.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/integration.d.ts delete mode 100644 node_modules/@sentry/core/esm/integration.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/integrations/functiontostring.d.ts delete mode 100644 node_modules/@sentry/core/esm/integrations/functiontostring.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/integrations/inboundfilters.d.ts delete mode 100644 node_modules/@sentry/core/esm/integrations/inboundfilters.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/integrations/index.d.ts delete mode 100644 node_modules/@sentry/core/esm/integrations/index.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/sdk.d.ts delete mode 100644 node_modules/@sentry/core/esm/sdk.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/transports/noop.d.ts delete mode 100644 node_modules/@sentry/core/esm/transports/noop.d.ts.map delete mode 100644 node_modules/@sentry/core/esm/transports/noop.js delete mode 100644 node_modules/@sentry/core/esm/transports/noop.js.map delete mode 100644 node_modules/@sentry/hub/LICENSE delete mode 100644 node_modules/@sentry/hub/README.md delete mode 100644 node_modules/@sentry/hub/dist/hub.d.ts delete mode 100644 node_modules/@sentry/hub/dist/hub.d.ts.map delete mode 100644 node_modules/@sentry/hub/dist/hub.js delete mode 100644 node_modules/@sentry/hub/dist/hub.js.map delete mode 100644 node_modules/@sentry/hub/dist/index.d.ts delete mode 100644 node_modules/@sentry/hub/dist/index.d.ts.map delete mode 100644 node_modules/@sentry/hub/dist/index.js delete mode 100644 node_modules/@sentry/hub/dist/index.js.map delete mode 100644 node_modules/@sentry/hub/dist/interfaces.d.ts delete mode 100644 node_modules/@sentry/hub/dist/interfaces.d.ts.map delete mode 100644 node_modules/@sentry/hub/dist/interfaces.js delete mode 100644 node_modules/@sentry/hub/dist/interfaces.js.map delete mode 100644 node_modules/@sentry/hub/dist/scope.d.ts delete mode 100644 node_modules/@sentry/hub/dist/scope.d.ts.map delete mode 100644 node_modules/@sentry/hub/dist/scope.js delete mode 100644 node_modules/@sentry/hub/dist/scope.js.map delete mode 100644 node_modules/@sentry/hub/esm/hub.d.ts delete mode 100644 node_modules/@sentry/hub/esm/hub.d.ts.map delete mode 100644 node_modules/@sentry/hub/esm/hub.js delete mode 100644 node_modules/@sentry/hub/esm/hub.js.map delete mode 100644 node_modules/@sentry/hub/esm/index.d.ts delete mode 100644 node_modules/@sentry/hub/esm/index.d.ts.map delete mode 100644 node_modules/@sentry/hub/esm/index.js delete mode 100644 node_modules/@sentry/hub/esm/index.js.map delete mode 100644 node_modules/@sentry/hub/esm/interfaces.d.ts delete mode 100644 node_modules/@sentry/hub/esm/interfaces.d.ts.map delete mode 100644 node_modules/@sentry/hub/esm/interfaces.js delete mode 100644 node_modules/@sentry/hub/esm/interfaces.js.map delete mode 100644 node_modules/@sentry/hub/esm/scope.d.ts delete mode 100644 node_modules/@sentry/hub/esm/scope.d.ts.map delete mode 100644 node_modules/@sentry/hub/esm/scope.js delete mode 100644 node_modules/@sentry/hub/esm/scope.js.map delete mode 100644 node_modules/@sentry/hub/package.json delete mode 100644 node_modules/@sentry/minimal/LICENSE delete mode 100644 node_modules/@sentry/minimal/README.md delete mode 100644 node_modules/@sentry/minimal/dist/index.d.ts delete mode 100644 node_modules/@sentry/minimal/dist/index.d.ts.map delete mode 100644 node_modules/@sentry/minimal/dist/index.js delete mode 100644 node_modules/@sentry/minimal/dist/index.js.map delete mode 100644 node_modules/@sentry/minimal/esm/index.d.ts delete mode 100644 node_modules/@sentry/minimal/esm/index.d.ts.map delete mode 100644 node_modules/@sentry/minimal/esm/index.js delete mode 100644 node_modules/@sentry/minimal/esm/index.js.map delete mode 100644 node_modules/@sentry/minimal/package.json delete mode 100644 node_modules/@sentry/node/dist/backend.d.ts delete mode 100644 node_modules/@sentry/node/dist/backend.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/backend.js delete mode 100644 node_modules/@sentry/node/dist/backend.js.map delete mode 100644 node_modules/@sentry/node/dist/client.d.ts delete mode 100644 node_modules/@sentry/node/dist/client.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/client.js delete mode 100644 node_modules/@sentry/node/dist/client.js.map delete mode 100644 node_modules/@sentry/node/dist/handlers.d.ts delete mode 100644 node_modules/@sentry/node/dist/handlers.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/handlers.js delete mode 100644 node_modules/@sentry/node/dist/handlers.js.map delete mode 100644 node_modules/@sentry/node/dist/index.d.ts delete mode 100644 node_modules/@sentry/node/dist/index.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/index.js delete mode 100644 node_modules/@sentry/node/dist/index.js.map delete mode 100644 node_modules/@sentry/node/dist/integrations/console.d.ts delete mode 100644 node_modules/@sentry/node/dist/integrations/console.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/integrations/console.js delete mode 100644 node_modules/@sentry/node/dist/integrations/console.js.map delete mode 100644 node_modules/@sentry/node/dist/integrations/http.d.ts delete mode 100644 node_modules/@sentry/node/dist/integrations/http.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/integrations/http.js delete mode 100644 node_modules/@sentry/node/dist/integrations/http.js.map delete mode 100644 node_modules/@sentry/node/dist/integrations/index.d.ts delete mode 100644 node_modules/@sentry/node/dist/integrations/index.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/integrations/index.js delete mode 100644 node_modules/@sentry/node/dist/integrations/index.js.map delete mode 100644 node_modules/@sentry/node/dist/integrations/linkederrors.d.ts delete mode 100644 node_modules/@sentry/node/dist/integrations/linkederrors.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/integrations/linkederrors.js delete mode 100644 node_modules/@sentry/node/dist/integrations/linkederrors.js.map delete mode 100644 node_modules/@sentry/node/dist/integrations/modules.d.ts delete mode 100644 node_modules/@sentry/node/dist/integrations/modules.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/integrations/modules.js delete mode 100644 node_modules/@sentry/node/dist/integrations/modules.js.map delete mode 100644 node_modules/@sentry/node/dist/integrations/onuncaughtexception.d.ts delete mode 100644 node_modules/@sentry/node/dist/integrations/onuncaughtexception.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/integrations/onuncaughtexception.js delete mode 100644 node_modules/@sentry/node/dist/integrations/onuncaughtexception.js.map delete mode 100644 node_modules/@sentry/node/dist/integrations/onunhandledrejection.d.ts delete mode 100644 node_modules/@sentry/node/dist/integrations/onunhandledrejection.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/integrations/onunhandledrejection.js delete mode 100644 node_modules/@sentry/node/dist/integrations/onunhandledrejection.js.map delete mode 100644 node_modules/@sentry/node/dist/parsers.d.ts delete mode 100644 node_modules/@sentry/node/dist/parsers.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/parsers.js delete mode 100644 node_modules/@sentry/node/dist/parsers.js.map delete mode 100644 node_modules/@sentry/node/dist/sdk.d.ts delete mode 100644 node_modules/@sentry/node/dist/sdk.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/sdk.js delete mode 100644 node_modules/@sentry/node/dist/sdk.js.map delete mode 100644 node_modules/@sentry/node/dist/stacktrace.d.ts delete mode 100644 node_modules/@sentry/node/dist/stacktrace.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/stacktrace.js delete mode 100644 node_modules/@sentry/node/dist/stacktrace.js.map delete mode 100644 node_modules/@sentry/node/dist/transports/base.d.ts delete mode 100644 node_modules/@sentry/node/dist/transports/base.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/transports/base.js delete mode 100644 node_modules/@sentry/node/dist/transports/base.js.map delete mode 100644 node_modules/@sentry/node/dist/transports/http.d.ts delete mode 100644 node_modules/@sentry/node/dist/transports/http.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/transports/http.js delete mode 100644 node_modules/@sentry/node/dist/transports/http.js.map delete mode 100644 node_modules/@sentry/node/dist/transports/https.d.ts delete mode 100644 node_modules/@sentry/node/dist/transports/https.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/transports/https.js delete mode 100644 node_modules/@sentry/node/dist/transports/https.js.map delete mode 100644 node_modules/@sentry/node/dist/transports/index.d.ts delete mode 100644 node_modules/@sentry/node/dist/transports/index.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/transports/index.js delete mode 100644 node_modules/@sentry/node/dist/transports/index.js.map delete mode 100644 node_modules/@sentry/node/dist/version.d.ts delete mode 100644 node_modules/@sentry/node/dist/version.d.ts.map delete mode 100644 node_modules/@sentry/node/dist/version.js delete mode 100644 node_modules/@sentry/node/dist/version.js.map delete mode 100644 node_modules/@sentry/node/esm/backend.d.ts delete mode 100644 node_modules/@sentry/node/esm/backend.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/backend.js delete mode 100644 node_modules/@sentry/node/esm/backend.js.map delete mode 100644 node_modules/@sentry/node/esm/client.d.ts delete mode 100644 node_modules/@sentry/node/esm/client.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/handlers.d.ts delete mode 100644 node_modules/@sentry/node/esm/handlers.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/index.d.ts delete mode 100644 node_modules/@sentry/node/esm/index.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/integrations/console.d.ts delete mode 100644 node_modules/@sentry/node/esm/integrations/console.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/integrations/http.d.ts delete mode 100644 node_modules/@sentry/node/esm/integrations/http.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/integrations/index.d.ts delete mode 100644 node_modules/@sentry/node/esm/integrations/index.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/integrations/linkederrors.d.ts delete mode 100644 node_modules/@sentry/node/esm/integrations/linkederrors.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/integrations/modules.d.ts delete mode 100644 node_modules/@sentry/node/esm/integrations/modules.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/integrations/onuncaughtexception.d.ts delete mode 100644 node_modules/@sentry/node/esm/integrations/onuncaughtexception.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/integrations/onunhandledrejection.d.ts delete mode 100644 node_modules/@sentry/node/esm/integrations/onunhandledrejection.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/parsers.d.ts delete mode 100644 node_modules/@sentry/node/esm/parsers.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/parsers.js delete mode 100644 node_modules/@sentry/node/esm/parsers.js.map delete mode 100644 node_modules/@sentry/node/esm/sdk.d.ts delete mode 100644 node_modules/@sentry/node/esm/sdk.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/stacktrace.d.ts delete mode 100644 node_modules/@sentry/node/esm/stacktrace.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/stacktrace.js delete mode 100644 node_modules/@sentry/node/esm/stacktrace.js.map delete mode 100644 node_modules/@sentry/node/esm/transports/base.d.ts delete mode 100644 node_modules/@sentry/node/esm/transports/base.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/transports/base.js delete mode 100644 node_modules/@sentry/node/esm/transports/base.js.map delete mode 100644 node_modules/@sentry/node/esm/transports/http.d.ts delete mode 100644 node_modules/@sentry/node/esm/transports/http.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/transports/https.d.ts delete mode 100644 node_modules/@sentry/node/esm/transports/https.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/transports/https.js delete mode 100644 node_modules/@sentry/node/esm/transports/https.js.map delete mode 100644 node_modules/@sentry/node/esm/transports/index.d.ts delete mode 100644 node_modules/@sentry/node/esm/transports/index.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/version.d.ts delete mode 100644 node_modules/@sentry/node/esm/version.d.ts.map delete mode 100644 node_modules/@sentry/node/esm/version.js delete mode 100644 node_modules/@sentry/node/esm/version.js.map delete mode 100644 node_modules/@sentry/types/dist/breadcrumb.d.ts delete mode 100644 node_modules/@sentry/types/dist/breadcrumb.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/breadcrumb.js delete mode 100644 node_modules/@sentry/types/dist/breadcrumb.js.map delete mode 100644 node_modules/@sentry/types/dist/client.d.ts delete mode 100644 node_modules/@sentry/types/dist/client.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/client.js delete mode 100644 node_modules/@sentry/types/dist/client.js.map delete mode 100644 node_modules/@sentry/types/dist/dsn.d.ts delete mode 100644 node_modules/@sentry/types/dist/dsn.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/dsn.js delete mode 100644 node_modules/@sentry/types/dist/dsn.js.map delete mode 100644 node_modules/@sentry/types/dist/error.d.ts delete mode 100644 node_modules/@sentry/types/dist/error.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/error.js delete mode 100644 node_modules/@sentry/types/dist/error.js.map delete mode 100644 node_modules/@sentry/types/dist/event.d.ts delete mode 100644 node_modules/@sentry/types/dist/event.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/event.js delete mode 100644 node_modules/@sentry/types/dist/event.js.map delete mode 100644 node_modules/@sentry/types/dist/eventprocessor.d.ts delete mode 100644 node_modules/@sentry/types/dist/eventprocessor.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/eventprocessor.js delete mode 100644 node_modules/@sentry/types/dist/eventprocessor.js.map delete mode 100644 node_modules/@sentry/types/dist/exception.d.ts delete mode 100644 node_modules/@sentry/types/dist/exception.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/exception.js delete mode 100644 node_modules/@sentry/types/dist/exception.js.map delete mode 100644 node_modules/@sentry/types/dist/hub.d.ts delete mode 100644 node_modules/@sentry/types/dist/hub.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/hub.js delete mode 100644 node_modules/@sentry/types/dist/hub.js.map delete mode 100644 node_modules/@sentry/types/dist/index.d.ts delete mode 100644 node_modules/@sentry/types/dist/index.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/index.js delete mode 100644 node_modules/@sentry/types/dist/index.js.map delete mode 100644 node_modules/@sentry/types/dist/integration.d.ts delete mode 100644 node_modules/@sentry/types/dist/integration.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/integration.js delete mode 100644 node_modules/@sentry/types/dist/integration.js.map delete mode 100644 node_modules/@sentry/types/dist/loglevel.d.ts delete mode 100644 node_modules/@sentry/types/dist/loglevel.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/loglevel.js delete mode 100644 node_modules/@sentry/types/dist/loglevel.js.map delete mode 100644 node_modules/@sentry/types/dist/mechanism.d.ts delete mode 100644 node_modules/@sentry/types/dist/mechanism.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/mechanism.js delete mode 100644 node_modules/@sentry/types/dist/mechanism.js.map delete mode 100644 node_modules/@sentry/types/dist/options.d.ts delete mode 100644 node_modules/@sentry/types/dist/options.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/options.js delete mode 100644 node_modules/@sentry/types/dist/options.js.map delete mode 100644 node_modules/@sentry/types/dist/package.d.ts delete mode 100644 node_modules/@sentry/types/dist/package.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/package.js delete mode 100644 node_modules/@sentry/types/dist/package.js.map delete mode 100644 node_modules/@sentry/types/dist/request.d.ts delete mode 100644 node_modules/@sentry/types/dist/request.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/request.js delete mode 100644 node_modules/@sentry/types/dist/request.js.map delete mode 100644 node_modules/@sentry/types/dist/response.d.ts delete mode 100644 node_modules/@sentry/types/dist/response.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/response.js delete mode 100644 node_modules/@sentry/types/dist/response.js.map delete mode 100644 node_modules/@sentry/types/dist/scope.d.ts delete mode 100644 node_modules/@sentry/types/dist/scope.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/scope.js delete mode 100644 node_modules/@sentry/types/dist/scope.js.map delete mode 100644 node_modules/@sentry/types/dist/sdkinfo.d.ts delete mode 100644 node_modules/@sentry/types/dist/sdkinfo.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/sdkinfo.js delete mode 100644 node_modules/@sentry/types/dist/sdkinfo.js.map delete mode 100644 node_modules/@sentry/types/dist/severity.d.ts delete mode 100644 node_modules/@sentry/types/dist/severity.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/severity.js delete mode 100644 node_modules/@sentry/types/dist/severity.js.map delete mode 100644 node_modules/@sentry/types/dist/span.d.ts delete mode 100644 node_modules/@sentry/types/dist/span.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/span.js delete mode 100644 node_modules/@sentry/types/dist/span.js.map delete mode 100644 node_modules/@sentry/types/dist/stackframe.d.ts delete mode 100644 node_modules/@sentry/types/dist/stackframe.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/stackframe.js delete mode 100644 node_modules/@sentry/types/dist/stackframe.js.map delete mode 100644 node_modules/@sentry/types/dist/stacktrace.d.ts delete mode 100644 node_modules/@sentry/types/dist/stacktrace.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/stacktrace.js delete mode 100644 node_modules/@sentry/types/dist/stacktrace.js.map delete mode 100644 node_modules/@sentry/types/dist/status.d.ts delete mode 100644 node_modules/@sentry/types/dist/status.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/status.js delete mode 100644 node_modules/@sentry/types/dist/status.js.map delete mode 100644 node_modules/@sentry/types/dist/thread.d.ts delete mode 100644 node_modules/@sentry/types/dist/thread.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/thread.js delete mode 100644 node_modules/@sentry/types/dist/thread.js.map delete mode 100644 node_modules/@sentry/types/dist/transport.d.ts delete mode 100644 node_modules/@sentry/types/dist/transport.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/transport.js delete mode 100644 node_modules/@sentry/types/dist/transport.js.map delete mode 100644 node_modules/@sentry/types/dist/user.d.ts delete mode 100644 node_modules/@sentry/types/dist/user.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/user.js delete mode 100644 node_modules/@sentry/types/dist/user.js.map delete mode 100644 node_modules/@sentry/types/dist/wrappedfunction.d.ts delete mode 100644 node_modules/@sentry/types/dist/wrappedfunction.d.ts.map delete mode 100644 node_modules/@sentry/types/dist/wrappedfunction.js delete mode 100644 node_modules/@sentry/types/dist/wrappedfunction.js.map delete mode 100644 node_modules/@sentry/types/esm/breadcrumb.d.ts delete mode 100644 node_modules/@sentry/types/esm/breadcrumb.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/breadcrumb.js delete mode 100644 node_modules/@sentry/types/esm/breadcrumb.js.map delete mode 100644 node_modules/@sentry/types/esm/client.d.ts delete mode 100644 node_modules/@sentry/types/esm/client.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/client.js delete mode 100644 node_modules/@sentry/types/esm/client.js.map delete mode 100644 node_modules/@sentry/types/esm/dsn.d.ts delete mode 100644 node_modules/@sentry/types/esm/dsn.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/dsn.js delete mode 100644 node_modules/@sentry/types/esm/dsn.js.map delete mode 100644 node_modules/@sentry/types/esm/error.d.ts delete mode 100644 node_modules/@sentry/types/esm/error.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/error.js delete mode 100644 node_modules/@sentry/types/esm/error.js.map delete mode 100644 node_modules/@sentry/types/esm/event.d.ts delete mode 100644 node_modules/@sentry/types/esm/event.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/event.js delete mode 100644 node_modules/@sentry/types/esm/event.js.map delete mode 100644 node_modules/@sentry/types/esm/eventprocessor.d.ts delete mode 100644 node_modules/@sentry/types/esm/eventprocessor.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/eventprocessor.js delete mode 100644 node_modules/@sentry/types/esm/eventprocessor.js.map delete mode 100644 node_modules/@sentry/types/esm/exception.d.ts delete mode 100644 node_modules/@sentry/types/esm/exception.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/exception.js delete mode 100644 node_modules/@sentry/types/esm/exception.js.map delete mode 100644 node_modules/@sentry/types/esm/hub.d.ts delete mode 100644 node_modules/@sentry/types/esm/hub.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/hub.js delete mode 100644 node_modules/@sentry/types/esm/hub.js.map delete mode 100644 node_modules/@sentry/types/esm/index.d.ts delete mode 100644 node_modules/@sentry/types/esm/index.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/integration.d.ts delete mode 100644 node_modules/@sentry/types/esm/integration.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/integration.js delete mode 100644 node_modules/@sentry/types/esm/integration.js.map delete mode 100644 node_modules/@sentry/types/esm/loglevel.d.ts delete mode 100644 node_modules/@sentry/types/esm/loglevel.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/loglevel.js delete mode 100644 node_modules/@sentry/types/esm/loglevel.js.map delete mode 100644 node_modules/@sentry/types/esm/mechanism.d.ts delete mode 100644 node_modules/@sentry/types/esm/mechanism.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/mechanism.js delete mode 100644 node_modules/@sentry/types/esm/mechanism.js.map delete mode 100644 node_modules/@sentry/types/esm/options.d.ts delete mode 100644 node_modules/@sentry/types/esm/options.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/options.js delete mode 100644 node_modules/@sentry/types/esm/options.js.map delete mode 100644 node_modules/@sentry/types/esm/package.d.ts delete mode 100644 node_modules/@sentry/types/esm/package.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/package.js delete mode 100644 node_modules/@sentry/types/esm/package.js.map delete mode 100644 node_modules/@sentry/types/esm/request.d.ts delete mode 100644 node_modules/@sentry/types/esm/request.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/request.js delete mode 100644 node_modules/@sentry/types/esm/request.js.map delete mode 100644 node_modules/@sentry/types/esm/response.d.ts delete mode 100644 node_modules/@sentry/types/esm/response.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/response.js delete mode 100644 node_modules/@sentry/types/esm/response.js.map delete mode 100644 node_modules/@sentry/types/esm/scope.d.ts delete mode 100644 node_modules/@sentry/types/esm/scope.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/scope.js delete mode 100644 node_modules/@sentry/types/esm/scope.js.map delete mode 100644 node_modules/@sentry/types/esm/sdkinfo.d.ts delete mode 100644 node_modules/@sentry/types/esm/sdkinfo.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/sdkinfo.js delete mode 100644 node_modules/@sentry/types/esm/sdkinfo.js.map delete mode 100644 node_modules/@sentry/types/esm/severity.d.ts delete mode 100644 node_modules/@sentry/types/esm/severity.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/severity.js delete mode 100644 node_modules/@sentry/types/esm/severity.js.map delete mode 100644 node_modules/@sentry/types/esm/span.d.ts delete mode 100644 node_modules/@sentry/types/esm/span.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/span.js delete mode 100644 node_modules/@sentry/types/esm/span.js.map delete mode 100644 node_modules/@sentry/types/esm/stackframe.d.ts delete mode 100644 node_modules/@sentry/types/esm/stackframe.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/stackframe.js delete mode 100644 node_modules/@sentry/types/esm/stackframe.js.map delete mode 100644 node_modules/@sentry/types/esm/stacktrace.d.ts delete mode 100644 node_modules/@sentry/types/esm/stacktrace.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/stacktrace.js delete mode 100644 node_modules/@sentry/types/esm/stacktrace.js.map delete mode 100644 node_modules/@sentry/types/esm/status.d.ts delete mode 100644 node_modules/@sentry/types/esm/status.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/status.js delete mode 100644 node_modules/@sentry/types/esm/status.js.map delete mode 100644 node_modules/@sentry/types/esm/thread.d.ts delete mode 100644 node_modules/@sentry/types/esm/thread.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/thread.js delete mode 100644 node_modules/@sentry/types/esm/thread.js.map delete mode 100644 node_modules/@sentry/types/esm/transport.d.ts delete mode 100644 node_modules/@sentry/types/esm/transport.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/transport.js delete mode 100644 node_modules/@sentry/types/esm/transport.js.map delete mode 100644 node_modules/@sentry/types/esm/user.d.ts delete mode 100644 node_modules/@sentry/types/esm/user.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/user.js delete mode 100644 node_modules/@sentry/types/esm/user.js.map delete mode 100644 node_modules/@sentry/types/esm/wrappedfunction.d.ts delete mode 100644 node_modules/@sentry/types/esm/wrappedfunction.d.ts.map delete mode 100644 node_modules/@sentry/types/esm/wrappedfunction.js delete mode 100644 node_modules/@sentry/types/esm/wrappedfunction.js.map delete mode 100644 node_modules/@sentry/utils/dist/async.d.ts delete mode 100644 node_modules/@sentry/utils/dist/async.js delete mode 100644 node_modules/@sentry/utils/dist/async.js.map delete mode 100644 node_modules/@sentry/utils/dist/dsn.d.ts delete mode 100644 node_modules/@sentry/utils/dist/dsn.js delete mode 100644 node_modules/@sentry/utils/dist/dsn.js.map delete mode 100644 node_modules/@sentry/utils/dist/error.d.ts delete mode 100644 node_modules/@sentry/utils/dist/error.js delete mode 100644 node_modules/@sentry/utils/dist/error.js.map delete mode 100644 node_modules/@sentry/utils/dist/index.d.ts delete mode 100644 node_modules/@sentry/utils/dist/index.js delete mode 100644 node_modules/@sentry/utils/dist/index.js.map delete mode 100644 node_modules/@sentry/utils/dist/instrument.d.ts delete mode 100644 node_modules/@sentry/utils/dist/instrument.js delete mode 100644 node_modules/@sentry/utils/dist/instrument.js.map delete mode 100644 node_modules/@sentry/utils/dist/is.d.ts delete mode 100644 node_modules/@sentry/utils/dist/is.js delete mode 100644 node_modules/@sentry/utils/dist/is.js.map delete mode 100644 node_modules/@sentry/utils/dist/logger.d.ts delete mode 100644 node_modules/@sentry/utils/dist/logger.js delete mode 100644 node_modules/@sentry/utils/dist/logger.js.map delete mode 100644 node_modules/@sentry/utils/dist/memo.d.ts delete mode 100644 node_modules/@sentry/utils/dist/memo.js delete mode 100644 node_modules/@sentry/utils/dist/memo.js.map delete mode 100644 node_modules/@sentry/utils/dist/misc.d.ts delete mode 100644 node_modules/@sentry/utils/dist/misc.js delete mode 100644 node_modules/@sentry/utils/dist/misc.js.map delete mode 100644 node_modules/@sentry/utils/dist/object.d.ts delete mode 100644 node_modules/@sentry/utils/dist/object.js delete mode 100644 node_modules/@sentry/utils/dist/object.js.map delete mode 100644 node_modules/@sentry/utils/dist/path.d.ts delete mode 100644 node_modules/@sentry/utils/dist/path.js delete mode 100644 node_modules/@sentry/utils/dist/path.js.map delete mode 100644 node_modules/@sentry/utils/dist/polyfill.d.ts delete mode 100644 node_modules/@sentry/utils/dist/polyfill.js delete mode 100644 node_modules/@sentry/utils/dist/polyfill.js.map delete mode 100644 node_modules/@sentry/utils/dist/promisebuffer.d.ts delete mode 100644 node_modules/@sentry/utils/dist/promisebuffer.js delete mode 100644 node_modules/@sentry/utils/dist/promisebuffer.js.map delete mode 100644 node_modules/@sentry/utils/dist/string.d.ts delete mode 100644 node_modules/@sentry/utils/dist/string.js delete mode 100644 node_modules/@sentry/utils/dist/string.js.map delete mode 100644 node_modules/@sentry/utils/dist/supports.d.ts delete mode 100644 node_modules/@sentry/utils/dist/supports.js delete mode 100644 node_modules/@sentry/utils/dist/supports.js.map delete mode 100644 node_modules/@sentry/utils/dist/syncpromise.d.ts delete mode 100644 node_modules/@sentry/utils/dist/syncpromise.js delete mode 100644 node_modules/@sentry/utils/dist/syncpromise.js.map delete mode 100644 node_modules/@sentry/utils/esm/async.d.ts delete mode 100644 node_modules/@sentry/utils/esm/async.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/async.js delete mode 100644 node_modules/@sentry/utils/esm/async.js.map delete mode 100644 node_modules/@sentry/utils/esm/dsn.d.ts delete mode 100644 node_modules/@sentry/utils/esm/dsn.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/error.d.ts delete mode 100644 node_modules/@sentry/utils/esm/error.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/index.d.ts delete mode 100644 node_modules/@sentry/utils/esm/index.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/instrument.d.ts delete mode 100644 node_modules/@sentry/utils/esm/instrument.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/is.d.ts delete mode 100644 node_modules/@sentry/utils/esm/is.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/logger.d.ts delete mode 100644 node_modules/@sentry/utils/esm/logger.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/memo.d.ts delete mode 100644 node_modules/@sentry/utils/esm/memo.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/misc.d.ts delete mode 100644 node_modules/@sentry/utils/esm/misc.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/object.d.ts delete mode 100644 node_modules/@sentry/utils/esm/object.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/path.d.ts delete mode 100644 node_modules/@sentry/utils/esm/path.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/polyfill.d.ts delete mode 100644 node_modules/@sentry/utils/esm/polyfill.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/polyfill.js delete mode 100644 node_modules/@sentry/utils/esm/polyfill.js.map delete mode 100644 node_modules/@sentry/utils/esm/promisebuffer.d.ts delete mode 100644 node_modules/@sentry/utils/esm/promisebuffer.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/string.d.ts delete mode 100644 node_modules/@sentry/utils/esm/string.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/supports.d.ts delete mode 100644 node_modules/@sentry/utils/esm/supports.d.ts.map delete mode 100644 node_modules/@sentry/utils/esm/syncpromise.d.ts delete mode 100644 node_modules/@sentry/utils/esm/syncpromise.d.ts.map delete mode 100644 node_modules/https-proxy-agent/.editorconfig delete mode 100644 node_modules/https-proxy-agent/.eslintrc.js delete mode 100644 node_modules/https-proxy-agent/.github/workflows/test.yml delete mode 100644 node_modules/https-proxy-agent/index.d.ts delete mode 100644 node_modules/https-proxy-agent/index.js delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/dist/debug.js delete mode 100644 node_modules/node-fetch/CHANGELOG.md diff --git a/node_modules/@sentry/apm/README.md b/node_modules/@sentry/apm/README.md deleted file mode 100644 index 1d03e21..0000000 --- a/node_modules/@sentry/apm/README.md +++ /dev/null @@ -1,22 +0,0 @@ -

- - - -
-

- -# Sentry APM Extensions - -[![npm version](https://img.shields.io/npm/v/@sentry/apm.svg)](https://www.npmjs.com/package/@sentry/apm) -[![npm dm](https://img.shields.io/npm/dm/@sentry/apm.svg)](https://www.npmjs.com/package/@sentry/apm) -[![npm dt](https://img.shields.io/npm/dt/@sentry/apm.svg)](https://www.npmjs.com/package/@sentry/apm) -[![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 contains extensions to the `@sentry/hub` to enable APM related functionality. It also provides integrations for Browser and Node that provide a good experience out of the box. diff --git a/node_modules/@sentry/apm/dist/hubextensions.d.ts b/node_modules/@sentry/apm/dist/hubextensions.d.ts deleted file mode 100644 index 8b05a49..0000000 --- a/node_modules/@sentry/apm/dist/hubextensions.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This patches the global object and injects the APM extensions methods - */ -export declare function addExtensionMethods(): void; -//# sourceMappingURL=hubextensions.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/hubextensions.d.ts.map b/node_modules/@sentry/apm/dist/hubextensions.d.ts.map deleted file mode 100644 index 69c4e45..0000000 --- a/node_modules/@sentry/apm/dist/hubextensions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hubextensions.d.ts","sourceRoot":"","sources":["../src/hubextensions.ts"],"names":[],"mappings":"AAsEA;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAW1C"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/hubextensions.js b/node_modules/@sentry/apm/dist/hubextensions.js deleted file mode 100644 index d737c7a..0000000 --- a/node_modules/@sentry/apm/dist/hubextensions.js +++ /dev/null @@ -1,78 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var hub_1 = require("@sentry/hub"); -var utils_1 = require("@sentry/utils"); -var span_1 = require("./span"); -/** - * Checks whether given value is instance of Span - * @param span value to check - */ -function isSpanInstance(span) { - return utils_1.isInstanceOf(span, span_1.Span); -} -/** Returns all trace headers that are currently on the top scope. */ -function traceHeaders() { - // @ts-ignore - var that = this; - var scope = that.getScope(); - if (scope) { - var span = scope.getSpan(); - if (span) { - return { - 'sentry-trace': span.toTraceparent(), - }; - } - } - return {}; -} -/** - * This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured - * and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope, - * the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`. - * - * @param span Already constructed span which should be started or properties with which the span should be created - */ -function startSpan(spanOrSpanContext, forceNoChild) { - if (forceNoChild === void 0) { forceNoChild = false; } - // @ts-ignore - var that = this; - var scope = that.getScope(); - var client = that.getClient(); - var span; - if (!isSpanInstance(spanOrSpanContext) && !forceNoChild) { - if (scope) { - var parentSpan = scope.getSpan(); - if (parentSpan) { - span = parentSpan.child(spanOrSpanContext); - } - } - } - if (!isSpanInstance(span)) { - span = new span_1.Span(spanOrSpanContext, that); - } - if (span.sampled === undefined && span.transaction !== undefined) { - var sampleRate = (client && client.getOptions().tracesSampleRate) || 0; - span.sampled = Math.random() < sampleRate; - } - if (span.sampled) { - var experimentsOptions = (client && client.getOptions()._experiments) || {}; - span.initFinishedSpans(experimentsOptions.maxSpans); - } - return span; -} -/** - * This patches the global object and injects the APM extensions methods - */ -function addExtensionMethods() { - var carrier = hub_1.getMainCarrier(); - if (carrier.__SENTRY__) { - carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; - if (!carrier.__SENTRY__.extensions.startSpan) { - carrier.__SENTRY__.extensions.startSpan = startSpan; - } - if (!carrier.__SENTRY__.extensions.traceHeaders) { - carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; - } - } -} -exports.addExtensionMethods = addExtensionMethods; -//# sourceMappingURL=hubextensions.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/hubextensions.js.map b/node_modules/@sentry/apm/dist/hubextensions.js.map deleted file mode 100644 index 4bd6e1b..0000000 --- a/node_modules/@sentry/apm/dist/hubextensions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hubextensions.js","sourceRoot":"","sources":["../src/hubextensions.ts"],"names":[],"mappings":";AAAA,mCAAkD;AAElD,uCAA6C;AAE7C,+BAA8B;AAE9B;;;GAGG;AACH,SAAS,cAAc,CAAC,IAAa;IACnC,OAAO,oBAAY,CAAC,IAAI,EAAE,WAAI,CAAC,CAAC;AAClC,CAAC;AAED,qEAAqE;AACrE,SAAS,YAAY;IACnB,aAAa;IACb,IAAM,IAAI,GAAG,IAAW,CAAC;IACzB,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,IAAI,KAAK,EAAE;QACT,IAAM,IAAI,GAAG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AC,iBAAiB,CAAC,kBAAkB,CAAC,QAAkB,CAAC,CAAC;KAC/D;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,mBAAmB;IACjC,IAAM,OAAO,GAAG,oBAAc,EAAE,CAAC;IACjC,IAAI,OAAO,CAAC,UAAU,EAAE;QACtB,OAAO,CAAC,UAAU,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC;QACpE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE;YAC5C,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,GAAG,SAAS,CAAC;SACrD;QACD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,EAAE;YAC/C,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,GAAG,YAAY,CAAC;SAC3D;KACF;AACH,CAAC;AAXD,kDAWC","sourcesContent":["import { getMainCarrier, Hub } from '@sentry/hub';\nimport { SpanContext } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { Span } from './span';\n\n/**\n * Checks whether given value is instance of Span\n * @param span value to check\n */\nfunction isSpanInstance(span: unknown): span is Span {\n return isInstanceOf(span, Span);\n}\n\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders(): { [key: string]: string } {\n // @ts-ignore\n const that = this as Hub;\n const scope = that.getScope();\n if (scope) {\n const span = scope.getSpan();\n if (span) {\n return {\n 'sentry-trace': span.toTraceparent(),\n };\n }\n }\n return {};\n}\n\n/**\n * This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured\n * and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope,\n * the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`.\n *\n * @param span Already constructed span which should be started or properties with which the span should be created\n */\nfunction startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild: boolean = false): Span {\n // @ts-ignore\n const that = this as Hub;\n const scope = that.getScope();\n const client = that.getClient();\n let span;\n\n if (!isSpanInstance(spanOrSpanContext) && !forceNoChild) {\n if (scope) {\n const parentSpan = scope.getSpan() as Span;\n if (parentSpan) {\n span = parentSpan.child(spanOrSpanContext);\n }\n }\n }\n\n if (!isSpanInstance(span)) {\n span = new Span(spanOrSpanContext, that);\n }\n\n if (span.sampled === undefined && span.transaction !== undefined) {\n const sampleRate = (client && client.getOptions().tracesSampleRate) || 0;\n span.sampled = Math.random() < sampleRate;\n }\n\n if (span.sampled) {\n const experimentsOptions = (client && client.getOptions()._experiments) || {};\n span.initFinishedSpans(experimentsOptions.maxSpans as number);\n }\n\n return span;\n}\n\n/**\n * This patches the global object and injects the APM extensions methods\n */\nexport function addExtensionMethods(): void {\n const carrier = getMainCarrier();\n if (carrier.__SENTRY__) {\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startSpan) {\n carrier.__SENTRY__.extensions.startSpan = startSpan;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/index.bundle.d.ts b/node_modules/@sentry/apm/dist/index.bundle.d.ts deleted file mode 100644 index 01ba2bd..0000000 --- a/node_modules/@sentry/apm/dist/index.bundle.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export { Breadcrumb, Request, SdkInfo, Event, Exception, Response, Severity, StackFrame, Stacktrace, Status, Thread, User, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, Transports, withScope, } from '@sentry/browser'; -export { BrowserOptions } from '@sentry/browser'; -export { BrowserClient, ReportDialogOptions } from '@sentry/browser'; -export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap, } from '@sentry/browser'; -export { SDK_NAME, SDK_VERSION } from '@sentry/browser'; -import * as ApmIntegrations from './integrations'; -export { Span, TRACEPARENT_REGEXP } from './span'; -declare const INTEGRATIONS: { - Tracing: typeof ApmIntegrations.Tracing; - GlobalHandlers: typeof import("../../browser/dist/integrations").GlobalHandlers; - TryCatch: typeof import("../../browser/dist/integrations").TryCatch; - Breadcrumbs: typeof import("../../browser/dist/integrations").Breadcrumbs; - LinkedErrors: typeof import("../../browser/dist/integrations").LinkedErrors; - UserAgent: typeof import("../../browser/dist/integrations").UserAgent; - FunctionToString: typeof import("@sentry/core/dist/integrations").FunctionToString; - InboundFilters: typeof import("@sentry/core/dist/integrations").InboundFilters; -}; -export { INTEGRATIONS as Integrations }; -//# sourceMappingURL=index.bundle.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/index.bundle.d.ts.map b/node_modules/@sentry/apm/dist/index.bundle.d.ts.map deleted file mode 100644 index 1ebca5a..0000000 --- a/node_modules/@sentry/apm/dist/index.bundle.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.bundle.d.ts","sourceRoot":"","sources":["../src/index.bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,UAAU,EACV,SAAS,GACV,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,IAAI,EACJ,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,IAAI,GACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAMxD,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAYlD,QAAA,MAAM,YAAY;;;;;;;;;CAIjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/index.bundle.js b/node_modules/@sentry/apm/dist/index.bundle.js deleted file mode 100644 index c08a3e4..0000000 --- a/node_modules/@sentry/apm/dist/index.bundle.js +++ /dev/null @@ -1,59 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var types_1 = require("@sentry/types"); -exports.Severity = types_1.Severity; -exports.Status = types_1.Status; -var browser_1 = require("@sentry/browser"); -exports.addGlobalEventProcessor = browser_1.addGlobalEventProcessor; -exports.addBreadcrumb = browser_1.addBreadcrumb; -exports.captureException = browser_1.captureException; -exports.captureEvent = browser_1.captureEvent; -exports.captureMessage = browser_1.captureMessage; -exports.configureScope = browser_1.configureScope; -exports.getHubFromCarrier = browser_1.getHubFromCarrier; -exports.getCurrentHub = browser_1.getCurrentHub; -exports.Hub = browser_1.Hub; -exports.Scope = browser_1.Scope; -exports.setContext = browser_1.setContext; -exports.setExtra = browser_1.setExtra; -exports.setExtras = browser_1.setExtras; -exports.setTag = browser_1.setTag; -exports.setTags = browser_1.setTags; -exports.setUser = browser_1.setUser; -exports.Transports = browser_1.Transports; -exports.withScope = browser_1.withScope; -var browser_2 = require("@sentry/browser"); -exports.BrowserClient = browser_2.BrowserClient; -var browser_3 = require("@sentry/browser"); -exports.defaultIntegrations = browser_3.defaultIntegrations; -exports.forceLoad = browser_3.forceLoad; -exports.init = browser_3.init; -exports.lastEventId = browser_3.lastEventId; -exports.onLoad = browser_3.onLoad; -exports.showReportDialog = browser_3.showReportDialog; -exports.flush = browser_3.flush; -exports.close = browser_3.close; -exports.wrap = browser_3.wrap; -var browser_4 = require("@sentry/browser"); -exports.SDK_NAME = browser_4.SDK_NAME; -exports.SDK_VERSION = browser_4.SDK_VERSION; -var browser_5 = require("@sentry/browser"); -var utils_1 = require("@sentry/utils"); -var hubextensions_1 = require("./hubextensions"); -var ApmIntegrations = require("./integrations"); -var span_1 = require("./span"); -exports.Span = span_1.Span; -exports.TRACEPARENT_REGEXP = span_1.TRACEPARENT_REGEXP; -var windowIntegrations = {}; -// This block is needed to add compatibility with the integrations packages when used with a CDN -// tslint:disable: no-unsafe-any -var _window = utils_1.getGlobalObject(); -if (_window.Sentry && _window.Sentry.Integrations) { - windowIntegrations = _window.Sentry.Integrations; -} -// tslint:enable: no-unsafe-any -var INTEGRATIONS = tslib_1.__assign({}, windowIntegrations, browser_5.Integrations, { Tracing: ApmIntegrations.Tracing }); -exports.Integrations = INTEGRATIONS; -// We are patching the global object with our hub extension methods -hubextensions_1.addExtensionMethods(); -//# sourceMappingURL=index.bundle.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/index.bundle.js.map b/node_modules/@sentry/apm/dist/index.bundle.js.map deleted file mode 100644 index f36cff7..0000000 --- a/node_modules/@sentry/apm/dist/index.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.bundle.js","sourceRoot":"","sources":["../src/index.bundle.ts"],"names":[],"mappings":";;AAAA,uCAauB;AANrB,2BAAA,QAAQ,CAAA;AAGR,yBAAA,MAAM,CAAA;AAKR,2CAmByB;AAlBvB,4CAAA,uBAAuB,CAAA;AACvB,kCAAA,aAAa,CAAA;AACb,qCAAA,gBAAgB,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EAAmE;AACnE,mCAAmB,EAAE,CAAC","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n Response,\n Severity,\n StackFrame,\n Stacktrace,\n Status,\n Thread,\n User,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n Transports,\n withScope,\n} from '@sentry/browser';\n\nexport { BrowserOptions } from '@sentry/browser';\nexport { BrowserClient, ReportDialogOptions } from '@sentry/browser';\nexport {\n defaultIntegrations,\n forceLoad,\n init,\n lastEventId,\n onLoad,\n showReportDialog,\n flush,\n close,\n wrap,\n} from '@sentry/browser';\nexport { SDK_NAME, SDK_VERSION } from '@sentry/browser';\n\nimport { Integrations as BrowserIntegrations } from '@sentry/browser';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport { addExtensionMethods } from './hubextensions';\nimport * as ApmIntegrations from './integrations';\n\nexport { Span, TRACEPARENT_REGEXP } from './span';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...BrowserIntegrations,\n Tracing: ApmIntegrations.Tracing,\n};\n\nexport { INTEGRATIONS as Integrations };\n\n// We are patching the global object with our hub extension methods\naddExtensionMethods();\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/index.d.ts b/node_modules/@sentry/apm/dist/index.d.ts deleted file mode 100644 index 1f65162..0000000 --- a/node_modules/@sentry/apm/dist/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as ApmIntegrations from './integrations'; -export { ApmIntegrations as Integrations }; -export { Span, TRACEPARENT_REGEXP } from './span'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/index.d.ts.map b/node_modules/@sentry/apm/dist/index.d.ts.map deleted file mode 100644 index 79d1e2f..0000000 --- a/node_modules/@sentry/apm/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,eAAe,IAAI,YAAY,EAAE,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/index.js b/node_modules/@sentry/apm/dist/index.js deleted file mode 100644 index f465c70..0000000 --- a/node_modules/@sentry/apm/dist/index.js +++ /dev/null @@ -1,10 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var hubextensions_1 = require("./hubextensions"); -var ApmIntegrations = require("./integrations"); -exports.Integrations = ApmIntegrations; -var span_1 = require("./span"); -exports.Span = span_1.Span; -exports.TRACEPARENT_REGEXP = span_1.TRACEPARENT_REGEXP; -// We are patching the global object with our hub extension methods -hubextensions_1.addExtensionMethods(); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/index.js.map b/node_modules/@sentry/apm/dist/index.js.map deleted file mode 100644 index 93f1e6f..0000000 --- a/node_modules/@sentry/apm/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,iDAAsD;AACtD,gDAAkD;AAEtB,uCAAY;AACxC,+BAAkD;AAAzC,sBAAA,IAAI,CAAA;AAAE,oCAAA,kBAAkB,CAAA;AAEjC,mEAAmE;AACnE,mCAAmB,EAAE,CAAC","sourcesContent":["import { addExtensionMethods } from './hubextensions';\nimport * as ApmIntegrations from './integrations';\n\nexport { ApmIntegrations as Integrations };\nexport { Span, TRACEPARENT_REGEXP } from './span';\n\n// We are patching the global object with our hub extension methods\naddExtensionMethods();\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/express.d.ts b/node_modules/@sentry/apm/dist/integrations/express.d.ts deleted file mode 100644 index c6d7635..0000000 --- a/node_modules/@sentry/apm/dist/integrations/express.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { EventProcessor, Hub, Integration } from '@sentry/types'; -import { Application } from 'express'; -/** - * Express integration - * - * Provides an request and error handler for Express framework - * as well as tracing capabilities - */ -export declare class Express implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * Express App instance - */ - private readonly _app?; - /** - * @inheritDoc - */ - constructor(options?: { - app?: Application; - }); - /** - * @inheritDoc - */ - setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; -} -//# sourceMappingURL=express.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/express.d.ts.map b/node_modules/@sentry/apm/dist/integrations/express.d.ts.map deleted file mode 100644 index 9b29898..0000000 --- a/node_modules/@sentry/apm/dist/integrations/express.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/integrations/express.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAwE,MAAM,SAAS,CAAC;AAE5G;;;;;GAKG;AACH,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IAEjC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAc;IAEpC;;OAEG;gBACgB,OAAO,GAAE;QAAE,GAAG,CAAC,EAAE,WAAW,CAAA;KAAO;IAItD;;OAEG;IACI,SAAS,CAAC,wBAAwB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI;CAO/G"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/express.js b/node_modules/@sentry/apm/dist/integrations/express.js deleted file mode 100644 index 82d10f6..0000000 --- a/node_modules/@sentry/apm/dist/integrations/express.js +++ /dev/null @@ -1,128 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = require("@sentry/utils"); -/** - * Express integration - * - * Provides an request and error handler for Express framework - * as well as tracing capabilities - */ -var Express = /** @class */ (function () { - /** - * @inheritDoc - */ - function Express(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = Express.id; - this._app = options.app; - } - /** - * @inheritDoc - */ - Express.prototype.setupOnce = function (_addGlobalEventProcessor, getCurrentHub) { - if (!this._app) { - utils_1.logger.error('ExpressIntegration is missing an Express instance'); - return; - } - instrumentMiddlewares(this._app, getCurrentHub); - }; - /** - * @inheritDoc - */ - Express.id = 'Express'; - return Express; -}()); -exports.Express = Express; -/** - * Wraps original middleware function in a tracing call, which stores the info about the call as a span, - * and finishes it once the middleware is done invoking. - * - * Express middlewares have 3 various forms, thus we have to take care of all of them: - * // sync - * app.use(function (req, res) { ... }) - * // async - * app.use(function (req, res, next) { ... }) - * // error handler - * app.use(function (err, req, res, next) { ... }) - */ -function wrap(fn, getCurrentHub) { - var arrity = fn.length; - switch (arrity) { - case 2: { - return function (_req, res) { - var span = getCurrentHub().startSpan({ - description: fn.name, - op: 'middleware', - }); - res.once('finish', function () { return span.finish(); }); - return fn.apply(this, arguments); - }; - } - case 3: { - return function (req, res, next) { - var span = getCurrentHub().startSpan({ - description: fn.name, - op: 'middleware', - }); - fn.call(this, req, res, function () { - span.finish(); - return next.apply(this, arguments); - }); - }; - } - case 4: { - return function (err, req, res, next) { - var span = getCurrentHub().startSpan({ - description: fn.name, - op: 'middleware', - }); - fn.call(this, err, req, res, function () { - span.finish(); - return next.apply(this, arguments); - }); - }; - } - default: { - throw new Error("Express middleware takes 2-4 arguments. Got: " + arrity); - } - } -} -/** - * Takes all the function arguments passed to the original `app.use` call - * and wraps every function, as well as array of functions with a call to our `wrap` method. - * We have to take care of the arrays as well as iterate over all of the arguments, - * as `app.use` can accept middlewares in few various forms. - * - * app.use([], ) - * app.use([], , ...) - * app.use([], ...[]) - */ -function wrapUseArgs(args, getCurrentHub) { - return Array.from(args).map(function (arg) { - if (typeof arg === 'function') { - return wrap(arg, getCurrentHub); - } - if (Array.isArray(arg)) { - return arg.map(function (a) { - if (typeof a === 'function') { - return wrap(a, getCurrentHub); - } - return a; - }); - } - return arg; - }); -} -/** - * Patches original app.use to utilize our tracing functionality - */ -function instrumentMiddlewares(app, getCurrentHub) { - var originalAppUse = app.use; - app.use = function () { - return originalAppUse.apply(this, wrapUseArgs(arguments, getCurrentHub)); - }; - return app; -} -//# sourceMappingURL=express.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/express.js.map b/node_modules/@sentry/apm/dist/integrations/express.js.map deleted file mode 100644 index c3cce13..0000000 --- a/node_modules/@sentry/apm/dist/integrations/express.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"express.js","sourceRoot":"","sources":["../../src/integrations/express.ts"],"names":[],"mappings":";AACA,uCAAuC;AAIvC;;;;;GAKG;AACH;IAgBE;;OAEG;IACH,iBAAmB,OAAmC;QAAnC,wBAAA,EAAA,YAAmC;QAlBtD;;WAEG;QACI,SAAI,GAAW,OAAO,CAAC,EAAE,CAAC;QAgB/B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,2BAAS,GAAhB,UAAiB,wBAA4D,EAAE,aAAwB;QACrG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACd,cA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,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n// tslint:disable-next-line:no-implicit-dependencies\nimport { Application, ErrorRequestHandler, NextFunction, Request, RequestHandler, Response } from 'express';\n\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework\n * as well as tracing capabilities\n */\nexport class Express implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Express.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Express';\n\n /**\n * Express App instance\n */\n private readonly _app?: Application;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { app?: Application } = {}) {\n this._app = options.app;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._app) {\n logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n instrumentMiddlewares(this._app, getCurrentHub);\n }\n}\n\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n */\nfunction wrap(fn: Function, getCurrentHub: () => Hub): RequestHandler | ErrorRequestHandler {\n const arrity = fn.length;\n\n switch (arrity) {\n case 2: {\n return function(this: NodeJS.Global, _req: Request, res: Response): any {\n const span = getCurrentHub().startSpan({\n description: fn.name,\n op: 'middleware',\n });\n res.once('finish', () => span.finish());\n return fn.apply(this, arguments);\n };\n }\n case 3: {\n return function(this: NodeJS.Global, req: Request, res: Response, next: NextFunction): any {\n const span = getCurrentHub().startSpan({\n description: fn.name,\n op: 'middleware',\n });\n fn.call(this, req, res, function(this: NodeJS.Global): any {\n span.finish();\n return next.apply(this, arguments);\n });\n };\n }\n case 4: {\n return function(this: NodeJS.Global, err: any, req: Request, res: Response, next: NextFunction): any {\n const span = getCurrentHub().startSpan({\n description: fn.name,\n op: 'middleware',\n });\n fn.call(this, err, req, res, function(this: NodeJS.Global): any {\n span.finish();\n return next.apply(this, arguments);\n });\n };\n }\n default: {\n throw new Error(`Express middleware takes 2-4 arguments. Got: ${arrity}`);\n }\n }\n}\n\n/**\n * Takes all the function arguments passed to the original `app.use` call\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\nfunction wrapUseArgs(args: IArguments, getCurrentHub: () => Hub): unknown[] {\n return Array.from(args).map((arg: unknown) => {\n if (typeof arg === 'function') {\n return wrap(arg, getCurrentHub);\n }\n\n if (Array.isArray(arg)) {\n return arg.map((a: unknown) => {\n if (typeof a === 'function') {\n return wrap(a, getCurrentHub);\n }\n return a;\n });\n }\n\n return arg;\n });\n}\n\n/**\n * Patches original app.use to utilize our tracing functionality\n */\nfunction instrumentMiddlewares(app: Application, getCurrentHub: () => Hub): Application {\n const originalAppUse = app.use;\n app.use = function(): any {\n return originalAppUse.apply(this, wrapUseArgs(arguments, getCurrentHub));\n };\n return app;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/index.d.ts b/node_modules/@sentry/apm/dist/integrations/index.d.ts deleted file mode 100644 index 6c891c4..0000000 --- a/node_modules/@sentry/apm/dist/integrations/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { Express } from './express'; -export { Tracing } from './tracing'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/index.d.ts.map b/node_modules/@sentry/apm/dist/integrations/index.d.ts.map deleted file mode 100644 index 412841d..0000000 --- a/node_modules/@sentry/apm/dist/integrations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/index.js b/node_modules/@sentry/apm/dist/integrations/index.js deleted file mode 100644 index 4522782..0000000 --- a/node_modules/@sentry/apm/dist/integrations/index.js +++ /dev/null @@ -1,6 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var express_1 = require("./express"); -exports.Express = express_1.Express; -var tracing_1 = require("./tracing"); -exports.Tracing = tracing_1.Tracing; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/index.js.map b/node_modules/@sentry/apm/dist/integrations/index.js.map deleted file mode 100644 index c67f5d8..0000000 --- a/node_modules/@sentry/apm/dist/integrations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":";AAAA,qCAAoC;AAA3B,4BAAA,OAAO,CAAA;AAChB,qCAAoC;AAA3B,4BAAA,OAAO,CAAA","sourcesContent":["export { Express } from './express';\nexport { Tracing } from './tracing';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/tracing.d.ts b/node_modules/@sentry/apm/dist/integrations/tracing.d.ts deleted file mode 100644 index 7d6b099..0000000 --- a/node_modules/@sentry/apm/dist/integrations/tracing.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -import { EventProcessor, Hub, Integration, Span, SpanContext, SpanStatus } from '@sentry/types'; -/** - * Options for Tracing integration - */ -interface TracingOptions { - /** - * List of strings / regex where the integration should create Spans out of. Additionally this will be used - * to define which outgoing requests the `sentry-trace` header will be attached to. - * - * Default: ['localhost', /^\//] - */ - tracingOrigins: Array; - /** - * Flag to disable patching all together for fetch requests. - * - * Default: true - */ - traceFetch: boolean; - /** - * Flag to disable patching all together for xhr requests. - * - * Default: true - */ - traceXHR: boolean; - /** - * This function will be called before creating a span for a request with the given url. - * Return false if you don't want a span for the given url. - * - * By default it uses the `tracingOrigins` options as a url match. - */ - shouldCreateSpanForRequest(url: string): boolean; - /** - * The time to wait in ms until the transaction will be finished. The transaction will use the end timestamp of - * the last finished span as the endtime for the transaction. - * Time is in ms. - * - * Default: 500 - */ - idleTimeout: number; - /** - * Flag to enable/disable creation of `navigation` transaction on history changes. Useful for react applications with - * a router. - * - * Default: true - */ - startTransactionOnLocationChange: boolean; - /** - * Sample to determine if the Integration should instrument anything. The decision will be taken once per load - * on initalization. - * 0 = 0% chance of instrumenting - * 1 = 100% change of instrumenting - * - * Default: 1 - */ - tracesSampleRate: number; - /** - * The maximum duration of a transaction before it will be discarded. This is for some edge cases where a browser - * completely freezes the JS state and picks it up later (background tabs). - * So after this duration, the SDK will not send the event. - * If you want to have an unlimited duration set it to 0. - * Time is in seconds. - * - * Default: 600 - */ - maxTransactionDuration: number; - /** - * Flag to discard all spans that occur in background. This includes transactions. Browser background tab timing is - * not suited towards doing precise measurements of operations. That's why this option discards any active transaction - * and also doesn't add any spans that happen in the background. Background spans/transaction can mess up your - * statistics in non deterministic ways that's why we by default recommend leaving this opition enabled. - * - * Default: true - */ - discardBackgroundSpans: boolean; -} -/** JSDoc */ -interface Activity { - name: string; - span?: Span; -} -/** - * Tracing Integration - */ -export declare class Tracing implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * Is Tracing enabled, this will be determined once per pageload. - */ - private static _enabled?; - /** JSDoc */ - static options: TracingOptions; - /** - * Returns current hub. - */ - private static _getCurrentHub?; - private static _activeTransaction?; - private static _currentIndex; - static _activities: { - [key: number]: Activity; - }; - private static _debounce; - private readonly _emitOptionsWarning; - private static _performanceCursor; - private static _heartbeatTimer; - private static _prevHeartbeatString; - private static _heartbeatCounter; - /** - * Constructor for Tracing - * - * @param _options TracingOptions - */ - constructor(_options?: Partial); - /** - * @inheritDoc - */ - setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; - /** - * Pings the heartbeat - */ - private static _pingHeartbeat; - /** - * Checks when entries of Tracing._activities are not changing for 3 beats. If this occurs we finish the transaction - * - */ - private static _beat; - /** - * Discards active transactions if tab moves to background - */ - private _setupBackgroundTabDetection; - /** - * Unsets the current active transaction + activities - */ - private static _resetActiveTransaction; - /** - * Registers to History API to detect navigation changes - */ - private _setupHistory; - /** - * Attaches to fetch to add sentry-trace header + creating spans - */ - private _setupFetchTracing; - /** - * Attaches to XHR to add sentry-trace header + creating spans - */ - private _setupXHRTracing; - /** - * Configures global error listeners - */ - private _setupErrorHandling; - /** - * Is tracing enabled - */ - private static _isEnabled; - /** - * Starts a Transaction waiting for activity idle to finish - */ - static startIdleTransaction(name: string, spanContext?: SpanContext): Span | undefined; - /** - * Update transaction - * @deprecated - */ - static updateTransactionName(name: string): void; - /** - * Finshes the current active transaction - */ - static finishIdleTransaction(): void; - /** - * This uses `performance.getEntries()` to add additional spans to the active transaction. - * Also, we update our timings since we consider the timings in this API to be more correct than our manual - * measurements. - * - * @param transactionSpan The transaction span - */ - private static _addPerformanceEntries; - /** - * Sets the status of the current active transaction (if there is one) - */ - static setTransactionStatus(status: SpanStatus): void; - /** - * Converts from milliseconds to seconds - * @param time time in ms - */ - private static _msToSec; - /** - * Starts tracking for a specifc activity - * - * @param name Name of the activity, can be any string (Only used internally to identify the activity) - * @param spanContext If provided a Span with the SpanContext will be created. - * @param options _autoPopAfter_ | Time in ms, if provided the activity will be popped automatically after this timeout. This can be helpful in cases where you cannot gurantee your application knows the state and calls `popActivity` for sure. - */ - static pushActivity(name: string, spanContext?: SpanContext, options?: { - autoPopAfter?: number; - }): number; - /** - * Removes activity and finishes the span in case there is one - */ - static popActivity(id: number, spanData?: { - [key: string]: any; - }): void; -} -export {}; -//# sourceMappingURL=tracing.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/tracing.d.ts.map b/node_modules/@sentry/apm/dist/integrations/tracing.d.ts.map deleted file mode 100644 index 137fc67..0000000 --- a/node_modules/@sentry/apm/dist/integrations/tracing.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/integrations/tracing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAWvG;;GAEG;AACH,UAAU,cAAc;IACtB;;;;;OAKG;IACH,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACjD;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,gCAAgC,EAAE,OAAO,CAAC;IAC1C;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;;;;OAQG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;;;;;;OAOG;IACH,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED,YAAY;AACZ,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAKD;;GAEG;AACH,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IAEjC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAU;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W,GAAG,IAAI,GAAG,SAAS;IAiD7F;;;OAGG;WACW,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAavD;;OAEG;WACW,qBAAqB,IAAI,IAAI;IAU3C;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAiJrC;;OAEG;WACW,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAQ5D;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ;IAIvB;;;;;;OAMG;WACW,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,WAAW,EACzB,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GACA,MAAM;IA4CT;;OAEG;WACW,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI;CA6C/E"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/tracing.js b/node_modules/@sentry/apm/dist/integrations/tracing.js deleted file mode 100644 index a5b6181..0000000 --- a/node_modules/@sentry/apm/dist/integrations/tracing.js +++ /dev/null @@ -1,631 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var global = utils_1.getGlobalObject(); -var defaultTracingOrigins = ['localhost', /^\//]; -/** - * Tracing Integration - */ -var Tracing = /** @class */ (function () { - /** - * Constructor for Tracing - * - * @param _options TracingOptions - */ - function Tracing(_options) { - /** - * @inheritDoc - */ - this.name = Tracing.id; - this._emitOptionsWarning = false; - if (global.performance) { - global.performance.mark('sentry-tracing-init'); - } - var defaults = { - discardBackgroundSpans: true, - idleTimeout: 500, - maxTransactionDuration: 600, - shouldCreateSpanForRequest: function (url) { - var origins = (_options && _options.tracingOrigins) || defaultTracingOrigins; - return (origins.some(function (origin) { return utils_1.isMatchingPattern(url, origin); }) && - !utils_1.isMatchingPattern(url, 'sentry_key')); - }, - startTransactionOnLocationChange: true, - traceFetch: true, - traceXHR: true, - tracesSampleRate: 1, - tracingOrigins: defaultTracingOrigins, - }; - // NOTE: Logger doesn't work in contructors, as it's initialized after integrations instances - if (!_options || !Array.isArray(_options.tracingOrigins) || _options.tracingOrigins.length === 0) { - this._emitOptionsWarning = true; - } - Tracing.options = tslib_1.__assign({}, defaults, _options); - } - /** - * @inheritDoc - */ - Tracing.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) { - Tracing._getCurrentHub = getCurrentHub; - if (this._emitOptionsWarning) { - utils_1.logger.warn('[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.'); - utils_1.logger.warn("[Tracing] We added a reasonable default for you: " + defaultTracingOrigins); - } - if (!Tracing._isEnabled()) { - return; - } - // Starting our inital pageload transaction - if (global.location && global.location.href) { - // `${global.location.href}` will be used a temp transaction name - Tracing.startIdleTransaction(global.location.href, { - op: 'pageload', - sampled: true, - }); - } - this._setupXHRTracing(); - this._setupFetchTracing(); - this._setupHistory(); - this._setupErrorHandling(); - this._setupBackgroundTabDetection(); - Tracing._pingHeartbeat(); - // This EventProcessor makes sure that the transaction is not longer than maxTransactionDuration - addGlobalEventProcessor(function (event) { - var self = getCurrentHub().getIntegration(Tracing); - if (!self) { - return event; - } - if (Tracing._isEnabled()) { - var isOutdatedTransaction = event.timestamp && - event.start_timestamp && - (event.timestamp - event.start_timestamp > Tracing.options.maxTransactionDuration || - event.timestamp - event.start_timestamp < 0); - if (Tracing.options.maxTransactionDuration !== 0 && event.type === 'transaction' && isOutdatedTransaction) { - utils_1.logger.log('[Tracing] Discarded transaction since it maxed out maxTransactionDuration'); - return null; - } - } - return event; - }); - }; - /** - * Pings the heartbeat - */ - Tracing._pingHeartbeat = function () { - Tracing._heartbeatTimer = setTimeout(function () { - Tracing._beat(); - }, 5000); - }; - /** - * Checks when entries of Tracing._activities are not changing for 3 beats. If this occurs we finish the transaction - * - */ - Tracing._beat = function () { - clearTimeout(Tracing._heartbeatTimer); - var keys = Object.keys(Tracing._activities); - if (keys.length) { - var heartbeatString = keys.reduce(function (prev, current) { return prev + current; }); - if (heartbeatString === Tracing._prevHeartbeatString) { - Tracing._heartbeatCounter++; - } - else { - Tracing._heartbeatCounter = 0; - } - if (Tracing._heartbeatCounter >= 3) { - if (Tracing._activeTransaction) { - utils_1.logger.log("[Tracing] Heartbeat safeguard kicked in, finishing transaction since activities content hasn't changed for 3 beats"); - Tracing._activeTransaction.setStatus(types_1.SpanStatus.DeadlineExceeded); - Tracing._activeTransaction.setTag('heartbeat', 'failed'); - Tracing.finishIdleTransaction(); - } - } - Tracing._prevHeartbeatString = heartbeatString; - } - Tracing._pingHeartbeat(); - }; - /** - * Discards active transactions if tab moves to background - */ - Tracing.prototype._setupBackgroundTabDetection = function () { - if (Tracing.options.discardBackgroundSpans && global.document) { - document.addEventListener('visibilitychange', function () { - if (document.hidden && Tracing._activeTransaction) { - utils_1.logger.log('[Tracing] Discarded active transaction incl. activities since tab moved to the background'); - Tracing._resetActiveTransaction(); - } - }); - } - }; - /** - * Unsets the current active transaction + activities - */ - Tracing._resetActiveTransaction = function () { - Tracing._activeTransaction = undefined; - Tracing._activities = {}; - }; - /** - * Registers to History API to detect navigation changes - */ - Tracing.prototype._setupHistory = function () { - if (Tracing.options.startTransactionOnLocationChange) { - utils_1.addInstrumentationHandler({ - callback: historyCallback, - type: 'history', - }); - } - }; - /** - * Attaches to fetch to add sentry-trace header + creating spans - */ - Tracing.prototype._setupFetchTracing = function () { - if (Tracing.options.traceFetch && utils_1.supportsNativeFetch()) { - utils_1.addInstrumentationHandler({ - callback: fetchCallback, - type: 'fetch', - }); - } - }; - /** - * Attaches to XHR to add sentry-trace header + creating spans - */ - Tracing.prototype._setupXHRTracing = function () { - if (Tracing.options.traceXHR) { - utils_1.addInstrumentationHandler({ - callback: xhrCallback, - type: 'xhr', - }); - } - }; - /** - * Configures global error listeners - */ - Tracing.prototype._setupErrorHandling = function () { - // tslint:disable-next-line: completed-docs - function errorCallback() { - if (Tracing._activeTransaction) { - /** - * If an error or unhandled promise occurs, we mark the active transaction as failed - */ - utils_1.logger.log("[Tracing] Global error occured, setting status in transaction: " + types_1.SpanStatus.InternalError); - Tracing._activeTransaction.setStatus(types_1.SpanStatus.InternalError); - } - } - utils_1.addInstrumentationHandler({ - callback: errorCallback, - type: 'error', - }); - utils_1.addInstrumentationHandler({ - callback: errorCallback, - type: 'unhandledrejection', - }); - }; - /** - * Is tracing enabled - */ - Tracing._isEnabled = function () { - if (Tracing._enabled !== undefined) { - return Tracing._enabled; - } - // This happens only in test cases where the integration isn't initalized properly - // tslint:disable-next-line: strict-type-predicates - if (!Tracing.options || typeof Tracing.options.tracesSampleRate !== 'number') { - return false; - } - Tracing._enabled = Math.random() > Tracing.options.tracesSampleRate ? false : true; - return Tracing._enabled; - }; - /** - * Starts a Transaction waiting for activity idle to finish - */ - Tracing.startIdleTransaction = function (name, spanContext) { - if (!Tracing._isEnabled()) { - // Tracing is not enabled - return undefined; - } - // If we already have an active transaction it means one of two things - // a) The user did rapid navigation changes and didn't wait until the transaction was finished - // b) A activity wasn't popped correctly and therefore the transaction is stalling - Tracing.finishIdleTransaction(); - utils_1.logger.log('[Tracing] startIdleTransaction, name:', name); - var _getCurrentHub = Tracing._getCurrentHub; - if (!_getCurrentHub) { - return undefined; - } - var hub = _getCurrentHub(); - if (!hub) { - return undefined; - } - var span = hub.startSpan(tslib_1.__assign({}, spanContext, { transaction: name }), true); - Tracing._activeTransaction = span; - // We need to do this workaround here and not use configureScope - // Reason being at the time we start the inital transaction we do not have a client bound on the hub yet - // therefore configureScope wouldn't be executed and we would miss setting the transaction - // tslint:disable-next-line: no-unsafe-any - hub.getScope().setSpan(span); - // The reason we do this here is because of cached responses - // If we start and transaction without an activity it would never finish since there is no activity - var id = Tracing.pushActivity('idleTransactionStarted'); - setTimeout(function () { - Tracing.popActivity(id); - }, (Tracing.options && Tracing.options.idleTimeout) || 100); - return span; - }; - /** - * Update transaction - * @deprecated - */ - Tracing.updateTransactionName = function (name) { - utils_1.logger.log('[Tracing] DEPRECATED, use Sentry.configureScope => scope.setTransaction instead', name); - var _getCurrentHub = Tracing._getCurrentHub; - if (_getCurrentHub) { - var hub = _getCurrentHub(); - if (hub) { - hub.configureScope(function (scope) { - scope.setTransaction(name); - }); - } - } - }; - /** - * Finshes the current active transaction - */ - Tracing.finishIdleTransaction = function () { - var active = Tracing._activeTransaction; - if (active) { - Tracing._addPerformanceEntries(active); - utils_1.logger.log('[Tracing] finishIdleTransaction', active.transaction); - active.finish(/*trimEnd*/ true); - Tracing._resetActiveTransaction(); - } - }; - /** - * This uses `performance.getEntries()` to add additional spans to the active transaction. - * Also, we update our timings since we consider the timings in this API to be more correct than our manual - * measurements. - * - * @param transactionSpan The transaction span - */ - Tracing._addPerformanceEntries = function (transactionSpan) { - if (!global.performance) { - // Gatekeeper if performance API not available - return; - } - utils_1.logger.log('[Tracing] Adding & adjusting spans using Performance API'); - var timeOrigin = Tracing._msToSec(performance.timeOrigin); - // tslint:disable-next-line: completed-docs - function addSpan(span) { - if (transactionSpan.spanRecorder) { - transactionSpan.spanRecorder.finishSpan(span); - } - } - // tslint:disable-next-line: completed-docs - function addPerformanceNavigationTiming(parent, entry, event) { - var span = parent.child({ - description: event, - op: 'browser', - }); - span.startTimestamp = timeOrigin + Tracing._msToSec(entry[event + "Start"]); - span.timestamp = timeOrigin + Tracing._msToSec(entry[event + "End"]); - addSpan(span); - } - // tslint:disable-next-line: completed-docs - function addRequest(parent, entry) { - var request = parent.child({ - description: 'request', - op: 'browser', - }); - request.startTimestamp = timeOrigin + Tracing._msToSec(entry.requestStart); - request.timestamp = timeOrigin + Tracing._msToSec(entry.responseEnd); - addSpan(request); - var response = parent.child({ - description: 'response', - op: 'browser', - }); - response.startTimestamp = timeOrigin + Tracing._msToSec(entry.responseStart); - response.timestamp = timeOrigin + Tracing._msToSec(entry.responseEnd); - addSpan(response); - } - var entryScriptSrc; - if (global.document) { - // tslint:disable-next-line: prefer-for-of - for (var i = 0; i < document.scripts.length; i++) { - // We go through all scripts on the page and look for 'data-entry' - // We remember the name and measure the time between this script finished loading and - // our mark 'sentry-tracing-init' - if (document.scripts[i].dataset.entry === 'true') { - entryScriptSrc = document.scripts[i].src; - break; - } - } - } - var entryScriptStartEndTime; - var tracingInitMarkStartTime; - // tslint:disable: no-unsafe-any - performance - .getEntries() - .slice(Tracing._performanceCursor) - .forEach(function (entry) { - var startTime = Tracing._msToSec(entry.startTime); - var duration = Tracing._msToSec(entry.duration); - if (transactionSpan.op === 'navigation' && timeOrigin + startTime < transactionSpan.startTimestamp) { - return; - } - switch (entry.entryType) { - case 'navigation': - addPerformanceNavigationTiming(transactionSpan, entry, 'unloadEvent'); - addPerformanceNavigationTiming(transactionSpan, entry, 'domContentLoadedEvent'); - addPerformanceNavigationTiming(transactionSpan, entry, 'loadEvent'); - addPerformanceNavigationTiming(transactionSpan, entry, 'connect'); - addPerformanceNavigationTiming(transactionSpan, entry, 'domainLookup'); - addRequest(transactionSpan, entry); - break; - case 'mark': - case 'paint': - case 'measure': - var mark = transactionSpan.child({ - description: entry.entryType + " " + entry.name, - op: 'mark', - }); - mark.startTimestamp = timeOrigin + startTime; - mark.timestamp = mark.startTimestamp + duration; - if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') { - tracingInitMarkStartTime = mark.startTimestamp; - } - addSpan(mark); - break; - case 'resource': - var resourceName_1 = entry.name.replace(window.location.origin, ''); - if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') { - // We need to update existing spans with new timing info - if (transactionSpan.spanRecorder) { - transactionSpan.spanRecorder.finishedSpans.map(function (finishedSpan) { - if (finishedSpan.description && finishedSpan.description.indexOf(resourceName_1) !== -1) { - finishedSpan.startTimestamp = timeOrigin + startTime; - finishedSpan.timestamp = finishedSpan.startTimestamp + duration; - } - }); - } - } - else { - var resource = transactionSpan.child({ - description: entry.initiatorType + " " + resourceName_1, - op: "resource", - }); - resource.startTimestamp = timeOrigin + startTime; - resource.timestamp = resource.startTimestamp + duration; - // We remember the entry script end time to calculate the difference to the first init mark - if (entryScriptStartEndTime === undefined && (entryScriptSrc || '').includes(resourceName_1)) { - entryScriptStartEndTime = resource.timestamp; - } - addSpan(resource); - } - break; - default: - // Ignore other entry types. - } - }); - if (entryScriptStartEndTime !== undefined && tracingInitMarkStartTime !== undefined) { - var evaluation = transactionSpan.child({ - description: 'evaluation', - op: "script", - }); - evaluation.startTimestamp = entryScriptStartEndTime; - evaluation.timestamp = tracingInitMarkStartTime; - addSpan(evaluation); - } - Tracing._performanceCursor = Math.max(performance.getEntries().length - 1, 0); - // tslint:enable: no-unsafe-any - }; - /** - * Sets the status of the current active transaction (if there is one) - */ - Tracing.setTransactionStatus = function (status) { - var active = Tracing._activeTransaction; - if (active) { - utils_1.logger.log('[Tracing] setTransactionStatus', status); - active.setStatus(status); - } - }; - /** - * Converts from milliseconds to seconds - * @param time time in ms - */ - Tracing._msToSec = function (time) { - return time / 1000; - }; - /** - * Starts tracking for a specifc activity - * - * @param name Name of the activity, can be any string (Only used internally to identify the activity) - * @param spanContext If provided a Span with the SpanContext will be created. - * @param options _autoPopAfter_ | Time in ms, if provided the activity will be popped automatically after this timeout. This can be helpful in cases where you cannot gurantee your application knows the state and calls `popActivity` for sure. - */ - Tracing.pushActivity = function (name, spanContext, options) { - if (!Tracing._isEnabled()) { - // Tracing is not enabled - return 0; - } - if (!Tracing._activeTransaction) { - utils_1.logger.log("[Tracing] Not pushing activity " + name + " since there is no active transaction"); - return 0; - } - // We want to clear the timeout also here since we push a new activity - clearTimeout(Tracing._debounce); - var _getCurrentHub = Tracing._getCurrentHub; - if (spanContext && _getCurrentHub) { - var hub = _getCurrentHub(); - if (hub) { - var span = hub.startSpan(spanContext); - Tracing._activities[Tracing._currentIndex] = { - name: name, - span: span, - }; - } - } - else { - Tracing._activities[Tracing._currentIndex] = { - name: name, - }; - } - utils_1.logger.log("[Tracing] pushActivity: " + name + "#" + Tracing._currentIndex); - utils_1.logger.log('[Tracing] activies count', Object.keys(Tracing._activities).length); - if (options && typeof options.autoPopAfter === 'number') { - utils_1.logger.log("[Tracing] auto pop of: " + name + "#" + Tracing._currentIndex + " in " + options.autoPopAfter + "ms"); - var index_1 = Tracing._currentIndex; - setTimeout(function () { - Tracing.popActivity(index_1, { - autoPop: true, - status: types_1.SpanStatus.DeadlineExceeded, - }); - }, options.autoPopAfter); - } - return Tracing._currentIndex++; - }; - /** - * Removes activity and finishes the span in case there is one - */ - Tracing.popActivity = function (id, spanData) { - // The !id is on purpose to also fail with 0 - // Since 0 is returned by push activity in case tracing is not enabled - // or there is no active transaction - if (!Tracing._isEnabled() || !id) { - // Tracing is not enabled - return; - } - var activity = Tracing._activities[id]; - if (activity) { - utils_1.logger.log("[Tracing] popActivity " + activity.name + "#" + id); - var span_1 = activity.span; - if (span_1) { - if (spanData) { - Object.keys(spanData).forEach(function (key) { - span_1.setData(key, spanData[key]); - if (key === 'status_code') { - span_1.setHttpStatus(spanData[key]); - } - if (key === 'status') { - span_1.setStatus(spanData[key]); - } - }); - } - span_1.finish(); - } - // tslint:disable-next-line: no-dynamic-delete - delete Tracing._activities[id]; - } - var count = Object.keys(Tracing._activities).length; - clearTimeout(Tracing._debounce); - utils_1.logger.log('[Tracing] activies count', count); - if (count === 0 && Tracing._activeTransaction) { - var timeout = Tracing.options && Tracing.options.idleTimeout; - utils_1.logger.log("[Tracing] Flushing Transaction in " + timeout + "ms"); - Tracing._debounce = setTimeout(function () { - Tracing.finishIdleTransaction(); - }, timeout); - } - }; - /** - * @inheritDoc - */ - Tracing.id = 'Tracing'; - Tracing._currentIndex = 1; - Tracing._activities = {}; - Tracing._debounce = 0; - Tracing._performanceCursor = 0; - Tracing._heartbeatTimer = 0; - Tracing._heartbeatCounter = 0; - return Tracing; -}()); -exports.Tracing = Tracing; -/** - * Creates breadcrumbs from XHR API calls - */ -function xhrCallback(handlerData) { - if (!Tracing.options.traceXHR) { - return; - } - // tslint:disable-next-line: no-unsafe-any - if (!handlerData || !handlerData.xhr || !handlerData.xhr.__sentry_xhr__) { - return; - } - // tslint:disable: no-unsafe-any - var xhr = handlerData.xhr.__sentry_xhr__; - if (!Tracing.options.shouldCreateSpanForRequest(xhr.url)) { - return; - } - // We only capture complete, non-sentry requests - if (handlerData.xhr.__sentry_own_request__) { - return; - } - if (handlerData.endTimestamp && handlerData.xhr.__sentry_xhr_activity_id__) { - Tracing.popActivity(handlerData.xhr.__sentry_xhr_activity_id__, handlerData.xhr.__sentry_xhr__); - return; - } - handlerData.xhr.__sentry_xhr_activity_id__ = Tracing.pushActivity('xhr', { - data: tslib_1.__assign({}, xhr.data, { type: 'xhr' }), - description: xhr.method + " " + xhr.url, - op: 'http', - }); - // Adding the trace header to the span - var activity = Tracing._activities[handlerData.xhr.__sentry_xhr_activity_id__]; - if (activity) { - var span = activity.span; - if (span && handlerData.xhr.setRequestHeader) { - handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent()); - } - } - // tslint:enable: no-unsafe-any -} -/** - * Creates breadcrumbs from fetch API calls - */ -function fetchCallback(handlerData) { - // tslint:disable: no-unsafe-any - if (!Tracing.options.traceFetch) { - return; - } - if (!Tracing.options.shouldCreateSpanForRequest(handlerData.fetchData.url)) { - return; - } - if (handlerData.endTimestamp && handlerData.fetchData.__activity) { - Tracing.popActivity(handlerData.fetchData.__activity, handlerData.fetchData); - } - else { - handlerData.fetchData.__activity = Tracing.pushActivity('fetch', { - data: tslib_1.__assign({}, handlerData.fetchData, { type: 'fetch' }), - description: handlerData.fetchData.method + " " + handlerData.fetchData.url, - op: 'http', - }); - var activity = Tracing._activities[handlerData.fetchData.__activity]; - if (activity) { - var span = activity.span; - if (span) { - var options = (handlerData.args[1] = handlerData.args[1] || {}); - if (options.headers) { - if (Array.isArray(options.headers)) { - options.headers = tslib_1.__spread(options.headers, [{ 'sentry-trace': span.toTraceparent() }]); - } - else { - options.headers = tslib_1.__assign({}, options.headers, { 'sentry-trace': span.toTraceparent() }); - } - } - else { - options.headers = { 'sentry-trace': span.toTraceparent() }; - } - } - } - } - // tslint:enable: no-unsafe-any -} -/** - * Creates transaction from navigation changes - */ -function historyCallback(_) { - if (Tracing.options.startTransactionOnLocationChange && global && global.location) { - Tracing.startIdleTransaction(global.location.href, { - op: 'navigation', - sampled: true, - }); - } -} -//# sourceMappingURL=tracing.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/integrations/tracing.js.map b/node_modules/@sentry/apm/dist/integrations/tracing.js.map deleted file mode 100644 index aac5441..0000000 --- a/node_modules/@sentry/apm/dist/integrations/tracing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/integrations/tracing.ts"],"names":[],"mappings":";;AAAA,uCAAuG;AACvG,uCAMuB;AAuFvB,IAAM,MAAM,GAAG,uBAAe,EAAU,CAAC;AACzC,IAAM,qBAAqB,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAEnD;;GAEG;AACH;IA0CE;;;;OAIG;IACH,iBAAmB,QAAkC;QA9CrD;;WAEG;QACI,SAAI,GAAW,OAAO,CAAC,EAAE,CAAC;QA4BhB,wBAAmB,GAAY,KAAK,CAAC;QAgBpD,IAAI,MAAM,CAAC,WAAW,EAAE;YACtB,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;SAChD;QACD,IAAM,QAAQ,GAAG;YACf,sBAAsB,EAAE,IAAI;YAC5B,WAAW,EAAE,GAAG;YAChB,sBAAsB,EAAE,GAAG;YAC3B,0BAA0B,EAA1B,UAA2B,GAAW;gBACpC,IAAM,OAAO,GAAG,CAAC,QAAQ,IAAI,QAAQ,CAAC,cAAc,CAAC,IAAI,qBAAqB,CAAC;gBAC/E,OAAO,CACL,OAAO,CAAC,IAAI,CAAC,UAAC,MAAuB,IAAK,OAAA,yBAAi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,IAAI,CAAC,aAAa,EAAE,GACrC,CAAC;qBACH;iBACF;qBAAM;oBACL,OAAO,CAAC,OAAO,GAAG,EAAE,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;iBAC5D;aACF;SACF;KACF;IACD,+BAA+B;AACjC,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,CAAyB;IAChD,IAAI,OAAO,CAAC,OAAO,CAAC,gCAAgC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE;QACjF,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YACjD,EAAE,EAAE,YAAY;YAChB,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;KACJ;AACH,CAAC","sourcesContent":["import { Event, EventProcessor, Hub, Integration, Span, SpanContext, SpanStatus } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getGlobalObject,\n isMatchingPattern,\n logger,\n supportsNativeFetch,\n} from '@sentry/utils';\n\nimport { Span as SpanClass } from '../span';\n\n/**\n * Options for Tracing integration\n */\ninterface TracingOptions {\n /**\n * List of strings / regex where the integration should create Spans out of. Additionally this will be used\n * to define which outgoing requests the `sentry-trace` header will be attached to.\n *\n * Default: ['localhost', /^\\//]\n */\n tracingOrigins: Array;\n /**\n * Flag to disable patching all together for fetch requests.\n *\n * Default: true\n */\n traceFetch: boolean;\n /**\n * Flag to disable patching all together for xhr requests.\n *\n * Default: true\n */\n traceXHR: boolean;\n /**\n * This function will be called before creating a span for a request with the given url.\n * Return false if you don't want a span for the given url.\n *\n * By default it uses the `tracingOrigins` options as a url match.\n */\n shouldCreateSpanForRequest(url: string): boolean;\n /**\n * The time to wait in ms until the transaction will be finished. The transaction will use the end timestamp of\n * the last finished span as the endtime for the transaction.\n * Time is in ms.\n *\n * Default: 500\n */\n idleTimeout: number;\n /**\n * Flag to enable/disable creation of `navigation` transaction on history changes. Useful for react applications with\n * a router.\n *\n * Default: true\n */\n startTransactionOnLocationChange: boolean;\n /**\n * Sample to determine if the Integration should instrument anything. The decision will be taken once per load\n * on initalization.\n * 0 = 0% chance of instrumenting\n * 1 = 100% change of instrumenting\n *\n * Default: 1\n */\n tracesSampleRate: number;\n\n /**\n * The maximum duration of a transaction before it will be discarded. This is for some edge cases where a browser\n * completely freezes the JS state and picks it up later (background tabs).\n * So after this duration, the SDK will not send the event.\n * If you want to have an unlimited duration set it to 0.\n * Time is in seconds.\n *\n * Default: 600\n */\n maxTransactionDuration: number;\n\n /**\n * Flag to discard all spans that occur in background. This includes transactions. Browser background tab timing is\n * not suited towards doing precise measurements of operations. That's why this option discards any active transaction\n * and also doesn't add any spans that happen in the background. Background spans/transaction can mess up your\n * statistics in non deterministic ways that's why we by default recommend leaving this opition enabled.\n *\n * Default: true\n */\n discardBackgroundSpans: boolean;\n}\n\n/** JSDoc */\ninterface Activity {\n name: string;\n span?: Span;\n}\n\nconst global = getGlobalObject();\nconst defaultTracingOrigins = ['localhost', /^\\//];\n\n/**\n * Tracing Integration\n */\nexport class Tracing implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Tracing.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Tracing';\n\n /**\n * Is Tracing enabled, this will be determined once per pageload.\n */\n private static _enabled?: boolean;\n\n /** JSDoc */\n public static options: TracingOptions;\n\n /**\n * Returns current hub.\n */\n private static _getCurrentHub?: () => Hub;\n\n private static _activeTransaction?: Span;\n\n private static _currentIndex: number = 1;\n\n public static _activities: { [key: number]: Activity } = {};\n\n private static _debounce: number = 0;\n\n private readonly _emitOptionsWarning: boolean = false;\n\n private static _performanceCursor: number = 0;\n\n private static _heartbeatTimer: number = 0;\n\n private static _prevHeartbeatString: string | undefined;\n\n private static _heartbeatCounter: number = 0;\n\n /**\n * Constructor for Tracing\n *\n * @param _options TracingOptions\n */\n public constructor(_options?: Partial) {\n if (global.performance) {\n global.performance.mark('sentry-tracing-init');\n }\n const defaults = {\n discardBackgroundSpans: true,\n idleTimeout: 500,\n maxTransactionDuration: 600,\n shouldCreateSpanForRequest(url: string): boolean {\n const origins = (_options && _options.tracingOrigins) || defaultTracingOrigins;\n return (\n origins.some((origin: string | RegExp) => isMatchingPattern(url, origin)) &&\n !isMatchingPattern(url, 'sentry_key')\n );\n },\n startTransactionOnLocationChange: true,\n traceFetch: true,\n traceXHR: true,\n tracesSampleRate: 1,\n tracingOrigins: defaultTracingOrigins,\n };\n // NOTE: Logger doesn't work in contructors, as it's initialized after integrations instances\n if (!_options || !Array.isArray(_options.tracingOrigins) || _options.tracingOrigins.length === 0) {\n this._emitOptionsWarning = true;\n }\n Tracing.options = {\n ...defaults,\n ..._options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n Tracing._getCurrentHub = getCurrentHub;\n\n if (this._emitOptionsWarning) {\n logger.warn(\n '[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.',\n );\n logger.warn(`[Tracing] We added a reasonable default for you: ${defaultTracingOrigins}`);\n }\n\n if (!Tracing._isEnabled()) {\n return;\n }\n\n // Starting our inital pageload transaction\n if (global.location && global.location.href) {\n // `${global.location.href}` will be used a temp transaction name\n Tracing.startIdleTransaction(global.location.href, {\n op: 'pageload',\n sampled: true,\n });\n }\n\n this._setupXHRTracing();\n\n this._setupFetchTracing();\n\n this._setupHistory();\n\n this._setupErrorHandling();\n\n this._setupBackgroundTabDetection();\n\n Tracing._pingHeartbeat();\n\n // This EventProcessor makes sure that the transaction is not longer than maxTransactionDuration\n addGlobalEventProcessor((event: Event) => {\n const self = getCurrentHub().getIntegration(Tracing);\n if (!self) {\n return event;\n }\n\n if (Tracing._isEnabled()) {\n const isOutdatedTransaction =\n event.timestamp &&\n event.start_timestamp &&\n (event.timestamp - event.start_timestamp > Tracing.options.maxTransactionDuration ||\n event.timestamp - event.start_timestamp < 0);\n\n if (Tracing.options.maxTransactionDuration !== 0 && event.type === 'transaction' && isOutdatedTransaction) {\n logger.log('[Tracing] Discarded transaction since it maxed out maxTransactionDuration');\n return null;\n }\n }\n\n return event;\n });\n }\n\n /**\n * Pings the heartbeat\n */\n private static _pingHeartbeat(): void {\n Tracing._heartbeatTimer = (setTimeout(() => {\n Tracing._beat();\n }, 5000) as any) as number;\n }\n\n /**\n * Checks when entries of Tracing._activities are not changing for 3 beats. If this occurs we finish the transaction\n *\n */\n private static _beat(): void {\n clearTimeout(Tracing._heartbeatTimer);\n const keys = Object.keys(Tracing._activities);\n if (keys.length) {\n const heartbeatString = keys.reduce((prev: string, current: string) => prev + current);\n if (heartbeatString === Tracing._prevHeartbeatString) {\n Tracing._heartbeatCounter++;\n } else {\n Tracing._heartbeatCounter = 0;\n }\n if (Tracing._heartbeatCounter >= 3) {\n if (Tracing._activeTransaction) {\n logger.log(\n \"[Tracing] Heartbeat safeguard kicked in, finishing transaction since activities content hasn't changed for 3 beats\",\n );\n Tracing._activeTransaction.setStatus(SpanStatus.DeadlineExceeded);\n Tracing._activeTransaction.setTag('heartbeat', 'failed');\n Tracing.finishIdleTransaction();\n }\n }\n Tracing._prevHeartbeatString = heartbeatString;\n }\n Tracing._pingHeartbeat();\n }\n\n /**\n * Discards active transactions if tab moves to background\n */\n private _setupBackgroundTabDetection(): void {\n if (Tracing.options.discardBackgroundSpans && global.document) {\n document.addEventListener('visibilitychange', () => {\n if (document.hidden && Tracing._activeTransaction) {\n logger.log('[Tracing] Discarded active transaction incl. activities since tab moved to the background');\n Tracing._resetActiveTransaction();\n }\n });\n }\n }\n\n /**\n * Unsets the current active transaction + activities\n */\n private static _resetActiveTransaction(): void {\n Tracing._activeTransaction = undefined;\n Tracing._activities = {};\n }\n\n /**\n * Registers to History API to detect navigation changes\n */\n private _setupHistory(): void {\n if (Tracing.options.startTransactionOnLocationChange) {\n addInstrumentationHandler({\n callback: historyCallback,\n type: 'history',\n });\n }\n }\n\n /**\n * Attaches to fetch to add sentry-trace header + creating spans\n */\n private _setupFetchTracing(): void {\n if (Tracing.options.traceFetch && supportsNativeFetch()) {\n addInstrumentationHandler({\n callback: fetchCallback,\n type: 'fetch',\n });\n }\n }\n\n /**\n * Attaches to XHR to add sentry-trace header + creating spans\n */\n private _setupXHRTracing(): void {\n if (Tracing.options.traceXHR) {\n addInstrumentationHandler({\n callback: xhrCallback,\n type: 'xhr',\n });\n }\n }\n\n /**\n * Configures global error listeners\n */\n private _setupErrorHandling(): void {\n // tslint:disable-next-line: completed-docs\n function errorCallback(): void {\n if (Tracing._activeTransaction) {\n /**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\n logger.log(`[Tracing] Global error occured, setting status in transaction: ${SpanStatus.InternalError}`);\n (Tracing._activeTransaction as SpanClass).setStatus(SpanStatus.InternalError);\n }\n }\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'error',\n });\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'unhandledrejection',\n });\n }\n\n /**\n * Is tracing enabled\n */\n private static _isEnabled(): boolean {\n if (Tracing._enabled !== undefined) {\n return Tracing._enabled;\n }\n // This happens only in test cases where the integration isn't initalized properly\n // tslint:disable-next-line: strict-type-predicates\n if (!Tracing.options || typeof Tracing.options.tracesSampleRate !== 'number') {\n return false;\n }\n Tracing._enabled = Math.random() > Tracing.options.tracesSampleRate ? false : true;\n return Tracing._enabled;\n }\n\n /**\n * Starts a Transaction waiting for activity idle to finish\n */\n public static startIdleTransaction(name: string, spanContext?: SpanContext): Span | undefined {\n if (!Tracing._isEnabled()) {\n // Tracing is not enabled\n return undefined;\n }\n\n // If we already have an active transaction it means one of two things\n // a) The user did rapid navigation changes and didn't wait until the transaction was finished\n // b) A activity wasn't popped correctly and therefore the transaction is stalling\n Tracing.finishIdleTransaction();\n\n logger.log('[Tracing] startIdleTransaction, name:', name);\n\n const _getCurrentHub = Tracing._getCurrentHub;\n if (!_getCurrentHub) {\n return undefined;\n }\n\n const hub = _getCurrentHub();\n if (!hub) {\n return undefined;\n }\n\n const span = hub.startSpan(\n {\n ...spanContext,\n transaction: name,\n },\n true,\n );\n\n Tracing._activeTransaction = span;\n\n // We need to do this workaround here and not use configureScope\n // Reason being at the time we start the inital transaction we do not have a client bound on the hub yet\n // therefore configureScope wouldn't be executed and we would miss setting the transaction\n // tslint:disable-next-line: no-unsafe-any\n (hub as any).getScope().setSpan(span);\n\n // The reason we do this here is because of cached responses\n // If we start and transaction without an activity it would never finish since there is no activity\n const id = Tracing.pushActivity('idleTransactionStarted');\n setTimeout(() => {\n Tracing.popActivity(id);\n }, (Tracing.options && Tracing.options.idleTimeout) || 100);\n\n return span;\n }\n\n /**\n * Update transaction\n * @deprecated\n */\n public static updateTransactionName(name: string): void {\n logger.log('[Tracing] DEPRECATED, use Sentry.configureScope => scope.setTransaction instead', name);\n const _getCurrentHub = Tracing._getCurrentHub;\n if (_getCurrentHub) {\n const hub = _getCurrentHub();\n if (hub) {\n hub.configureScope(scope => {\n scope.setTransaction(name);\n });\n }\n }\n }\n\n /**\n * Finshes the current active transaction\n */\n public static finishIdleTransaction(): void {\n const active = Tracing._activeTransaction as SpanClass;\n if (active) {\n Tracing._addPerformanceEntries(active);\n logger.log('[Tracing] finishIdleTransaction', active.transaction);\n active.finish(/*trimEnd*/ true);\n Tracing._resetActiveTransaction();\n }\n }\n\n /**\n * This uses `performance.getEntries()` to add additional spans to the active transaction.\n * Also, we update our timings since we consider the timings in this API to be more correct than our manual\n * measurements.\n *\n * @param transactionSpan The transaction span\n */\n private static _addPerformanceEntries(transactionSpan: SpanClass): void {\n if (!global.performance) {\n // Gatekeeper if performance API not available\n return;\n }\n\n logger.log('[Tracing] Adding & adjusting spans using Performance API');\n\n const timeOrigin = Tracing._msToSec(performance.timeOrigin);\n\n // tslint:disable-next-line: completed-docs\n function addSpan(span: SpanClass): void {\n if (transactionSpan.spanRecorder) {\n transactionSpan.spanRecorder.finishSpan(span);\n }\n }\n\n // tslint:disable-next-line: completed-docs\n function addPerformanceNavigationTiming(parent: SpanClass, entry: { [key: string]: number }, event: string): void {\n const span = parent.child({\n description: event,\n op: 'browser',\n });\n span.startTimestamp = timeOrigin + Tracing._msToSec(entry[`${event}Start`]);\n span.timestamp = timeOrigin + Tracing._msToSec(entry[`${event}End`]);\n addSpan(span);\n }\n\n // tslint:disable-next-line: completed-docs\n function addRequest(parent: SpanClass, entry: { [key: string]: number }): void {\n const request = parent.child({\n description: 'request',\n op: 'browser',\n });\n request.startTimestamp = timeOrigin + Tracing._msToSec(entry.requestStart);\n request.timestamp = timeOrigin + Tracing._msToSec(entry.responseEnd);\n addSpan(request);\n const response = parent.child({\n description: 'response',\n op: 'browser',\n });\n response.startTimestamp = timeOrigin + Tracing._msToSec(entry.responseStart);\n response.timestamp = timeOrigin + Tracing._msToSec(entry.responseEnd);\n addSpan(response);\n }\n\n let entryScriptSrc: string | undefined;\n\n if (global.document) {\n // tslint:disable-next-line: prefer-for-of\n for (let i = 0; i < document.scripts.length; i++) {\n // We go through all scripts on the page and look for 'data-entry'\n // We remember the name and measure the time between this script finished loading and\n // our mark 'sentry-tracing-init'\n if (document.scripts[i].dataset.entry === 'true') {\n entryScriptSrc = document.scripts[i].src;\n break;\n }\n }\n }\n\n let entryScriptStartEndTime: number | undefined;\n let tracingInitMarkStartTime: number | undefined;\n\n // tslint:disable: no-unsafe-any\n performance\n .getEntries()\n .slice(Tracing._performanceCursor)\n .forEach((entry: any) => {\n const startTime = Tracing._msToSec(entry.startTime as number);\n const duration = Tracing._msToSec(entry.duration as number);\n\n if (transactionSpan.op === 'navigation' && timeOrigin + startTime < transactionSpan.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation':\n addPerformanceNavigationTiming(transactionSpan, entry, 'unloadEvent');\n addPerformanceNavigationTiming(transactionSpan, entry, 'domContentLoadedEvent');\n addPerformanceNavigationTiming(transactionSpan, entry, 'loadEvent');\n addPerformanceNavigationTiming(transactionSpan, entry, 'connect');\n addPerformanceNavigationTiming(transactionSpan, entry, 'domainLookup');\n addRequest(transactionSpan, entry);\n break;\n case 'mark':\n case 'paint':\n case 'measure':\n const mark = transactionSpan.child({\n description: `${entry.entryType} ${entry.name}`,\n op: 'mark',\n });\n mark.startTimestamp = timeOrigin + startTime;\n mark.timestamp = mark.startTimestamp + duration;\n if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') {\n tracingInitMarkStartTime = mark.startTimestamp;\n }\n addSpan(mark);\n break;\n case 'resource':\n const resourceName = entry.name.replace(window.location.origin, '');\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n // We need to update existing spans with new timing info\n if (transactionSpan.spanRecorder) {\n transactionSpan.spanRecorder.finishedSpans.map((finishedSpan: SpanClass) => {\n if (finishedSpan.description && finishedSpan.description.indexOf(resourceName) !== -1) {\n finishedSpan.startTimestamp = timeOrigin + startTime;\n finishedSpan.timestamp = finishedSpan.startTimestamp + duration;\n }\n });\n }\n } else {\n const resource = transactionSpan.child({\n description: `${entry.initiatorType} ${resourceName}`,\n op: `resource`,\n });\n resource.startTimestamp = timeOrigin + startTime;\n resource.timestamp = resource.startTimestamp + duration;\n // We remember the entry script end time to calculate the difference to the first init mark\n if (entryScriptStartEndTime === undefined && (entryScriptSrc || '').includes(resourceName)) {\n entryScriptStartEndTime = resource.timestamp;\n }\n addSpan(resource);\n }\n break;\n default:\n // Ignore other entry types.\n }\n });\n\n if (entryScriptStartEndTime !== undefined && tracingInitMarkStartTime !== undefined) {\n const evaluation = transactionSpan.child({\n description: 'evaluation',\n op: `script`,\n });\n evaluation.startTimestamp = entryScriptStartEndTime;\n evaluation.timestamp = tracingInitMarkStartTime;\n addSpan(evaluation);\n }\n\n Tracing._performanceCursor = Math.max(performance.getEntries().length - 1, 0);\n\n // tslint:enable: no-unsafe-any\n }\n\n /**\n * Sets the status of the current active transaction (if there is one)\n */\n public static setTransactionStatus(status: SpanStatus): void {\n const active = Tracing._activeTransaction;\n if (active) {\n logger.log('[Tracing] setTransactionStatus', status);\n active.setStatus(status);\n }\n }\n\n /**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\n private static _msToSec(time: number): number {\n return time / 1000;\n }\n\n /**\n * Starts tracking for a specifc activity\n *\n * @param name Name of the activity, can be any string (Only used internally to identify the activity)\n * @param spanContext If provided a Span with the SpanContext will be created.\n * @param options _autoPopAfter_ | Time in ms, if provided the activity will be popped automatically after this timeout. This can be helpful in cases where you cannot gurantee your application knows the state and calls `popActivity` for sure.\n */\n public static pushActivity(\n name: string,\n spanContext?: SpanContext,\n options?: {\n autoPopAfter?: number;\n },\n ): number {\n if (!Tracing._isEnabled()) {\n // Tracing is not enabled\n return 0;\n }\n if (!Tracing._activeTransaction) {\n logger.log(`[Tracing] Not pushing activity ${name} since there is no active transaction`);\n return 0;\n }\n\n // We want to clear the timeout also here since we push a new activity\n clearTimeout(Tracing._debounce);\n\n const _getCurrentHub = Tracing._getCurrentHub;\n if (spanContext && _getCurrentHub) {\n const hub = _getCurrentHub();\n if (hub) {\n const span = hub.startSpan(spanContext);\n Tracing._activities[Tracing._currentIndex] = {\n name,\n span,\n };\n }\n } else {\n Tracing._activities[Tracing._currentIndex] = {\n name,\n };\n }\n\n logger.log(`[Tracing] pushActivity: ${name}#${Tracing._currentIndex}`);\n logger.log('[Tracing] activies count', Object.keys(Tracing._activities).length);\n if (options && typeof options.autoPopAfter === 'number') {\n logger.log(`[Tracing] auto pop of: ${name}#${Tracing._currentIndex} in ${options.autoPopAfter}ms`);\n const index = Tracing._currentIndex;\n setTimeout(() => {\n Tracing.popActivity(index, {\n autoPop: true,\n status: SpanStatus.DeadlineExceeded,\n });\n }, options.autoPopAfter);\n }\n return Tracing._currentIndex++;\n }\n\n /**\n * Removes activity and finishes the span in case there is one\n */\n public static popActivity(id: number, spanData?: { [key: string]: any }): void {\n // The !id is on purpose to also fail with 0\n // Since 0 is returned by push activity in case tracing is not enabled\n // or there is no active transaction\n if (!Tracing._isEnabled() || !id) {\n // Tracing is not enabled\n return;\n }\n\n const activity = Tracing._activities[id];\n\n if (activity) {\n logger.log(`[Tracing] popActivity ${activity.name}#${id}`);\n const span = activity.span as SpanClass;\n if (span) {\n if (spanData) {\n Object.keys(spanData).forEach((key: string) => {\n span.setData(key, spanData[key]);\n if (key === 'status_code') {\n span.setHttpStatus(spanData[key] as number);\n }\n if (key === 'status') {\n span.setStatus(spanData[key] as SpanStatus);\n }\n });\n }\n span.finish();\n }\n // tslint:disable-next-line: no-dynamic-delete\n delete Tracing._activities[id];\n }\n\n const count = Object.keys(Tracing._activities).length;\n clearTimeout(Tracing._debounce);\n\n logger.log('[Tracing] activies count', count);\n\n if (count === 0 && Tracing._activeTransaction) {\n const timeout = Tracing.options && Tracing.options.idleTimeout;\n logger.log(`[Tracing] Flushing Transaction in ${timeout}ms`);\n Tracing._debounce = (setTimeout(() => {\n Tracing.finishIdleTransaction();\n }, timeout) as any) as number;\n }\n }\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction xhrCallback(handlerData: { [key: string]: any }): void {\n if (!Tracing.options.traceXHR) {\n return;\n }\n\n // tslint:disable-next-line: no-unsafe-any\n if (!handlerData || !handlerData.xhr || !handlerData.xhr.__sentry_xhr__) {\n return;\n }\n\n // tslint:disable: no-unsafe-any\n const xhr = handlerData.xhr.__sentry_xhr__;\n\n if (!Tracing.options.shouldCreateSpanForRequest(xhr.url)) {\n return;\n }\n\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n if (handlerData.endTimestamp && handlerData.xhr.__sentry_xhr_activity_id__) {\n Tracing.popActivity(handlerData.xhr.__sentry_xhr_activity_id__, handlerData.xhr.__sentry_xhr__);\n return;\n }\n\n handlerData.xhr.__sentry_xhr_activity_id__ = Tracing.pushActivity('xhr', {\n data: {\n ...xhr.data,\n type: 'xhr',\n },\n description: `${xhr.method} ${xhr.url}`,\n op: 'http',\n });\n\n // Adding the trace header to the span\n const activity = Tracing._activities[handlerData.xhr.__sentry_xhr_activity_id__];\n if (activity) {\n const span = activity.span;\n if (span && handlerData.xhr.setRequestHeader) {\n handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent());\n }\n }\n // tslint:enable: no-unsafe-any\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction fetchCallback(handlerData: { [key: string]: any }): void {\n // tslint:disable: no-unsafe-any\n if (!Tracing.options.traceFetch) {\n return;\n }\n\n if (!Tracing.options.shouldCreateSpanForRequest(handlerData.fetchData.url)) {\n return;\n }\n\n if (handlerData.endTimestamp && handlerData.fetchData.__activity) {\n Tracing.popActivity(handlerData.fetchData.__activity, handlerData.fetchData);\n } else {\n handlerData.fetchData.__activity = Tracing.pushActivity('fetch', {\n data: {\n ...handlerData.fetchData,\n type: 'fetch',\n },\n description: `${handlerData.fetchData.method} ${handlerData.fetchData.url}`,\n op: 'http',\n });\n\n const activity = Tracing._activities[handlerData.fetchData.__activity];\n if (activity) {\n const span = activity.span;\n if (span) {\n const options = (handlerData.args[1] = (handlerData.args[1] as { [key: string]: any }) || {});\n if (options.headers) {\n if (Array.isArray(options.headers)) {\n options.headers = [...options.headers, { 'sentry-trace': span.toTraceparent() }];\n } else {\n options.headers = {\n ...options.headers,\n 'sentry-trace': span.toTraceparent(),\n };\n }\n } else {\n options.headers = { 'sentry-trace': span.toTraceparent() };\n }\n }\n }\n }\n // tslint:enable: no-unsafe-any\n}\n\n/**\n * Creates transaction from navigation changes\n */\nfunction historyCallback(_: { [key: string]: any }): void {\n if (Tracing.options.startTransactionOnLocationChange && global && global.location) {\n Tracing.startIdleTransaction(global.location.href, {\n op: 'navigation',\n sampled: true,\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/span.d.ts b/node_modules/@sentry/apm/dist/span.d.ts deleted file mode 100644 index 63b488a..0000000 --- a/node_modules/@sentry/apm/dist/span.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { Hub } from '@sentry/hub'; -import { Span as SpanInterface, SpanContext, SpanStatus } from '@sentry/types'; -export declare const TRACEPARENT_REGEXP: RegExp; -/** - * Keeps track of finished spans for a given transaction - */ -declare class SpanRecorder { - private readonly _maxlen; - private _openSpanCount; - finishedSpans: Span[]; - constructor(maxlen: number); - /** - * This is just so that we don't run out of memory while recording a lot - * of spans. At some point we just stop and flush out the start of the - * trace tree (i.e.the first n spans with the smallest - * start_timestamp). - */ - startSpan(span: Span): void; - /** - * Appends a span to finished spans table - * @param span Span to be added - */ - finishSpan(span: Span): void; -} -/** - * Span contains all data about a span - */ -export declare class Span implements SpanInterface, SpanContext { - /** - * The reference to the current hub. - */ - private readonly _hub; - /** - * @inheritDoc - */ - private readonly _traceId; - /** - * @inheritDoc - */ - private readonly _spanId; - /** - * @inheritDoc - */ - private readonly _parentSpanId?; - /** - * @inheritDoc - */ - sampled?: boolean; - /** - * Timestamp in seconds when the span was created. - */ - startTimestamp: number; - /** - * Timestamp in seconds when the span ended. - */ - timestamp?: number; - /** - * @inheritDoc - */ - transaction?: string; - /** - * @inheritDoc - */ - op?: string; - /** - * @inheritDoc - */ - description?: string; - /** - * @inheritDoc - */ - tags: { - [key: string]: string; - }; - /** - * @inheritDoc - */ - data: { - [key: string]: any; - }; - /** - * List of spans that were finalized - */ - spanRecorder?: SpanRecorder; - constructor(spanContext?: SpanContext, hub?: Hub); - /** - * Attaches SpanRecorder to the span itself - * @param maxlen maximum number of spans that can be recorded - */ - initFinishedSpans(maxlen?: number): void; - /** - * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`. - * Also the `sampled` decision will be inherited. - */ - child(spanContext?: Pick>): Span; - /** - * Continues a trace from a string (usually the header). - * @param traceparent Traceparent string - */ - static fromTraceparent(traceparent: string, spanContext?: Pick>): Span | undefined; - /** - * @inheritDoc - */ - setTag(key: string, value: string): this; - /** - * @inheritDoc - */ - setData(key: string, value: any): this; - /** - * @inheritDoc - */ - setStatus(value: SpanStatus): this; - /** - * @inheritDoc - */ - setHttpStatus(httpStatus: number): this; - /** - * @inheritDoc - */ - isSuccess(): boolean; - /** - * Sets the finish timestamp on the current span. - * @param trimEnd If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming - * the duration of the transaction span. This is useful to discard extra time in the transaction span that is not - * accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the - * transaction after a given "idle time" and we don't want this "idle time" to be part of the transaction. - */ - finish(trimEnd?: boolean): string | undefined; - /** - * @inheritDoc - */ - toTraceparent(): string; - /** - * @inheritDoc - */ - getTraceContext(): object; - /** - * @inheritDoc - */ - toJSON(): object; -} -export {}; -//# sourceMappingURL=span.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/span.d.ts.map b/node_modules/@sentry/apm/dist/span.d.ts.map deleted file mode 100644 index 10c75c2..0000000 --- a/node_modules/@sentry/apm/dist/span.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,GAAG,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI/E,eAAO,MAAM,kBAAkB,QAM9B,CAAC;AAEF;;GAEG;AACH,cAAM,YAAY;IAChB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,cAAc,CAAa;IAC5B,aAAa,EAAE,IAAI,EAAE,CAAM;gBAEf,MAAM,EAAE,MAAM;IAIjC;;;;;OAKG;IACI,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAOlC;;;OAGG;IACI,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;CAGpC;AAED;;GAEG;AACH,qBAAa,IAAK,YAAW,aAAa,EAAE,WAAW;IACrD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA4C;IAEjE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAE5C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO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;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAKzC;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAS9C;;OAEG;IACI,SAAS,IAAI,OAAO;IAI3B;;;;;;OAMG;IACI,MAAM,CAAC,OAAO,GAAE,OAAe,GAAG,MAAM,GAAG,SAAS;IAqD3D;;OAEG;IACI,aAAa,IAAI,MAAM;IAQ9B;;OAEG;IACI,eAAe,IAAI,MAAM;IAahC;;OAEG;IACI,MAAM,IAAI,MAAM;CAexB"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/span.js b/node_modules/@sentry/apm/dist/span.js deleted file mode 100644 index a8b64ab..0000000 --- a/node_modules/@sentry/apm/dist/span.js +++ /dev/null @@ -1,284 +0,0 @@ -// tslint:disable:max-classes-per-file -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var hub_1 = require("@sentry/hub"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -// TODO: Should this be exported? -exports.TRACEPARENT_REGEXP = new RegExp('^[ \\t]*' + // whitespace - '([0-9a-f]{32})?' + // trace_id - '-?([0-9a-f]{16})?' + // span_id - '-?([01])?' + // sampled - '[ \\t]*$'); -/** - * Keeps track of finished spans for a given transaction - */ -var SpanRecorder = /** @class */ (function () { - function SpanRecorder(maxlen) { - this._openSpanCount = 0; - this.finishedSpans = []; - this._maxlen = maxlen; - } - /** - * This is just so that we don't run out of memory while recording a lot - * of spans. At some point we just stop and flush out the start of the - * trace tree (i.e.the first n spans with the smallest - * start_timestamp). - */ - SpanRecorder.prototype.startSpan = function (span) { - this._openSpanCount += 1; - if (this._openSpanCount > this._maxlen) { - span.spanRecorder = undefined; - } - }; - /** - * Appends a span to finished spans table - * @param span Span to be added - */ - SpanRecorder.prototype.finishSpan = function (span) { - this.finishedSpans.push(span); - }; - return SpanRecorder; -}()); -/** - * Span contains all data about a span - */ -var Span = /** @class */ (function () { - function Span(spanContext, hub) { - /** - * The reference to the current hub. - */ - this._hub = hub_1.getCurrentHub(); - /** - * @inheritDoc - */ - this._traceId = utils_1.uuid4(); - /** - * @inheritDoc - */ - this._spanId = utils_1.uuid4().substring(16); - /** - * Timestamp in seconds when the span was created. - */ - this.startTimestamp = utils_1.timestampWithMs(); - /** - * @inheritDoc - */ - this.tags = {}; - /** - * @inheritDoc - */ - this.data = {}; - if (utils_1.isInstanceOf(hub, hub_1.Hub)) { - this._hub = hub; - } - if (!spanContext) { - return this; - } - if (spanContext.traceId) { - this._traceId = spanContext.traceId; - } - if (spanContext.spanId) { - this._spanId = spanContext.spanId; - } - if (spanContext.parentSpanId) { - this._parentSpanId = spanContext.parentSpanId; - } - // We want to include booleans as well here - if ('sampled' in spanContext) { - this.sampled = spanContext.sampled; - } - if (spanContext.transaction) { - this.transaction = spanContext.transaction; - } - if (spanContext.op) { - this.op = spanContext.op; - } - if (spanContext.description) { - this.description = spanContext.description; - } - if (spanContext.data) { - this.data = spanContext.data; - } - if (spanContext.tags) { - this.tags = spanContext.tags; - } - } - /** - * Attaches SpanRecorder to the span itself - * @param maxlen maximum number of spans that can be recorded - */ - Span.prototype.initFinishedSpans = function (maxlen) { - if (maxlen === void 0) { maxlen = 1000; } - if (!this.spanRecorder) { - this.spanRecorder = new SpanRecorder(maxlen); - } - this.spanRecorder.startSpan(this); - }; - /** - * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`. - * Also the `sampled` decision will be inherited. - */ - Span.prototype.child = function (spanContext) { - var span = new Span(tslib_1.__assign({}, spanContext, { parentSpanId: this._spanId, sampled: this.sampled, traceId: this._traceId })); - span.spanRecorder = this.spanRecorder; - return span; - }; - /** - * Continues a trace from a string (usually the header). - * @param traceparent Traceparent string - */ - Span.fromTraceparent = function (traceparent, spanContext) { - var matches = traceparent.match(exports.TRACEPARENT_REGEXP); - if (matches) { - var sampled = void 0; - if (matches[3] === '1') { - sampled = true; - } - else if (matches[3] === '0') { - sampled = false; - } - return new Span(tslib_1.__assign({}, spanContext, { parentSpanId: matches[2], sampled: sampled, traceId: matches[1] })); - } - return undefined; - }; - /** - * @inheritDoc - */ - Span.prototype.setTag = function (key, value) { - var _a; - this.tags = tslib_1.__assign({}, this.tags, (_a = {}, _a[key] = value, _a)); - return this; - }; - /** - * @inheritDoc - */ - Span.prototype.setData = function (key, value) { - var _a; - this.data = tslib_1.__assign({}, this.data, (_a = {}, _a[key] = value, _a)); - return this; - }; - /** - * @inheritDoc - */ - Span.prototype.setStatus = function (value) { - this.setTag('status', value); - return this; - }; - /** - * @inheritDoc - */ - Span.prototype.setHttpStatus = function (httpStatus) { - this.setTag('http.status_code', String(httpStatus)); - var spanStatus = types_1.SpanStatus.fromHttpCode(httpStatus); - if (spanStatus !== types_1.SpanStatus.UnknownError) { - this.setStatus(spanStatus); - } - return this; - }; - /** - * @inheritDoc - */ - Span.prototype.isSuccess = function () { - return this.tags.status === types_1.SpanStatus.Ok; - }; - /** - * Sets the finish timestamp on the current span. - * @param trimEnd If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming - * the duration of the transaction span. This is useful to discard extra time in the transaction span that is not - * accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the - * transaction after a given "idle time" and we don't want this "idle time" to be part of the transaction. - */ - Span.prototype.finish = function (trimEnd) { - var _this = this; - if (trimEnd === void 0) { trimEnd = false; } - // This transaction is already finished, so we should not flush it again. - if (this.timestamp !== undefined) { - return undefined; - } - this.timestamp = utils_1.timestampWithMs(); - if (this.spanRecorder === undefined) { - return undefined; - } - this.spanRecorder.finishSpan(this); - if (this.transaction === undefined) { - // If this has no transaction set we assume there's a parent - // transaction for this span that would be flushed out eventually. - return undefined; - } - if (this.sampled === undefined) { - // At this point a `sampled === undefined` should have already been - // resolved to a concrete decision. If `sampled` is `undefined`, it's - // likely that somebody used `Sentry.startSpan(...)` on a - // non-transaction span and later decided to make it a transaction. - utils_1.logger.warn('Discarding transaction Span without sampling decision'); - return undefined; - } - var finishedSpans = this.spanRecorder ? this.spanRecorder.finishedSpans.filter(function (s) { return s !== _this; }) : []; - if (trimEnd && finishedSpans.length > 0) { - this.timestamp = finishedSpans.reduce(function (prev, current) { - if (prev.timestamp && current.timestamp) { - return prev.timestamp > current.timestamp ? prev : current; - } - return prev; - }).timestamp; - } - return this._hub.captureEvent({ - contexts: { - trace: this.getTraceContext(), - }, - spans: finishedSpans, - start_timestamp: this.startTimestamp, - tags: this.tags, - timestamp: this.timestamp, - transaction: this.transaction, - type: 'transaction', - }); - }; - /** - * @inheritDoc - */ - Span.prototype.toTraceparent = function () { - var sampledString = ''; - if (this.sampled !== undefined) { - sampledString = this.sampled ? '-1' : '-0'; - } - return this._traceId + "-" + this._spanId + sampledString; - }; - /** - * @inheritDoc - */ - Span.prototype.getTraceContext = function () { - return utils_1.dropUndefinedKeys({ - data: Object.keys(this.data).length > 0 ? this.data : undefined, - description: this.description, - op: this.op, - parent_span_id: this._parentSpanId, - span_id: this._spanId, - status: this.tags.status, - tags: Object.keys(this.tags).length > 0 ? this.tags : undefined, - trace_id: this._traceId, - }); - }; - /** - * @inheritDoc - */ - Span.prototype.toJSON = function () { - return utils_1.dropUndefinedKeys({ - data: Object.keys(this.data).length > 0 ? this.data : undefined, - description: this.description, - op: this.op, - parent_span_id: this._parentSpanId, - sampled: this.sampled, - span_id: this._spanId, - start_timestamp: this.startTimestamp, - tags: Object.keys(this.tags).length > 0 ? this.tags : undefined, - timestamp: this.timestamp, - trace_id: this._traceId, - transaction: this.transaction, - }); - }; - return Span; -}()); -exports.Span = Span; -//# sourceMappingURL=span.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/dist/span.js.map b/node_modules/@sentry/apm/dist/span.js.map deleted file mode 100644 index 438cd1c..0000000 --- a/node_modules/@sentry/apm/dist/span.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,sCAAsC;;;AAEtC,mCAAiD;AACjD,uCAA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AAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;IACL,CAAC;IACH,WAAC;AAAD,CAAC,AAnTD,IAmTC;AAnTY,oBAAI","sourcesContent":["// tslint:disable:max-classes-per-file\n\nimport { getCurrentHub, Hub } from '@sentry/hub';\nimport { Span as SpanInterface, SpanContext, SpanStatus } from '@sentry/types';\nimport { dropUndefinedKeys, isInstanceOf, logger, timestampWithMs, uuid4 } from '@sentry/utils';\n\n// TODO: Should this be exported?\nexport const TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Keeps track of finished spans for a given transaction\n */\nclass SpanRecorder {\n private readonly _maxlen: number;\n private _openSpanCount: number = 0;\n public finishedSpans: Span[] = [];\n\n public constructor(maxlen: number) {\n this._maxlen = maxlen;\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n public startSpan(span: Span): void {\n this._openSpanCount += 1;\n if (this._openSpanCount > this._maxlen) {\n span.spanRecorder = undefined;\n }\n }\n\n /**\n * Appends a span to finished spans table\n * @param span Span to be added\n */\n public finishSpan(span: Span): void {\n this.finishedSpans.push(span);\n }\n}\n\n/**\n * Span contains all data about a span\n */\nexport class Span implements SpanInterface, SpanContext {\n /**\n * The reference to the current hub.\n */\n private readonly _hub: Hub = (getCurrentHub() as unknown) as Hub;\n\n /**\n * @inheritDoc\n */\n private readonly _traceId: string = uuid4();\n\n /**\n * @inheritDoc\n */\n private readonly _spanId: string = uuid4().substring(16);\n\n /**\n * @inheritDoc\n */\n private readonly _parentSpanId?: string;\n\n /**\n * @inheritDoc\n */\n public sampled?: boolean;\n\n /**\n * Timestamp in seconds when the span was created.\n */\n public startTimestamp: number = timestampWithMs();\n\n /**\n * Timestamp in seconds when the span ended.\n */\n public timestamp?: number;\n\n /**\n * @inheritDoc\n */\n public transaction?: string;\n\n /**\n * @inheritDoc\n */\n public op?: string;\n\n /**\n * @inheritDoc\n */\n public description?: string;\n\n /**\n * @inheritDoc\n */\n public tags: { [key: string]: string } = {};\n\n /**\n * @inheritDoc\n */\n public data: { [key: string]: any } = {};\n\n /**\n * List of spans that were finalized\n */\n public spanRecorder?: SpanRecorder;\n\n public constructor(spanContext?: SpanContext, hub?: Hub) {\n if (isInstanceOf(hub, Hub)) {\n this._hub = hub as Hub;\n }\n\n if (!spanContext) {\n return this;\n }\n\n if (spanContext.traceId) {\n this._traceId = spanContext.traceId;\n }\n if (spanContext.spanId) {\n this._spanId = spanContext.spanId;\n }\n if (spanContext.parentSpanId) {\n this._parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.transaction) {\n this.transaction = spanContext.transaction;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.data) {\n this.data = spanContext.data;\n }\n if (spanContext.tags) {\n this.tags = spanContext.tags;\n }\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n public initFinishedSpans(maxlen: number = 1000): void {\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.startSpan(this);\n }\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n */\n public child(spanContext?: Pick>): Span {\n const span = new Span({\n ...spanContext,\n parentSpanId: this._spanId,\n sampled: this.sampled,\n traceId: this._traceId,\n });\n\n span.spanRecorder = this.spanRecorder;\n\n return span;\n }\n\n /**\n * Continues a trace from a string (usually the header).\n * @param traceparent Traceparent string\n */\n public static fromTraceparent(\n traceparent: string,\n spanContext?: Pick>,\n ): Span | undefined {\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (matches) {\n let sampled: boolean | undefined;\n if (matches[3] === '1') {\n sampled = true;\n } else if (matches[3] === '0') {\n sampled = false;\n }\n return new Span({\n ...spanContext,\n parentSpanId: matches[2],\n sampled,\n traceId: matches[1],\n });\n }\n return undefined;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setData(key: string, value: any): this {\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setStatus(value: SpanStatus): this {\n this.setTag('status', value);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setHttpStatus(httpStatus: number): this {\n this.setTag('http.status_code', String(httpStatus));\n const spanStatus = SpanStatus.fromHttpCode(httpStatus);\n if (spanStatus !== SpanStatus.UnknownError) {\n this.setStatus(spanStatus);\n }\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public isSuccess(): boolean {\n return this.tags.status === SpanStatus.Ok;\n }\n\n /**\n * Sets the finish timestamp on the current span.\n * @param trimEnd If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming\n * the duration of the transaction span. This is useful to discard extra time in the transaction span that is not\n * accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the\n * transaction after a given \"idle time\" and we don't want this \"idle time\" to be part of the transaction.\n */\n public finish(trimEnd: boolean = false): string | undefined {\n // This transaction is already finished, so we should not flush it again.\n if (this.timestamp !== undefined) {\n return undefined;\n }\n\n this.timestamp = timestampWithMs();\n\n if (this.spanRecorder === undefined) {\n return undefined;\n }\n\n this.spanRecorder.finishSpan(this);\n\n if (this.transaction === undefined) {\n // If this has no transaction set we assume there's a parent\n // transaction for this span that would be flushed out eventually.\n return undefined;\n }\n\n if (this.sampled === undefined) {\n // At this point a `sampled === undefined` should have already been\n // resolved to a concrete decision. If `sampled` is `undefined`, it's\n // likely that somebody used `Sentry.startSpan(...)` on a\n // non-transaction span and later decided to make it a transaction.\n logger.warn('Discarding transaction Span without sampling decision');\n return undefined;\n }\n\n const finishedSpans = this.spanRecorder ? this.spanRecorder.finishedSpans.filter(s => s !== this) : [];\n\n if (trimEnd && finishedSpans.length > 0) {\n this.timestamp = finishedSpans.reduce((prev: Span, current: Span) => {\n if (prev.timestamp && current.timestamp) {\n return prev.timestamp > current.timestamp ? prev : current;\n }\n return prev;\n }).timestamp;\n }\n\n return this._hub.captureEvent({\n contexts: {\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.timestamp,\n transaction: this.transaction,\n type: 'transaction',\n });\n }\n\n /**\n * @inheritDoc\n */\n public toTraceparent(): string {\n let sampledString = '';\n if (this.sampled !== undefined) {\n sampledString = this.sampled ? '-1' : '-0';\n }\n return `${this._traceId}-${this._spanId}${sampledString}`;\n }\n\n /**\n * @inheritDoc\n */\n public getTraceContext(): object {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this._parentSpanId,\n span_id: this._spanId,\n status: this.tags.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this._traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n public toJSON(): object {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this._parentSpanId,\n sampled: this.sampled,\n span_id: this._spanId,\n start_timestamp: this.startTimestamp,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.timestamp,\n trace_id: this._traceId,\n transaction: this.transaction,\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/hubextensions.d.ts b/node_modules/@sentry/apm/esm/hubextensions.d.ts deleted file mode 100644 index 8b05a49..0000000 --- a/node_modules/@sentry/apm/esm/hubextensions.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This patches the global object and injects the APM extensions methods - */ -export declare function addExtensionMethods(): void; -//# sourceMappingURL=hubextensions.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/hubextensions.d.ts.map b/node_modules/@sentry/apm/esm/hubextensions.d.ts.map deleted file mode 100644 index 69c4e45..0000000 --- a/node_modules/@sentry/apm/esm/hubextensions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hubextensions.d.ts","sourceRoot":"","sources":["../src/hubextensions.ts"],"names":[],"mappings":"AAsEA;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAW1C"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/hubextensions.js b/node_modules/@sentry/apm/esm/hubextensions.js deleted file mode 100644 index 0c52340..0000000 --- a/node_modules/@sentry/apm/esm/hubextensions.js +++ /dev/null @@ -1,76 +0,0 @@ -import { getMainCarrier } from '@sentry/hub'; -import { isInstanceOf } from '@sentry/utils'; -import { Span } from './span'; -/** - * Checks whether given value is instance of Span - * @param span value to check - */ -function isSpanInstance(span) { - return isInstanceOf(span, Span); -} -/** Returns all trace headers that are currently on the top scope. */ -function traceHeaders() { - // @ts-ignore - var that = this; - var scope = that.getScope(); - if (scope) { - var span = scope.getSpan(); - if (span) { - return { - 'sentry-trace': span.toTraceparent(), - }; - } - } - return {}; -} -/** - * This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured - * and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope, - * the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`. - * - * @param span Already constructed span which should be started or properties with which the span should be created - */ -function startSpan(spanOrSpanContext, forceNoChild) { - if (forceNoChild === void 0) { forceNoChild = false; } - // @ts-ignore - var that = this; - var scope = that.getScope(); - var client = that.getClient(); - var span; - if (!isSpanInstance(spanOrSpanContext) && !forceNoChild) { - if (scope) { - var parentSpan = scope.getSpan(); - if (parentSpan) { - span = parentSpan.child(spanOrSpanContext); - } - } - } - if (!isSpanInstance(span)) { - span = new Span(spanOrSpanContext, that); - } - if (span.sampled === undefined && span.transaction !== undefined) { - var sampleRate = (client && client.getOptions().tracesSampleRate) || 0; - span.sampled = Math.random() < sampleRate; - } - if (span.sampled) { - var experimentsOptions = (client && client.getOptions()._experiments) || {}; - span.initFinishedSpans(experimentsOptions.maxSpans); - } - return span; -} -/** - * This patches the global object and injects the APM extensions methods - */ -export function addExtensionMethods() { - var carrier = getMainCarrier(); - if (carrier.__SENTRY__) { - carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; - if (!carrier.__SENTRY__.extensions.startSpan) { - carrier.__SENTRY__.extensions.startSpan = startSpan; - } - if (!carrier.__SENTRY__.extensions.traceHeaders) { - carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; - } - } -} -//# sourceMappingURL=hubextensions.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/hubextensions.js.map b/node_modules/@sentry/apm/esm/hubextensions.js.map deleted file mode 100644 index ca10278..0000000 --- a/node_modules/@sentry/apm/esm/hubextensions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hubextensions.js","sourceRoot":"","sources":["../src/hubextensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAO,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,SAAS,cAAc,CAAC,IAAa;IACnC,OAAO,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,qEAAqE;AACrE,SAAS,YAAY;IACnB,aAAa;IACb,IAAM,IAAI,GAAG,IAAW,CAAC;IACzB,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,IAAI,KAAK,EAAE;QACT,IAAM,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;QAC7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kB,CAAC,CAAC;KAC/D;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,IAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IACjC,IAAI,OAAO,CAAC,UAAU,EAAE;QACtB,OAAO,CAAC,UAAU,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC;QACpE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE;YAC5C,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,GAAG,SAAS,CAAC;SACrD;QACD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,EAAE;YAC/C,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,GAAG,YAAY,CAAC;SAC3D;KACF;AACH,CAAC","sourcesContent":["import { getMainCarrier, Hub } from '@sentry/hub';\nimport { SpanContext } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { Span } from './span';\n\n/**\n * Checks whether given value is instance of Span\n * @param span value to check\n */\nfunction isSpanInstance(span: unknown): span is Span {\n return isInstanceOf(span, Span);\n}\n\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders(): { [key: string]: string } {\n // @ts-ignore\n const that = this as Hub;\n const scope = that.getScope();\n if (scope) {\n const span = scope.getSpan();\n if (span) {\n return {\n 'sentry-trace': span.toTraceparent(),\n };\n }\n }\n return {};\n}\n\n/**\n * This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured\n * and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope,\n * the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`.\n *\n * @param span Already constructed span which should be started or properties with which the span should be created\n */\nfunction startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild: boolean = false): Span {\n // @ts-ignore\n const that = this as Hub;\n const scope = that.getScope();\n const client = that.getClient();\n let span;\n\n if (!isSpanInstance(spanOrSpanContext) && !forceNoChild) {\n if (scope) {\n const parentSpan = scope.getSpan() as Span;\n if (parentSpan) {\n span = parentSpan.child(spanOrSpanContext);\n }\n }\n }\n\n if (!isSpanInstance(span)) {\n span = new Span(spanOrSpanContext, that);\n }\n\n if (span.sampled === undefined && span.transaction !== undefined) {\n const sampleRate = (client && client.getOptions().tracesSampleRate) || 0;\n span.sampled = Math.random() < sampleRate;\n }\n\n if (span.sampled) {\n const experimentsOptions = (client && client.getOptions()._experiments) || {};\n span.initFinishedSpans(experimentsOptions.maxSpans as number);\n }\n\n return span;\n}\n\n/**\n * This patches the global object and injects the APM extensions methods\n */\nexport function addExtensionMethods(): void {\n const carrier = getMainCarrier();\n if (carrier.__SENTRY__) {\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startSpan) {\n carrier.__SENTRY__.extensions.startSpan = startSpan;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/index.bundle.d.ts b/node_modules/@sentry/apm/esm/index.bundle.d.ts deleted file mode 100644 index 01ba2bd..0000000 --- a/node_modules/@sentry/apm/esm/index.bundle.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export { Breadcrumb, Request, SdkInfo, Event, Exception, Response, Severity, StackFrame, Stacktrace, Status, Thread, User, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, Transports, withScope, } from '@sentry/browser'; -export { BrowserOptions } from '@sentry/browser'; -export { BrowserClient, ReportDialogOptions } from '@sentry/browser'; -export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap, } from '@sentry/browser'; -export { SDK_NAME, SDK_VERSION } from '@sentry/browser'; -import * as ApmIntegrations from './integrations'; -export { Span, TRACEPARENT_REGEXP } from './span'; -declare const INTEGRATIONS: { - Tracing: typeof ApmIntegrations.Tracing; - GlobalHandlers: typeof import("../../browser/dist/integrations").GlobalHandlers; - TryCatch: typeof import("../../browser/dist/integrations").TryCatch; - Breadcrumbs: typeof import("../../browser/dist/integrations").Breadcrumbs; - LinkedErrors: typeof import("../../browser/dist/integrations").LinkedErrors; - UserAgent: typeof import("../../browser/dist/integrations").UserAgent; - FunctionToString: typeof import("@sentry/core/dist/integrations").FunctionToString; - InboundFilters: typeof import("@sentry/core/dist/integrations").InboundFilters; -}; -export { INTEGRATIONS as Integrations }; -//# sourceMappingURL=index.bundle.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/index.bundle.d.ts.map b/node_modules/@sentry/apm/esm/index.bundle.d.ts.map deleted file mode 100644 index 1ebca5a..0000000 --- a/node_modules/@sentry/apm/esm/index.bundle.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.bundle.d.ts","sourceRoot":"","sources":["../src/index.bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,UAAU,EACV,SAAS,GACV,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,IAAI,EACJ,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,IAAI,GACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAMxD,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAYlD,QAAA,MAAM,YAAY;;;;;;;;;CAIjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/index.bundle.js b/node_modules/@sentry/apm/esm/index.bundle.js deleted file mode 100644 index 6fff1d7..0000000 --- a/node_modules/@sentry/apm/esm/index.bundle.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as tslib_1 from "tslib"; -export { Severity, Status, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, Transports, withScope, } from '@sentry/browser'; -export { BrowserClient } from '@sentry/browser'; -export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap, } from '@sentry/browser'; -export { SDK_NAME, SDK_VERSION } from '@sentry/browser'; -import { Integrations as BrowserIntegrations } from '@sentry/browser'; -import { getGlobalObject } from '@sentry/utils'; -import { addExtensionMethods } from './hubextensions'; -import * as ApmIntegrations from './integrations'; -export { Span, TRACEPARENT_REGEXP } from './span'; -var windowIntegrations = {}; -// This block is needed to add compatibility with the integrations packages when used with a CDN -// tslint:disable: no-unsafe-any -var _window = getGlobalObject(); -if (_window.Sentry && _window.Sentry.Integrations) { - windowIntegrations = _window.Sentry.Integrations; -} -// tslint:enable: no-unsafe-any -var INTEGRATIONS = tslib_1.__assign({}, windowIntegrations, BrowserIntegrations, { Tracing: ApmIntegrations.Tracing }); -export { INTEGRATIONS as Integrations }; -// We are patching the global object with our hub extension methods -addExtensionMethods(); -//# sourceMappingURL=index.bundle.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/index.bundle.js.map b/node_modules/@sentry/apm/esm/index.bundle.js.map deleted file mode 100644 index d9d0d9e..0000000 --- a/node_modules/@sentry/apm/esm/index.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.bundle.js","sourceRoot":"","sources":["../src/index.bundle.ts"],"names":[],"mappings":";AAAA,OAAO,EAOL,QAAQ,EAGR,MAAM,GAGP,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,UAAU,EACV,SAAS,GACV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,aAAa,EAAuB,MAAM,iBAAiB,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,IAAI,EACJ,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,IAAI,GACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAElD,IAAI,kBAAkB,GAAG,EAAE,CAAC;AAE5B,gGAAgG;AAChG,gCAAgC;AAChC,IAAM,OAAO,GAAG,eAAe,EAAU,CAAC;AAC1C,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE;IACjD,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;CAClD;AACD,+BAA+B;AAE/B,IAAM,YAAY,wBACb,kBAAkB,EAClB,mBAAmB,IACtB,OAAO,EAAE,eAAe,CAAC,OAAO,GACjC,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,CAAC;AAExC,mEAAmE;AACnE,mBAAmB,EAAE,CAAC","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n Response,\n Severity,\n StackFrame,\n Stacktrace,\n Status,\n Thread,\n User,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n Transports,\n withScope,\n} from '@sentry/browser';\n\nexport { BrowserOptions } from '@sentry/browser';\nexport { BrowserClient, ReportDialogOptions } from '@sentry/browser';\nexport {\n defaultIntegrations,\n forceLoad,\n init,\n lastEventId,\n onLoad,\n showReportDialog,\n flush,\n close,\n wrap,\n} from '@sentry/browser';\nexport { SDK_NAME, SDK_VERSION } from '@sentry/browser';\n\nimport { Integrations as BrowserIntegrations } from '@sentry/browser';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport { addExtensionMethods } from './hubextensions';\nimport * as ApmIntegrations from './integrations';\n\nexport { Span, TRACEPARENT_REGEXP } from './span';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...BrowserIntegrations,\n Tracing: ApmIntegrations.Tracing,\n};\n\nexport { INTEGRATIONS as Integrations };\n\n// We are patching the global object with our hub extension methods\naddExtensionMethods();\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/index.d.ts b/node_modules/@sentry/apm/esm/index.d.ts deleted file mode 100644 index 1f65162..0000000 --- a/node_modules/@sentry/apm/esm/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as ApmIntegrations from './integrations'; -export { ApmIntegrations as Integrations }; -export { Span, TRACEPARENT_REGEXP } from './span'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/index.d.ts.map b/node_modules/@sentry/apm/esm/index.d.ts.map deleted file mode 100644 index 79d1e2f..0000000 --- a/node_modules/@sentry/apm/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,eAAe,IAAI,YAAY,EAAE,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/index.js b/node_modules/@sentry/apm/esm/index.js deleted file mode 100644 index aebbc16..0000000 --- a/node_modules/@sentry/apm/esm/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import { addExtensionMethods } from './hubextensions'; -import * as ApmIntegrations from './integrations'; -export { ApmIntegrations as Integrations }; -export { Span, TRACEPARENT_REGEXP } from './span'; -// We are patching the global object with our hub extension methods -addExtensionMethods(); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/index.js.map b/node_modules/@sentry/apm/esm/index.js.map deleted file mode 100644 index 6c683c9..0000000 --- a/node_modules/@sentry/apm/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,eAAe,IAAI,YAAY,EAAE,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAElD,mEAAmE;AACnE,mBAAmB,EAAE,CAAC","sourcesContent":["import { addExtensionMethods } from './hubextensions';\nimport * as ApmIntegrations from './integrations';\n\nexport { ApmIntegrations as Integrations };\nexport { Span, TRACEPARENT_REGEXP } from './span';\n\n// We are patching the global object with our hub extension methods\naddExtensionMethods();\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/express.d.ts b/node_modules/@sentry/apm/esm/integrations/express.d.ts deleted file mode 100644 index c6d7635..0000000 --- a/node_modules/@sentry/apm/esm/integrations/express.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { EventProcessor, Hub, Integration } from '@sentry/types'; -import { Application } from 'express'; -/** - * Express integration - * - * Provides an request and error handler for Express framework - * as well as tracing capabilities - */ -export declare class Express implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * Express App instance - */ - private readonly _app?; - /** - * @inheritDoc - */ - constructor(options?: { - app?: Application; - }); - /** - * @inheritDoc - */ - setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; -} -//# sourceMappingURL=express.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/express.d.ts.map b/node_modules/@sentry/apm/esm/integrations/express.d.ts.map deleted file mode 100644 index 9b29898..0000000 --- a/node_modules/@sentry/apm/esm/integrations/express.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/integrations/express.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAwE,MAAM,SAAS,CAAC;AAE5G;;;;;GAKG;AACH,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IAEjC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAc;IAEpC;;OAEG;gBACgB,OAAO,GAAE;QAAE,GAAG,CAAC,EAAE,WAAW,CAAA;KAAO;IAItD;;OAEG;IACI,SAAS,CAAC,wBAAwB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI;CAO/G"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/express.js b/node_modules/@sentry/apm/esm/integrations/express.js deleted file mode 100644 index c37eac3..0000000 --- a/node_modules/@sentry/apm/esm/integrations/express.js +++ /dev/null @@ -1,127 +0,0 @@ -import { logger } from '@sentry/utils'; -/** - * Express integration - * - * Provides an request and error handler for Express framework - * as well as tracing capabilities - */ -var Express = /** @class */ (function () { - /** - * @inheritDoc - */ - function Express(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = Express.id; - this._app = options.app; - } - /** - * @inheritDoc - */ - Express.prototype.setupOnce = function (_addGlobalEventProcessor, getCurrentHub) { - if (!this._app) { - logger.error('ExpressIntegration is missing an Express instance'); - return; - } - instrumentMiddlewares(this._app, getCurrentHub); - }; - /** - * @inheritDoc - */ - Express.id = 'Express'; - return Express; -}()); -export { Express }; -/** - * Wraps original middleware function in a tracing call, which stores the info about the call as a span, - * and finishes it once the middleware is done invoking. - * - * Express middlewares have 3 various forms, thus we have to take care of all of them: - * // sync - * app.use(function (req, res) { ... }) - * // async - * app.use(function (req, res, next) { ... }) - * // error handler - * app.use(function (err, req, res, next) { ... }) - */ -function wrap(fn, getCurrentHub) { - var arrity = fn.length; - switch (arrity) { - case 2: { - return function (_req, res) { - var span = getCurrentHub().startSpan({ - description: fn.name, - op: 'middleware', - }); - res.once('finish', function () { return span.finish(); }); - return fn.apply(this, arguments); - }; - } - case 3: { - return function (req, res, next) { - var span = getCurrentHub().startSpan({ - description: fn.name, - op: 'middleware', - }); - fn.call(this, req, res, function () { - span.finish(); - return next.apply(this, arguments); - }); - }; - } - case 4: { - return function (err, req, res, next) { - var span = getCurrentHub().startSpan({ - description: fn.name, - op: 'middleware', - }); - fn.call(this, err, req, res, function () { - span.finish(); - return next.apply(this, arguments); - }); - }; - } - default: { - throw new Error("Express middleware takes 2-4 arguments. Got: " + arrity); - } - } -} -/** - * Takes all the function arguments passed to the original `app.use` call - * and wraps every function, as well as array of functions with a call to our `wrap` method. - * We have to take care of the arrays as well as iterate over all of the arguments, - * as `app.use` can accept middlewares in few various forms. - * - * app.use([], ) - * app.use([], , ...) - * app.use([], ...[]) - */ -function wrapUseArgs(args, getCurrentHub) { - return Array.from(args).map(function (arg) { - if (typeof arg === 'function') { - return wrap(arg, getCurrentHub); - } - if (Array.isArray(arg)) { - return arg.map(function (a) { - if (typeof a === 'function') { - return wrap(a, getCurrentHub); - } - return a; - }); - } - return arg; - }); -} -/** - * Patches original app.use to utilize our tracing functionality - */ -function instrumentMiddlewares(app, getCurrentHub) { - var originalAppUse = app.use; - app.use = function () { - return originalAppUse.apply(this, wrapUseArgs(arguments, getCurrentHub)); - }; - return app; -} -//# sourceMappingURL=express.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/express.js.map b/node_modules/@sentry/apm/esm/integrations/express.js.map deleted file mode 100644 index 4ba52a5..0000000 --- a/node_modules/@sentry/apm/esm/integrations/express.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"express.js","sourceRoot":"","s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OAAO,GAAG,CAAC,GAAG,CAAC,UAAC,CAAU;gBACxB,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE;oBAC3B,OAAO,IAAI,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;iBAC/B;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB,CAAC,GAAgB,EAAE,aAAwB;IACvE,IAAM,cAAc,GAAG,GAAG,CAAC,GAAG,CAAC;IAC/B,GAAG,CAAC,GAAG,GAAG;QACR,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n// tslint:disable-next-line:no-implicit-dependencies\nimport { Application, ErrorRequestHandler, NextFunction, Request, RequestHandler, Response } from 'express';\n\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework\n * as well as tracing capabilities\n */\nexport class Express implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Express.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Express';\n\n /**\n * Express App instance\n */\n private readonly _app?: Application;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { app?: Application } = {}) {\n this._app = options.app;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._app) {\n logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n instrumentMiddlewares(this._app, getCurrentHub);\n }\n}\n\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n */\nfunction wrap(fn: Function, getCurrentHub: () => Hub): RequestHandler | ErrorRequestHandler {\n const arrity = fn.length;\n\n switch (arrity) {\n case 2: {\n return function(this: NodeJS.Global, _req: Request, res: Response): any {\n const span = getCurrentHub().startSpan({\n description: fn.name,\n op: 'middleware',\n });\n res.once('finish', () => span.finish());\n return fn.apply(this, arguments);\n };\n }\n case 3: {\n return function(this: NodeJS.Global, req: Request, res: Response, next: NextFunction): any {\n const span = getCurrentHub().startSpan({\n description: fn.name,\n op: 'middleware',\n });\n fn.call(this, req, res, function(this: NodeJS.Global): any {\n span.finish();\n return next.apply(this, arguments);\n });\n };\n }\n case 4: {\n return function(this: NodeJS.Global, err: any, req: Request, res: Response, next: NextFunction): any {\n const span = getCurrentHub().startSpan({\n description: fn.name,\n op: 'middleware',\n });\n fn.call(this, err, req, res, function(this: NodeJS.Global): any {\n span.finish();\n return next.apply(this, arguments);\n });\n };\n }\n default: {\n throw new Error(`Express middleware takes 2-4 arguments. Got: ${arrity}`);\n }\n }\n}\n\n/**\n * Takes all the function arguments passed to the original `app.use` call\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\nfunction wrapUseArgs(args: IArguments, getCurrentHub: () => Hub): unknown[] {\n return Array.from(args).map((arg: unknown) => {\n if (typeof arg === 'function') {\n return wrap(arg, getCurrentHub);\n }\n\n if (Array.isArray(arg)) {\n return arg.map((a: unknown) => {\n if (typeof a === 'function') {\n return wrap(a, getCurrentHub);\n }\n return a;\n });\n }\n\n return arg;\n });\n}\n\n/**\n * Patches original app.use to utilize our tracing functionality\n */\nfunction instrumentMiddlewares(app: Application, getCurrentHub: () => Hub): Application {\n const originalAppUse = app.use;\n app.use = function(): any {\n return originalAppUse.apply(this, wrapUseArgs(arguments, getCurrentHub));\n };\n return app;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/index.d.ts b/node_modules/@sentry/apm/esm/integrations/index.d.ts deleted file mode 100644 index 6c891c4..0000000 --- a/node_modules/@sentry/apm/esm/integrations/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { Express } from './express'; -export { Tracing } from './tracing'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/index.d.ts.map b/node_modules/@sentry/apm/esm/integrations/index.d.ts.map deleted file mode 100644 index 412841d..0000000 --- a/node_modules/@sentry/apm/esm/integrations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/index.js b/node_modules/@sentry/apm/esm/integrations/index.js deleted file mode 100644 index a374b2a..0000000 --- a/node_modules/@sentry/apm/esm/integrations/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { Express } from './express'; -export { Tracing } from './tracing'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/index.js.map b/node_modules/@sentry/apm/esm/integrations/index.js.map deleted file mode 100644 index b43f9ae..0000000 --- a/node_modules/@sentry/apm/esm/integrations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { Express } from './express';\nexport { Tracing } from './tracing';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/tracing.d.ts b/node_modules/@sentry/apm/esm/integrations/tracing.d.ts deleted file mode 100644 index 7d6b099..0000000 --- a/node_modules/@sentry/apm/esm/integrations/tracing.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -import { EventProcessor, Hub, Integration, Span, SpanContext, SpanStatus } from '@sentry/types'; -/** - * Options for Tracing integration - */ -interface TracingOptions { - /** - * List of strings / regex where the integration should create Spans out of. Additionally this will be used - * to define which outgoing requests the `sentry-trace` header will be attached to. - * - * Default: ['localhost', /^\//] - */ - tracingOrigins: Array; - /** - * Flag to disable patching all together for fetch requests. - * - * Default: true - */ - traceFetch: boolean; - /** - * Flag to disable patching all together for xhr requests. - * - * Default: true - */ - traceXHR: boolean; - /** - * This function will be called before creating a span for a request with the given url. - * Return false if you don't want a span for the given url. - * - * By default it uses the `tracingOrigins` options as a url match. - */ - shouldCreateSpanForRequest(url: string): boolean; - /** - * The time to wait in ms until the transaction will be finished. The transaction will use the end timestamp of - * the last finished span as the endtime for the transaction. - * Time is in ms. - * - * Default: 500 - */ - idleTimeout: number; - /** - * Flag to enable/disable creation of `navigation` transaction on history changes. Useful for react applications with - * a router. - * - * Default: true - */ - startTransactionOnLocationChange: boolean; - /** - * Sample to determine if the Integration should instrument anything. The decision will be taken once per load - * on initalization. - * 0 = 0% chance of instrumenting - * 1 = 100% change of instrumenting - * - * Default: 1 - */ - tracesSampleRate: number; - /** - * The maximum duration of a transaction before it will be discarded. This is for some edge cases where a browser - * completely freezes the JS state and picks it up later (background tabs). - * So after this duration, the SDK will not send the event. - * If you want to have an unlimited duration set it to 0. - * Time is in seconds. - * - * Default: 600 - */ - maxTransactionDuration: number; - /** - * Flag to discard all spans that occur in background. This includes transactions. Browser background tab timing is - * not suited towards doing precise measurements of operations. That's why this option discards any active transaction - * and also doesn't add any spans that happen in the background. Background spans/transaction can mess up your - * statistics in non deterministic ways that's why we by default recommend leaving this opition enabled. - * - * Default: true - */ - discardBackgroundSpans: boolean; -} -/** JSDoc */ -interface Activity { - name: string; - span?: Span; -} -/** - * Tracing Integration - */ -export declare class Tracing implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * Is Tracing enabled, this will be determined once per pageload. - */ - private static _enabled?; - /** JSDoc */ - static options: TracingOptions; - /** - * Returns current hub. - */ - private static _getCurrentHub?; - private static _activeTransaction?; - private static _currentIndex; - static _activities: { - [key: number]: Activity; - }; - private static _debounce; - private readonly _emitOptionsWarning; - private static _performanceCursor; - private static _heartbeatTimer; - private static _prevHeartbeatString; - private static _heartbeatCounter; - /** - * Constructor for Tracing - * - * @param _options TracingOptions - */ - constructor(_options?: Partial); - /** - * @inheritDoc - */ - setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; - /** - * Pings the heartbeat - */ - private static _pingHeartbeat; - /** - * Checks when entries of Tracing._activities are not changing for 3 beats. If this occurs we finish the transaction - * - */ - private static _beat; - /** - * Discards active transactions if tab moves to background - */ - private _setupBackgroundTabDetection; - /** - * Unsets the current active transaction + activities - */ - private static _resetActiveTransaction; - /** - * Registers to History API to detect navigation changes - */ - private _setupHistory; - /** - * Attaches to fetch to add sentry-trace header + creating spans - */ - private _setupFetchTracing; - /** - * Attaches to XHR to add sentry-trace header + creating spans - */ - private _setupXHRTracing; - /** - * Configures global error listeners - */ - private _setupErrorHandling; - /** - * Is tracing enabled - */ - private static _isEnabled; - /** - * Starts a Transaction waiting for activity idle to finish - */ - static startIdleTransaction(name: string, spanContext?: SpanContext): Span | undefined; - /** - * Update transaction - * @deprecated - */ - static updateTransactionName(name: string): void; - /** - * Finshes the current active transaction - */ - static finishIdleTransaction(): void; - /** - * This uses `performance.getEntries()` to add additional spans to the active transaction. - * Also, we update our timings since we consider the timings in this API to be more correct than our manual - * measurements. - * - * @param transactionSpan The transaction span - */ - private static _addPerformanceEntries; - /** - * Sets the status of the current active transaction (if there is one) - */ - static setTransactionStatus(status: SpanStatus): void; - /** - * Converts from milliseconds to seconds - * @param time time in ms - */ - private static _msToSec; - /** - * Starts tracking for a specifc activity - * - * @param name Name of the activity, can be any string (Only used internally to identify the activity) - * @param spanContext If provided a Span with the SpanContext will be created. - * @param options _autoPopAfter_ | Time in ms, if provided the activity will be popped automatically after this timeout. This can be helpful in cases where you cannot gurantee your application knows the state and calls `popActivity` for sure. - */ - static pushActivity(name: string, spanContext?: SpanContext, options?: { - autoPopAfter?: number; - }): number; - /** - * Removes activity and finishes the span in case there is one - */ - static popActivity(id: number, spanData?: { - [key: string]: any; - }): void; -} -export {}; -//# sourceMappingURL=tracing.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/tracing.d.ts.map b/node_modules/@sentry/apm/esm/integrations/tracing.d.ts.map deleted file mode 100644 index 137fc67..0000000 --- a/node_modules/@sentry/apm/esm/integrations/tracing.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/integrations/tracing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAWvG;;GAEG;AACH,UAAU,cAAc;IACtB;;;;;OAKG;IACH,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACjD;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,gCAAgC,EAAE,OAAO,CAAC;IAC1C;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;;;;OAQG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;;;;;;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AA4B;IAWpC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAKtC;;OAEG;IACH,OAAO,CAAC,aAAa;IASrB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAS1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IASxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAazB;;OAEG;WACW,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS;IAiD7F;;;OAGG;WACW,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAavD;;OAEG;WACW,qBAAqB,IAAI,IAAI;IAU3C;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAiJrC;;OAEG;WACW,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAQ5D;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ;IAIvB;;;;;;OAMG;WACW,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,WAAW,EACzB,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GACA,MAAM;IA4CT;;OAEG;WACW,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI;CA6C/E"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/tracing.js b/node_modules/@sentry/apm/esm/integrations/tracing.js deleted file mode 100644 index 2182ca3..0000000 --- a/node_modules/@sentry/apm/esm/integrations/tracing.js +++ /dev/null @@ -1,630 +0,0 @@ -import * as tslib_1 from "tslib"; -import { SpanStatus } from '@sentry/types'; -import { addInstrumentationHandler, getGlobalObject, isMatchingPattern, logger, supportsNativeFetch, } from '@sentry/utils'; -var global = getGlobalObject(); -var defaultTracingOrigins = ['localhost', /^\//]; -/** - * Tracing Integration - */ -var Tracing = /** @class */ (function () { - /** - * Constructor for Tracing - * - * @param _options TracingOptions - */ - function Tracing(_options) { - /** - * @inheritDoc - */ - this.name = Tracing.id; - this._emitOptionsWarning = false; - if (global.performance) { - global.performance.mark('sentry-tracing-init'); - } - var defaults = { - discardBackgroundSpans: true, - idleTimeout: 500, - maxTransactionDuration: 600, - shouldCreateSpanForRequest: function (url) { - var origins = (_options && _options.tracingOrigins) || defaultTracingOrigins; - return (origins.some(function (origin) { return isMatchingPattern(url, origin); }) && - !isMatchingPattern(url, 'sentry_key')); - }, - startTransactionOnLocationChange: true, - traceFetch: true, - traceXHR: true, - tracesSampleRate: 1, - tracingOrigins: defaultTracingOrigins, - }; - // NOTE: Logger doesn't work in contructors, as it's initialized after integrations instances - if (!_options || !Array.isArray(_options.tracingOrigins) || _options.tracingOrigins.length === 0) { - this._emitOptionsWarning = true; - } - Tracing.options = tslib_1.__assign({}, defaults, _options); - } - /** - * @inheritDoc - */ - Tracing.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) { - Tracing._getCurrentHub = getCurrentHub; - if (this._emitOptionsWarning) { - logger.warn('[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.'); - logger.warn("[Tracing] We added a reasonable default for you: " + defaultTracingOrigins); - } - if (!Tracing._isEnabled()) { - return; - } - // Starting our inital pageload transaction - if (global.location && global.location.href) { - // `${global.location.href}` will be used a temp transaction name - Tracing.startIdleTransaction(global.location.href, { - op: 'pageload', - sampled: true, - }); - } - this._setupXHRTracing(); - this._setupFetchTracing(); - this._setupHistory(); - this._setupErrorHandling(); - this._setupBackgroundTabDetection(); - Tracing._pingHeartbeat(); - // This EventProcessor makes sure that the transaction is not longer than maxTransactionDuration - addGlobalEventProcessor(function (event) { - var self = getCurrentHub().getIntegration(Tracing); - if (!self) { - return event; - } - if (Tracing._isEnabled()) { - var isOutdatedTransaction = event.timestamp && - event.start_timestamp && - (event.timestamp - event.start_timestamp > Tracing.options.maxTransactionDuration || - event.timestamp - event.start_timestamp < 0); - if (Tracing.options.maxTransactionDuration !== 0 && event.type === 'transaction' && isOutdatedTransaction) { - logger.log('[Tracing] Discarded transaction since it maxed out maxTransactionDuration'); - return null; - } - } - return event; - }); - }; - /** - * Pings the heartbeat - */ - Tracing._pingHeartbeat = function () { - Tracing._heartbeatTimer = setTimeout(function () { - Tracing._beat(); - }, 5000); - }; - /** - * Checks when entries of Tracing._activities are not changing for 3 beats. If this occurs we finish the transaction - * - */ - Tracing._beat = function () { - clearTimeout(Tracing._heartbeatTimer); - var keys = Object.keys(Tracing._activities); - if (keys.length) { - var heartbeatString = keys.reduce(function (prev, current) { return prev + current; }); - if (heartbeatString === Tracing._prevHeartbeatString) { - Tracing._heartbeatCounter++; - } - else { - Tracing._heartbeatCounter = 0; - } - if (Tracing._heartbeatCounter >= 3) { - if (Tracing._activeTransaction) { - logger.log("[Tracing] Heartbeat safeguard kicked in, finishing transaction since activities content hasn't changed for 3 beats"); - Tracing._activeTransaction.setStatus(SpanStatus.DeadlineExceeded); - Tracing._activeTransaction.setTag('heartbeat', 'failed'); - Tracing.finishIdleTransaction(); - } - } - Tracing._prevHeartbeatString = heartbeatString; - } - Tracing._pingHeartbeat(); - }; - /** - * Discards active transactions if tab moves to background - */ - Tracing.prototype._setupBackgroundTabDetection = function () { - if (Tracing.options.discardBackgroundSpans && global.document) { - document.addEventListener('visibilitychange', function () { - if (document.hidden && Tracing._activeTransaction) { - logger.log('[Tracing] Discarded active transaction incl. activities since tab moved to the background'); - Tracing._resetActiveTransaction(); - } - }); - } - }; - /** - * Unsets the current active transaction + activities - */ - Tracing._resetActiveTransaction = function () { - Tracing._activeTransaction = undefined; - Tracing._activities = {}; - }; - /** - * Registers to History API to detect navigation changes - */ - Tracing.prototype._setupHistory = function () { - if (Tracing.options.startTransactionOnLocationChange) { - addInstrumentationHandler({ - callback: historyCallback, - type: 'history', - }); - } - }; - /** - * Attaches to fetch to add sentry-trace header + creating spans - */ - Tracing.prototype._setupFetchTracing = function () { - if (Tracing.options.traceFetch && supportsNativeFetch()) { - addInstrumentationHandler({ - callback: fetchCallback, - type: 'fetch', - }); - } - }; - /** - * Attaches to XHR to add sentry-trace header + creating spans - */ - Tracing.prototype._setupXHRTracing = function () { - if (Tracing.options.traceXHR) { - addInstrumentationHandler({ - callback: xhrCallback, - type: 'xhr', - }); - } - }; - /** - * Configures global error listeners - */ - Tracing.prototype._setupErrorHandling = function () { - // tslint:disable-next-line: completed-docs - function errorCallback() { - if (Tracing._activeTransaction) { - /** - * If an error or unhandled promise occurs, we mark the active transaction as failed - */ - logger.log("[Tracing] Global error occured, setting status in transaction: " + SpanStatus.InternalError); - Tracing._activeTransaction.setStatus(SpanStatus.InternalError); - } - } - addInstrumentationHandler({ - callback: errorCallback, - type: 'error', - }); - addInstrumentationHandler({ - callback: errorCallback, - type: 'unhandledrejection', - }); - }; - /** - * Is tracing enabled - */ - Tracing._isEnabled = function () { - if (Tracing._enabled !== undefined) { - return Tracing._enabled; - } - // This happens only in test cases where the integration isn't initalized properly - // tslint:disable-next-line: strict-type-predicates - if (!Tracing.options || typeof Tracing.options.tracesSampleRate !== 'number') { - return false; - } - Tracing._enabled = Math.random() > Tracing.options.tracesSampleRate ? false : true; - return Tracing._enabled; - }; - /** - * Starts a Transaction waiting for activity idle to finish - */ - Tracing.startIdleTransaction = function (name, spanContext) { - if (!Tracing._isEnabled()) { - // Tracing is not enabled - return undefined; - } - // If we already have an active transaction it means one of two things - // a) The user did rapid navigation changes and didn't wait until the transaction was finished - // b) A activity wasn't popped correctly and therefore the transaction is stalling - Tracing.finishIdleTransaction(); - logger.log('[Tracing] startIdleTransaction, name:', name); - var _getCurrentHub = Tracing._getCurrentHub; - if (!_getCurrentHub) { - return undefined; - } - var hub = _getCurrentHub(); - if (!hub) { - return undefined; - } - var span = hub.startSpan(tslib_1.__assign({}, spanContext, { transaction: name }), true); - Tracing._activeTransaction = span; - // We need to do this workaround here and not use configureScope - // Reason being at the time we start the inital transaction we do not have a client bound on the hub yet - // therefore configureScope wouldn't be executed and we would miss setting the transaction - // tslint:disable-next-line: no-unsafe-any - hub.getScope().setSpan(span); - // The reason we do this here is because of cached responses - // If we start and transaction without an activity it would never finish since there is no activity - var id = Tracing.pushActivity('idleTransactionStarted'); - setTimeout(function () { - Tracing.popActivity(id); - }, (Tracing.options && Tracing.options.idleTimeout) || 100); - return span; - }; - /** - * Update transaction - * @deprecated - */ - Tracing.updateTransactionName = function (name) { - logger.log('[Tracing] DEPRECATED, use Sentry.configureScope => scope.setTransaction instead', name); - var _getCurrentHub = Tracing._getCurrentHub; - if (_getCurrentHub) { - var hub = _getCurrentHub(); - if (hub) { - hub.configureScope(function (scope) { - scope.setTransaction(name); - }); - } - } - }; - /** - * Finshes the current active transaction - */ - Tracing.finishIdleTransaction = function () { - var active = Tracing._activeTransaction; - if (active) { - Tracing._addPerformanceEntries(active); - logger.log('[Tracing] finishIdleTransaction', active.transaction); - active.finish(/*trimEnd*/ true); - Tracing._resetActiveTransaction(); - } - }; - /** - * This uses `performance.getEntries()` to add additional spans to the active transaction. - * Also, we update our timings since we consider the timings in this API to be more correct than our manual - * measurements. - * - * @param transactionSpan The transaction span - */ - Tracing._addPerformanceEntries = function (transactionSpan) { - if (!global.performance) { - // Gatekeeper if performance API not available - return; - } - logger.log('[Tracing] Adding & adjusting spans using Performance API'); - var timeOrigin = Tracing._msToSec(performance.timeOrigin); - // tslint:disable-next-line: completed-docs - function addSpan(span) { - if (transactionSpan.spanRecorder) { - transactionSpan.spanRecorder.finishSpan(span); - } - } - // tslint:disable-next-line: completed-docs - function addPerformanceNavigationTiming(parent, entry, event) { - var span = parent.child({ - description: event, - op: 'browser', - }); - span.startTimestamp = timeOrigin + Tracing._msToSec(entry[event + "Start"]); - span.timestamp = timeOrigin + Tracing._msToSec(entry[event + "End"]); - addSpan(span); - } - // tslint:disable-next-line: completed-docs - function addRequest(parent, entry) { - var request = parent.child({ - description: 'request', - op: 'browser', - }); - request.startTimestamp = timeOrigin + Tracing._msToSec(entry.requestStart); - request.timestamp = timeOrigin + Tracing._msToSec(entry.responseEnd); - addSpan(request); - var response = parent.child({ - description: 'response', - op: 'browser', - }); - response.startTimestamp = timeOrigin + Tracing._msToSec(entry.responseStart); - response.timestamp = timeOrigin + Tracing._msToSec(entry.responseEnd); - addSpan(response); - } - var entryScriptSrc; - if (global.document) { - // tslint:disable-next-line: prefer-for-of - for (var i = 0; i < document.scripts.length; i++) { - // We go through all scripts on the page and look for 'data-entry' - // We remember the name and measure the time between this script finished loading and - // our mark 'sentry-tracing-init' - if (document.scripts[i].dataset.entry === 'true') { - entryScriptSrc = document.scripts[i].src; - break; - } - } - } - var entryScriptStartEndTime; - var tracingInitMarkStartTime; - // tslint:disable: no-unsafe-any - performance - .getEntries() - .slice(Tracing._performanceCursor) - .forEach(function (entry) { - var startTime = Tracing._msToSec(entry.startTime); - var duration = Tracing._msToSec(entry.duration); - if (transactionSpan.op === 'navigation' && timeOrigin + startTime < transactionSpan.startTimestamp) { - return; - } - switch (entry.entryType) { - case 'navigation': - addPerformanceNavigationTiming(transactionSpan, entry, 'unloadEvent'); - addPerformanceNavigationTiming(transactionSpan, entry, 'domContentLoadedEvent'); - addPerformanceNavigationTiming(transactionSpan, entry, 'loadEvent'); - addPerformanceNavigationTiming(transactionSpan, entry, 'connect'); - addPerformanceNavigationTiming(transactionSpan, entry, 'domainLookup'); - addRequest(transactionSpan, entry); - break; - case 'mark': - case 'paint': - case 'measure': - var mark = transactionSpan.child({ - description: entry.entryType + " " + entry.name, - op: 'mark', - }); - mark.startTimestamp = timeOrigin + startTime; - mark.timestamp = mark.startTimestamp + duration; - if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') { - tracingInitMarkStartTime = mark.startTimestamp; - } - addSpan(mark); - break; - case 'resource': - var resourceName_1 = entry.name.replace(window.location.origin, ''); - if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') { - // We need to update existing spans with new timing info - if (transactionSpan.spanRecorder) { - transactionSpan.spanRecorder.finishedSpans.map(function (finishedSpan) { - if (finishedSpan.description && finishedSpan.description.indexOf(resourceName_1) !== -1) { - finishedSpan.startTimestamp = timeOrigin + startTime; - finishedSpan.timestamp = finishedSpan.startTimestamp + duration; - } - }); - } - } - else { - var resource = transactionSpan.child({ - description: entry.initiatorType + " " + resourceName_1, - op: "resource", - }); - resource.startTimestamp = timeOrigin + startTime; - resource.timestamp = resource.startTimestamp + duration; - // We remember the entry script end time to calculate the difference to the first init mark - if (entryScriptStartEndTime === undefined && (entryScriptSrc || '').includes(resourceName_1)) { - entryScriptStartEndTime = resource.timestamp; - } - addSpan(resource); - } - break; - default: - // Ignore other entry types. - } - }); - if (entryScriptStartEndTime !== undefined && tracingInitMarkStartTime !== undefined) { - var evaluation = transactionSpan.child({ - description: 'evaluation', - op: "script", - }); - evaluation.startTimestamp = entryScriptStartEndTime; - evaluation.timestamp = tracingInitMarkStartTime; - addSpan(evaluation); - } - Tracing._performanceCursor = Math.max(performance.getEntries().length - 1, 0); - // tslint:enable: no-unsafe-any - }; - /** - * Sets the status of the current active transaction (if there is one) - */ - Tracing.setTransactionStatus = function (status) { - var active = Tracing._activeTransaction; - if (active) { - logger.log('[Tracing] setTransactionStatus', status); - active.setStatus(status); - } - }; - /** - * Converts from milliseconds to seconds - * @param time time in ms - */ - Tracing._msToSec = function (time) { - return time / 1000; - }; - /** - * Starts tracking for a specifc activity - * - * @param name Name of the activity, can be any string (Only used internally to identify the activity) - * @param spanContext If provided a Span with the SpanContext will be created. - * @param options _autoPopAfter_ | Time in ms, if provided the activity will be popped automatically after this timeout. This can be helpful in cases where you cannot gurantee your application knows the state and calls `popActivity` for sure. - */ - Tracing.pushActivity = function (name, spanContext, options) { - if (!Tracing._isEnabled()) { - // Tracing is not enabled - return 0; - } - if (!Tracing._activeTransaction) { - logger.log("[Tracing] Not pushing activity " + name + " since there is no active transaction"); - return 0; - } - // We want to clear the timeout also here since we push a new activity - clearTimeout(Tracing._debounce); - var _getCurrentHub = Tracing._getCurrentHub; - if (spanContext && _getCurrentHub) { - var hub = _getCurrentHub(); - if (hub) { - var span = hub.startSpan(spanContext); - Tracing._activities[Tracing._currentIndex] = { - name: name, - span: span, - }; - } - } - else { - Tracing._activities[Tracing._currentIndex] = { - name: name, - }; - } - logger.log("[Tracing] pushActivity: " + name + "#" + Tracing._currentIndex); - logger.log('[Tracing] activies count', Object.keys(Tracing._activities).length); - if (options && typeof options.autoPopAfter === 'number') { - logger.log("[Tracing] auto pop of: " + name + "#" + Tracing._currentIndex + " in " + options.autoPopAfter + "ms"); - var index_1 = Tracing._currentIndex; - setTimeout(function () { - Tracing.popActivity(index_1, { - autoPop: true, - status: SpanStatus.DeadlineExceeded, - }); - }, options.autoPopAfter); - } - return Tracing._currentIndex++; - }; - /** - * Removes activity and finishes the span in case there is one - */ - Tracing.popActivity = function (id, spanData) { - // The !id is on purpose to also fail with 0 - // Since 0 is returned by push activity in case tracing is not enabled - // or there is no active transaction - if (!Tracing._isEnabled() || !id) { - // Tracing is not enabled - return; - } - var activity = Tracing._activities[id]; - if (activity) { - logger.log("[Tracing] popActivity " + activity.name + "#" + id); - var span_1 = activity.span; - if (span_1) { - if (spanData) { - Object.keys(spanData).forEach(function (key) { - span_1.setData(key, spanData[key]); - if (key === 'status_code') { - span_1.setHttpStatus(spanData[key]); - } - if (key === 'status') { - span_1.setStatus(spanData[key]); - } - }); - } - span_1.finish(); - } - // tslint:disable-next-line: no-dynamic-delete - delete Tracing._activities[id]; - } - var count = Object.keys(Tracing._activities).length; - clearTimeout(Tracing._debounce); - logger.log('[Tracing] activies count', count); - if (count === 0 && Tracing._activeTransaction) { - var timeout = Tracing.options && Tracing.options.idleTimeout; - logger.log("[Tracing] Flushing Transaction in " + timeout + "ms"); - Tracing._debounce = setTimeout(function () { - Tracing.finishIdleTransaction(); - }, timeout); - } - }; - /** - * @inheritDoc - */ - Tracing.id = 'Tracing'; - Tracing._currentIndex = 1; - Tracing._activities = {}; - Tracing._debounce = 0; - Tracing._performanceCursor = 0; - Tracing._heartbeatTimer = 0; - Tracing._heartbeatCounter = 0; - return Tracing; -}()); -export { Tracing }; -/** - * Creates breadcrumbs from XHR API calls - */ -function xhrCallback(handlerData) { - if (!Tracing.options.traceXHR) { - return; - } - // tslint:disable-next-line: no-unsafe-any - if (!handlerData || !handlerData.xhr || !handlerData.xhr.__sentry_xhr__) { - return; - } - // tslint:disable: no-unsafe-any - var xhr = handlerData.xhr.__sentry_xhr__; - if (!Tracing.options.shouldCreateSpanForRequest(xhr.url)) { - return; - } - // We only capture complete, non-sentry requests - if (handlerData.xhr.__sentry_own_request__) { - return; - } - if (handlerData.endTimestamp && handlerData.xhr.__sentry_xhr_activity_id__) { - Tracing.popActivity(handlerData.xhr.__sentry_xhr_activity_id__, handlerData.xhr.__sentry_xhr__); - return; - } - handlerData.xhr.__sentry_xhr_activity_id__ = Tracing.pushActivity('xhr', { - data: tslib_1.__assign({}, xhr.data, { type: 'xhr' }), - description: xhr.method + " " + xhr.url, - op: 'http', - }); - // Adding the trace header to the span - var activity = Tracing._activities[handlerData.xhr.__sentry_xhr_activity_id__]; - if (activity) { - var span = activity.span; - if (span && handlerData.xhr.setRequestHeader) { - handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent()); - } - } - // tslint:enable: no-unsafe-any -} -/** - * Creates breadcrumbs from fetch API calls - */ -function fetchCallback(handlerData) { - // tslint:disable: no-unsafe-any - if (!Tracing.options.traceFetch) { - return; - } - if (!Tracing.options.shouldCreateSpanForRequest(handlerData.fetchData.url)) { - return; - } - if (handlerData.endTimestamp && handlerData.fetchData.__activity) { - Tracing.popActivity(handlerData.fetchData.__activity, handlerData.fetchData); - } - else { - handlerData.fetchData.__activity = Tracing.pushActivity('fetch', { - data: tslib_1.__assign({}, handlerData.fetchData, { type: 'fetch' }), - description: handlerData.fetchData.method + " " + handlerData.fetchData.url, - op: 'http', - }); - var activity = Tracing._activities[handlerData.fetchData.__activity]; - if (activity) { - var span = activity.span; - if (span) { - var options = (handlerData.args[1] = handlerData.args[1] || {}); - if (options.headers) { - if (Array.isArray(options.headers)) { - options.headers = tslib_1.__spread(options.headers, [{ 'sentry-trace': span.toTraceparent() }]); - } - else { - options.headers = tslib_1.__assign({}, options.headers, { 'sentry-trace': span.toTraceparent() }); - } - } - else { - options.headers = { 'sentry-trace': span.toTraceparent() }; - } - } - } - } - // tslint:enable: no-unsafe-any -} -/** - * Creates transaction from navigation changes - */ -function historyCallback(_) { - if (Tracing.options.startTransactionOnLocationChange && global && global.location) { - Tracing.startIdleTransaction(global.location.href, { - op: 'navigation', - sampled: true, - }); - } -} -//# sourceMappingURL=tracing.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/integrations/tracing.js.map b/node_modules/@sentry/apm/esm/integrations/tracing.js.map deleted file mode 100644 index a90fe24..0000000 --- a/node_modules/@sentry/apm/esm/integrations/tracing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/integrations/tracing.ts"],"names":[],"mappings":";AAAA,OAAO,EAA8D,UAAU,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,MAAM,EACN,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAuFvB,IAAM,MAAM,GAAG,eAAe,EAAU,CAAC;AACzC,IAAM,qBAAqB,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAEnD;;GAEG;AACH;IA0CE;;;;OAIG;IACH,iBAAmB,QAAkC;QA9CrD;;WAEG;QACI,SAAI,GAAW,OAAO,CAAC,EAAE,CAAC;QA4BhB,wBAAmB,GAAY,KAAK,CAAC;QAgBpD,IAAI,MAAM,CAAC,WAAW,EAAE;YACtB,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;SAChD;QACD,IAAM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AAO,CAAC,OAAO,EAAE;oBACnB,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;wBAClC,OAAO,CAAC,OAAO,oBAAO,OAAO,CAAC,OAAO,GAAE,EAAE,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,EAAC,CAAC;qBAClF;yBAAM;wBACL,OAAO,CAAC,OAAO,wBACV,OAAO,CAAC,OAAO,IAClB,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE,GACrC,CAAC;qBACH;iBACF;qBAAM;oBACL,OAAO,CAAC,OAAO,GAAG,EAAE,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;iBAC5D;aACF;SACF;KACF;IACD,+BAA+B;AACjC,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,CAAyB;IAChD,IAAI,OAAO,CAAC,OAAO,CAAC,gCAAgC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE;QACjF,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YACjD,EAAE,EAAE,YAAY;YAChB,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;KACJ;AACH,CAAC","sourcesContent":["import { Event, EventProcessor, Hub, Integration, Span, SpanContext, SpanStatus } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getGlobalObject,\n isMatchingPattern,\n logger,\n supportsNativeFetch,\n} from '@sentry/utils';\n\nimport { Span as SpanClass } from '../span';\n\n/**\n * Options for Tracing integration\n */\ninterface TracingOptions {\n /**\n * List of strings / regex where the integration should create Spans out of. Additionally this will be used\n * to define which outgoing requests the `sentry-trace` header will be attached to.\n *\n * Default: ['localhost', /^\\//]\n */\n tracingOrigins: Array;\n /**\n * Flag to disable patching all together for fetch requests.\n *\n * Default: true\n */\n traceFetch: boolean;\n /**\n * Flag to disable patching all together for xhr requests.\n *\n * Default: true\n */\n traceXHR: boolean;\n /**\n * This function will be called before creating a span for a request with the given url.\n * Return false if you don't want a span for the given url.\n *\n * By default it uses the `tracingOrigins` options as a url match.\n */\n shouldCreateSpanForRequest(url: string): boolean;\n /**\n * The time to wait in ms until the transaction will be finished. The transaction will use the end timestamp of\n * the last finished span as the endtime for the transaction.\n * Time is in ms.\n *\n * Default: 500\n */\n idleTimeout: number;\n /**\n * Flag to enable/disable creation of `navigation` transaction on history changes. Useful for react applications with\n * a router.\n *\n * Default: true\n */\n startTransactionOnLocationChange: boolean;\n /**\n * Sample to determine if the Integration should instrument anything. The decision will be taken once per load\n * on initalization.\n * 0 = 0% chance of instrumenting\n * 1 = 100% change of instrumenting\n *\n * Default: 1\n */\n tracesSampleRate: number;\n\n /**\n * The maximum duration of a transaction before it will be discarded. This is for some edge cases where a browser\n * completely freezes the JS state and picks it up later (background tabs).\n * So after this duration, the SDK will not send the event.\n * If you want to have an unlimited duration set it to 0.\n * Time is in seconds.\n *\n * Default: 600\n */\n maxTransactionDuration: number;\n\n /**\n * Flag to discard all spans that occur in background. This includes transactions. Browser background tab timing is\n * not suited towards doing precise measurements of operations. That's why this option discards any active transaction\n * and also doesn't add any spans that happen in the background. Background spans/transaction can mess up your\n * statistics in non deterministic ways that's why we by default recommend leaving this opition enabled.\n *\n * Default: true\n */\n discardBackgroundSpans: boolean;\n}\n\n/** JSDoc */\ninterface Activity {\n name: string;\n span?: Span;\n}\n\nconst global = getGlobalObject();\nconst defaultTracingOrigins = ['localhost', /^\\//];\n\n/**\n * Tracing Integration\n */\nexport class Tracing implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Tracing.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Tracing';\n\n /**\n * Is Tracing enabled, this will be determined once per pageload.\n */\n private static _enabled?: boolean;\n\n /** JSDoc */\n public static options: TracingOptions;\n\n /**\n * Returns current hub.\n */\n private static _getCurrentHub?: () => Hub;\n\n private static _activeTransaction?: Span;\n\n private static _currentIndex: number = 1;\n\n public static _activities: { [key: number]: Activity } = {};\n\n private static _debounce: number = 0;\n\n private readonly _emitOptionsWarning: boolean = false;\n\n private static _performanceCursor: number = 0;\n\n private static _heartbeatTimer: number = 0;\n\n private static _prevHeartbeatString: string | undefined;\n\n private static _heartbeatCounter: number = 0;\n\n /**\n * Constructor for Tracing\n *\n * @param _options TracingOptions\n */\n public constructor(_options?: Partial) {\n if (global.performance) {\n global.performance.mark('sentry-tracing-init');\n }\n const defaults = {\n discardBackgroundSpans: true,\n idleTimeout: 500,\n maxTransactionDuration: 600,\n shouldCreateSpanForRequest(url: string): boolean {\n const origins = (_options && _options.tracingOrigins) || defaultTracingOrigins;\n return (\n origins.some((origin: string | RegExp) => isMatchingPattern(url, origin)) &&\n !isMatchingPattern(url, 'sentry_key')\n );\n },\n startTransactionOnLocationChange: true,\n traceFetch: true,\n traceXHR: true,\n tracesSampleRate: 1,\n tracingOrigins: defaultTracingOrigins,\n };\n // NOTE: Logger doesn't work in contructors, as it's initialized after integrations instances\n if (!_options || !Array.isArray(_options.tracingOrigins) || _options.tracingOrigins.length === 0) {\n this._emitOptionsWarning = true;\n }\n Tracing.options = {\n ...defaults,\n ..._options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n Tracing._getCurrentHub = getCurrentHub;\n\n if (this._emitOptionsWarning) {\n logger.warn(\n '[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.',\n );\n logger.warn(`[Tracing] We added a reasonable default for you: ${defaultTracingOrigins}`);\n }\n\n if (!Tracing._isEnabled()) {\n return;\n }\n\n // Starting our inital pageload transaction\n if (global.location && global.location.href) {\n // `${global.location.href}` will be used a temp transaction name\n Tracing.startIdleTransaction(global.location.href, {\n op: 'pageload',\n sampled: true,\n });\n }\n\n this._setupXHRTracing();\n\n this._setupFetchTracing();\n\n this._setupHistory();\n\n this._setupErrorHandling();\n\n this._setupBackgroundTabDetection();\n\n Tracing._pingHeartbeat();\n\n // This EventProcessor makes sure that the transaction is not longer than maxTransactionDuration\n addGlobalEventProcessor((event: Event) => {\n const self = getCurrentHub().getIntegration(Tracing);\n if (!self) {\n return event;\n }\n\n if (Tracing._isEnabled()) {\n const isOutdatedTransaction =\n event.timestamp &&\n event.start_timestamp &&\n (event.timestamp - event.start_timestamp > Tracing.options.maxTransactionDuration ||\n event.timestamp - event.start_timestamp < 0);\n\n if (Tracing.options.maxTransactionDuration !== 0 && event.type === 'transaction' && isOutdatedTransaction) {\n logger.log('[Tracing] Discarded transaction since it maxed out maxTransactionDuration');\n return null;\n }\n }\n\n return event;\n });\n }\n\n /**\n * Pings the heartbeat\n */\n private static _pingHeartbeat(): void {\n Tracing._heartbeatTimer = (setTimeout(() => {\n Tracing._beat();\n }, 5000) as any) as number;\n }\n\n /**\n * Checks when entries of Tracing._activities are not changing for 3 beats. If this occurs we finish the transaction\n *\n */\n private static _beat(): void {\n clearTimeout(Tracing._heartbeatTimer);\n const keys = Object.keys(Tracing._activities);\n if (keys.length) {\n const heartbeatString = keys.reduce((prev: string, current: string) => prev + current);\n if (heartbeatString === Tracing._prevHeartbeatString) {\n Tracing._heartbeatCounter++;\n } else {\n Tracing._heartbeatCounter = 0;\n }\n if (Tracing._heartbeatCounter >= 3) {\n if (Tracing._activeTransaction) {\n logger.log(\n \"[Tracing] Heartbeat safeguard kicked in, finishing transaction since activities content hasn't changed for 3 beats\",\n );\n Tracing._activeTransaction.setStatus(SpanStatus.DeadlineExceeded);\n Tracing._activeTransaction.setTag('heartbeat', 'failed');\n Tracing.finishIdleTransaction();\n }\n }\n Tracing._prevHeartbeatString = heartbeatString;\n }\n Tracing._pingHeartbeat();\n }\n\n /**\n * Discards active transactions if tab moves to background\n */\n private _setupBackgroundTabDetection(): void {\n if (Tracing.options.discardBackgroundSpans && global.document) {\n document.addEventListener('visibilitychange', () => {\n if (document.hidden && Tracing._activeTransaction) {\n logger.log('[Tracing] Discarded active transaction incl. activities since tab moved to the background');\n Tracing._resetActiveTransaction();\n }\n });\n }\n }\n\n /**\n * Unsets the current active transaction + activities\n */\n private static _resetActiveTransaction(): void {\n Tracing._activeTransaction = undefined;\n Tracing._activities = {};\n }\n\n /**\n * Registers to History API to detect navigation changes\n */\n private _setupHistory(): void {\n if (Tracing.options.startTransactionOnLocationChange) {\n addInstrumentationHandler({\n callback: historyCallback,\n type: 'history',\n });\n }\n }\n\n /**\n * Attaches to fetch to add sentry-trace header + creating spans\n */\n private _setupFetchTracing(): void {\n if (Tracing.options.traceFetch && supportsNativeFetch()) {\n addInstrumentationHandler({\n callback: fetchCallback,\n type: 'fetch',\n });\n }\n }\n\n /**\n * Attaches to XHR to add sentry-trace header + creating spans\n */\n private _setupXHRTracing(): void {\n if (Tracing.options.traceXHR) {\n addInstrumentationHandler({\n callback: xhrCallback,\n type: 'xhr',\n });\n }\n }\n\n /**\n * Configures global error listeners\n */\n private _setupErrorHandling(): void {\n // tslint:disable-next-line: completed-docs\n function errorCallback(): void {\n if (Tracing._activeTransaction) {\n /**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\n logger.log(`[Tracing] Global error occured, setting status in transaction: ${SpanStatus.InternalError}`);\n (Tracing._activeTransaction as SpanClass).setStatus(SpanStatus.InternalError);\n }\n }\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'error',\n });\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'unhandledrejection',\n });\n }\n\n /**\n * Is tracing enabled\n */\n private static _isEnabled(): boolean {\n if (Tracing._enabled !== undefined) {\n return Tracing._enabled;\n }\n // This happens only in test cases where the integration isn't initalized properly\n // tslint:disable-next-line: strict-type-predicates\n if (!Tracing.options || typeof Tracing.options.tracesSampleRate !== 'number') {\n return false;\n }\n Tracing._enabled = Math.random() > Tracing.options.tracesSampleRate ? false : true;\n return Tracing._enabled;\n }\n\n /**\n * Starts a Transaction waiting for activity idle to finish\n */\n public static startIdleTransaction(name: string, spanContext?: SpanContext): Span | undefined {\n if (!Tracing._isEnabled()) {\n // Tracing is not enabled\n return undefined;\n }\n\n // If we already have an active transaction it means one of two things\n // a) The user did rapid navigation changes and didn't wait until the transaction was finished\n // b) A activity wasn't popped correctly and therefore the transaction is stalling\n Tracing.finishIdleTransaction();\n\n logger.log('[Tracing] startIdleTransaction, name:', name);\n\n const _getCurrentHub = Tracing._getCurrentHub;\n if (!_getCurrentHub) {\n return undefined;\n }\n\n const hub = _getCurrentHub();\n if (!hub) {\n return undefined;\n }\n\n const span = hub.startSpan(\n {\n ...spanContext,\n transaction: name,\n },\n true,\n );\n\n Tracing._activeTransaction = span;\n\n // We need to do this workaround here and not use configureScope\n // Reason being at the time we start the inital transaction we do not have a client bound on the hub yet\n // therefore configureScope wouldn't be executed and we would miss setting the transaction\n // tslint:disable-next-line: no-unsafe-any\n (hub as any).getScope().setSpan(span);\n\n // The reason we do this here is because of cached responses\n // If we start and transaction without an activity it would never finish since there is no activity\n const id = Tracing.pushActivity('idleTransactionStarted');\n setTimeout(() => {\n Tracing.popActivity(id);\n }, (Tracing.options && Tracing.options.idleTimeout) || 100);\n\n return span;\n }\n\n /**\n * Update transaction\n * @deprecated\n */\n public static updateTransactionName(name: string): void {\n logger.log('[Tracing] DEPRECATED, use Sentry.configureScope => scope.setTransaction instead', name);\n const _getCurrentHub = Tracing._getCurrentHub;\n if (_getCurrentHub) {\n const hub = _getCurrentHub();\n if (hub) {\n hub.configureScope(scope => {\n scope.setTransaction(name);\n });\n }\n }\n }\n\n /**\n * Finshes the current active transaction\n */\n public static finishIdleTransaction(): void {\n const active = Tracing._activeTransaction as SpanClass;\n if (active) {\n Tracing._addPerformanceEntries(active);\n logger.log('[Tracing] finishIdleTransaction', active.transaction);\n active.finish(/*trimEnd*/ true);\n Tracing._resetActiveTransaction();\n }\n }\n\n /**\n * This uses `performance.getEntries()` to add additional spans to the active transaction.\n * Also, we update our timings since we consider the timings in this API to be more correct than our manual\n * measurements.\n *\n * @param transactionSpan The transaction span\n */\n private static _addPerformanceEntries(transactionSpan: SpanClass): void {\n if (!global.performance) {\n // Gatekeeper if performance API not available\n return;\n }\n\n logger.log('[Tracing] Adding & adjusting spans using Performance API');\n\n const timeOrigin = Tracing._msToSec(performance.timeOrigin);\n\n // tslint:disable-next-line: completed-docs\n function addSpan(span: SpanClass): void {\n if (transactionSpan.spanRecorder) {\n transactionSpan.spanRecorder.finishSpan(span);\n }\n }\n\n // tslint:disable-next-line: completed-docs\n function addPerformanceNavigationTiming(parent: SpanClass, entry: { [key: string]: number }, event: string): void {\n const span = parent.child({\n description: event,\n op: 'browser',\n });\n span.startTimestamp = timeOrigin + Tracing._msToSec(entry[`${event}Start`]);\n span.timestamp = timeOrigin + Tracing._msToSec(entry[`${event}End`]);\n addSpan(span);\n }\n\n // tslint:disable-next-line: completed-docs\n function addRequest(parent: SpanClass, entry: { [key: string]: number }): void {\n const request = parent.child({\n description: 'request',\n op: 'browser',\n });\n request.startTimestamp = timeOrigin + Tracing._msToSec(entry.requestStart);\n request.timestamp = timeOrigin + Tracing._msToSec(entry.responseEnd);\n addSpan(request);\n const response = parent.child({\n description: 'response',\n op: 'browser',\n });\n response.startTimestamp = timeOrigin + Tracing._msToSec(entry.responseStart);\n response.timestamp = timeOrigin + Tracing._msToSec(entry.responseEnd);\n addSpan(response);\n }\n\n let entryScriptSrc: string | undefined;\n\n if (global.document) {\n // tslint:disable-next-line: prefer-for-of\n for (let i = 0; i < document.scripts.length; i++) {\n // We go through all scripts on the page and look for 'data-entry'\n // We remember the name and measure the time between this script finished loading and\n // our mark 'sentry-tracing-init'\n if (document.scripts[i].dataset.entry === 'true') {\n entryScriptSrc = document.scripts[i].src;\n break;\n }\n }\n }\n\n let entryScriptStartEndTime: number | undefined;\n let tracingInitMarkStartTime: number | undefined;\n\n // tslint:disable: no-unsafe-any\n performance\n .getEntries()\n .slice(Tracing._performanceCursor)\n .forEach((entry: any) => {\n const startTime = Tracing._msToSec(entry.startTime as number);\n const duration = Tracing._msToSec(entry.duration as number);\n\n if (transactionSpan.op === 'navigation' && timeOrigin + startTime < transactionSpan.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation':\n addPerformanceNavigationTiming(transactionSpan, entry, 'unloadEvent');\n addPerformanceNavigationTiming(transactionSpan, entry, 'domContentLoadedEvent');\n addPerformanceNavigationTiming(transactionSpan, entry, 'loadEvent');\n addPerformanceNavigationTiming(transactionSpan, entry, 'connect');\n addPerformanceNavigationTiming(transactionSpan, entry, 'domainLookup');\n addRequest(transactionSpan, entry);\n break;\n case 'mark':\n case 'paint':\n case 'measure':\n const mark = transactionSpan.child({\n description: `${entry.entryType} ${entry.name}`,\n op: 'mark',\n });\n mark.startTimestamp = timeOrigin + startTime;\n mark.timestamp = mark.startTimestamp + duration;\n if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') {\n tracingInitMarkStartTime = mark.startTimestamp;\n }\n addSpan(mark);\n break;\n case 'resource':\n const resourceName = entry.name.replace(window.location.origin, '');\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n // We need to update existing spans with new timing info\n if (transactionSpan.spanRecorder) {\n transactionSpan.spanRecorder.finishedSpans.map((finishedSpan: SpanClass) => {\n if (finishedSpan.description && finishedSpan.description.indexOf(resourceName) !== -1) {\n finishedSpan.startTimestamp = timeOrigin + startTime;\n finishedSpan.timestamp = finishedSpan.startTimestamp + duration;\n }\n });\n }\n } else {\n const resource = transactionSpan.child({\n description: `${entry.initiatorType} ${resourceName}`,\n op: `resource`,\n });\n resource.startTimestamp = timeOrigin + startTime;\n resource.timestamp = resource.startTimestamp + duration;\n // We remember the entry script end time to calculate the difference to the first init mark\n if (entryScriptStartEndTime === undefined && (entryScriptSrc || '').includes(resourceName)) {\n entryScriptStartEndTime = resource.timestamp;\n }\n addSpan(resource);\n }\n break;\n default:\n // Ignore other entry types.\n }\n });\n\n if (entryScriptStartEndTime !== undefined && tracingInitMarkStartTime !== undefined) {\n const evaluation = transactionSpan.child({\n description: 'evaluation',\n op: `script`,\n });\n evaluation.startTimestamp = entryScriptStartEndTime;\n evaluation.timestamp = tracingInitMarkStartTime;\n addSpan(evaluation);\n }\n\n Tracing._performanceCursor = Math.max(performance.getEntries().length - 1, 0);\n\n // tslint:enable: no-unsafe-any\n }\n\n /**\n * Sets the status of the current active transaction (if there is one)\n */\n public static setTransactionStatus(status: SpanStatus): void {\n const active = Tracing._activeTransaction;\n if (active) {\n logger.log('[Tracing] setTransactionStatus', status);\n active.setStatus(status);\n }\n }\n\n /**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\n private static _msToSec(time: number): number {\n return time / 1000;\n }\n\n /**\n * Starts tracking for a specifc activity\n *\n * @param name Name of the activity, can be any string (Only used internally to identify the activity)\n * @param spanContext If provided a Span with the SpanContext will be created.\n * @param options _autoPopAfter_ | Time in ms, if provided the activity will be popped automatically after this timeout. This can be helpful in cases where you cannot gurantee your application knows the state and calls `popActivity` for sure.\n */\n public static pushActivity(\n name: string,\n spanContext?: SpanContext,\n options?: {\n autoPopAfter?: number;\n },\n ): number {\n if (!Tracing._isEnabled()) {\n // Tracing is not enabled\n return 0;\n }\n if (!Tracing._activeTransaction) {\n logger.log(`[Tracing] Not pushing activity ${name} since there is no active transaction`);\n return 0;\n }\n\n // We want to clear the timeout also here since we push a new activity\n clearTimeout(Tracing._debounce);\n\n const _getCurrentHub = Tracing._getCurrentHub;\n if (spanContext && _getCurrentHub) {\n const hub = _getCurrentHub();\n if (hub) {\n const span = hub.startSpan(spanContext);\n Tracing._activities[Tracing._currentIndex] = {\n name,\n span,\n };\n }\n } else {\n Tracing._activities[Tracing._currentIndex] = {\n name,\n };\n }\n\n logger.log(`[Tracing] pushActivity: ${name}#${Tracing._currentIndex}`);\n logger.log('[Tracing] activies count', Object.keys(Tracing._activities).length);\n if (options && typeof options.autoPopAfter === 'number') {\n logger.log(`[Tracing] auto pop of: ${name}#${Tracing._currentIndex} in ${options.autoPopAfter}ms`);\n const index = Tracing._currentIndex;\n setTimeout(() => {\n Tracing.popActivity(index, {\n autoPop: true,\n status: SpanStatus.DeadlineExceeded,\n });\n }, options.autoPopAfter);\n }\n return Tracing._currentIndex++;\n }\n\n /**\n * Removes activity and finishes the span in case there is one\n */\n public static popActivity(id: number, spanData?: { [key: string]: any }): void {\n // The !id is on purpose to also fail with 0\n // Since 0 is returned by push activity in case tracing is not enabled\n // or there is no active transaction\n if (!Tracing._isEnabled() || !id) {\n // Tracing is not enabled\n return;\n }\n\n const activity = Tracing._activities[id];\n\n if (activity) {\n logger.log(`[Tracing] popActivity ${activity.name}#${id}`);\n const span = activity.span as SpanClass;\n if (span) {\n if (spanData) {\n Object.keys(spanData).forEach((key: string) => {\n span.setData(key, spanData[key]);\n if (key === 'status_code') {\n span.setHttpStatus(spanData[key] as number);\n }\n if (key === 'status') {\n span.setStatus(spanData[key] as SpanStatus);\n }\n });\n }\n span.finish();\n }\n // tslint:disable-next-line: no-dynamic-delete\n delete Tracing._activities[id];\n }\n\n const count = Object.keys(Tracing._activities).length;\n clearTimeout(Tracing._debounce);\n\n logger.log('[Tracing] activies count', count);\n\n if (count === 0 && Tracing._activeTransaction) {\n const timeout = Tracing.options && Tracing.options.idleTimeout;\n logger.log(`[Tracing] Flushing Transaction in ${timeout}ms`);\n Tracing._debounce = (setTimeout(() => {\n Tracing.finishIdleTransaction();\n }, timeout) as any) as number;\n }\n }\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction xhrCallback(handlerData: { [key: string]: any }): void {\n if (!Tracing.options.traceXHR) {\n return;\n }\n\n // tslint:disable-next-line: no-unsafe-any\n if (!handlerData || !handlerData.xhr || !handlerData.xhr.__sentry_xhr__) {\n return;\n }\n\n // tslint:disable: no-unsafe-any\n const xhr = handlerData.xhr.__sentry_xhr__;\n\n if (!Tracing.options.shouldCreateSpanForRequest(xhr.url)) {\n return;\n }\n\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n if (handlerData.endTimestamp && handlerData.xhr.__sentry_xhr_activity_id__) {\n Tracing.popActivity(handlerData.xhr.__sentry_xhr_activity_id__, handlerData.xhr.__sentry_xhr__);\n return;\n }\n\n handlerData.xhr.__sentry_xhr_activity_id__ = Tracing.pushActivity('xhr', {\n data: {\n ...xhr.data,\n type: 'xhr',\n },\n description: `${xhr.method} ${xhr.url}`,\n op: 'http',\n });\n\n // Adding the trace header to the span\n const activity = Tracing._activities[handlerData.xhr.__sentry_xhr_activity_id__];\n if (activity) {\n const span = activity.span;\n if (span && handlerData.xhr.setRequestHeader) {\n handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent());\n }\n }\n // tslint:enable: no-unsafe-any\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction fetchCallback(handlerData: { [key: string]: any }): void {\n // tslint:disable: no-unsafe-any\n if (!Tracing.options.traceFetch) {\n return;\n }\n\n if (!Tracing.options.shouldCreateSpanForRequest(handlerData.fetchData.url)) {\n return;\n }\n\n if (handlerData.endTimestamp && handlerData.fetchData.__activity) {\n Tracing.popActivity(handlerData.fetchData.__activity, handlerData.fetchData);\n } else {\n handlerData.fetchData.__activity = Tracing.pushActivity('fetch', {\n data: {\n ...handlerData.fetchData,\n type: 'fetch',\n },\n description: `${handlerData.fetchData.method} ${handlerData.fetchData.url}`,\n op: 'http',\n });\n\n const activity = Tracing._activities[handlerData.fetchData.__activity];\n if (activity) {\n const span = activity.span;\n if (span) {\n const options = (handlerData.args[1] = (handlerData.args[1] as { [key: string]: any }) || {});\n if (options.headers) {\n if (Array.isArray(options.headers)) {\n options.headers = [...options.headers, { 'sentry-trace': span.toTraceparent() }];\n } else {\n options.headers = {\n ...options.headers,\n 'sentry-trace': span.toTraceparent(),\n };\n }\n } else {\n options.headers = { 'sentry-trace': span.toTraceparent() };\n }\n }\n }\n }\n // tslint:enable: no-unsafe-any\n}\n\n/**\n * Creates transaction from navigation changes\n */\nfunction historyCallback(_: { [key: string]: any }): void {\n if (Tracing.options.startTransactionOnLocationChange && global && global.location) {\n Tracing.startIdleTransaction(global.location.href, {\n op: 'navigation',\n sampled: true,\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/span.d.ts b/node_modules/@sentry/apm/esm/span.d.ts deleted file mode 100644 index 63b488a..0000000 --- a/node_modules/@sentry/apm/esm/span.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { Hub } from '@sentry/hub'; -import { Span as SpanInterface, SpanContext, SpanStatus } from '@sentry/types'; -export declare const TRACEPARENT_REGEXP: RegExp; -/** - * Keeps track of finished spans for a given transaction - */ -declare class SpanRecorder { - private readonly _maxlen; - private _openSpanCount; - finishedSpans: Span[]; - constructor(maxlen: number); - /** - * This is just so that we don't run out of memory while recording a lot - * of spans. At some point we just stop and flush out the start of the - * trace tree (i.e.the first n spans with the smallest - * start_timestamp). - */ - startSpan(span: Span): void; - /** - * Appends a span to finished spans table - * @param span Span to be added - */ - finishSpan(span: Span): void; -} -/** - * Span contains all data about a span - */ -export declare class Span implements SpanInterface, SpanContext { - /** - * The reference to the current hub. - */ - private readonly _hub; - /** - * @inheritDoc - */ - private readonly _traceId; - /** - * @inheritDoc - */ - private readonly _spanId; - /** - * @inheritDoc - */ - private readonly _parentSpanId?; - /** - * @inheritDoc - */ - sampled?: boolean; - /** - * Timestamp in seconds when the span was created. - */ - startTimestamp: number; - /** - * Timestamp in seconds when the span ended. - */ - timestamp?: number; - /** - * @inheritDoc - */ - transaction?: string; - /** - * @inheritDoc - */ - op?: string; - /** - * @inheritDoc - */ - description?: string; - /** - * @inheritDoc - */ - tags: { - [key: string]: string; - }; - /** - * @inheritDoc - */ - data: { - [key: string]: any; - }; - /** - * List of spans that were finalized - */ - spanRecorder?: SpanRecorder; - constructor(spanContext?: SpanContext, hub?: Hub); - /** - * Attaches SpanRecorder to the span itself - * @param maxlen maximum number of spans that can be recorded - */ - initFinishedSpans(maxlen?: number): void; - /** - * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`. - * Also the `sampled` decision will be inherited. - */ - child(spanContext?: Pick>): Span; - /** - * Continues a trace from a string (usually the header). - * @param traceparent Traceparent string - */ - static fromTraceparent(traceparent: string, spanContext?: Pick>): Span | undefined; - /** - * @inheritDoc - */ - setTag(key: string, value: string): this; - /** - * @inheritDoc - */ - setData(key: string, value: any): this; - /** - * @inheritDoc - */ - setStatus(value: SpanStatus): this; - /** - * @inheritDoc - */ - setHttpStatus(httpStatus: number): this; - /** - * @inheritDoc - */ - isSuccess(): boolean; - /** - * Sets the finish timestamp on the current span. - * @param trimEnd If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming - * the duration of the transaction span. This is useful to discard extra time in the transaction span that is not - * accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the - * transaction after a given "idle time" and we don't want this "idle time" to be part of the transaction. - */ - finish(trimEnd?: boolean): string | undefined; - /** - * @inheritDoc - */ - toTraceparent(): string; - /** - * @inheritDoc - */ - getTraceContext(): object; - /** - * @inheritDoc - */ - toJSON(): object; -} -export {}; -//# sourceMappingURL=span.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/span.d.ts.map b/node_modules/@sentry/apm/esm/span.d.ts.map deleted file mode 100644 index 10c75c2..0000000 --- a/node_modules/@sentry/apm/esm/span.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,GAAG,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI/E,eAAO,MAAM,kBAAkB,QAM9B,CAAC;AAEF;;GAEG;AACH,cAAM,YAAY;IAChB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,cAAc,CAAa;IAC5B,aAAa,EAAE,IAAI,EAAE,CAAM;gBAEf,MAAM,EAAE,MAAM;IAIjC;;;;;OAKG;IACI,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IA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AW,EAAE,OAAO,CAAC,MAAM,WAAW,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC,GAC5F,IAAI,GAAG,SAAS;IAmBnB;;OAEG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAK/C;;OAEG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAK7C;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAKzC;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAS9C;;OAEG;IACI,SAAS,IAAI,OAAO;IAI3B;;;;;;OAMG;IACI,MAAM,CAAC,OAAO,GAAE,OAAe,GAAG,MAAM,GAAG,SAAS;IAqD3D;;OAEG;IACI,aAAa,IAAI,MAAM;IAQ9B;;OAEG;IACI,eAAe,IAAI,MAAM;IAahC;;OAEG;IACI,MAAM,IAAI,MAAM;CAexB"} \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/span.js b/node_modules/@sentry/apm/esm/span.js deleted file mode 100644 index 0b7f94d..0000000 --- a/node_modules/@sentry/apm/esm/span.js +++ /dev/null @@ -1,283 +0,0 @@ -// tslint:disable:max-classes-per-file -import * as tslib_1 from "tslib"; -import { getCurrentHub, Hub } from '@sentry/hub'; -import { SpanStatus } from '@sentry/types'; -import { dropUndefinedKeys, isInstanceOf, logger, timestampWithMs, uuid4 } from '@sentry/utils'; -// TODO: Should this be exported? -export var TRACEPARENT_REGEXP = new RegExp('^[ \\t]*' + // whitespace - '([0-9a-f]{32})?' + // trace_id - '-?([0-9a-f]{16})?' + // span_id - '-?([01])?' + // sampled - '[ \\t]*$'); -/** - * Keeps track of finished spans for a given transaction - */ -var SpanRecorder = /** @class */ (function () { - function SpanRecorder(maxlen) { - this._openSpanCount = 0; - this.finishedSpans = []; - this._maxlen = maxlen; - } - /** - * This is just so that we don't run out of memory while recording a lot - * of spans. At some point we just stop and flush out the start of the - * trace tree (i.e.the first n spans with the smallest - * start_timestamp). - */ - SpanRecorder.prototype.startSpan = function (span) { - this._openSpanCount += 1; - if (this._openSpanCount > this._maxlen) { - span.spanRecorder = undefined; - } - }; - /** - * Appends a span to finished spans table - * @param span Span to be added - */ - SpanRecorder.prototype.finishSpan = function (span) { - this.finishedSpans.push(span); - }; - return SpanRecorder; -}()); -/** - * Span contains all data about a span - */ -var Span = /** @class */ (function () { - function Span(spanContext, hub) { - /** - * The reference to the current hub. - */ - this._hub = getCurrentHub(); - /** - * @inheritDoc - */ - this._traceId = uuid4(); - /** - * @inheritDoc - */ - this._spanId = uuid4().substring(16); - /** - * Timestamp in seconds when the span was created. - */ - this.startTimestamp = timestampWithMs(); - /** - * @inheritDoc - */ - this.tags = {}; - /** - * @inheritDoc - */ - this.data = {}; - if (isInstanceOf(hub, Hub)) { - this._hub = hub; - } - if (!spanContext) { - return this; - } - if (spanContext.traceId) { - this._traceId = spanContext.traceId; - } - if (spanContext.spanId) { - this._spanId = spanContext.spanId; - } - if (spanContext.parentSpanId) { - this._parentSpanId = spanContext.parentSpanId; - } - // We want to include booleans as well here - if ('sampled' in spanContext) { - this.sampled = spanContext.sampled; - } - if (spanContext.transaction) { - this.transaction = spanContext.transaction; - } - if (spanContext.op) { - this.op = spanContext.op; - } - if (spanContext.description) { - this.description = spanContext.description; - } - if (spanContext.data) { - this.data = spanContext.data; - } - if (spanContext.tags) { - this.tags = spanContext.tags; - } - } - /** - * Attaches SpanRecorder to the span itself - * @param maxlen maximum number of spans that can be recorded - */ - Span.prototype.initFinishedSpans = function (maxlen) { - if (maxlen === void 0) { maxlen = 1000; } - if (!this.spanRecorder) { - this.spanRecorder = new SpanRecorder(maxlen); - } - this.spanRecorder.startSpan(this); - }; - /** - * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`. - * Also the `sampled` decision will be inherited. - */ - Span.prototype.child = function (spanContext) { - var span = new Span(tslib_1.__assign({}, spanContext, { parentSpanId: this._spanId, sampled: this.sampled, traceId: this._traceId })); - span.spanRecorder = this.spanRecorder; - return span; - }; - /** - * Continues a trace from a string (usually the header). - * @param traceparent Traceparent string - */ - Span.fromTraceparent = function (traceparent, spanContext) { - var matches = traceparent.match(TRACEPARENT_REGEXP); - if (matches) { - var sampled = void 0; - if (matches[3] === '1') { - sampled = true; - } - else if (matches[3] === '0') { - sampled = false; - } - return new Span(tslib_1.__assign({}, spanContext, { parentSpanId: matches[2], sampled: sampled, traceId: matches[1] })); - } - return undefined; - }; - /** - * @inheritDoc - */ - Span.prototype.setTag = function (key, value) { - var _a; - this.tags = tslib_1.__assign({}, this.tags, (_a = {}, _a[key] = value, _a)); - return this; - }; - /** - * @inheritDoc - */ - Span.prototype.setData = function (key, value) { - var _a; - this.data = tslib_1.__assign({}, this.data, (_a = {}, _a[key] = value, _a)); - return this; - }; - /** - * @inheritDoc - */ - Span.prototype.setStatus = function (value) { - this.setTag('status', value); - return this; - }; - /** - * @inheritDoc - */ - Span.prototype.setHttpStatus = function (httpStatus) { - this.setTag('http.status_code', String(httpStatus)); - var spanStatus = SpanStatus.fromHttpCode(httpStatus); - if (spanStatus !== SpanStatus.UnknownError) { - this.setStatus(spanStatus); - } - return this; - }; - /** - * @inheritDoc - */ - Span.prototype.isSuccess = function () { - return this.tags.status === SpanStatus.Ok; - }; - /** - * Sets the finish timestamp on the current span. - * @param trimEnd If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming - * the duration of the transaction span. This is useful to discard extra time in the transaction span that is not - * accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the - * transaction after a given "idle time" and we don't want this "idle time" to be part of the transaction. - */ - Span.prototype.finish = function (trimEnd) { - var _this = this; - if (trimEnd === void 0) { trimEnd = false; } - // This transaction is already finished, so we should not flush it again. - if (this.timestamp !== undefined) { - return undefined; - } - this.timestamp = timestampWithMs(); - if (this.spanRecorder === undefined) { - return undefined; - } - this.spanRecorder.finishSpan(this); - if (this.transaction === undefined) { - // If this has no transaction set we assume there's a parent - // transaction for this span that would be flushed out eventually. - return undefined; - } - if (this.sampled === undefined) { - // At this point a `sampled === undefined` should have already been - // resolved to a concrete decision. If `sampled` is `undefined`, it's - // likely that somebody used `Sentry.startSpan(...)` on a - // non-transaction span and later decided to make it a transaction. - logger.warn('Discarding transaction Span without sampling decision'); - return undefined; - } - var finishedSpans = this.spanRecorder ? this.spanRecorder.finishedSpans.filter(function (s) { return s !== _this; }) : []; - if (trimEnd && finishedSpans.length > 0) { - this.timestamp = finishedSpans.reduce(function (prev, current) { - if (prev.timestamp && current.timestamp) { - return prev.timestamp > current.timestamp ? prev : current; - } - return prev; - }).timestamp; - } - return this._hub.captureEvent({ - contexts: { - trace: this.getTraceContext(), - }, - spans: finishedSpans, - start_timestamp: this.startTimestamp, - tags: this.tags, - timestamp: this.timestamp, - transaction: this.transaction, - type: 'transaction', - }); - }; - /** - * @inheritDoc - */ - Span.prototype.toTraceparent = function () { - var sampledString = ''; - if (this.sampled !== undefined) { - sampledString = this.sampled ? '-1' : '-0'; - } - return this._traceId + "-" + this._spanId + sampledString; - }; - /** - * @inheritDoc - */ - Span.prototype.getTraceContext = function () { - return dropUndefinedKeys({ - data: Object.keys(this.data).length > 0 ? this.data : undefined, - description: this.description, - op: this.op, - parent_span_id: this._parentSpanId, - span_id: this._spanId, - status: this.tags.status, - tags: Object.keys(this.tags).length > 0 ? this.tags : undefined, - trace_id: this._traceId, - }); - }; - /** - * @inheritDoc - */ - Span.prototype.toJSON = function () { - return dropUndefinedKeys({ - data: Object.keys(this.data).length > 0 ? this.data : undefined, - description: this.description, - op: this.op, - parent_span_id: this._parentSpanId, - sampled: this.sampled, - span_id: this._spanId, - start_timestamp: this.startTimestamp, - tags: Object.keys(this.tags).length > 0 ? this.tags : undefined, - timestamp: this.timestamp, - trace_id: this._traceId, - transaction: this.transaction, - }); - }; - return Span; -}()); -export { Span }; -//# sourceMappingURL=span.js.map \ No newline at end of file diff --git a/node_modules/@sentry/apm/esm/span.js.map b/node_modules/@sentry/apm/esm/span.js.map deleted file mode 100644 index 4c67384..0000000 --- a/node_modules/@sentry/apm/esm/span.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,sCAAsC;;AAEtC,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAsC,UAAU,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhG,iCAAiC;AACjC,MAAM,CAAC,IAAM,kBAAkB,GAAG,IAAI,MAAM,CAC1C,UAAU,GAAG,aAAa;IAC1B,iBAAiB,GAAG,WAAW;IAC/B,mBAAmB,GAAG,UAAU;IAChC,WAAW,GAAG,UAAU;IACtB,UAAU,CACb,CAAC;AAEF;;GAEG;AACH;IAKE,sBAAmB,MAAc;QAHzB,mBAAc,GAAW,CAAC,CAAC;QAC5B,kBAAa,GAAW,EAAE,CAAC;QAGhC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACI,gCAAS,GAAhB,UAAiB,IAAU;QACzB,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;QACzB,IAAI,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE;YACtC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;SAC/B;IACH,CAAC;IAED;;;OAGG;IACI,iCAAU,GAAjB,UAAkB,IAAU;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IACH,mBAAC;AAAD,CAAC,AA7BD,IA6BC;AAED;;GAEG;AACH;IAkEE,cAAmB,WAAyB,EAAE,GAAS;QAjEvD;;WAEG;QACc,SAAI,GAAS,aAAa,EAAqB,CAAC;QA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I,CAAC,EAAE;YACX,cAAc,EAAE,IAAI,CAAC,aAAa;YAClC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,eAAe,EAAE,IAAI,CAAC,cAAc;YACpC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YAC/D,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;IACL,CAAC;IACH,WAAC;AAAD,CAAC,AAnTD,IAmTC","sourcesContent":["// tslint:disable:max-classes-per-file\n\nimport { getCurrentHub, Hub } from '@sentry/hub';\nimport { Span as SpanInterface, SpanContext, SpanStatus } from '@sentry/types';\nimport { dropUndefinedKeys, isInstanceOf, logger, timestampWithMs, uuid4 } from '@sentry/utils';\n\n// TODO: Should this be exported?\nexport const TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Keeps track of finished spans for a given transaction\n */\nclass SpanRecorder {\n private readonly _maxlen: number;\n private _openSpanCount: number = 0;\n public finishedSpans: Span[] = [];\n\n public constructor(maxlen: number) {\n this._maxlen = maxlen;\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n public startSpan(span: Span): void {\n this._openSpanCount += 1;\n if (this._openSpanCount > this._maxlen) {\n span.spanRecorder = undefined;\n }\n }\n\n /**\n * Appends a span to finished spans table\n * @param span Span to be added\n */\n public finishSpan(span: Span): void {\n this.finishedSpans.push(span);\n }\n}\n\n/**\n * Span contains all data about a span\n */\nexport class Span implements SpanInterface, SpanContext {\n /**\n * The reference to the current hub.\n */\n private readonly _hub: Hub = (getCurrentHub() as unknown) as Hub;\n\n /**\n * @inheritDoc\n */\n private readonly _traceId: string = uuid4();\n\n /**\n * @inheritDoc\n */\n private readonly _spanId: string = uuid4().substring(16);\n\n /**\n * @inheritDoc\n */\n private readonly _parentSpanId?: string;\n\n /**\n * @inheritDoc\n */\n public sampled?: boolean;\n\n /**\n * Timestamp in seconds when the span was created.\n */\n public startTimestamp: number = timestampWithMs();\n\n /**\n * Timestamp in seconds when the span ended.\n */\n public timestamp?: number;\n\n /**\n * @inheritDoc\n */\n public transaction?: string;\n\n /**\n * @inheritDoc\n */\n public op?: string;\n\n /**\n * @inheritDoc\n */\n public description?: string;\n\n /**\n * @inheritDoc\n */\n public tags: { [key: string]: string } = {};\n\n /**\n * @inheritDoc\n */\n public data: { [key: string]: any } = {};\n\n /**\n * List of spans that were finalized\n */\n public spanRecorder?: SpanRecorder;\n\n public constructor(spanContext?: SpanContext, hub?: Hub) {\n if (isInstanceOf(hub, Hub)) {\n this._hub = hub as Hub;\n }\n\n if (!spanContext) {\n return this;\n }\n\n if (spanContext.traceId) {\n this._traceId = spanContext.traceId;\n }\n if (spanContext.spanId) {\n this._spanId = spanContext.spanId;\n }\n if (spanContext.parentSpanId) {\n this._parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.transaction) {\n this.transaction = spanContext.transaction;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.data) {\n this.data = spanContext.data;\n }\n if (spanContext.tags) {\n this.tags = spanContext.tags;\n }\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n public initFinishedSpans(maxlen: number = 1000): void {\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.startSpan(this);\n }\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n */\n public child(spanContext?: Pick>): Span {\n const span = new Span({\n ...spanContext,\n parentSpanId: this._spanId,\n sampled: this.sampled,\n traceId: this._traceId,\n });\n\n span.spanRecorder = this.spanRecorder;\n\n return span;\n }\n\n /**\n * Continues a trace from a string (usually the header).\n * @param traceparent Traceparent string\n */\n public static fromTraceparent(\n traceparent: string,\n spanContext?: Pick>,\n ): Span | undefined {\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (matches) {\n let sampled: boolean | undefined;\n if (matches[3] === '1') {\n sampled = true;\n } else if (matches[3] === '0') {\n sampled = false;\n }\n return new Span({\n ...spanContext,\n parentSpanId: matches[2],\n sampled,\n traceId: matches[1],\n });\n }\n return undefined;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setData(key: string, value: any): this {\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setStatus(value: SpanStatus): this {\n this.setTag('status', value);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setHttpStatus(httpStatus: number): this {\n this.setTag('http.status_code', String(httpStatus));\n const spanStatus = SpanStatus.fromHttpCode(httpStatus);\n if (spanStatus !== SpanStatus.UnknownError) {\n this.setStatus(spanStatus);\n }\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public isSuccess(): boolean {\n return this.tags.status === SpanStatus.Ok;\n }\n\n /**\n * Sets the finish timestamp on the current span.\n * @param trimEnd If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming\n * the duration of the transaction span. This is useful to discard extra time in the transaction span that is not\n * accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the\n * transaction after a given \"idle time\" and we don't want this \"idle time\" to be part of the transaction.\n */\n public finish(trimEnd: boolean = false): string | undefined {\n // This transaction is already finished, so we should not flush it again.\n if (this.timestamp !== undefined) {\n return undefined;\n }\n\n this.timestamp = timestampWithMs();\n\n if (this.spanRecorder === undefined) {\n return undefined;\n }\n\n this.spanRecorder.finishSpan(this);\n\n if (this.transaction === undefined) {\n // If this has no transaction set we assume there's a parent\n // transaction for this span that would be flushed out eventually.\n return undefined;\n }\n\n if (this.sampled === undefined) {\n // At this point a `sampled === undefined` should have already been\n // resolved to a concrete decision. If `sampled` is `undefined`, it's\n // likely that somebody used `Sentry.startSpan(...)` on a\n // non-transaction span and later decided to make it a transaction.\n logger.warn('Discarding transaction Span without sampling decision');\n return undefined;\n }\n\n const finishedSpans = this.spanRecorder ? this.spanRecorder.finishedSpans.filter(s => s !== this) : [];\n\n if (trimEnd && finishedSpans.length > 0) {\n this.timestamp = finishedSpans.reduce((prev: Span, current: Span) => {\n if (prev.timestamp && current.timestamp) {\n return prev.timestamp > current.timestamp ? prev : current;\n }\n return prev;\n }).timestamp;\n }\n\n return this._hub.captureEvent({\n contexts: {\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.timestamp,\n transaction: this.transaction,\n type: 'transaction',\n });\n }\n\n /**\n * @inheritDoc\n */\n public toTraceparent(): string {\n let sampledString = '';\n if (this.sampled !== undefined) {\n sampledString = this.sampled ? '-1' : '-0';\n }\n return `${this._traceId}-${this._spanId}${sampledString}`;\n }\n\n /**\n * @inheritDoc\n */\n public getTraceContext(): object {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this._parentSpanId,\n span_id: this._spanId,\n status: this.tags.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this._traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n public toJSON(): object {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this._parentSpanId,\n sampled: this.sampled,\n span_id: this._spanId,\n start_timestamp: this.startTimestamp,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.timestamp,\n trace_id: this._traceId,\n transaction: this.transaction,\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/apm/package.json b/node_modules/@sentry/apm/package.json deleted file mode 100644 index c8e3054..0000000 --- a/node_modules/@sentry/apm/package.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "_args": [ - [ - "@sentry/apm@5.14.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "@sentry/apm@5.14.1", - "_id": "@sentry/apm@5.14.1", - "_inBundle": false, - "_integrity": "sha1-mWBcTPkzlirtpKGwPpklYhPlHX0=", - "_location": "/@sentry/apm", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@sentry/apm@5.14.1", - "name": "@sentry/apm", - "escapedName": "@sentry%2fapm", - "scope": "@sentry", - "rawSpec": "5.14.1", - "saveSpec": null, - "fetchSpec": "5.14.1" - }, - "_requiredBy": [ - "/@sentry/node" - ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/apm/-/apm-5.14.1.tgz", - "_spec": "5.14.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", - "author": { - "name": "Sentry" - }, - "bugs": { - "url": "https://github.com/getsentry/sentry-javascript/issues" - }, - "dependencies": { - "@sentry/browser": "5.14.1", - "@sentry/hub": "5.14.1", - "@sentry/minimal": "5.14.1", - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "tslib": "^1.9.3" - }, - "description": "Extensions for APM", - "devDependencies": { - "@types/express": "^4.17.1", - "jest": "^24.7.1", - "npm-run-all": "^4.1.2", - "prettier": "^1.17.0", - "prettier-check": "^2.0.0", - "rimraf": "^2.6.3", - "rollup": "^1.10.1", - "rollup-plugin-commonjs": "^9.3.4", - "rollup-plugin-license": "^0.8.1", - "rollup-plugin-node-resolve": "^4.2.3", - "rollup-plugin-terser": "^4.0.4", - "rollup-plugin-typescript2": "^0.21.0", - "tslint": "^5.16.0", - "typescript": "^3.4.5" - }, - "engines": { - "node": ">=6" - }, - "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core", - "jest": { - "collectCoverage": true, - "transform": { - "^.+\\.ts$": "ts-jest" - }, - "moduleFileExtensions": [ - "js", - "ts" - ], - "testEnvironment": "node", - "testMatch": [ - "**/*.test.ts" - ], - "globals": { - "ts-jest": { - "tsConfig": "./tsconfig.json", - "diagnostics": false - } - } - }, - "license": "BSD-3-Clause", - "main": "dist/index.js", - "module": "esm/index.js", - "name": "@sentry/apm", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git://github.com/getsentry/sentry-javascript.git" - }, - "scripts": { - "build": "run-p build:es5 build:esm build:bundle", - "build:bundle": "rollup --config", - "build:bundle:watch": "rollup --config --watch", - "build:es5": "tsc -p tsconfig.build.json", - "build:esm": "tsc -p tsconfig.esm.json", - "build:watch": "run-p build:watch:es5 build:watch:esm", - "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", - "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", - "clean": "rimraf dist coverage build esm", - "fix": "run-s fix:tslint fix:prettier", - "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", - "fix:tslint": "tslint --fix -t stylish -p .", - "link:yarn": "yarn link", - "lint": "run-s lint:prettier lint:tslint", - "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", - "lint:tslint": "tslint -t stylish -p .", - "lint:tslint:json": "tslint --format json -p . | tee lint-results.json", - "test": "jest", - "test:watch": "jest --watch" - }, - "sideEffects": false, - "types": "dist/index.d.ts", - "version": "5.14.1" -} diff --git a/node_modules/@sentry/browser/LICENSE b/node_modules/@sentry/browser/LICENSE deleted file mode 100644 index 8b42db8..0000000 --- a/node_modules/@sentry/browser/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -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. diff --git a/node_modules/@sentry/browser/README.md b/node_modules/@sentry/browser/README.md deleted file mode 100644 index 486505c..0000000 --- a/node_modules/@sentry/browser/README.md +++ /dev/null @@ -1,64 +0,0 @@ -

- - - -
-

- -# Official Sentry SDK for Browsers - -[![Sauce Test Status](https://saucelabs.com/buildstatus/sentryio)](https://saucelabs.com/u/sentryio) -[![npm version](https://img.shields.io/npm/v/@sentry/browser.svg)](https://www.npmjs.com/package/@sentry/browser) -[![npm dm](https://img.shields.io/npm/dm/@sentry/browser.svg)](https://www.npmjs.com/package/@sentry/browser) -[![npm dt](https://img.shields.io/npm/dt/@sentry/browser.svg)](https://www.npmjs.com/package/@sentry/browser) -[![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/) - -## Usage - -To use this SDK, call `Sentry.init(options)` as early as possible after loading the page. This will initialize the SDK -and hook into the environment. Note that you can turn off almost all side effects using the respective options. - -```javascript -import * as Sentry from '@sentry/browser'; - -Sentry.init({ - dsn: '__DSN__', - // ... -}); -``` - -To set context information or send manual events, use the exported functions of `@sentry/browser`. Note that these -functions will not perform any action before you have called `Sentry.init()`: - -```javascript -import * as Sentry from '@sentry/browser'; - -// Set user information, as well as tags and further extras -Sentry.configureScope(scope => { - scope.setExtra('battery', 0.7); - scope.setTag('user_mode', 'admin'); - scope.setUser({ id: '4711' }); - // scope.clear(); -}); - -// Add a breadcrumb for future events -Sentry.addBreadcrumb({ - message: 'My Breadcrumb', - // ... -}); - -// Capture exceptions, messages or manual events -Sentry.captureMessage('Hello, world!'); -Sentry.captureException(new Error('Good bye')); -Sentry.captureEvent({ - message: 'Manual', - stacktrace: [ - // ... - ], -}); -``` diff --git a/node_modules/@sentry/browser/build/bundle.es6.js b/node_modules/@sentry/browser/build/bundle.es6.js deleted file mode 100644 index dae079d..0000000 --- a/node_modules/@sentry/browser/build/bundle.es6.js +++ /dev/null @@ -1,5298 +0,0 @@ -var Sentry = (function (exports) { - /** Console logging verbosity for the SDK. */ - var LogLevel; - (function (LogLevel) { - /** No logs will be generated. */ - LogLevel[LogLevel["None"] = 0] = "None"; - /** Only SDK internal errors will be logged. */ - LogLevel[LogLevel["Error"] = 1] = "Error"; - /** Information useful for debugging the SDK will be logged. */ - LogLevel[LogLevel["Debug"] = 2] = "Debug"; - /** All SDK actions will be logged. */ - LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; - })(LogLevel || (LogLevel = {})); - - /** JSDoc */ - (function (Severity) { - /** JSDoc */ - Severity["Fatal"] = "fatal"; - /** JSDoc */ - Severity["Error"] = "error"; - /** JSDoc */ - Severity["Warning"] = "warning"; - /** JSDoc */ - Severity["Log"] = "log"; - /** JSDoc */ - Severity["Info"] = "info"; - /** JSDoc */ - Severity["Debug"] = "debug"; - /** JSDoc */ - Severity["Critical"] = "critical"; - })(exports.Severity || (exports.Severity = {})); - // tslint:disable:completed-docs - // tslint:disable:no-unnecessary-qualifier no-namespace - (function (Severity) { - /** - * Converts a string-based level into a {@link Severity}. - * - * @param level string representation of Severity - * @returns Severity - */ - function fromString(level) { - switch (level) { - case 'debug': - return Severity.Debug; - case 'info': - return Severity.Info; - case 'warn': - case 'warning': - return Severity.Warning; - case 'error': - return Severity.Error; - case 'fatal': - return Severity.Fatal; - case 'critical': - return Severity.Critical; - case 'log': - default: - return Severity.Log; - } - } - Severity.fromString = fromString; - })(exports.Severity || (exports.Severity = {})); - - /** The status of an Span. */ - var SpanStatus; - (function (SpanStatus) { - /** The operation completed successfully. */ - SpanStatus["Ok"] = "ok"; - /** Deadline expired before operation could complete. */ - SpanStatus["DeadlineExceeded"] = "deadline_exceeded"; - /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ - SpanStatus["Unauthenticated"] = "unauthenticated"; - /** 403 Forbidden */ - SpanStatus["PermissionDenied"] = "permission_denied"; - /** 404 Not Found. Some requested entity (file or directory) was not found. */ - SpanStatus["NotFound"] = "not_found"; - /** 429 Too Many Requests */ - SpanStatus["ResourceExhausted"] = "resource_exhausted"; - /** Client specified an invalid argument. 4xx. */ - SpanStatus["InvalidArgument"] = "invalid_argument"; - /** 501 Not Implemented */ - SpanStatus["Unimplemented"] = "unimplemented"; - /** 503 Service Unavailable */ - SpanStatus["Unavailable"] = "unavailable"; - /** Other/generic 5xx. */ - SpanStatus["InternalError"] = "internal_error"; - /** Unknown. Any non-standard HTTP status code. */ - SpanStatus["UnknownError"] = "unknown_error"; - /** The operation was cancelled (typically by the user). */ - SpanStatus["Cancelled"] = "cancelled"; - /** Already exists (409) */ - SpanStatus["AlreadyExists"] = "already_exists"; - /** Operation was rejected because the system is not in a state required for the operation's */ - SpanStatus["FailedPrecondition"] = "failed_precondition"; - /** The operation was aborted, typically due to a concurrency issue. */ - SpanStatus["Aborted"] = "aborted"; - /** Operation was attempted past the valid range. */ - SpanStatus["OutOfRange"] = "out_of_range"; - /** Unrecoverable data loss or corruption */ - SpanStatus["DataLoss"] = "data_loss"; - })(SpanStatus || (SpanStatus = {})); - // tslint:disable:no-unnecessary-qualifier no-namespace - (function (SpanStatus) { - /** - * Converts a HTTP status code into a {@link SpanStatus}. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or {@link SpanStatus.UnknownError}. - */ - // tslint:disable-next-line:completed-docs - function fromHttpCode(httpStatus) { - if (httpStatus < 400) { - return SpanStatus.Ok; - } - if (httpStatus >= 400 && httpStatus < 500) { - switch (httpStatus) { - case 401: - return SpanStatus.Unauthenticated; - case 403: - return SpanStatus.PermissionDenied; - case 404: - return SpanStatus.NotFound; - case 409: - return SpanStatus.AlreadyExists; - case 413: - return SpanStatus.FailedPrecondition; - case 429: - return SpanStatus.ResourceExhausted; - default: - return SpanStatus.InvalidArgument; - } - } - if (httpStatus >= 500 && httpStatus < 600) { - switch (httpStatus) { - case 501: - return SpanStatus.Unimplemented; - case 503: - return SpanStatus.Unavailable; - case 504: - return SpanStatus.DeadlineExceeded; - default: - return SpanStatus.InternalError; - } - } - return SpanStatus.UnknownError; - } - SpanStatus.fromHttpCode = fromHttpCode; - })(SpanStatus || (SpanStatus = {})); - - /** The status of an event. */ - (function (Status) { - /** The status could not be determined. */ - Status["Unknown"] = "unknown"; - /** The event was skipped due to configuration or callbacks. */ - Status["Skipped"] = "skipped"; - /** The event was sent to Sentry successfully. */ - Status["Success"] = "success"; - /** The client is currently rate limited and will try again later. */ - Status["RateLimit"] = "rate_limit"; - /** The event could not be processed. */ - Status["Invalid"] = "invalid"; - /** A server-side error ocurred during submission. */ - Status["Failed"] = "failed"; - })(exports.Status || (exports.Status = {})); - // tslint:disable:completed-docs - // tslint:disable:no-unnecessary-qualifier no-namespace - (function (Status) { - /** - * Converts a HTTP status code into a {@link Status}. - * - * @param code The HTTP response status code. - * @returns The send status or {@link Status.Unknown}. - */ - function fromHttpCode(code) { - if (code >= 200 && code < 300) { - return Status.Success; - } - if (code === 429) { - return Status.RateLimit; - } - if (code >= 400 && code < 500) { - return Status.Invalid; - } - if (code >= 500) { - return Status.Failed; - } - return Status.Unknown; - } - Status.fromHttpCode = fromHttpCode; - })(exports.Status || (exports.Status = {})); - - /** - * Consumes the promise and logs the error when it rejects. - * @param promise A promise to forget. - */ - - const setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method - /** - * setPrototypeOf polyfill using __proto__ - */ - function setProtoOf(obj, proto) { - // @ts-ignore - obj.__proto__ = proto; - return obj; - } - /** - * setPrototypeOf polyfill using mixin - */ - function mixinProperties(obj, proto) { - for (const prop in proto) { - if (!obj.hasOwnProperty(prop)) { - // @ts-ignore - obj[prop] = proto[prop]; - } - } - return obj; - } - - /** An error emitted by Sentry SDKs and related utilities. */ - class SentryError extends Error { - constructor(message) { - super(message); - this.message = message; - // tslint:disable:no-unsafe-any - this.name = new.target.prototype.constructor.name; - setPrototypeOf(this, new.target.prototype); - } - } - - /** - * Checks whether given value's type is one of a few Error or Error-like - * {@link isError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isError(wat) { - switch (Object.prototype.toString.call(wat)) { - case '[object Error]': - return true; - case '[object Exception]': - return true; - case '[object DOMException]': - return true; - default: - return isInstanceOf(wat, Error); - } - } - /** - * Checks whether given value's type is ErrorEvent - * {@link isErrorEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isErrorEvent(wat) { - return Object.prototype.toString.call(wat) === '[object ErrorEvent]'; - } - /** - * Checks whether given value's type is DOMError - * {@link isDOMError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isDOMError(wat) { - return Object.prototype.toString.call(wat) === '[object DOMError]'; - } - /** - * Checks whether given value's type is DOMException - * {@link isDOMException}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isDOMException(wat) { - return Object.prototype.toString.call(wat) === '[object DOMException]'; - } - /** - * Checks whether given value's type is a string - * {@link isString}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isString(wat) { - return Object.prototype.toString.call(wat) === '[object String]'; - } - /** - * Checks whether given value's is a primitive (undefined, null, number, boolean, string) - * {@link isPrimitive}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isPrimitive(wat) { - return wat === null || (typeof wat !== 'object' && typeof wat !== 'function'); - } - /** - * Checks whether given value's type is an object literal - * {@link isPlainObject}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isPlainObject(wat) { - return Object.prototype.toString.call(wat) === '[object Object]'; - } - /** - * Checks whether given value's type is an Event instance - * {@link isEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isEvent(wat) { - // tslint:disable-next-line:strict-type-predicates - return typeof Event !== 'undefined' && isInstanceOf(wat, Event); - } - /** - * Checks whether given value's type is an Element instance - * {@link isElement}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isElement(wat) { - // tslint:disable-next-line:strict-type-predicates - return typeof Element !== 'undefined' && isInstanceOf(wat, Element); - } - /** - * Checks whether given value's type is an regexp - * {@link isRegExp}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isRegExp(wat) { - return Object.prototype.toString.call(wat) === '[object RegExp]'; - } - /** - * Checks whether given value has a then function. - * @param wat A value to be checked. - */ - function isThenable(wat) { - // tslint:disable:no-unsafe-any - return Boolean(wat && wat.then && typeof wat.then === 'function'); - // tslint:enable:no-unsafe-any - } - /** - * Checks whether given value's type is a SyntheticEvent - * {@link isSyntheticEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isSyntheticEvent(wat) { - // tslint:disable-next-line:no-unsafe-any - return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; - } - /** - * Checks whether given value's type is an instance of provided constructor. - * {@link isInstanceOf}. - * - * @param wat A value to be checked. - * @param base A constructor to be used in a check. - * @returns A boolean representing the result. - */ - function isInstanceOf(wat, base) { - try { - // tslint:disable-next-line:no-unsafe-any - return wat instanceof base; - } - catch (_e) { - return false; - } - } - - /** - * Truncates given string to the maximum characters count - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ - function truncate(str, max = 0) { - // tslint:disable-next-line:strict-type-predicates - if (typeof str !== 'string' || max === 0) { - return str; - } - return str.length <= max ? str : `${str.substr(0, max)}...`; - } - /** - * Join values in array - * @param input array of values to be joined together - * @param delimiter string to be placed in-between values - * @returns Joined values - */ - function safeJoin(input, delimiter) { - if (!Array.isArray(input)) { - return ''; - } - const output = []; - // tslint:disable-next-line:prefer-for-of - for (let i = 0; i < input.length; i++) { - const value = input[i]; - try { - output.push(String(value)); - } - catch (e) { - output.push('[value cannot be serialized]'); - } - } - return output.join(delimiter); - } - /** - * Checks if the value matches a regex or includes the string - * @param value The string value to be checked against - * @param pattern Either a regex or a string that must be contained in value - */ - function isMatchingPattern(value, pattern) { - if (isRegExp(pattern)) { - return pattern.test(value); - } - if (typeof pattern === 'string') { - return value.indexOf(pattern) !== -1; - } - return false; - } - - /** - * Requires a module which is protected _against bundler minification. - * - * @param request The module path to resolve - */ - function dynamicRequire(mod, request) { - // tslint:disable-next-line: no-unsafe-any - return mod.require(request); - } - /** - * Checks whether we're in the Node.js or Browser environment - * - * @returns Answer to given question - */ - function isNodeEnv() { - // tslint:disable:strict-type-predicates - return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'; - } - const fallbackGlobalObject = {}; - /** - * Safely get global scope object - * - * @returns Global scope object - */ - function getGlobalObject() { - return (isNodeEnv() - ? global - : typeof window !== 'undefined' - ? window - : typeof self !== 'undefined' - ? self - : fallbackGlobalObject); - } - /** - * UUID4 generator - * - * @returns string Generated UUID4. - */ - function uuid4() { - const global = getGlobalObject(); - const crypto = global.crypto || global.msCrypto; - if (!(crypto === void 0) && crypto.getRandomValues) { - // Use window.crypto API if available - const arr = new Uint16Array(8); - crypto.getRandomValues(arr); - // set 4 in byte 7 - // tslint:disable-next-line:no-bitwise - arr[3] = (arr[3] & 0xfff) | 0x4000; - // set 2 most significant bits of byte 9 to '10' - // tslint:disable-next-line:no-bitwise - arr[4] = (arr[4] & 0x3fff) | 0x8000; - const pad = (num) => { - let v = num.toString(16); - while (v.length < 4) { - v = `0${v}`; - } - return v; - }; - return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])); - } - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 - return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => { - // tslint:disable-next-line:no-bitwise - const r = (Math.random() * 16) | 0; - // tslint:disable-next-line:no-bitwise - const v = c === 'x' ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); - } - /** - * Parses string form of URL into an object - * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B - * // intentionally using regex and not href parsing trick because React Native and other - * // environments where DOM might not be available - * @returns parsed URL object - */ - function parseUrl(url) { - if (!url) { - return {}; - } - const match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); - if (!match) { - return {}; - } - // coerce to undefined values to empty string so we don't get 'undefined' - const query = match[6] || ''; - const fragment = match[8] || ''; - return { - host: match[4], - path: match[5], - protocol: match[2], - relative: match[5] + query + fragment, - }; - } - /** - * Extracts either message or type+value from an event that can be used for user-facing logs - * @returns event's description - */ - function getEventDescription(event) { - if (event.message) { - return event.message; - } - if (event.exception && event.exception.values && event.exception.values[0]) { - const exception = event.exception.values[0]; - if (exception.type && exception.value) { - return `${exception.type}: ${exception.value}`; - } - return exception.type || exception.value || event.event_id || ''; - } - return event.event_id || ''; - } - /** JSDoc */ - function consoleSandbox(callback) { - const global = getGlobalObject(); - const levels = ['debug', 'info', 'warn', 'error', 'log', 'assert']; - if (!('console' in global)) { - return callback(); - } - const originalConsole = global.console; - const wrappedLevels = {}; - // Restore all wrapped console methods - levels.forEach(level => { - if (level in global.console && originalConsole[level].__sentry_original__) { - wrappedLevels[level] = originalConsole[level]; - originalConsole[level] = originalConsole[level].__sentry_original__; - } - }); - // Perform callback manipulations - const result = callback(); - // Revert restoration to wrapped state - Object.keys(wrappedLevels).forEach(level => { - originalConsole[level] = wrappedLevels[level]; - }); - return result; - } - /** - * Adds exception values, type and value to an synthetic Exception. - * @param event The event to modify. - * @param value Value of the exception. - * @param type Type of the exception. - * @hidden - */ - function addExceptionTypeValue(event, value, type) { - event.exception = event.exception || {}; - event.exception.values = event.exception.values || []; - event.exception.values[0] = event.exception.values[0] || {}; - event.exception.values[0].value = event.exception.values[0].value || value || ''; - event.exception.values[0].type = event.exception.values[0].type || type || 'Error'; - } - /** - * Adds exception mechanism to a given event. - * @param event The event to modify. - * @param mechanism Mechanism of the mechanism. - * @hidden - */ - function addExceptionMechanism(event, mechanism = {}) { - // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better? - try { - // @ts-ignore - // tslint:disable:no-non-null-assertion - event.exception.values[0].mechanism = event.exception.values[0].mechanism || {}; - Object.keys(mechanism).forEach(key => { - // @ts-ignore - event.exception.values[0].mechanism[key] = mechanism[key]; - }); - } - catch (_oO) { - // no-empty - } - } - /** - * A safe form of location.href - */ - function getLocationHref() { - try { - return document.location.href; - } - catch (oO) { - return ''; - } - } - /** - * Given a child DOM element, returns a query-selector statement describing that - * and its ancestors - * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] - * @returns generated DOM path - */ - function htmlTreeAsString(elem) { - // try/catch both: - // - accessing event.target (see getsentry/raven-js#838, #768) - // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly - // - can throw an exception in some circumstances. - try { - let currentElem = elem; - const MAX_TRAVERSE_HEIGHT = 5; - const MAX_OUTPUT_LEN = 80; - const out = []; - let height = 0; - let len = 0; - const separator = ' > '; - const sepLength = separator.length; - let nextStr; - while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { - nextStr = _htmlElementAsString(currentElem); - // bail out if - // - nextStr is the 'html' element - // - the length of the string that would be created exceeds MAX_OUTPUT_LEN - // (ignore this limit if we are on the first iteration) - if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) { - break; - } - out.push(nextStr); - len += nextStr.length; - currentElem = currentElem.parentNode; - } - return out.reverse().join(separator); - } - catch (_oO) { - return ''; - } - } - /** - * Returns a simple, query-selector representation of a DOM element - * e.g. [HTMLElement] => input#foo.btn[name=baz] - * @returns generated DOM path - */ - function _htmlElementAsString(el) { - const elem = el; - const out = []; - let className; - let classes; - let key; - let attr; - let i; - if (!elem || !elem.tagName) { - return ''; - } - out.push(elem.tagName.toLowerCase()); - if (elem.id) { - out.push(`#${elem.id}`); - } - className = elem.className; - if (className && isString(className)) { - classes = className.split(/\s+/); - for (i = 0; i < classes.length; i++) { - out.push(`.${classes[i]}`); - } - } - const attrWhitelist = ['type', 'name', 'title', 'alt']; - for (i = 0; i < attrWhitelist.length; i++) { - key = attrWhitelist[i]; - attr = elem.getAttribute(key); - if (attr) { - out.push(`[${key}="${attr}"]`); - } - } - return out.join(''); - } - const INITIAL_TIME = Date.now(); - let prevNow = 0; - const performanceFallback = { - now() { - let now = Date.now() - INITIAL_TIME; - if (now < prevNow) { - now = prevNow; - } - prevNow = now; - return now; - }, - timeOrigin: INITIAL_TIME, - }; - const crossPlatformPerformance = (() => { - if (isNodeEnv()) { - try { - const perfHooks = dynamicRequire(module, 'perf_hooks'); - return perfHooks.performance; - } - catch (_) { - return performanceFallback; - } - } - if (getGlobalObject().performance) { - // Polyfill for performance.timeOrigin. - // - // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin - // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing. - // tslint:disable-next-line:strict-type-predicates - if (performance.timeOrigin === undefined) { - // For webworkers it could mean we don't have performance.timing then we fallback - // tslint:disable-next-line:deprecation - if (!performance.timing) { - return performanceFallback; - } - // tslint:disable-next-line:deprecation - if (!performance.timing.navigationStart) { - return performanceFallback; - } - // @ts-ignore - // tslint:disable-next-line:deprecation - performance.timeOrigin = performance.timing.navigationStart; - } - } - return getGlobalObject().performance || performanceFallback; - })(); - /** - * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock. - */ - function timestampWithMs() { - return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000; - } - const defaultRetryAfter = 60 * 1000; // 60 seconds - /** - * Extracts Retry-After value from the request header or returns default value - * @param now current unix timestamp - * @param header string representation of 'Retry-After' header - */ - function parseRetryAfterHeader(now, header) { - if (!header) { - return defaultRetryAfter; - } - const headerDelay = parseInt(`${header}`, 10); - if (!isNaN(headerDelay)) { - return headerDelay * 1000; - } - const headerDate = Date.parse(`${header}`); - if (!isNaN(headerDate)) { - return headerDate - now; - } - return defaultRetryAfter; - } - const defaultFunctionName = ''; - /** - * Safely extract function name from itself - */ - function getFunctionName(fn) { - try { - if (!fn || typeof fn !== 'function') { - return defaultFunctionName; - } - return fn.name || defaultFunctionName; - } - catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - return defaultFunctionName; - } - } - - // TODO: Implement different loggers for different environments - const global$1 = getGlobalObject(); - /** Prefix for logging strings */ - const PREFIX = 'Sentry Logger '; - /** JSDoc */ - class Logger { - /** JSDoc */ - constructor() { - this._enabled = false; - } - /** JSDoc */ - disable() { - this._enabled = false; - } - /** JSDoc */ - enable() { - this._enabled = true; - } - /** JSDoc */ - log(...args) { - if (!this._enabled) { - return; - } - consoleSandbox(() => { - global$1.console.log(`${PREFIX}[Log]: ${args.join(' ')}`); // tslint:disable-line:no-console - }); - } - /** JSDoc */ - warn(...args) { - if (!this._enabled) { - return; - } - consoleSandbox(() => { - global$1.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); // tslint:disable-line:no-console - }); - } - /** JSDoc */ - error(...args) { - if (!this._enabled) { - return; - } - consoleSandbox(() => { - global$1.console.error(`${PREFIX}[Error]: ${args.join(' ')}`); // tslint:disable-line:no-console - }); - } - } - // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used - global$1.__SENTRY__ = global$1.__SENTRY__ || {}; - const logger = global$1.__SENTRY__.logger || (global$1.__SENTRY__.logger = new Logger()); - - // tslint:disable:no-unsafe-any - /** - * Memo class used for decycle json objects. Uses WeakSet if available otherwise array. - */ - class Memo { - constructor() { - // tslint:disable-next-line - this._hasWeakSet = typeof WeakSet === 'function'; - this._inner = this._hasWeakSet ? new WeakSet() : []; - } - /** - * Sets obj to remember. - * @param obj Object to remember - */ - memoize(obj) { - if (this._hasWeakSet) { - if (this._inner.has(obj)) { - return true; - } - this._inner.add(obj); - return false; - } - // tslint:disable-next-line:prefer-for-of - for (let i = 0; i < this._inner.length; i++) { - const value = this._inner[i]; - if (value === obj) { - return true; - } - } - this._inner.push(obj); - return false; - } - /** - * Removes object from internal storage. - * @param obj Object to forget - */ - unmemoize(obj) { - if (this._hasWeakSet) { - this._inner.delete(obj); - } - else { - for (let i = 0; i < this._inner.length; i++) { - if (this._inner[i] === obj) { - this._inner.splice(i, 1); - break; - } - } - } - } - } - - /** - * Wrap a given object method with a higher-order function - * - * @param source An object that contains a method to be wrapped. - * @param name A name of method to be wrapped. - * @param replacement A function that should be used to wrap a given method. - * @returns void - */ - function fill(source, name, replacement) { - if (!(name in source)) { - return; - } - const original = source[name]; - const wrapped = replacement(original); - // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work - // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" - // tslint:disable-next-line:strict-type-predicates - if (typeof wrapped === 'function') { - try { - wrapped.prototype = wrapped.prototype || {}; - Object.defineProperties(wrapped, { - __sentry_original__: { - enumerable: false, - value: original, - }, - }); - } - catch (_Oo) { - // This can throw if multiple fill happens on a global object like XMLHttpRequest - // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 - } - } - source[name] = wrapped; - } - /** - * Encodes given object into url-friendly format - * - * @param object An object that contains serializable values - * @returns string Encoded - */ - function urlEncode(object) { - return Object.keys(object) - .map( - // tslint:disable-next-line:no-unsafe-any - key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`) - .join('&'); - } - /** - * Transforms any object into an object literal with all it's attributes - * attached to it. - * - * @param value Initial source that we have to transform in order to be usable by the serializer - */ - function getWalkSource(value) { - if (isError(value)) { - const error = value; - const err = { - message: error.message, - name: error.name, - stack: error.stack, - }; - for (const i in error) { - if (Object.prototype.hasOwnProperty.call(error, i)) { - err[i] = error[i]; - } - } - return err; - } - if (isEvent(value)) { - const event = value; - const source = {}; - source.type = event.type; - // Accessing event.target can throw (see getsentry/raven-js#838, #768) - try { - source.target = isElement(event.target) - ? htmlTreeAsString(event.target) - : Object.prototype.toString.call(event.target); - } - catch (_oO) { - source.target = ''; - } - try { - source.currentTarget = isElement(event.currentTarget) - ? htmlTreeAsString(event.currentTarget) - : Object.prototype.toString.call(event.currentTarget); - } - catch (_oO) { - source.currentTarget = ''; - } - // tslint:disable-next-line:strict-type-predicates - if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) { - source.detail = event.detail; - } - for (const i in event) { - if (Object.prototype.hasOwnProperty.call(event, i)) { - source[i] = event; - } - } - return source; - } - return value; - } - /** Calculates bytes size of input string */ - function utf8Length(value) { - // tslint:disable-next-line:no-bitwise - return ~-encodeURI(value).split(/%..|./).length; - } - /** Calculates bytes size of input object */ - function jsonSize(value) { - return utf8Length(JSON.stringify(value)); - } - /** JSDoc */ - function normalizeToSize(object, - // Default Node.js REPL depth - depth = 3, - // 100kB, as 200kB is max payload size, so half sounds reasonable - maxSize = 100 * 1024) { - const serialized = normalize(object, depth); - if (jsonSize(serialized) > maxSize) { - return normalizeToSize(object, depth - 1, maxSize); - } - return serialized; - } - /** Transforms any input value into a string form, either primitive value or a type of the input */ - function serializeValue(value) { - const type = Object.prototype.toString.call(value); - // Node.js REPL notation - if (typeof value === 'string') { - return value; - } - if (type === '[object Object]') { - return '[Object]'; - } - if (type === '[object Array]') { - return '[Array]'; - } - const normalized = normalizeValue(value); - return isPrimitive(normalized) ? normalized : type; - } - /** - * normalizeValue() - * - * Takes unserializable input and make it serializable friendly - * - * - translates undefined/NaN values to "[undefined]"/"[NaN]" respectively, - * - serializes Error objects - * - filter global objects - */ - // tslint:disable-next-line:cyclomatic-complexity - function normalizeValue(value, key) { - if (key === 'domain' && value && typeof value === 'object' && value._events) { - return '[Domain]'; - } - if (key === 'domainEmitter') { - return '[DomainEmitter]'; - } - if (typeof global !== 'undefined' && value === global) { - return '[Global]'; - } - if (typeof window !== 'undefined' && value === window) { - return '[Window]'; - } - if (typeof document !== 'undefined' && value === document) { - return '[Document]'; - } - // React's SyntheticEvent thingy - if (isSyntheticEvent(value)) { - return '[SyntheticEvent]'; - } - // tslint:disable-next-line:no-tautology-expression - if (typeof value === 'number' && value !== value) { - return '[NaN]'; - } - if (value === void 0) { - return '[undefined]'; - } - if (typeof value === 'function') { - return `[Function: ${getFunctionName(value)}]`; - } - return value; - } - /** - * Walks an object to perform a normalization on it - * - * @param key of object that's walked in current iteration - * @param value object to be walked - * @param depth Optional number indicating how deep should walking be performed - * @param memo Optional Memo class handling decycling - */ - function walk(key, value, depth = +Infinity, memo = new Memo()) { - // If we reach the maximum depth, serialize whatever has left - if (depth === 0) { - return serializeValue(value); - } - // If value implements `toJSON` method, call it and return early - // tslint:disable:no-unsafe-any - if (value !== null && value !== undefined && typeof value.toJSON === 'function') { - return value.toJSON(); - } - // tslint:enable:no-unsafe-any - // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further - const normalized = normalizeValue(value, key); - if (isPrimitive(normalized)) { - return normalized; - } - // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself - const source = getWalkSource(value); - // Create an accumulator that will act as a parent for all future itterations of that branch - const acc = Array.isArray(value) ? [] : {}; - // If we already walked that branch, bail out, as it's circular reference - if (memo.memoize(value)) { - return '[Circular ~]'; - } - // Walk all keys of the source - for (const innerKey in source) { - // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration. - if (!Object.prototype.hasOwnProperty.call(source, innerKey)) { - continue; - } - // Recursively walk through all the child nodes - acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo); - } - // Once walked through all the branches, remove the parent from memo storage - memo.unmemoize(value); - // Return accumulated values - return acc; - } - /** - * normalize() - * - * - Creates a copy to prevent original input mutation - * - Skip non-enumerablers - * - Calls `toJSON` if implemented - * - Removes circular references - * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format - * - Translates known global objects/Classes to a string representations - * - Takes care of Error objects serialization - * - Optionally limit depth of final output - */ - function normalize(input, depth) { - try { - // tslint:disable-next-line:no-unsafe-any - return JSON.parse(JSON.stringify(input, (key, value) => walk(key, value, depth))); - } - catch (_oO) { - return '**non-serializable**'; - } - } - /** - * Given any captured exception, extract its keys and create a sorted - * and truncated list that will be used inside the event message. - * eg. `Non-error exception captured with keys: foo, bar, baz` - */ - function extractExceptionKeysForMessage(exception, maxLength = 40) { - // tslint:disable:strict-type-predicates - const keys = Object.keys(getWalkSource(exception)); - keys.sort(); - if (!keys.length) { - return '[object has no keys]'; - } - if (keys[0].length >= maxLength) { - return truncate(keys[0], maxLength); - } - for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { - const serialized = keys.slice(0, includedKeys).join(', '); - if (serialized.length > maxLength) { - continue; - } - if (includedKeys === keys.length) { - return serialized; - } - return truncate(serialized, maxLength); - } - return ''; - } - - // Slightly modified (no IE8 support, ES6) and transcribed to TypeScript - - /** SyncPromise internal states */ - var States; - (function (States) { - /** Pending */ - States["PENDING"] = "PENDING"; - /** Resolved / OK */ - States["RESOLVED"] = "RESOLVED"; - /** Rejected / Error */ - States["REJECTED"] = "REJECTED"; - })(States || (States = {})); - /** - * Thenable class that behaves like a Promise and follows it's interface - * but is not async internally - */ - class SyncPromise { - constructor(executor) { - this._state = States.PENDING; - this._handlers = []; - /** JSDoc */ - this._resolve = (value) => { - this._setResult(States.RESOLVED, value); - }; - /** JSDoc */ - this._reject = (reason) => { - this._setResult(States.REJECTED, reason); - }; - /** JSDoc */ - this._setResult = (state, value) => { - if (this._state !== States.PENDING) { - return; - } - if (isThenable(value)) { - value.then(this._resolve, this._reject); - return; - } - this._state = state; - this._value = value; - this._executeHandlers(); - }; - // TODO: FIXME - /** JSDoc */ - this._attachHandler = (handler) => { - this._handlers = this._handlers.concat(handler); - this._executeHandlers(); - }; - /** JSDoc */ - this._executeHandlers = () => { - if (this._state === States.PENDING) { - return; - } - if (this._state === States.REJECTED) { - this._handlers.forEach(handler => { - if (handler.onrejected) { - handler.onrejected(this._value); - } - }); - } - else { - this._handlers.forEach(handler => { - if (handler.onfulfilled) { - // tslint:disable-next-line:no-unsafe-any - handler.onfulfilled(this._value); - } - }); - } - this._handlers = []; - }; - try { - executor(this._resolve, this._reject); - } - catch (e) { - this._reject(e); - } - } - /** JSDoc */ - toString() { - return '[object SyncPromise]'; - } - /** JSDoc */ - static resolve(value) { - return new SyncPromise(resolve => { - resolve(value); - }); - } - /** JSDoc */ - static reject(reason) { - return new SyncPromise((_, reject) => { - reject(reason); - }); - } - /** JSDoc */ - static all(collection) { - return new SyncPromise((resolve, reject) => { - if (!Array.isArray(collection)) { - reject(new TypeError(`Promise.all requires an array as input.`)); - return; - } - if (collection.length === 0) { - resolve([]); - return; - } - let counter = collection.length; - const resolvedCollection = []; - collection.forEach((item, index) => { - SyncPromise.resolve(item) - .then(value => { - resolvedCollection[index] = value; - counter -= 1; - if (counter !== 0) { - return; - } - resolve(resolvedCollection); - }) - .then(null, reject); - }); - }); - } - /** JSDoc */ - then(onfulfilled, onrejected) { - return new SyncPromise((resolve, reject) => { - this._attachHandler({ - onfulfilled: result => { - if (!onfulfilled) { - // TODO: ¯\_(ツ)_/¯ - // TODO: FIXME - resolve(result); - return; - } - try { - resolve(onfulfilled(result)); - return; - } - catch (e) { - reject(e); - return; - } - }, - onrejected: reason => { - if (!onrejected) { - reject(reason); - return; - } - try { - resolve(onrejected(reason)); - return; - } - catch (e) { - reject(e); - return; - } - }, - }); - }); - } - /** JSDoc */ - catch(onrejected) { - return this.then(val => val, onrejected); - } - /** JSDoc */ - finally(onfinally) { - return new SyncPromise((resolve, reject) => { - let val; - let isRejected; - return this.then(value => { - isRejected = false; - val = value; - if (onfinally) { - onfinally(); - } - }, reason => { - isRejected = true; - val = reason; - if (onfinally) { - onfinally(); - } - }).then(() => { - if (isRejected) { - reject(val); - return; - } - // tslint:disable-next-line:no-unsafe-any - resolve(val); - }); - }); - } - } - - /** A simple queue that holds promises. */ - class PromiseBuffer { - constructor(_limit) { - this._limit = _limit; - /** Internal set of queued Promises */ - this._buffer = []; - } - /** - * Says if the buffer is ready to take more requests - */ - isReady() { - return this._limit === undefined || this.length() < this._limit; - } - /** - * Add a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns The original promise. - */ - add(task) { - if (!this.isReady()) { - return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.')); - } - if (this._buffer.indexOf(task) === -1) { - this._buffer.push(task); - } - task - .then(() => this.remove(task)) - .then(null, () => this.remove(task).then(null, () => { - // We have to add this catch here otherwise we have an unhandledPromiseRejection - // because it's a new Promise chain. - })); - return task; - } - /** - * Remove a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns Removed promise. - */ - remove(task) { - const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0]; - return removedTask; - } - /** - * This function returns the number of unresolved promises in the queue. - */ - length() { - return this._buffer.length; - } - /** - * This will drain the whole queue, returns true if queue is empty or drained. - * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false. - * - * @param timeout Number in ms to wait until it resolves with false. - */ - drain(timeout) { - return new SyncPromise(resolve => { - const capturedSetTimeout = setTimeout(() => { - if (timeout && timeout > 0) { - resolve(false); - } - }, timeout); - SyncPromise.all(this._buffer) - .then(() => { - clearTimeout(capturedSetTimeout); - resolve(true); - }) - .then(null, () => { - resolve(true); - }); - }); - } - } - - /** - * Tells whether current environment supports Fetch API - * {@link supportsFetch}. - * - * @returns Answer to the given question. - */ - function supportsFetch() { - if (!('fetch' in getGlobalObject())) { - return false; - } - try { - // tslint:disable-next-line:no-unused-expression - new Headers(); - // tslint:disable-next-line:no-unused-expression - new Request(''); - // tslint:disable-next-line:no-unused-expression - new Response(); - return true; - } - catch (e) { - return false; - } - } - /** - * isNativeFetch checks if the given function is a native implementation of fetch() - */ - function isNativeFetch(func) { - return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); - } - /** - * Tells whether current environment supports Fetch API natively - * {@link supportsNativeFetch}. - * - * @returns true if `window.fetch` is natively implemented, false otherwise - */ - function supportsNativeFetch() { - if (!supportsFetch()) { - return false; - } - const global = getGlobalObject(); - // Fast path to avoid DOM I/O - // tslint:disable-next-line:no-unbound-method - if (isNativeFetch(global.fetch)) { - return true; - } - // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) - // so create a "pure" iframe to see if that has native fetch - let result = false; - const doc = global.document; - if (doc) { - try { - const sandbox = doc.createElement('iframe'); - sandbox.hidden = true; - doc.head.appendChild(sandbox); - if (sandbox.contentWindow && sandbox.contentWindow.fetch) { - // tslint:disable-next-line:no-unbound-method - result = isNativeFetch(sandbox.contentWindow.fetch); - } - doc.head.removeChild(sandbox); - } - catch (err) { - logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); - } - } - return result; - } - /** - * Tells whether current environment supports Referrer Policy API - * {@link supportsReferrerPolicy}. - * - * @returns Answer to the given question. - */ - function supportsReferrerPolicy() { - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default - // https://caniuse.com/#feat=referrer-policy - // It doesn't. And it throw exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - if (!supportsFetch()) { - return false; - } - try { - // tslint:disable:no-unused-expression - new Request('_', { - referrerPolicy: 'origin', - }); - return true; - } - catch (e) { - return false; - } - } - /** - * Tells whether current environment supports History API - * {@link supportsHistory}. - * - * @returns Answer to the given question. - */ - function supportsHistory() { - // NOTE: in Chrome App environment, touching history.pushState, *even inside - // a try/catch block*, will cause Chrome to output an error to console.error - // borrowed from: https://github.com/angular/angular.js/pull/13945/files - const global = getGlobalObject(); - const chrome = global.chrome; - // tslint:disable-next-line:no-unsafe-any - const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; - const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState; - return !isChromePackagedApp && hasHistoryApi; - } - - /* tslint:disable:only-arrow-functions no-unsafe-any */ - const global$2 = getGlobalObject(); - /** - * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc. - * - Console API - * - Fetch API - * - XHR API - * - History API - * - DOM API (click/typing) - * - Error API - * - UnhandledRejection API - */ - const handlers = {}; - const instrumented = {}; - /** Instruments given API */ - function instrument(type) { - if (instrumented[type]) { - return; - } - instrumented[type] = true; - switch (type) { - case 'console': - instrumentConsole(); - break; - case 'dom': - instrumentDOM(); - break; - case 'xhr': - instrumentXHR(); - break; - case 'fetch': - instrumentFetch(); - break; - case 'history': - instrumentHistory(); - break; - case 'error': - instrumentError(); - break; - case 'unhandledrejection': - instrumentUnhandledRejection(); - break; - default: - logger.warn('unknown instrumentation type:', type); - } - } - /** - * Add handler that will be called when given type of instrumentation triggers. - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ - function addInstrumentationHandler(handler) { - // tslint:disable-next-line:strict-type-predicates - if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') { - return; - } - handlers[handler.type] = handlers[handler.type] || []; - handlers[handler.type].push(handler.callback); - instrument(handler.type); - } - /** JSDoc */ - function triggerHandlers(type, data) { - if (!type || !handlers[type]) { - return; - } - for (const handler of handlers[type] || []) { - try { - handler(data); - } - catch (e) { - logger.error(`Error while triggering instrumentation handler.\nType: ${type}\nName: ${getFunctionName(handler)}\nError: ${e}`); - } - } - } - /** JSDoc */ - function instrumentConsole() { - if (!('console' in global$2)) { - return; - } - ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) { - if (!(level in global$2.console)) { - return; - } - fill(global$2.console, level, function (originalConsoleLevel) { - return function (...args) { - triggerHandlers('console', { args, level }); - // this fails for some browsers. :( - if (originalConsoleLevel) { - Function.prototype.apply.call(originalConsoleLevel, global$2.console, args); - } - }; - }); - }); - } - /** JSDoc */ - function instrumentFetch() { - if (!supportsNativeFetch()) { - return; - } - fill(global$2, 'fetch', function (originalFetch) { - return function (...args) { - const commonHandlerData = { - args, - fetchData: { - method: getFetchMethod(args), - url: getFetchUrl(args), - }, - startTimestamp: Date.now(), - }; - triggerHandlers('fetch', Object.assign({}, commonHandlerData)); - return originalFetch.apply(global$2, args).then((response) => { - triggerHandlers('fetch', Object.assign({}, commonHandlerData, { endTimestamp: Date.now(), response })); - return response; - }, (error) => { - triggerHandlers('fetch', Object.assign({}, commonHandlerData, { endTimestamp: Date.now(), error })); - throw error; - }); - }; - }); - } - /** Extract `method` from fetch call arguments */ - function getFetchMethod(fetchArgs = []) { - if ('Request' in global$2 && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) { - return String(fetchArgs[0].method).toUpperCase(); - } - if (fetchArgs[1] && fetchArgs[1].method) { - return String(fetchArgs[1].method).toUpperCase(); - } - return 'GET'; - } - /** Extract `url` from fetch call arguments */ - function getFetchUrl(fetchArgs = []) { - if (typeof fetchArgs[0] === 'string') { - return fetchArgs[0]; - } - if ('Request' in global$2 && isInstanceOf(fetchArgs[0], Request)) { - return fetchArgs[0].url; - } - return String(fetchArgs[0]); - } - /** JSDoc */ - function instrumentXHR() { - if (!('XMLHttpRequest' in global$2)) { - return; - } - const xhrproto = XMLHttpRequest.prototype; - fill(xhrproto, 'open', function (originalOpen) { - return function (...args) { - const url = args[1]; - this.__sentry_xhr__ = { - method: isString(args[0]) ? args[0].toUpperCase() : args[0], - url: args[1], - }; - // if Sentry key appears in URL, don't capture it as a request - if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) { - this.__sentry_own_request__ = true; - } - return originalOpen.apply(this, args); - }; - }); - fill(xhrproto, 'send', function (originalSend) { - return function (...args) { - const xhr = this; // tslint:disable-line:no-this-assignment - const commonHandlerData = { - args, - startTimestamp: Date.now(), - xhr, - }; - triggerHandlers('xhr', Object.assign({}, commonHandlerData)); - xhr.addEventListener('readystatechange', function () { - if (xhr.readyState === 4) { - try { - // touching statusCode in some platforms throws - // an exception - if (xhr.__sentry_xhr__) { - xhr.__sentry_xhr__.status_code = xhr.status; - } - } - catch (e) { - /* do nothing */ - } - triggerHandlers('xhr', Object.assign({}, commonHandlerData, { endTimestamp: Date.now() })); - } - }); - return originalSend.apply(this, args); - }; - }); - } - let lastHref; - /** JSDoc */ - function instrumentHistory() { - if (!supportsHistory()) { - return; - } - const oldOnPopState = global$2.onpopstate; - global$2.onpopstate = function (...args) { - const to = global$2.location.href; - // keep track of the current URL state, as we always receive only the updated state - const from = lastHref; - lastHref = to; - triggerHandlers('history', { - from, - to, - }); - if (oldOnPopState) { - return oldOnPopState.apply(this, args); - } - }; - /** @hidden */ - function historyReplacementFunction(originalHistoryFunction) { - return function (...args) { - const url = args.length > 2 ? args[2] : undefined; - if (url) { - // coerce to string (this is what pushState does) - const from = lastHref; - const to = String(url); - // keep track of the current URL state, as we always receive only the updated state - lastHref = to; - triggerHandlers('history', { - from, - to, - }); - } - return originalHistoryFunction.apply(this, args); - }; - } - fill(global$2.history, 'pushState', historyReplacementFunction); - fill(global$2.history, 'replaceState', historyReplacementFunction); - } - /** JSDoc */ - function instrumentDOM() { - if (!('document' in global$2)) { - return; - } - // Capture breadcrumbs from any click that is unhandled / bubbled up all the way - // to the document. Do this before we instrument addEventListener. - global$2.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false); - global$2.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false); - // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses. - ['EventTarget', 'Node'].forEach((target) => { - const proto = global$2[target] && global$2[target].prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - fill(proto, 'addEventListener', function (original) { - return function (eventName, fn, options) { - if (fn && fn.handleEvent) { - if (eventName === 'click') { - fill(fn, 'handleEvent', function (innerOriginal) { - return function (event) { - domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event); - return innerOriginal.call(this, event); - }; - }); - } - if (eventName === 'keypress') { - fill(fn, 'handleEvent', function (innerOriginal) { - return function (event) { - keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event); - return innerOriginal.call(this, event); - }; - }); - } - } - else { - if (eventName === 'click') { - domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this); - } - if (eventName === 'keypress') { - keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this); - } - } - return original.call(this, eventName, fn, options); - }; - }); - fill(proto, 'removeEventListener', function (original) { - return function (eventName, fn, options) { - let callback = fn; - try { - callback = callback && (callback.__sentry_wrapped__ || callback); - } - catch (e) { - // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments - } - return original.call(this, eventName, callback, options); - }; - }); - }); - } - const debounceDuration = 1000; - let debounceTimer = 0; - let keypressTimeout; - let lastCapturedEvent; - /** - * Wraps addEventListener to capture UI breadcrumbs - * @param name the event name (e.g. "click") - * @param handler function that will be triggered - * @param debounce decides whether it should wait till another event loop - * @returns wrapped breadcrumb events handler - * @hidden - */ - function domEventHandler(name, handler, debounce = false) { - return (event) => { - // reset keypress timeout; e.g. triggering a 'click' after - // a 'keypress' will reset the keypress debounce so that a new - // set of keypresses can be recorded - keypressTimeout = undefined; - // It's possible this handler might trigger multiple times for the same - // event (e.g. event propagation through node ancestors). Ignore if we've - // already captured the event. - if (!event || lastCapturedEvent === event) { - return; - } - lastCapturedEvent = event; - if (debounceTimer) { - clearTimeout(debounceTimer); - } - if (debounce) { - debounceTimer = setTimeout(() => { - handler({ event, name }); - }); - } - else { - handler({ event, name }); - } - }; - } - /** - * Wraps addEventListener to capture keypress UI events - * @param handler function that will be triggered - * @returns wrapped keypress events handler - * @hidden - */ - function keypressEventHandler(handler) { - // TODO: if somehow user switches keypress target before - // debounce timeout is triggered, we will only capture - // a single breadcrumb from the FIRST target (acceptable?) - return (event) => { - let target; - try { - target = event.target; - } - catch (e) { - // just accessing event properties can throw an exception in some rare circumstances - // see: https://github.com/getsentry/raven-js/issues/838 - return; - } - const tagName = target && target.tagName; - // only consider keypress events on actual input elements - // this will disregard keypresses targeting body (e.g. tabbing - // through elements, hotkeys, etc) - if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)) { - return; - } - // record first keypress in a series, but ignore subsequent - // keypresses until debounce clears - if (!keypressTimeout) { - domEventHandler('input', handler)(event); - } - clearTimeout(keypressTimeout); - keypressTimeout = setTimeout(() => { - keypressTimeout = undefined; - }, debounceDuration); - }; - } - let _oldOnErrorHandler = null; - /** JSDoc */ - function instrumentError() { - _oldOnErrorHandler = global$2.onerror; - global$2.onerror = function (msg, url, line, column, error) { - triggerHandlers('error', { - column, - error, - line, - msg, - url, - }); - if (_oldOnErrorHandler) { - return _oldOnErrorHandler.apply(this, arguments); - } - return false; - }; - } - let _oldOnUnhandledRejectionHandler = null; - /** JSDoc */ - function instrumentUnhandledRejection() { - _oldOnUnhandledRejectionHandler = global$2.onunhandledrejection; - global$2.onunhandledrejection = function (e) { - triggerHandlers('unhandledrejection', e); - if (_oldOnUnhandledRejectionHandler) { - return _oldOnUnhandledRejectionHandler.apply(this, arguments); - } - return true; - }; - } - - /** Regular expression used to parse a Dsn. */ - const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/; - /** Error message */ - const ERROR_MESSAGE = 'Invalid Dsn'; - /** The Sentry Dsn, identifying a Sentry instance and project. */ - class Dsn { - /** Creates a new Dsn component */ - constructor(from) { - if (typeof from === 'string') { - this._fromString(from); - } - else { - this._fromComponents(from); - } - this._validate(); - } - /** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private _representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ - toString(withPassword = false) { - // tslint:disable-next-line:no-this-assignment - const { host, path, pass, port, projectId, protocol, user } = this; - return (`${protocol}://${user}${withPassword && pass ? `:${pass}` : ''}` + - `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`); - } - /** Parses a string into this Dsn. */ - _fromString(str) { - const match = DSN_REGEX.exec(str); - if (!match) { - throw new SentryError(ERROR_MESSAGE); - } - const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1); - let path = ''; - let projectId = lastPath; - const split = projectId.split('/'); - if (split.length > 1) { - path = split.slice(0, -1).join('/'); - projectId = split.pop(); - } - this._fromComponents({ host, pass, path, projectId, port, protocol: protocol, user }); - } - /** Maps Dsn components into this instance. */ - _fromComponents(components) { - this.protocol = components.protocol; - this.user = components.user; - this.pass = components.pass || ''; - this.host = components.host; - this.port = components.port || ''; - this.path = components.path || ''; - this.projectId = components.projectId; - } - /** Validates this Dsn and throws on error. */ - _validate() { - ['protocol', 'user', 'host', 'projectId'].forEach(component => { - if (!this[component]) { - throw new SentryError(ERROR_MESSAGE); - } - }); - if (this.protocol !== 'http' && this.protocol !== 'https') { - throw new SentryError(ERROR_MESSAGE); - } - if (this.port && isNaN(parseInt(this.port, 10))) { - throw new SentryError(ERROR_MESSAGE); - } - } - } - - /** - * Holds additional event information. {@link Scope.applyToEvent} will be - * called by the client before an event will be sent. - */ - class Scope { - constructor() { - /** Flag if notifiying 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._context = {}; - } - /** - * Add internal on change listener. Used for sub SDKs that need to store the scope. - * @hidden - */ - addScopeListener(callback) { - this._scopeListeners.push(callback); - } - /** - * @inheritDoc - */ - addEventProcessor(callback) { - this._eventProcessors.push(callback); - return this; - } - /** - * This will be called on every set call. - */ - _notifyScopeListeners() { - if (!this._notifyingListeners) { - this._notifyingListeners = true; - setTimeout(() => { - this._scopeListeners.forEach(callback => { - callback(this); - }); - this._notifyingListeners = false; - }); - } - } - /** - * This will be called after {@link applyToEvent} is finished. - */ - _notifyEventProcessors(processors, event, hint, index = 0) { - return new SyncPromise((resolve, reject) => { - const processor = processors[index]; - // tslint:disable-next-line:strict-type-predicates - if (event === null || typeof processor !== 'function') { - resolve(event); - } - else { - const result = processor(Object.assign({}, event), hint); - if (isThenable(result)) { - result - .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve)) - .then(null, reject); - } - else { - this._notifyEventProcessors(processors, result, hint, index + 1) - .then(resolve) - .then(null, reject); - } - } - }); - } - /** - * @inheritDoc - */ - setUser(user) { - this._user = user || {}; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setTags(tags) { - this._tags = Object.assign({}, this._tags, tags); - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setTag(key, value) { - this._tags = Object.assign({}, this._tags, { [key]: value }); - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setExtras(extras) { - this._extra = Object.assign({}, this._extra, extras); - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setExtra(key, extra) { - this._extra = Object.assign({}, this._extra, { [key]: extra }); - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setFingerprint(fingerprint) { - this._fingerprint = fingerprint; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setLevel(level) { - this._level = level; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setTransaction(transaction) { - this._transaction = transaction; - if (this._span) { - this._span.transaction = transaction; - } - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setContext(key, context) { - this._context = Object.assign({}, this._context, { [key]: context }); - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setSpan(span) { - this._span = span; - this._notifyScopeListeners(); - return this; - } - /** - * Internal getter for Span, used in Hub. - * @hidden - */ - getSpan() { - return this._span; - } - /** - * Inherit values from the parent scope. - * @param scope to clone. - */ - static clone(scope) { - const newScope = new Scope(); - if (scope) { - newScope._breadcrumbs = [...scope._breadcrumbs]; - newScope._tags = Object.assign({}, scope._tags); - newScope._extra = Object.assign({}, scope._extra); - newScope._context = Object.assign({}, scope._context); - newScope._user = scope._user; - newScope._level = scope._level; - newScope._span = scope._span; - newScope._transaction = scope._transaction; - newScope._fingerprint = scope._fingerprint; - newScope._eventProcessors = [...scope._eventProcessors]; - } - return newScope; - } - /** - * @inheritDoc - */ - clear() { - this._breadcrumbs = []; - this._tags = {}; - this._extra = {}; - this._user = {}; - this._context = {}; - this._level = undefined; - this._transaction = undefined; - this._fingerprint = undefined; - this._span = undefined; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - addBreadcrumb(breadcrumb, maxBreadcrumbs) { - const mergedBreadcrumb = Object.assign({ timestamp: timestampWithMs() }, breadcrumb); - this._breadcrumbs = - maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0 - ? [...this._breadcrumbs, mergedBreadcrumb].slice(-maxBreadcrumbs) - : [...this._breadcrumbs, mergedBreadcrumb]; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - clearBreadcrumbs() { - this._breadcrumbs = []; - this._notifyScopeListeners(); - return this; - } - /** - * 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 - */ - _applyFingerprint(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; - } - } - /** - * 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 informartion about the original exception. - * @hidden - */ - applyToEvent(event, hint) { - if (this._extra && Object.keys(this._extra).length) { - event.extra = Object.assign({}, this._extra, event.extra); - } - if (this._tags && Object.keys(this._tags).length) { - event.tags = Object.assign({}, this._tags, event.tags); - } - if (this._user && Object.keys(this._user).length) { - event.user = Object.assign({}, this._user, event.user); - } - if (this._context && Object.keys(this._context).length) { - event.contexts = Object.assign({}, this._context, event.contexts); - } - if (this._level) { - event.level = this._level; - } - if (this._transaction) { - event.transaction = this._transaction; - } - if (this._span) { - event.contexts = Object.assign({ trace: this._span.getTraceContext() }, event.contexts); - } - this._applyFingerprint(event); - event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs]; - event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined; - return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint); - } - } - /** - * Retruns the global event processors. - */ - function getGlobalEventProcessors() { - const global = getGlobalObject(); - global.__SENTRY__ = global.__SENTRY__ || {}; - global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || []; - return global.__SENTRY__.globalEventProcessors; - } - /** - * Add a EventProcessor to be kept globally. - * @param callback EventProcessor to add - */ - function addGlobalEventProcessor(callback) { - getGlobalEventProcessors().push(callback); - } - - /** - * API compatibility version of this hub. - * - * WARNING: This number should only be incresed when the global interface - * changes a and new methods are introduced. - * - * @hidden - */ - const API_VERSION = 3; - /** - * Default maximum number of breadcrumbs added to an event. Can be overwritten - * with {@link Options.maxBreadcrumbs}. - */ - const DEFAULT_BREADCRUMBS = 100; - /** - * Absolute maximum number of breadcrumbs added to an event. The - * `maxBreadcrumbs` option cannot be higher than this value. - */ - const MAX_BREADCRUMBS = 100; - /** - * @inheritDoc - */ - class Hub { - /** - * 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, scope = new Scope(), _version = API_VERSION) { - this._version = _version; - /** Is a {@link Layer}[] containing the client and scope */ - this._stack = []; - this._stack.push({ client, scope }); - } - /** - * 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. - */ - _invokeClient(method, ...args) { - const top = this.getStackTop(); - if (top && top.client && top.client[method]) { - top.client[method](...args, top.scope); - } - } - /** - * @inheritDoc - */ - isOlderThan(version) { - return this._version < version; - } - /** - * @inheritDoc - */ - bindClient(client) { - const top = this.getStackTop(); - top.client = client; - } - /** - * @inheritDoc - */ - pushScope() { - // We want to clone the content of prev scope - const stack = this.getStack(); - const parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined; - const scope = Scope.clone(parentScope); - this.getStack().push({ - client: this.getClient(), - scope, - }); - return scope; - } - /** - * @inheritDoc - */ - popScope() { - return this.getStack().pop() !== undefined; - } - /** - * @inheritDoc - */ - withScope(callback) { - const scope = this.pushScope(); - try { - callback(scope); - } - finally { - this.popScope(); - } - } - /** - * @inheritDoc - */ - getClient() { - return this.getStackTop().client; - } - /** Returns the scope of the top stack. */ - getScope() { - return this.getStackTop().scope; - } - /** Returns the scope stack for domains or the process. */ - getStack() { - return this._stack; - } - /** Returns the topmost scope layer in the order domain > local > process. */ - getStackTop() { - return this._stack[this._stack.length - 1]; - } - /** - * @inheritDoc - */ - captureException(exception, hint) { - const eventId = (this._lastEventId = uuid4()); - let finalHint = hint; - // If there's no explicit hint provided, mimick 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) { - let syntheticException; - try { - throw new Error('Sentry syntheticException'); - } - catch (exception) { - syntheticException = exception; - } - finalHint = { - originalException: exception, - syntheticException, - }; - } - this._invokeClient('captureException', exception, Object.assign({}, finalHint, { event_id: eventId })); - return eventId; - } - /** - * @inheritDoc - */ - captureMessage(message, level, hint) { - const eventId = (this._lastEventId = uuid4()); - let finalHint = hint; - // If there's no explicit hint provided, mimick 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) { - let syntheticException; - try { - throw new Error(message); - } - catch (exception) { - syntheticException = exception; - } - finalHint = { - originalException: message, - syntheticException, - }; - } - this._invokeClient('captureMessage', message, level, Object.assign({}, finalHint, { event_id: eventId })); - return eventId; - } - /** - * @inheritDoc - */ - captureEvent(event, hint) { - const eventId = (this._lastEventId = uuid4()); - this._invokeClient('captureEvent', event, Object.assign({}, hint, { event_id: eventId })); - return eventId; - } - /** - * @inheritDoc - */ - lastEventId() { - return this._lastEventId; - } - /** - * @inheritDoc - */ - addBreadcrumb(breadcrumb, hint) { - const top = this.getStackTop(); - if (!top.scope || !top.client) { - return; - } - const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = (top.client.getOptions && top.client.getOptions()) || {}; - if (maxBreadcrumbs <= 0) { - return; - } - const timestamp = timestampWithMs(); - const mergedBreadcrumb = Object.assign({ timestamp }, breadcrumb); - const finalBreadcrumb = beforeBreadcrumb - ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) - : mergedBreadcrumb; - if (finalBreadcrumb === null) { - return; - } - top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS)); - } - /** - * @inheritDoc - */ - setUser(user) { - const top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setUser(user); - } - /** - * @inheritDoc - */ - setTags(tags) { - const top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setTags(tags); - } - /** - * @inheritDoc - */ - setExtras(extras) { - const top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setExtras(extras); - } - /** - * @inheritDoc - */ - setTag(key, value) { - const top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setTag(key, value); - } - /** - * @inheritDoc - */ - setExtra(key, extra) { - const top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setExtra(key, extra); - } - /** - * @inheritDoc - */ - setContext(name, context) { - const top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setContext(name, context); - } - /** - * @inheritDoc - */ - configureScope(callback) { - const top = this.getStackTop(); - if (top.scope && top.client) { - callback(top.scope); - } - } - /** - * @inheritDoc - */ - run(callback) { - const oldHub = makeMain(this); - try { - callback(this); - } - finally { - makeMain(oldHub); - } - } - /** - * @inheritDoc - */ - getIntegration(integration) { - const client = this.getClient(); - if (!client) { - return null; - } - try { - return client.getIntegration(integration); - } - catch (_oO) { - logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`); - return null; - } - } - /** - * @inheritDoc - */ - startSpan(spanOrSpanContext, forceNoChild = false) { - return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild); - } - /** - * @inheritDoc - */ - traceHeaders() { - return this._callExtensionMethod('traceHeaders'); - } - /** - * Calls global extension method and binding current instance to the function call - */ - // @ts-ignore - _callExtensionMethod(method, ...args) { - const carrier = getMainCarrier(); - const sentry = carrier.__SENTRY__; - // tslint:disable-next-line: strict-type-predicates - if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') { - return sentry.extensions[method].apply(this, args); - } - logger.warn(`Extension method ${method} couldn't be found, doing nothing.`); - } - } - /** Returns the global shim registry. */ - function getMainCarrier() { - const 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 - */ - function makeMain(hub) { - const registry = getMainCarrier(); - const 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. - */ - function getCurrentHub() { - // Get main carrier (global for every environment) - const 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); - } - /** - * Try to read the hub from an active domain, fallback to the registry if one doesnt exist - * @returns discovered hub - */ - function getHubFromActiveDomain(registry) { - try { - // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack. - // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser - // for example so we do not have to shim it and use `getCurrentHub` universally. - const domain = dynamicRequire(module, 'domain'); - const activeDomain = domain.active; - // If there no active domain, just return global hub - if (!activeDomain) { - return getHubFromCarrier(registry); - } - // If there's no hub on current domain, or its an old API, assign a new one - if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) { - const 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) { - if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) { - return true; - } - return false; - } - /** - * This will create a new {@link Hub} and add to the passed object on - * __SENTRY__.hub. - * @param carrier object - * @hidden - */ - function getHubFromCarrier(carrier) { - if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) { - return carrier.__SENTRY__.hub; - } - carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - carrier.__SENTRY__.hub = new Hub(); - return carrier.__SENTRY__.hub; - } - /** - * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute - * @param carrier object - * @param hub Hub - */ - function setHubOnCarrier(carrier, hub) { - if (!carrier) { - return false; - } - carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - carrier.__SENTRY__.hub = hub; - return true; - } - - /** - * This calls a function on the current hub. - * @param method function to call on hub. - * @param args to pass to function. - */ - function callOnHub(method, ...args) { - const hub = getCurrentHub(); - if (hub && hub[method]) { - // tslint:disable-next-line:no-unsafe-any - return hub[method](...args); - } - throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`); - } - /** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @returns The generated eventId. - */ - function captureException(exception) { - let syntheticException; - try { - throw new Error('Sentry syntheticException'); - } - catch (exception) { - syntheticException = exception; - } - return callOnHub('captureException', exception, { - originalException: exception, - syntheticException, - }); - } - /** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @returns The generated eventId. - */ - function captureMessage(message, level) { - let syntheticException; - try { - throw new Error(message); - } - catch (exception) { - syntheticException = exception; - } - return callOnHub('captureMessage', message, level, { - originalException: message, - syntheticException, - }); - } - /** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @returns The generated eventId. - */ - function captureEvent(event) { - return callOnHub('captureEvent', event); - } - /** - * Callback to set context information onto the scope. - * @param callback Callback function that receives Scope. - */ - function configureScope(callback) { - callOnHub('configureScope', callback); - } - /** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - */ - function addBreadcrumb(breadcrumb) { - callOnHub('addBreadcrumb', breadcrumb); - } - /** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ - function setContext(name, context) { - callOnHub('setContext', name, context); - } - /** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ - function setExtras(extras) { - callOnHub('setExtras', extras); - } - /** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ - function setTags(tags) { - callOnHub('setTags', tags); - } - /** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ - function setExtra(key, extra) { - callOnHub('setExtra', key, extra); - } - /** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ - function setTag(key, value) { - callOnHub('setTag', key, value); - } - /** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ - function setUser(user) { - callOnHub('setUser', user); - } - /** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - * - * @param callback that will be enclosed into push/popScope. - */ - function withScope(callback) { - callOnHub('withScope', callback); - } - - const SENTRY_API_VERSION = '7'; - /** Helper class to provide urls to different Sentry endpoints. */ - class API { - /** Create a new instance of API */ - constructor(dsn) { - this.dsn = dsn; - this._dsnObject = new Dsn(dsn); - } - /** Returns the Dsn object. */ - getDsn() { - return this._dsnObject; - } - /** Returns a string with auth headers in the url to the store endpoint. */ - getStoreEndpoint() { - return `${this._getBaseUrl()}${this.getStoreEndpointPath()}`; - } - /** Returns the store endpoint with auth added in url encoded. */ - getStoreEndpointWithUrlEncodedAuth() { - const dsn = this._dsnObject; - const auth = { - sentry_key: dsn.user, - sentry_version: SENTRY_API_VERSION, - }; - // Auth is intentionally sent as part of query string (NOT as custom HTTP header) - // to avoid preflight CORS requests - return `${this.getStoreEndpoint()}?${urlEncode(auth)}`; - } - /** Returns the base path of the url including the port. */ - _getBaseUrl() { - const dsn = this._dsnObject; - const protocol = dsn.protocol ? `${dsn.protocol}:` : ''; - const port = dsn.port ? `:${dsn.port}` : ''; - return `${protocol}//${dsn.host}${port}`; - } - /** Returns only the path component for the store endpoint. */ - getStoreEndpointPath() { - const dsn = this._dsnObject; - return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`; - } - /** Returns an object that can be used in request headers. */ - getRequestHeaders(clientName, clientVersion) { - const dsn = this._dsnObject; - const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`]; - header.push(`sentry_client=${clientName}/${clientVersion}`); - header.push(`sentry_key=${dsn.user}`); - if (dsn.pass) { - header.push(`sentry_secret=${dsn.pass}`); - } - return { - 'Content-Type': 'application/json', - 'X-Sentry-Auth': header.join(', '), - }; - } - /** Returns the url to the report dialog endpoint. */ - getReportDialogEndpoint(dialogOptions = {}) { - const dsn = this._dsnObject; - const endpoint = `${this._getBaseUrl()}${dsn.path ? `/${dsn.path}` : ''}/api/embed/error-page/`; - const encodedOptions = []; - encodedOptions.push(`dsn=${dsn.toString()}`); - for (const key in dialogOptions) { - if (key === 'user') { - if (!dialogOptions.user) { - continue; - } - if (dialogOptions.user.name) { - encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`); - } - if (dialogOptions.user.email) { - encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`); - } - } - else { - encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`); - } - } - if (encodedOptions.length) { - return `${endpoint}?${encodedOptions.join('&')}`; - } - return endpoint; - } - } - - const installedIntegrations = []; - /** Gets integration to install */ - function getIntegrationsToSetup(options) { - const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || []; - const userIntegrations = options.integrations; - let integrations = []; - if (Array.isArray(userIntegrations)) { - const userIntegrationsNames = userIntegrations.map(i => i.name); - const pickedIntegrationsNames = []; - // Leave only unique default integrations, that were not overridden with provided user integrations - defaultIntegrations.forEach(defaultIntegration => { - if (userIntegrationsNames.indexOf(defaultIntegration.name) === -1 && - pickedIntegrationsNames.indexOf(defaultIntegration.name) === -1) { - integrations.push(defaultIntegration); - pickedIntegrationsNames.push(defaultIntegration.name); - } - }); - // Don't add same user integration twice - userIntegrations.forEach(userIntegration => { - if (pickedIntegrationsNames.indexOf(userIntegration.name) === -1) { - integrations.push(userIntegration); - pickedIntegrationsNames.push(userIntegration.name); - } - }); - } - else if (typeof userIntegrations === 'function') { - integrations = userIntegrations(defaultIntegrations); - integrations = Array.isArray(integrations) ? integrations : [integrations]; - } - else { - integrations = [...defaultIntegrations]; - } - // Make sure that if present, `Debug` integration will always run last - const integrationsNames = integrations.map(i => i.name); - const alwaysLastToRun = 'Debug'; - if (integrationsNames.indexOf(alwaysLastToRun) !== -1) { - integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)); - } - return integrations; - } - /** Setup given integration */ - function setupIntegration(integration) { - if (installedIntegrations.indexOf(integration.name) !== -1) { - return; - } - integration.setupOnce(addGlobalEventProcessor, getCurrentHub); - installedIntegrations.push(integration.name); - logger.log(`Integration installed: ${integration.name}`); - } - /** - * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default - * integrations are added unless they were already provided before. - * @param integrations array of integration instances - * @param withDefault should enable default integrations - */ - function setupIntegrations(options) { - const integrations = {}; - getIntegrationsToSetup(options).forEach(integration => { - integrations[integration.name] = integration; - setupIntegration(integration); - }); - return integrations; - } - - /** - * Base implementation for all JavaScript SDK clients. - * - * Call the constructor with the corresponding backend constructor and options - * specific to the client subclass. To access these options later, use - * {@link Client.getOptions}. Also, the Backend instance is available via - * {@link Client.getBackend}. - * - * If a Dsn is specified in the options, it will be parsed and stored. Use - * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is - * invalid, the constructor will throw a {@link SentryException}. Note that - * without a valid Dsn, the SDK will not send any events to Sentry. - * - * Before sending an event via the backend, it is passed through - * {@link BaseClient.prepareEvent} to add SDK information and scope data - * (breadcrumbs and context). To add more custom information, override this - * method and extend the resulting prepared event. - * - * To issue automatically created events (e.g. via instrumentation), use - * {@link Client.captureEvent}. It will prepare the event and pass it through - * the callback lifecycle. To issue auto-breadcrumbs, use - * {@link Client.addBreadcrumb}. - * - * @example - * class NodeClient extends BaseClient { - * public constructor(options: NodeOptions) { - * super(NodeBackend, options); - * } - * - * // ... - * } - */ - class BaseClient { - /** - * Initializes this client instance. - * - * @param backendClass A constructor function to create the backend. - * @param options Options for the client. - */ - constructor(backendClass, options) { - /** Array of used integrations. */ - this._integrations = {}; - /** Is the client still processing a call? */ - this._processing = false; - this._backend = new backendClass(options); - this._options = options; - if (options.dsn) { - this._dsn = new Dsn(options.dsn); - } - if (this._isEnabled()) { - this._integrations = setupIntegrations(this._options); - } - } - /** - * @inheritDoc - */ - captureException(exception, hint, scope) { - let eventId = hint && hint.event_id; - this._processing = true; - this._getBackend() - .eventFromException(exception, hint) - .then(event => this._processEvent(event, hint, scope)) - .then(finalEvent => { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - this._processing = false; - }) - .then(null, reason => { - logger.error(reason); - this._processing = false; - }); - return eventId; - } - /** - * @inheritDoc - */ - captureMessage(message, level, hint, scope) { - let eventId = hint && hint.event_id; - this._processing = true; - const promisedEvent = isPrimitive(message) - ? this._getBackend().eventFromMessage(`${message}`, level, hint) - : this._getBackend().eventFromException(message, hint); - promisedEvent - .then(event => this._processEvent(event, hint, scope)) - .then(finalEvent => { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - this._processing = false; - }) - .then(null, reason => { - logger.error(reason); - this._processing = false; - }); - return eventId; - } - /** - * @inheritDoc - */ - captureEvent(event, hint, scope) { - let eventId = hint && hint.event_id; - this._processing = true; - this._processEvent(event, hint, scope) - .then(finalEvent => { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - this._processing = false; - }) - .then(null, reason => { - logger.error(reason); - this._processing = false; - }); - return eventId; - } - /** - * @inheritDoc - */ - getDsn() { - return this._dsn; - } - /** - * @inheritDoc - */ - getOptions() { - return this._options; - } - /** - * @inheritDoc - */ - flush(timeout) { - return this._isClientProcessing(timeout).then(status => { - clearInterval(status.interval); - return this._getBackend() - .getTransport() - .close(timeout) - .then(transportFlushed => status.ready && transportFlushed); - }); - } - /** - * @inheritDoc - */ - close(timeout) { - return this.flush(timeout).then(result => { - this.getOptions().enabled = false; - return result; - }); - } - /** - * @inheritDoc - */ - getIntegrations() { - return this._integrations || {}; - } - /** - * @inheritDoc - */ - getIntegration(integration) { - try { - return this._integrations[integration.id] || null; - } - catch (_oO) { - logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`); - return null; - } - } - /** Waits for the client to be done with processing. */ - _isClientProcessing(timeout) { - return new SyncPromise(resolve => { - let ticked = 0; - const tick = 1; - let interval = 0; - clearInterval(interval); - interval = setInterval(() => { - if (!this._processing) { - resolve({ - interval, - ready: true, - }); - } - else { - ticked += tick; - if (timeout && ticked >= timeout) { - resolve({ - interval, - ready: false, - }); - } - } - }, tick); - }); - } - /** Returns the current backend. */ - _getBackend() { - return this._backend; - } - /** Determines whether this SDK is enabled and a valid Dsn is present. */ - _isEnabled() { - return this.getOptions().enabled !== false && this._dsn !== undefined; - } - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - */ - _prepareEvent(event, scope, hint) { - const { environment, release, dist, maxValueLength = 250, normalizeDepth = 3 } = this.getOptions(); - const prepared = Object.assign({}, event); - if (prepared.environment === undefined && environment !== undefined) { - prepared.environment = environment; - } - if (prepared.release === undefined && release !== undefined) { - prepared.release = release; - } - if (prepared.dist === undefined && dist !== undefined) { - prepared.dist = dist; - } - if (prepared.message) { - prepared.message = truncate(prepared.message, maxValueLength); - } - const exception = prepared.exception && prepared.exception.values && prepared.exception.values[0]; - if (exception && exception.value) { - exception.value = truncate(exception.value, maxValueLength); - } - const request = prepared.request; - if (request && request.url) { - request.url = truncate(request.url, maxValueLength); - } - if (prepared.event_id === undefined) { - prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4(); - } - this._addIntegrations(prepared.sdk); - // We prepare the result here with a resolved Event. - let result = SyncPromise.resolve(prepared); - // This should be the last thing called, since we want that - // {@link Hub.addEventProcessor} gets the finished prepared event. - if (scope) { - // In case we have a hub we reassign it. - result = scope.applyToEvent(prepared, hint); - } - return result.then(evt => { - // tslint:disable-next-line:strict-type-predicates - if (typeof normalizeDepth === 'number' && normalizeDepth > 0) { - return this._normalizeEvent(evt, normalizeDepth); - } - return evt; - }); - } - /** - * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization. - * Normalized keys: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * @param event Event - * @returns Normalized event - */ - _normalizeEvent(event, depth) { - if (!event) { - return null; - } - // tslint:disable:no-unsafe-any - return Object.assign({}, event, (event.breadcrumbs && { - breadcrumbs: event.breadcrumbs.map(b => (Object.assign({}, b, (b.data && { - data: normalize(b.data, depth), - })))), - }), (event.user && { - user: normalize(event.user, depth), - }), (event.contexts && { - contexts: normalize(event.contexts, depth), - }), (event.extra && { - extra: normalize(event.extra, depth), - })); - } - /** - * This function adds all used integrations to the SDK info in the event. - * @param sdkInfo The sdkInfo of the event that will be filled with all integrations. - */ - _addIntegrations(sdkInfo) { - const integrationsArray = Object.keys(this._integrations); - if (sdkInfo && integrationsArray.length > 0) { - sdkInfo.integrations = integrationsArray; - } - } - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - _processEvent(event, hint, scope) { - const { beforeSend, sampleRate } = this.getOptions(); - if (!this._isEnabled()) { - return SyncPromise.reject('SDK not enabled, will not send event.'); - } - // 1.0 === 100% events are sent - // 0.0 === 0% events are sent - if (typeof sampleRate === 'number' && Math.random() > sampleRate) { - return SyncPromise.reject('This event has been sampled, will not send event.'); - } - return new SyncPromise((resolve, reject) => { - this._prepareEvent(event, scope, hint) - .then(prepared => { - if (prepared === null) { - reject('An event processor returned null, will not send event.'); - return; - } - let finalEvent = prepared; - const isInternalException = hint && hint.data && hint.data.__sentry__ === true; - if (isInternalException || !beforeSend) { - this._getBackend().sendEvent(finalEvent); - resolve(finalEvent); - return; - } - const beforeSendResult = beforeSend(prepared, hint); - // tslint:disable-next-line:strict-type-predicates - if (typeof beforeSendResult === 'undefined') { - logger.error('`beforeSend` method has to return `null` or a valid event.'); - } - else if (isThenable(beforeSendResult)) { - this._handleAsyncBeforeSend(beforeSendResult, resolve, reject); - } - else { - finalEvent = beforeSendResult; - if (finalEvent === null) { - logger.log('`beforeSend` returned `null`, will not send event.'); - resolve(null); - return; - } - // From here on we are really async - this._getBackend().sendEvent(finalEvent); - resolve(finalEvent); - } - }) - .then(null, reason => { - this.captureException(reason, { - data: { - __sentry__: true, - }, - originalException: reason, - }); - reject(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`); - }); - }); - } - /** - * Resolves before send Promise and calls resolve/reject on parent SyncPromise. - */ - _handleAsyncBeforeSend(beforeSend, resolve, reject) { - beforeSend - .then(processedEvent => { - if (processedEvent === null) { - reject('`beforeSend` returned `null`, will not send event.'); - return; - } - // From here on we are really async - this._getBackend().sendEvent(processedEvent); - resolve(processedEvent); - }) - .then(null, e => { - reject(`beforeSend rejected with ${e}`); - }); - } - } - - /** Noop transport */ - class NoopTransport { - /** - * @inheritDoc - */ - sendEvent(_) { - return SyncPromise.resolve({ - reason: `NoopTransport: Event has been skipped because no Dsn is configured.`, - status: exports.Status.Skipped, - }); - } - /** - * @inheritDoc - */ - close(_) { - return SyncPromise.resolve(true); - } - } - - /** - * This is the base implemention of a Backend. - * @hidden - */ - class BaseBackend { - /** Creates a new backend instance. */ - constructor(options) { - this._options = options; - if (!this._options.dsn) { - logger.warn('No DSN provided, backend will not do anything.'); - } - this._transport = this._setupTransport(); - } - /** - * Sets up the transport so it can be used later to send requests. - */ - _setupTransport() { - return new NoopTransport(); - } - /** - * @inheritDoc - */ - eventFromException(_exception, _hint) { - throw new SentryError('Backend has to implement `eventFromException` method'); - } - /** - * @inheritDoc - */ - eventFromMessage(_message, _level, _hint) { - throw new SentryError('Backend has to implement `eventFromMessage` method'); - } - /** - * @inheritDoc - */ - sendEvent(event) { - this._transport.sendEvent(event).then(null, reason => { - logger.error(`Error while sending event: ${reason}`); - }); - } - /** - * @inheritDoc - */ - getTransport() { - return this._transport; - } - } - - /** - * Internal function to create a new SDK client instance. The client is - * installed and then bound to the current scope. - * - * @param clientClass The client class to instanciate. - * @param options Options to pass to the client. - */ - function initAndBind(clientClass, options) { - if (options.debug === true) { - logger.enable(); - } - getCurrentHub().bindClient(new clientClass(options)); - } - - let originalFunctionToString; - /** Patch toString calls to return proper name for wrapped functions */ - class FunctionToString { - constructor() { - /** - * @inheritDoc - */ - this.name = FunctionToString.id; - } - /** - * @inheritDoc - */ - setupOnce() { - originalFunctionToString = Function.prototype.toString; - Function.prototype.toString = function (...args) { - const context = this.__sentry_original__ || this; - // tslint:disable-next-line:no-unsafe-any - return originalFunctionToString.apply(context, args); - }; - } - } - /** - * @inheritDoc - */ - FunctionToString.id = 'FunctionToString'; - - // "Script error." is hard coded into browsers for errors that it can't read. - // this is the result of a script being pulled in from an external domain and CORS. - const DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/]; - /** Inbound filters configurable by the user */ - class InboundFilters { - constructor(_options = {}) { - this._options = _options; - /** - * @inheritDoc - */ - this.name = InboundFilters.id; - } - /** - * @inheritDoc - */ - setupOnce() { - addGlobalEventProcessor((event) => { - const hub = getCurrentHub(); - if (!hub) { - return event; - } - const self = hub.getIntegration(InboundFilters); - if (self) { - const client = hub.getClient(); - const clientOptions = client ? client.getOptions() : {}; - const options = self._mergeOptions(clientOptions); - if (self._shouldDropEvent(event, options)) { - return null; - } - } - return event; - }); - } - /** JSDoc */ - _shouldDropEvent(event, options) { - if (this._isSentryError(event, options)) { - logger.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${getEventDescription(event)}`); - return true; - } - if (this._isIgnoredError(event, options)) { - logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${getEventDescription(event)}`); - return true; - } - if (this._isBlacklistedUrl(event, options)) { - logger.warn(`Event dropped due to being matched by \`blacklistUrls\` option.\nEvent: ${getEventDescription(event)}.\nUrl: ${this._getEventFilterUrl(event)}`); - return true; - } - if (!this._isWhitelistedUrl(event, options)) { - logger.warn(`Event dropped due to not being matched by \`whitelistUrls\` option.\nEvent: ${getEventDescription(event)}.\nUrl: ${this._getEventFilterUrl(event)}`); - return true; - } - return false; - } - /** JSDoc */ - _isSentryError(event, options = {}) { - if (!options.ignoreInternal) { - return false; - } - try { - return ((event && - event.exception && - event.exception.values && - event.exception.values[0] && - event.exception.values[0].type === 'SentryError') || - false); - } - catch (_oO) { - return false; - } - } - /** JSDoc */ - _isIgnoredError(event, options = {}) { - if (!options.ignoreErrors || !options.ignoreErrors.length) { - return false; - } - return this._getPossibleEventMessages(event).some(message => - // Not sure why TypeScript complains here... - options.ignoreErrors.some(pattern => isMatchingPattern(message, pattern))); - } - /** JSDoc */ - _isBlacklistedUrl(event, options = {}) { - // TODO: Use Glob instead? - if (!options.blacklistUrls || !options.blacklistUrls.length) { - return false; - } - const url = this._getEventFilterUrl(event); - return !url ? false : options.blacklistUrls.some(pattern => isMatchingPattern(url, pattern)); - } - /** JSDoc */ - _isWhitelistedUrl(event, options = {}) { - // TODO: Use Glob instead? - if (!options.whitelistUrls || !options.whitelistUrls.length) { - return true; - } - const url = this._getEventFilterUrl(event); - return !url ? true : options.whitelistUrls.some(pattern => isMatchingPattern(url, pattern)); - } - /** JSDoc */ - _mergeOptions(clientOptions = {}) { - return { - blacklistUrls: [...(this._options.blacklistUrls || []), ...(clientOptions.blacklistUrls || [])], - ignoreErrors: [ - ...(this._options.ignoreErrors || []), - ...(clientOptions.ignoreErrors || []), - ...DEFAULT_IGNORE_ERRORS, - ], - ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true, - whitelistUrls: [...(this._options.whitelistUrls || []), ...(clientOptions.whitelistUrls || [])], - }; - } - /** JSDoc */ - _getPossibleEventMessages(event) { - if (event.message) { - return [event.message]; - } - if (event.exception) { - try { - const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {}; - return [`${value}`, `${type}: ${value}`]; - } - catch (oO) { - logger.error(`Cannot extract message for event ${getEventDescription(event)}`); - return []; - } - } - return []; - } - /** JSDoc */ - _getEventFilterUrl(event) { - try { - if (event.stacktrace) { - const frames = event.stacktrace.frames; - return (frames && frames[frames.length - 1].filename) || null; - } - if (event.exception) { - const frames = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames; - return (frames && frames[frames.length - 1].filename) || null; - } - return null; - } - catch (oO) { - logger.error(`Cannot extract url for event ${getEventDescription(event)}`); - return null; - } - } - } - /** - * @inheritDoc - */ - InboundFilters.id = 'InboundFilters'; - - - - var CoreIntegrations = /*#__PURE__*/Object.freeze({ - FunctionToString: FunctionToString, - InboundFilters: InboundFilters - }); - - // tslint:disable:object-literal-sort-keys - // global reference to slice - const UNKNOWN_FUNCTION = '?'; - // Chromium based browsers: Chrome, Brave, new Opera, new Edge - const chrome = /^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; - // gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it - // generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js - // We need this specific case for now because we want no other regex to match. - const gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i; - const winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; - const geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; - const chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/; - /** JSDoc */ - function computeStackTrace(ex) { - // tslint:disable:no-unsafe-any - let stack = null; - const popSize = ex && ex.framesToPop; - try { - // This must be tried first because Opera 10 *destroys* - // its stacktrace property if you try to access the stack - // property first!! - stack = computeStackTraceFromStacktraceProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } - catch (e) { - // no-empty - } - try { - stack = computeStackTraceFromStackProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } - catch (e) { - // no-empty - } - return { - message: extractMessage(ex), - name: ex && ex.name, - stack: [], - failed: true, - }; - } - /** JSDoc */ - // tslint:disable-next-line:cyclomatic-complexity - function computeStackTraceFromStackProp(ex) { - // tslint:disable:no-conditional-assignment - if (!ex || !ex.stack) { - return null; - } - const stack = []; - const lines = ex.stack.split('\n'); - let isEval; - let submatch; - let parts; - let element; - for (let i = 0; i < lines.length; ++i) { - if ((parts = chrome.exec(lines[i]))) { - const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line - isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line - if (isEval && (submatch = chromeEval.exec(parts[2]))) { - // throw out eval line/column and use top-most line/column number - parts[2] = submatch[1]; // url - parts[3] = submatch[2]; // line - parts[4] = submatch[3]; // column - } - element = { - // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at ` - // prefix here seems like the quickest solution for now. - url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - args: isNative ? [parts[2]] : [], - line: parts[3] ? +parts[3] : null, - column: parts[4] ? +parts[4] : null, - }; - } - else if ((parts = winjs.exec(lines[i]))) { - element = { - url: parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - args: [], - line: +parts[3], - column: parts[4] ? +parts[4] : null, - }; - } - else if ((parts = gecko.exec(lines[i]))) { - isEval = parts[3] && parts[3].indexOf(' > eval') > -1; - if (isEval && (submatch = geckoEval.exec(parts[3]))) { - // throw out eval line/column and use top-most line number - parts[1] = parts[1] || `eval`; - parts[3] = submatch[1]; - parts[4] = submatch[2]; - parts[5] = ''; // no column when eval - } - else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) { - // FireFox uses this awesome columnNumber property for its top frame - // Also note, Firefox's column number is 0-based and everything else expects 1-based, - // so adding 1 - // NOTE: this hack doesn't work if top-most frame is eval - stack[0].column = ex.columnNumber + 1; - } - element = { - url: parts[3], - func: parts[1] || UNKNOWN_FUNCTION, - args: parts[2] ? parts[2].split(',') : [], - line: parts[4] ? +parts[4] : null, - column: parts[5] ? +parts[5] : null, - }; - } - else { - continue; - } - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - if (!stack.length) { - return null; - } - return { - message: extractMessage(ex), - name: ex.name, - stack, - }; - } - /** JSDoc */ - function computeStackTraceFromStacktraceProp(ex) { - if (!ex || !ex.stacktrace) { - return null; - } - // Access and store the stacktrace property before doing ANYTHING - // else to it because Opera is not very good at providing it - // reliably in other circumstances. - const stacktrace = ex.stacktrace; - const opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; - const opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i; - const lines = stacktrace.split('\n'); - const stack = []; - let parts; - for (let line = 0; line < lines.length; line += 2) { - // tslint:disable:no-conditional-assignment - let element = null; - if ((parts = opera10Regex.exec(lines[line]))) { - element = { - url: parts[2], - func: parts[3], - args: [], - line: +parts[1], - column: null, - }; - } - else if ((parts = opera11Regex.exec(lines[line]))) { - element = { - url: parts[6], - func: parts[3] || parts[4], - args: parts[5] ? parts[5].split(',') : [], - line: +parts[1], - column: +parts[2], - }; - } - if (element) { - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - } - if (!stack.length) { - return null; - } - return { - message: extractMessage(ex), - name: ex.name, - stack, - }; - } - /** Remove N number of frames from the stack */ - function popFrames(stacktrace, popSize) { - try { - return Object.assign({}, stacktrace, { stack: stacktrace.stack.slice(popSize) }); - } - catch (e) { - return stacktrace; - } - } - /** - * There are cases where stacktrace.message is an Event object - * https://github.com/getsentry/sentry-javascript/issues/1949 - * In this specific case we try to extract stacktrace.message.error.message - */ - function extractMessage(ex) { - const message = ex && ex.message; - if (!message) { - return 'No error message'; - } - if (message.error && typeof message.error.message === 'string') { - return message.error.message; - } - return message; - } - - const STACKTRACE_LIMIT = 50; - /** - * This function creates an exception from an TraceKitStackTrace - * @param stacktrace TraceKitStackTrace that will be converted to an exception - * @hidden - */ - function exceptionFromStacktrace(stacktrace) { - const frames = prepareFramesForEvent(stacktrace.stack); - const exception = { - type: stacktrace.name, - value: stacktrace.message, - }; - if (frames && frames.length) { - exception.stacktrace = { frames }; - } - // tslint:disable-next-line:strict-type-predicates - if (exception.type === undefined && exception.value === '') { - exception.value = 'Unrecoverable error caught'; - } - return exception; - } - /** - * @hidden - */ - function eventFromPlainObject(exception, syntheticException, rejection) { - const event = { - exception: { - values: [ - { - type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error', - value: `Non-Error ${rejection ? 'promise rejection' : 'exception'} captured with keys: ${extractExceptionKeysForMessage(exception)}`, - }, - ], - }, - extra: { - __serialized__: normalizeToSize(exception), - }, - }; - if (syntheticException) { - const stacktrace = computeStackTrace(syntheticException); - const frames = prepareFramesForEvent(stacktrace.stack); - event.stacktrace = { - frames, - }; - } - return event; - } - /** - * @hidden - */ - function eventFromStacktrace(stacktrace) { - const exception = exceptionFromStacktrace(stacktrace); - return { - exception: { - values: [exception], - }, - }; - } - /** - * @hidden - */ - function prepareFramesForEvent(stack) { - if (!stack || !stack.length) { - return []; - } - let localStack = stack; - const firstFrameFunction = localStack[0].func || ''; - const lastFrameFunction = localStack[localStack.length - 1].func || ''; - // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call) - if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { - localStack = localStack.slice(1); - } - // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call) - if (lastFrameFunction.indexOf('sentryWrapped') !== -1) { - localStack = localStack.slice(0, -1); - } - // The frame where the crash happened, should be the last entry in the array - return localStack - .map((frame) => ({ - colno: frame.column === null ? undefined : frame.column, - filename: frame.url || localStack[0].url, - function: frame.func || '?', - in_app: true, - lineno: frame.line === null ? undefined : frame.line, - })) - .slice(0, STACKTRACE_LIMIT) - .reverse(); - } - - /** JSDoc */ - function eventFromUnknownInput(exception, syntheticException, options = {}) { - let event; - if (isErrorEvent(exception) && exception.error) { - // If it is an ErrorEvent with `error` property, extract it to get actual Error - const errorEvent = exception; - exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment - event = eventFromStacktrace(computeStackTrace(exception)); - return event; - } - if (isDOMError(exception) || isDOMException(exception)) { - // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers) - // then we just extract the name and message, as they don't provide anything else - // https://developer.mozilla.org/en-US/docs/Web/API/DOMError - // https://developer.mozilla.org/en-US/docs/Web/API/DOMException - const domException = exception; - const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException'); - const message = domException.message ? `${name}: ${domException.message}` : name; - event = eventFromString(message, syntheticException, options); - addExceptionTypeValue(event, message); - return event; - } - if (isError(exception)) { - // we have a real Error object, do nothing - event = eventFromStacktrace(computeStackTrace(exception)); - return event; - } - if (isPlainObject(exception) || isEvent(exception)) { - // If it is plain Object or Event, serialize it manually and extract options - // This will allow us to group events based on top-level keys - // which is much better than creating new group when any key/value change - const objectException = exception; - event = eventFromPlainObject(objectException, syntheticException, options.rejection); - addExceptionMechanism(event, { - synthetic: true, - }); - return event; - } - // If none of previous checks were valid, then it means that it's not: - // - an instance of DOMError - // - an instance of DOMException - // - an instance of Event - // - an instance of Error - // - a valid ErrorEvent (one with an error property) - // - a plain Object - // - // So bail out and capture it as a simple message: - event = eventFromString(exception, syntheticException, options); - addExceptionTypeValue(event, `${exception}`, undefined); - addExceptionMechanism(event, { - synthetic: true, - }); - return event; - } - // this._options.attachStacktrace - /** JSDoc */ - function eventFromString(input, syntheticException, options = {}) { - const event = { - message: input, - }; - if (options.attachStacktrace && syntheticException) { - const stacktrace = computeStackTrace(syntheticException); - const frames = prepareFramesForEvent(stacktrace.stack); - event.stacktrace = { - frames, - }; - } - return event; - } - - /** Base Transport class implementation */ - class BaseTransport { - constructor(options) { - this.options = options; - /** A simple buffer holding all requests. */ - this._buffer = new PromiseBuffer(30); - this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth(); - } - /** - * @inheritDoc - */ - sendEvent(_) { - throw new SentryError('Transport Class has to implement `sendEvent` method'); - } - /** - * @inheritDoc - */ - close(timeout) { - return this._buffer.drain(timeout); - } - } - - const global$3 = getGlobalObject(); - /** `fetch` based transport */ - class FetchTransport extends BaseTransport { - constructor() { - super(...arguments); - /** Locks transport after receiving 429 response */ - this._disabledUntil = new Date(Date.now()); - } - /** - * @inheritDoc - */ - sendEvent(event) { - if (new Date(Date.now()) < this._disabledUntil) { - return Promise.reject({ - event, - reason: `Transport locked till ${this._disabledUntil} due to too many requests.`, - status: 429, - }); - } - const defaultOptions = { - body: JSON.stringify(event), - method: 'POST', - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default - // https://caniuse.com/#feat=referrer-policy - // It doesn't. And it throw exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''), - }; - if (this.options.headers !== undefined) { - defaultOptions.headers = this.options.headers; - } - return this._buffer.add(new SyncPromise((resolve, reject) => { - global$3 - .fetch(this.url, defaultOptions) - .then(response => { - const status = exports.Status.fromHttpCode(response.status); - if (status === exports.Status.Success) { - resolve({ status }); - return; - } - if (status === exports.Status.RateLimit) { - const now = Date.now(); - this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After'))); - logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`); - } - reject(response); - }) - .catch(reject); - })); - } - } - - /** `XHR` based transport */ - class XHRTransport extends BaseTransport { - constructor() { - super(...arguments); - /** Locks transport after receiving 429 response */ - this._disabledUntil = new Date(Date.now()); - } - /** - * @inheritDoc - */ - sendEvent(event) { - if (new Date(Date.now()) < this._disabledUntil) { - return Promise.reject({ - event, - reason: `Transport locked till ${this._disabledUntil} due to too many requests.`, - status: 429, - }); - } - return this._buffer.add(new SyncPromise((resolve, reject) => { - const request = new XMLHttpRequest(); - request.onreadystatechange = () => { - if (request.readyState !== 4) { - return; - } - const status = exports.Status.fromHttpCode(request.status); - if (status === exports.Status.Success) { - resolve({ status }); - return; - } - if (status === exports.Status.RateLimit) { - const now = Date.now(); - this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After'))); - logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`); - } - reject(request); - }; - request.open('POST', this.url); - for (const header in this.options.headers) { - if (this.options.headers.hasOwnProperty(header)) { - request.setRequestHeader(header, this.options.headers[header]); - } - } - request.send(JSON.stringify(event)); - })); - } - } - - - - var index = /*#__PURE__*/Object.freeze({ - BaseTransport: BaseTransport, - FetchTransport: FetchTransport, - XHRTransport: XHRTransport - }); - - /** - * The Sentry Browser SDK Backend. - * @hidden - */ - class BrowserBackend extends BaseBackend { - /** - * @inheritDoc - */ - _setupTransport() { - if (!this._options.dsn) { - // We return the noop transport here in case there is no Dsn. - return super._setupTransport(); - } - const transportOptions = Object.assign({}, this._options.transportOptions, { dsn: this._options.dsn }); - if (this._options.transport) { - return new this._options.transport(transportOptions); - } - if (supportsFetch()) { - return new FetchTransport(transportOptions); - } - return new XHRTransport(transportOptions); - } - /** - * @inheritDoc - */ - eventFromException(exception, hint) { - const syntheticException = (hint && hint.syntheticException) || undefined; - const event = eventFromUnknownInput(exception, syntheticException, { - attachStacktrace: this._options.attachStacktrace, - }); - addExceptionMechanism(event, { - handled: true, - type: 'generic', - }); - event.level = exports.Severity.Error; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return SyncPromise.resolve(event); - } - /** - * @inheritDoc - */ - eventFromMessage(message, level = exports.Severity.Info, hint) { - const syntheticException = (hint && hint.syntheticException) || undefined; - const event = eventFromString(message, syntheticException, { - attachStacktrace: this._options.attachStacktrace, - }); - event.level = level; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return SyncPromise.resolve(event); - } - } - - const SDK_NAME = 'sentry.javascript.browser'; - const SDK_VERSION = '5.14.1'; - - /** - * The Sentry Browser SDK Client. - * - * @see BrowserOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ - class BrowserClient extends BaseClient { - /** - * Creates a new Browser SDK instance. - * - * @param options Configuration options for this SDK. - */ - constructor(options = {}) { - super(BrowserBackend, options); - } - /** - * @inheritDoc - */ - _prepareEvent(event, scope, hint) { - event.platform = event.platform || 'javascript'; - event.sdk = Object.assign({}, event.sdk, { name: SDK_NAME, packages: [ - ...((event.sdk && event.sdk.packages) || []), - { - name: 'npm:@sentry/browser', - version: SDK_VERSION, - }, - ], version: SDK_VERSION }); - return super._prepareEvent(event, scope, hint); - } - /** - * Show a report dialog to the user to send feedback to a specific event. - * - * @param options Set individual options for the dialog - */ - showReportDialog(options = {}) { - // doesn't work without a document (React Native) - const document = getGlobalObject().document; - if (!document) { - return; - } - if (!this._isEnabled()) { - logger.error('Trying to call showReportDialog with Sentry Client is disabled'); - return; - } - const dsn = options.dsn || this.getDsn(); - if (!options.eventId) { - logger.error('Missing `eventId` option in showReportDialog call'); - return; - } - if (!dsn) { - logger.error('Missing `Dsn` option in showReportDialog call'); - return; - } - const script = document.createElement('script'); - script.async = true; - script.src = new API(dsn).getReportDialogEndpoint(options); - if (options.onLoad) { - script.onload = options.onLoad; - } - (document.head || document.body).appendChild(script); - } - } - - let ignoreOnError = 0; - /** - * @hidden - */ - function shouldIgnoreOnError() { - return ignoreOnError > 0; - } - /** - * @hidden - */ - function ignoreNextOnError() { - // onerror should trigger before setTimeout - ignoreOnError += 1; - setTimeout(() => { - ignoreOnError -= 1; - }); - } - /** - * Instruments the given function and sends an event to Sentry every time the - * function throws an exception. - * - * @param fn A function to wrap. - * @returns The wrapped function. - * @hidden - */ - function wrap(fn, options = {}, before) { - // tslint:disable-next-line:strict-type-predicates - if (typeof fn !== 'function') { - return fn; - } - try { - // We don't wanna wrap it twice - if (fn.__sentry__) { - return fn; - } - // If this has already been wrapped in the past, return that wrapped function - if (fn.__sentry_wrapped__) { - return fn.__sentry_wrapped__; - } - } - catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - // Bail on wrapping and return the function as-is (defers to window.onerror). - return fn; - } - const sentryWrapped = function () { - const args = Array.prototype.slice.call(arguments); - // tslint:disable:no-unsafe-any - try { - // tslint:disable-next-line:strict-type-predicates - if (before && typeof before === 'function') { - before.apply(this, arguments); - } - const wrappedArguments = args.map((arg) => wrap(arg, options)); - if (fn.handleEvent) { - // Attempt to invoke user-land function - // NOTE: If you are a Sentry user, and you are seeing this stack frame, it - // means the sentry.javascript SDK caught an error invoking your application code. This - // is expected behavior and NOT indicative of a bug with sentry.javascript. - return fn.handleEvent.apply(this, wrappedArguments); - } - // Attempt to invoke user-land function - // NOTE: If you are a Sentry user, and you are seeing this stack frame, it - // means the sentry.javascript SDK caught an error invoking your application code. This - // is expected behavior and NOT indicative of a bug with sentry.javascript. - return fn.apply(this, wrappedArguments); - // tslint:enable:no-unsafe-any - } - catch (ex) { - ignoreNextOnError(); - withScope((scope) => { - scope.addEventProcessor((event) => { - const processedEvent = Object.assign({}, event); - if (options.mechanism) { - addExceptionTypeValue(processedEvent, undefined, undefined); - addExceptionMechanism(processedEvent, options.mechanism); - } - processedEvent.extra = Object.assign({}, processedEvent.extra, { arguments: args }); - return processedEvent; - }); - captureException(ex); - }); - throw ex; - } - }; - // Accessing some objects may throw - // ref: https://github.com/getsentry/sentry-javascript/issues/1168 - try { - for (const property in fn) { - if (Object.prototype.hasOwnProperty.call(fn, property)) { - sentryWrapped[property] = fn[property]; - } - } - } - catch (_oO) { } // tslint:disable-line:no-empty - fn.prototype = fn.prototype || {}; - sentryWrapped.prototype = fn.prototype; - Object.defineProperty(fn, '__sentry_wrapped__', { - enumerable: false, - value: sentryWrapped, - }); - // Signal that this function has been wrapped/filled already - // for both debugging and to prevent it to being wrapped/filled twice - Object.defineProperties(sentryWrapped, { - __sentry__: { - enumerable: false, - value: true, - }, - __sentry_original__: { - enumerable: false, - value: fn, - }, - }); - // Restore original function name (not all browsers allow that) - try { - const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name'); - if (descriptor.configurable) { - Object.defineProperty(sentryWrapped, 'name', { - get() { - return fn.name; - }, - }); - } - } - catch (_oO) { - /*no-empty*/ - } - return sentryWrapped; - } - - /** Global handlers */ - class GlobalHandlers { - /** JSDoc */ - constructor(options) { - /** - * @inheritDoc - */ - this.name = GlobalHandlers.id; - /** JSDoc */ - this._onErrorHandlerInstalled = false; - /** JSDoc */ - this._onUnhandledRejectionHandlerInstalled = false; - this._options = Object.assign({ onerror: true, onunhandledrejection: true }, options); - } - /** - * @inheritDoc - */ - setupOnce() { - Error.stackTraceLimit = 50; - if (this._options.onerror) { - logger.log('Global Handler attached: onerror'); - this._installGlobalOnErrorHandler(); - } - if (this._options.onunhandledrejection) { - logger.log('Global Handler attached: onunhandledrejection'); - this._installGlobalOnUnhandledRejectionHandler(); - } - } - /** JSDoc */ - _installGlobalOnErrorHandler() { - if (this._onErrorHandlerInstalled) { - return; - } - addInstrumentationHandler({ - callback: (data) => { - const error = data.error; - const currentHub = getCurrentHub(); - const hasIntegration = currentHub.getIntegration(GlobalHandlers); - const isFailedOwnDelivery = error && error.__sentry_own_request__ === true; - if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) { - return; - } - const client = currentHub.getClient(); - const event = isPrimitive(error) - ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column) - : this._enhanceEventWithInitialFrame(eventFromUnknownInput(error, undefined, { - attachStacktrace: client && client.getOptions().attachStacktrace, - rejection: false, - }), data.url, data.line, data.column); - addExceptionMechanism(event, { - handled: false, - type: 'onerror', - }); - currentHub.captureEvent(event, { - originalException: error, - }); - }, - type: 'error', - }); - this._onErrorHandlerInstalled = true; - } - /** JSDoc */ - _installGlobalOnUnhandledRejectionHandler() { - if (this._onUnhandledRejectionHandlerInstalled) { - return; - } - addInstrumentationHandler({ - callback: (e) => { - let error = e; - // dig the object of the rejection out of known event types - try { - // PromiseRejectionEvents store the object of the rejection under 'reason' - // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent - if ('reason' in e) { - error = e.reason; - } - // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents - // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into - // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec - // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and - // https://github.com/getsentry/sentry-javascript/issues/2380 - else if ('detail' in e && 'reason' in e.detail) { - error = e.detail.reason; - } - } - catch (_oO) { - // no-empty - } - const currentHub = getCurrentHub(); - const hasIntegration = currentHub.getIntegration(GlobalHandlers); - const isFailedOwnDelivery = error && error.__sentry_own_request__ === true; - if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) { - return true; - } - const client = currentHub.getClient(); - const event = isPrimitive(error) - ? this._eventFromIncompleteRejection(error) - : eventFromUnknownInput(error, undefined, { - attachStacktrace: client && client.getOptions().attachStacktrace, - rejection: true, - }); - event.level = exports.Severity.Error; - addExceptionMechanism(event, { - handled: false, - type: 'onunhandledrejection', - }); - currentHub.captureEvent(event, { - originalException: error, - }); - return; - }, - type: 'unhandledrejection', - }); - this._onUnhandledRejectionHandlerInstalled = true; - } - /** - * This function creates a stack from an old, error-less onerror handler. - */ - _eventFromIncompleteOnError(msg, url, line, column) { - const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; - // If 'message' is ErrorEvent, get real message from inside - let message = isErrorEvent(msg) ? msg.message : msg; - let name; - if (isString(message)) { - const groups = message.match(ERROR_TYPES_RE); - if (groups) { - name = groups[1]; - message = groups[2]; - } - } - const event = { - exception: { - values: [ - { - type: name || 'Error', - value: message, - }, - ], - }, - }; - return this._enhanceEventWithInitialFrame(event, url, line, column); - } - /** - * This function creates an Event from an TraceKitStackTrace that has part of it missing. - */ - _eventFromIncompleteRejection(error) { - return { - exception: { - values: [ - { - type: 'UnhandledRejection', - value: `Non-Error promise rejection captured with value: ${error}`, - }, - ], - }, - }; - } - /** JSDoc */ - _enhanceEventWithInitialFrame(event, url, line, column) { - event.exception = event.exception || {}; - event.exception.values = event.exception.values || []; - event.exception.values[0] = event.exception.values[0] || {}; - event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {}; - event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || []; - const colno = isNaN(parseInt(column, 10)) ? undefined : column; - const lineno = isNaN(parseInt(line, 10)) ? undefined : line; - const filename = isString(url) && url.length > 0 ? url : getLocationHref(); - if (event.exception.values[0].stacktrace.frames.length === 0) { - event.exception.values[0].stacktrace.frames.push({ - colno, - filename, - function: '?', - in_app: true, - lineno, - }); - } - return event; - } - } - /** - * @inheritDoc - */ - GlobalHandlers.id = 'GlobalHandlers'; - - /** Wrap timer functions and event targets to catch errors and provide better meta data */ - class TryCatch { - constructor() { - /** JSDoc */ - this._ignoreOnError = 0; - /** - * @inheritDoc - */ - this.name = TryCatch.id; - } - /** JSDoc */ - _wrapTimeFunction(original) { - return function (...args) { - const originalCallback = args[0]; - args[0] = wrap(originalCallback, { - mechanism: { - data: { function: getFunctionName(original) }, - handled: true, - type: 'instrument', - }, - }); - return original.apply(this, args); - }; - } - /** JSDoc */ - _wrapRAF(original) { - return function (callback) { - return original(wrap(callback, { - mechanism: { - data: { - function: 'requestAnimationFrame', - handler: getFunctionName(original), - }, - handled: true, - type: 'instrument', - }, - })); - }; - } - /** JSDoc */ - _wrapEventTarget(target) { - const global = getGlobalObject(); - const proto = global[target] && global[target].prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - fill(proto, 'addEventListener', function (original) { - return function (eventName, fn, options) { - try { - // tslint:disable-next-line:no-unbound-method strict-type-predicates - if (typeof fn.handleEvent === 'function') { - fn.handleEvent = wrap(fn.handleEvent.bind(fn), { - mechanism: { - data: { - function: 'handleEvent', - handler: getFunctionName(fn), - target, - }, - handled: true, - type: 'instrument', - }, - }); - } - } - catch (err) { - // can sometimes get 'Permission denied to access property "handle Event' - } - return original.call(this, eventName, wrap(fn, { - mechanism: { - data: { - function: 'addEventListener', - handler: getFunctionName(fn), - target, - }, - handled: true, - type: 'instrument', - }, - }), options); - }; - }); - fill(proto, 'removeEventListener', function (original) { - return function (eventName, fn, options) { - let callback = fn; - try { - callback = callback && (callback.__sentry_wrapped__ || callback); - } - catch (e) { - // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments - } - return original.call(this, eventName, callback, options); - }; - }); - } - /** JSDoc */ - _wrapXHR(originalSend) { - return function (...args) { - const xhr = this; // tslint:disable-line:no-this-assignment - const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange']; - xmlHttpRequestProps.forEach(prop => { - if (prop in xhr && typeof xhr[prop] === 'function') { - fill(xhr, prop, function (original) { - const wrapOptions = { - mechanism: { - data: { - function: prop, - handler: getFunctionName(original), - }, - handled: true, - type: 'instrument', - }, - }; - // If Instrument integration has been called before TryCatch, get the name of original function - if (original.__sentry_original__) { - wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__); - } - // Otherwise wrap directly - return wrap(original, wrapOptions); - }); - } - }); - return originalSend.apply(this, args); - }; - } - /** - * Wrap timer functions and event targets to catch errors - * and provide better metadata. - */ - setupOnce() { - this._ignoreOnError = this._ignoreOnError; - const global = getGlobalObject(); - fill(global, 'setTimeout', this._wrapTimeFunction.bind(this)); - fill(global, 'setInterval', this._wrapTimeFunction.bind(this)); - fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this)); - if ('XMLHttpRequest' in global) { - fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this)); - } - [ - 'EventTarget', - 'Window', - 'Node', - 'ApplicationCache', - 'AudioTrackList', - 'ChannelMergerNode', - 'CryptoOperation', - 'EventSource', - 'FileReader', - 'HTMLUnknownElement', - 'IDBDatabase', - 'IDBRequest', - 'IDBTransaction', - 'KeyOperation', - 'MediaController', - 'MessagePort', - 'ModalWindow', - 'Notification', - 'SVGElementInstance', - 'Screen', - 'TextTrack', - 'TextTrackCue', - 'TextTrackList', - 'WebSocket', - 'WebSocketWorker', - 'Worker', - 'XMLHttpRequest', - 'XMLHttpRequestEventTarget', - 'XMLHttpRequestUpload', - ].forEach(this._wrapEventTarget.bind(this)); - } - } - /** - * @inheritDoc - */ - TryCatch.id = 'TryCatch'; - - /** - * Default Breadcrumbs instrumentations - * TODO: Deprecated - with v6, this will be renamed to `Instrument` - */ - class Breadcrumbs { - /** - * @inheritDoc - */ - constructor(options) { - /** - * @inheritDoc - */ - this.name = Breadcrumbs.id; - this._options = Object.assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options); - } - /** - * Creates breadcrumbs from console API calls - */ - _consoleBreadcrumb(handlerData) { - const breadcrumb = { - category: 'console', - data: { - arguments: handlerData.args, - logger: 'console', - }, - level: exports.Severity.fromString(handlerData.level), - message: safeJoin(handlerData.args, ' '), - }; - if (handlerData.level === 'assert') { - if (handlerData.args[0] === false) { - breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`; - breadcrumb.data.arguments = handlerData.args.slice(1); - } - else { - // Don't capture a breadcrumb for passed assertions - return; - } - } - getCurrentHub().addBreadcrumb(breadcrumb, { - input: handlerData.args, - level: handlerData.level, - }); - } - /** - * Creates breadcrumbs from DOM API calls - */ - _domBreadcrumb(handlerData) { - let target; - // Accessing event.target can throw (see getsentry/raven-js#838, #768) - try { - target = handlerData.event.target - ? htmlTreeAsString(handlerData.event.target) - : htmlTreeAsString(handlerData.event); - } - catch (e) { - target = ''; - } - if (target.length === 0) { - return; - } - getCurrentHub().addBreadcrumb({ - category: `ui.${handlerData.name}`, - message: target, - }, { - event: handlerData.event, - name: handlerData.name, - }); - } - /** - * Creates breadcrumbs from XHR API calls - */ - _xhrBreadcrumb(handlerData) { - if (handlerData.endTimestamp) { - // We only capture complete, non-sentry requests - if (handlerData.xhr.__sentry_own_request__) { - return; - } - getCurrentHub().addBreadcrumb({ - category: 'xhr', - data: handlerData.xhr.__sentry_xhr__, - type: 'http', - }, { - xhr: handlerData.xhr, - }); - return; - } - // We only capture issued sentry requests - if (handlerData.xhr.__sentry_own_request__) { - addSentryBreadcrumb(handlerData.args[0]); - } - } - /** - * Creates breadcrumbs from fetch API calls - */ - _fetchBreadcrumb(handlerData) { - // We only capture complete fetch requests - if (!handlerData.endTimestamp) { - return; - } - const client = getCurrentHub().getClient(); - const dsn = client && client.getDsn(); - if (dsn) { - const filterUrl = new API(dsn).getStoreEndpoint(); - // if Sentry key appears in URL, don't capture it as a request - // but rather as our own 'sentry' type breadcrumb - if (filterUrl && - handlerData.fetchData.url.indexOf(filterUrl) !== -1 && - handlerData.fetchData.method === 'POST' && - handlerData.args[1] && - handlerData.args[1].body) { - addSentryBreadcrumb(handlerData.args[1].body); - return; - } - } - if (handlerData.error) { - getCurrentHub().addBreadcrumb({ - category: 'fetch', - data: Object.assign({}, handlerData.fetchData, { status_code: handlerData.response.status }), - level: exports.Severity.Error, - type: 'http', - }, { - data: handlerData.error, - input: handlerData.args, - }); - } - else { - getCurrentHub().addBreadcrumb({ - category: 'fetch', - data: Object.assign({}, handlerData.fetchData, { status_code: handlerData.response.status }), - type: 'http', - }, { - input: handlerData.args, - response: handlerData.response, - }); - } - } - /** - * Creates breadcrumbs from history API calls - */ - _historyBreadcrumb(handlerData) { - const global = getGlobalObject(); - let from = handlerData.from; - let to = handlerData.to; - const parsedLoc = parseUrl(global.location.href); - let parsedFrom = parseUrl(from); - const parsedTo = parseUrl(to); - // Initial pushState doesn't provide `from` information - if (!parsedFrom.path) { - parsedFrom = parsedLoc; - } - // Use only the path component of the URL if the URL matches the current - // document (almost all the time when using pushState) - if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) { - // tslint:disable-next-line:no-parameter-reassignment - to = parsedTo.relative; - } - if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) { - // tslint:disable-next-line:no-parameter-reassignment - from = parsedFrom.relative; - } - getCurrentHub().addBreadcrumb({ - category: 'navigation', - data: { - from, - to, - }, - }); - } - /** - * Instrument browser built-ins w/ breadcrumb capturing - * - Console API - * - DOM API (click/typing) - * - XMLHttpRequest API - * - Fetch API - * - History API - */ - setupOnce() { - if (this._options.console) { - addInstrumentationHandler({ - callback: (...args) => { - this._consoleBreadcrumb(...args); - }, - type: 'console', - }); - } - if (this._options.dom) { - addInstrumentationHandler({ - callback: (...args) => { - this._domBreadcrumb(...args); - }, - type: 'dom', - }); - } - if (this._options.xhr) { - addInstrumentationHandler({ - callback: (...args) => { - this._xhrBreadcrumb(...args); - }, - type: 'xhr', - }); - } - if (this._options.fetch) { - addInstrumentationHandler({ - callback: (...args) => { - this._fetchBreadcrumb(...args); - }, - type: 'fetch', - }); - } - if (this._options.history) { - addInstrumentationHandler({ - callback: (...args) => { - this._historyBreadcrumb(...args); - }, - type: 'history', - }); - } - } - } - /** - * @inheritDoc - */ - Breadcrumbs.id = 'Breadcrumbs'; - /** - * Create a breadcrumb of `sentry` from the events themselves - */ - function addSentryBreadcrumb(serializedData) { - // There's always something that can go wrong with deserialization... - try { - const event = JSON.parse(serializedData); - getCurrentHub().addBreadcrumb({ - category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`, - event_id: event.event_id, - level: event.level || exports.Severity.fromString('error'), - message: getEventDescription(event), - }, { - event, - }); - } - catch (_oO) { - logger.error('Error while adding sentry type breadcrumb'); - } - } - - const DEFAULT_KEY = 'cause'; - const DEFAULT_LIMIT = 5; - /** Adds SDK info to an event. */ - class LinkedErrors { - /** - * @inheritDoc - */ - constructor(options = {}) { - /** - * @inheritDoc - */ - this.name = LinkedErrors.id; - this._key = options.key || DEFAULT_KEY; - this._limit = options.limit || DEFAULT_LIMIT; - } - /** - * @inheritDoc - */ - setupOnce() { - addGlobalEventProcessor((event, hint) => { - const self = getCurrentHub().getIntegration(LinkedErrors); - if (self) { - return self._handler(event, hint); - } - return event; - }); - } - /** - * @inheritDoc - */ - _handler(event, hint) { - if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) { - return event; - } - const linkedErrors = this._walkErrorTree(hint.originalException, this._key); - event.exception.values = [...linkedErrors, ...event.exception.values]; - return event; - } - /** - * @inheritDoc - */ - _walkErrorTree(error, key, stack = []) { - if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) { - return stack; - } - const stacktrace = computeStackTrace(error[key]); - const exception = exceptionFromStacktrace(stacktrace); - return this._walkErrorTree(error[key], key, [exception, ...stack]); - } - } - /** - * @inheritDoc - */ - LinkedErrors.id = 'LinkedErrors'; - - const global$4 = getGlobalObject(); - /** UserAgent */ - class UserAgent { - constructor() { - /** - * @inheritDoc - */ - this.name = UserAgent.id; - } - /** - * @inheritDoc - */ - setupOnce() { - addGlobalEventProcessor((event) => { - if (getCurrentHub().getIntegration(UserAgent)) { - if (!global$4.navigator || !global$4.location) { - return event; - } - // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/ - const request = event.request || {}; - request.url = request.url || global$4.location.href; - request.headers = request.headers || {}; - request.headers['User-Agent'] = global$4.navigator.userAgent; - return Object.assign({}, event, { request }); - } - return event; - }); - } - } - /** - * @inheritDoc - */ - UserAgent.id = 'UserAgent'; - - - - var BrowserIntegrations = /*#__PURE__*/Object.freeze({ - GlobalHandlers: GlobalHandlers, - TryCatch: TryCatch, - Breadcrumbs: Breadcrumbs, - LinkedErrors: LinkedErrors, - UserAgent: UserAgent - }); - - const defaultIntegrations = [ - new InboundFilters(), - new FunctionToString(), - new TryCatch(), - new Breadcrumbs(), - new GlobalHandlers(), - new LinkedErrors(), - new UserAgent(), - ]; - /** - * The Sentry Browser SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible when - * loading the web page. To set context information or send manual events, use - * the provided methods. - * - * @example - * - * ``` - * - * import { init } from '@sentry/browser'; - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * import { configureScope } from '@sentry/browser'; - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * import { addBreadcrumb } from '@sentry/browser'; - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * - * ``` - * - * import * as Sentry from '@sentry/browser'; - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link BrowserOptions} for documentation on configuration options. - */ - function init(options = {}) { - if (options.defaultIntegrations === undefined) { - options.defaultIntegrations = defaultIntegrations; - } - if (options.release === undefined) { - const window = getGlobalObject(); - // This supports the variable that sentry-webpack-plugin injects - if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) { - options.release = window.SENTRY_RELEASE.id; - } - } - initAndBind(BrowserClient, options); - } - /** - * Present the user with a report dialog. - * - * @param options Everything is optional, we try to fetch all info need from the global scope. - */ - function showReportDialog(options = {}) { - if (!options.eventId) { - options.eventId = getCurrentHub().lastEventId(); - } - const client = getCurrentHub().getClient(); - if (client) { - client.showReportDialog(options); - } - } - /** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ - function lastEventId() { - return getCurrentHub().lastEventId(); - } - /** - * This function is here to be API compatible with the loader. - * @hidden - */ - function forceLoad() { - // Noop - } - /** - * This function is here to be API compatible with the loader. - * @hidden - */ - function onLoad(callback) { - callback(); - } - /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ - function flush(timeout) { - const client = getCurrentHub().getClient(); - if (client) { - return client.flush(timeout); - } - return SyncPromise.reject(false); - } - /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ - function close(timeout) { - const client = getCurrentHub().getClient(); - if (client) { - return client.close(timeout); - } - return SyncPromise.reject(false); - } - /** - * Wrap code within a try/catch block so the SDK is able to capture errors. - * - * @param fn A function to wrap. - * - * @returns The result of wrapped function call. - */ - function wrap$1(fn) { - return wrap(fn)(); // tslint:disable-line:no-unsafe-any - } - - let windowIntegrations = {}; - // This block is needed to add compatibility with the integrations packages when used with a CDN - // tslint:disable: no-unsafe-any - const _window = getGlobalObject(); - if (_window.Sentry && _window.Sentry.Integrations) { - windowIntegrations = _window.Sentry.Integrations; - } - // tslint:enable: no-unsafe-any - const INTEGRATIONS = Object.assign({}, windowIntegrations, CoreIntegrations, BrowserIntegrations); - - exports.BrowserClient = BrowserClient; - exports.Hub = Hub; - exports.Integrations = INTEGRATIONS; - exports.SDK_NAME = SDK_NAME; - exports.SDK_VERSION = SDK_VERSION; - exports.Scope = Scope; - exports.Transports = index; - exports.addBreadcrumb = addBreadcrumb; - exports.addGlobalEventProcessor = addGlobalEventProcessor; - exports.captureEvent = captureEvent; - exports.captureException = captureException; - exports.captureMessage = captureMessage; - exports.close = close; - exports.configureScope = configureScope; - exports.defaultIntegrations = defaultIntegrations; - exports.flush = flush; - exports.forceLoad = forceLoad; - exports.getCurrentHub = getCurrentHub; - exports.getHubFromCarrier = getHubFromCarrier; - exports.init = init; - exports.lastEventId = lastEventId; - exports.onLoad = onLoad; - exports.setContext = setContext; - exports.setExtra = setExtra; - exports.setExtras = setExtras; - exports.setTag = setTag; - exports.setTags = setTags; - exports.setUser = setUser; - exports.showReportDialog = showReportDialog; - exports.withScope = withScope; - exports.wrap = wrap$1; - - return exports; - -}({})); -//# sourceMappingURL=bundle.es6.js.map diff --git a/node_modules/@sentry/browser/build/bundle.es6.js.map b/node_modules/@sentry/browser/build/bundle.es6.js.map deleted file mode 100644 index e8f2be8..0000000 --- a/node_modules/@sentry/browser/build/bundle.es6.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bundle.es6.js","sources":["../../types/src/loglevel.ts","../../types/src/severity.ts","../../types/src/span.ts","../../types/src/status.ts","../../utils/src/async.ts","../../utils/src/polyfill.ts","../../utils/src/error.ts","../../utils/src/is.ts","../../utils/src/string.ts","../../utils/src/misc.ts","../../utils/src/logger.ts","../../utils/src/memo.ts","../../utils/src/object.ts","../../utils/src/path.ts","../../utils/src/syncpromise.ts","../../utils/src/promisebuffer.ts","../../utils/src/supports.ts","../../utils/src/instrument.ts","../../utils/src/dsn.ts","../../hub/src/scope.ts","../../hub/src/hub.ts","../../minimal/src/index.ts","../../core/src/api.ts","../../core/src/integration.ts","../../core/src/baseclient.ts","../../core/src/transports/noop.ts","../../core/src/basebackend.ts","../../core/src/sdk.ts","../../core/src/integrations/functiontostring.ts","../../core/src/integrations/inboundfilters.ts","../src/tracekit.ts","../src/parsers.ts","../src/eventbuilder.ts","../src/transports/base.ts","../src/transports/fetch.ts","../src/transports/xhr.ts","../src/backend.ts","../src/version.ts","../src/client.ts","../src/helpers.ts","../src/integrations/globalhandlers.ts","../src/integrations/trycatch.ts","../src/integrations/breadcrumbs.ts","../src/integrations/linkederrors.ts","../src/integrations/useragent.ts","../src/sdk.ts","../src/index.ts"],"sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n /** No logs will be generated. */\n None = 0,\n /** Only SDK internal errors will be logged. */\n Error = 1,\n /** Information useful for debugging the SDK will be logged. */\n Debug = 2,\n /** All SDK actions will be logged. */\n Verbose = 3,\n}\n","/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n","/** Span holding trace_id, span_id */\nexport interface Span {\n /** Sets the finish timestamp on the current span and sends it if it was a transaction */\n finish(useLastSpanTimestamp?: boolean): string | undefined;\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): object;\n /** Convert the object to JSON */\n toJSON(): object;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * @param status http code used to set the status\n */\n setStatus(status: SpanStatus): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n}\n\n/** Interface holder all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n /**\n * Operation of the Span.\n */\n op?: string;\n /**\n * Completion status of the Span.\n */\n status?: SpanStatus;\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n /**\n * Has the sampling decision been made?\n */\n sampled?: boolean;\n /**\n * Span ID\n */\n spanId?: string;\n /**\n * Trace ID\n */\n traceId?: string;\n /**\n * Transaction of the Span.\n */\n transaction?: string;\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n}\n\n/** The status of an Span. */\nexport enum SpanStatus {\n /** The operation completed successfully. */\n Ok = 'ok',\n /** Deadline expired before operation could complete. */\n DeadlineExceeded = 'deadline_exceeded',\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n Unauthenticated = 'unauthenticated',\n /** 403 Forbidden */\n PermissionDenied = 'permission_denied',\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n NotFound = 'not_found',\n /** 429 Too Many Requests */\n ResourceExhausted = 'resource_exhausted',\n /** Client specified an invalid argument. 4xx. */\n InvalidArgument = 'invalid_argument',\n /** 501 Not Implemented */\n Unimplemented = 'unimplemented',\n /** 503 Service Unavailable */\n Unavailable = 'unavailable',\n /** Other/generic 5xx. */\n InternalError = 'internal_error',\n /** Unknown. Any non-standard HTTP status code. */\n UnknownError = 'unknown_error',\n /** The operation was cancelled (typically by the user). */\n Cancelled = 'cancelled',\n /** Already exists (409) */\n AlreadyExists = 'already_exists',\n /** Operation was rejected because the system is not in a state required for the operation's */\n FailedPrecondition = 'failed_precondition',\n /** The operation was aborted, typically due to a concurrency issue. */\n Aborted = 'aborted',\n /** Operation was attempted past the valid range. */\n OutOfRange = 'out_of_range',\n /** Unrecoverable data loss or corruption */\n DataLoss = 'data_loss',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace SpanStatus {\n /**\n * Converts a HTTP status code into a {@link SpanStatus}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or {@link SpanStatus.UnknownError}.\n */\n // tslint:disable-next-line:completed-docs\n export function fromHttpCode(httpStatus: number): SpanStatus {\n if (httpStatus < 400) {\n return SpanStatus.Ok;\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return SpanStatus.Unauthenticated;\n case 403:\n return SpanStatus.PermissionDenied;\n case 404:\n return SpanStatus.NotFound;\n case 409:\n return SpanStatus.AlreadyExists;\n case 413:\n return SpanStatus.FailedPrecondition;\n case 429:\n return SpanStatus.ResourceExhausted;\n default:\n return SpanStatus.InvalidArgument;\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return SpanStatus.Unimplemented;\n case 503:\n return SpanStatus.Unavailable;\n case 504:\n return SpanStatus.DeadlineExceeded;\n default:\n return SpanStatus.InternalError;\n }\n }\n\n return SpanStatus.UnknownError;\n }\n}\n","/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\nexport function forget(promise: PromiseLike): void {\n promise.then(null, e => {\n // TODO: Use a better logging mechanism\n console.error(e);\n });\n}\n","export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n // tslint:disable:no-unsafe-any\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n","/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: any): boolean {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: any): boolean {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): boolean {\n // tslint:disable:no-unsafe-any\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n // tslint:enable:no-unsafe-any\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: any): boolean {\n // tslint:disable-next-line:no-unsafe-any\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n","import { isRegExp } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n colno = ll; // tslint:disable-line:no-parameter-reassignment\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n","import { Event, Integration, StackFrame, WrappedFunction } from '@sentry/types';\n\nimport { isString } from './is';\nimport { snipLine } from './string';\n\n/** Internal */\ninterface SentryGlobal {\n Sentry?: {\n Integrations?: Integration[];\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n };\n}\n\n/**\n * Requires a module which is protected _against bundler minification.\n *\n * @param request The module path to resolve\n */\nexport function dynamicRequire(mod: any, request: string): any {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // tslint:disable:strict-type-predicates\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n\nconst fallbackGlobalObject = {};\n\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject(): T & SentryGlobal {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject) as T & SentryGlobal;\n}\n// tslint:enable:strict-type-predicates\n\n/**\n * Extended Window interface that allows for Crypto API usage in IE browsers\n */\ninterface MsCryptoWindow extends Window {\n msCrypto?: Crypto;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const global = getGlobalObject() as MsCryptoWindow;\n const crypto = global.crypto || global.msCrypto;\n\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n const arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n // tslint:disable-next-line:no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // tslint:disable-next-line:no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n const pad = (num: number): string => {\n let v = num.toString(16);\n while (v.length < 4) {\n v = `0${v}`;\n }\n return v;\n };\n\n return (\n pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])\n );\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n // tslint:disable-next-line:no-bitwise\n const r = (Math.random() * 16) | 0;\n // tslint:disable-next-line:no-bitwise\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(\n url: string,\n): {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n} {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n const exception = event.exception.values[0];\n\n if (exception.type && exception.value) {\n return `${exception.type}: ${exception.value}`;\n }\n return exception.type || exception.value || event.event_id || '';\n }\n return event.event_id || '';\n}\n\n/** JSDoc */\ninterface ExtensibleConsole extends Console {\n [key: string]: any;\n}\n\n/** JSDoc */\nexport function consoleSandbox(callback: () => any): any {\n const global = getGlobalObject();\n const levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n if (!('console' in global)) {\n return callback();\n }\n\n const originalConsole = global.console as ExtensibleConsole;\n const wrappedLevels: { [key: string]: any } = {};\n\n // Restore all wrapped console methods\n levels.forEach(level => {\n if (level in global.console && (originalConsole[level] as WrappedFunction).__sentry_original__) {\n wrappedLevels[level] = originalConsole[level] as WrappedFunction;\n originalConsole[level] = (originalConsole[level] as WrappedFunction).__sentry_original__;\n }\n });\n\n // Perform callback manipulations\n const result = callback();\n\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level];\n });\n\n return result;\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(\n event: Event,\n mechanism: {\n [key: string]: any;\n } = {},\n): void {\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception!.values![0].mechanism = event.exception!.values![0].mechanism || {};\n Object.keys(mechanism).forEach(key => {\n // @ts-ignore\n event.exception!.values![0].mechanism[key] = mechanism[key];\n });\n } catch (_oO) {\n // no-empty\n }\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown): string {\n const elem = el as {\n getAttribute(key: string): string; // tslint:disable-line:completed-docs\n tagName?: string;\n id?: string;\n className?: string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n const attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\nconst INITIAL_TIME = Date.now();\nlet prevNow = 0;\n\nconst performanceFallback: Pick = {\n now(): number {\n let now = Date.now() - INITIAL_TIME;\n if (now < prevNow) {\n now = prevNow;\n }\n prevNow = now;\n return now;\n },\n timeOrigin: INITIAL_TIME,\n};\n\nexport const crossPlatformPerformance: Pick = (() => {\n if (isNodeEnv()) {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: Performance };\n return perfHooks.performance;\n } catch (_) {\n return performanceFallback;\n }\n }\n\n if (getGlobalObject().performance) {\n // Polyfill for performance.timeOrigin.\n //\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // tslint:disable-next-line:strict-type-predicates\n if (performance.timeOrigin === undefined) {\n // For webworkers it could mean we don't have performance.timing then we fallback\n // tslint:disable-next-line:deprecation\n if (!performance.timing) {\n return performanceFallback;\n }\n // tslint:disable-next-line:deprecation\n if (!performance.timing.navigationStart) {\n return performanceFallback;\n }\n\n // @ts-ignore\n // tslint:disable-next-line:deprecation\n performance.timeOrigin = performance.timing.navigationStart;\n }\n }\n\n return getGlobalObject().performance || performanceFallback;\n})();\n\n/**\n * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock.\n */\nexport function timestampWithMs(): number {\n return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000;\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\nconst defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now: number, header?: string | number | null): number {\n if (!header) {\n return defaultRetryAfter;\n }\n\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return defaultRetryAfter;\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n const lineno = frame.lineno || 0;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n","import { consoleSandbox, getGlobalObject } from './misc';\n\n// TODO: Implement different loggers for different environments\nconst global = getGlobalObject();\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** JSDoc */\nclass Logger {\n /** JSDoc */\n private _enabled: boolean;\n\n /** JSDoc */\n public constructor() {\n this._enabled = false;\n }\n\n /** JSDoc */\n public disable(): void {\n this._enabled = false;\n }\n\n /** JSDoc */\n public enable(): void {\n this._enabled = true;\n }\n\n /** JSDoc */\n public log(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.log(`${PREFIX}[Log]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public warn(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public error(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.error(`${PREFIX}[Error]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nconst logger = (global.__SENTRY__.logger as Logger) || (global.__SENTRY__.logger = new Logger());\n\nexport { logger };\n","// tslint:disable:no-unsafe-any\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n /** Determines if WeakSet is available */\n private readonly _hasWeakSet: boolean;\n /** Either WeakSet or Array */\n private readonly _inner: any;\n\n public constructor() {\n // tslint:disable-next-line\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n public memoize(obj: any): boolean {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < this._inner.length; i++) {\n const value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n }\n\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n public unmemoize(obj: any): void {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (let i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n }\n}\n","import { ExtendedError, WrappedFunction } from '@sentry/types';\n\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName, htmlTreeAsString } from './misc';\nimport { truncate } from './string';\n\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacement: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacement(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n // tslint:disable-next-line:strict-type-predicates\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`,\n )\n .join('&');\n}\n\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\nfunction getWalkSource(\n value: any,\n): {\n [key: string]: any;\n} {\n if (isError(value)) {\n const error = value as ExtendedError;\n const err: {\n stack: string | undefined;\n message: string;\n name: string;\n [key: string]: any;\n } = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n\n for (const i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n\n return err;\n }\n\n if (isEvent(value)) {\n /**\n * Event-like interface that's usable in browser and node\n */\n interface SimpleEvent {\n [key: string]: unknown;\n type: string;\n target?: unknown;\n currentTarget?: unknown;\n }\n\n const event = value as SimpleEvent;\n\n const source: {\n [key: string]: any;\n } = {};\n\n source.type = event.type;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n source.target = isElement(event.target)\n ? htmlTreeAsString(event.target)\n : Object.prototype.toString.call(event.target);\n } catch (_oO) {\n source.target = '';\n }\n\n try {\n source.currentTarget = isElement(event.currentTarget)\n ? htmlTreeAsString(event.currentTarget)\n : Object.prototype.toString.call(event.currentTarget);\n } catch (_oO) {\n source.currentTarget = '';\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event.detail;\n }\n\n for (const i in event) {\n if (Object.prototype.hasOwnProperty.call(event, i)) {\n source[i] = event;\n }\n }\n\n return source;\n }\n\n return value as {\n [key: string]: any;\n };\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // tslint:disable-next-line:no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n\n/** JSDoc */\nexport function normalizeToSize(\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const serialized = normalize(object, depth);\n\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return serialized as T;\n}\n\n/** Transforms any input value into a string form, either primitive value or a type of the input */\nfunction serializeValue(value: any): any {\n const type = Object.prototype.toString.call(value);\n\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n\n const normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction normalizeValue(value: T, key?: any): T | string {\n if (key === 'domain' && value && typeof value === 'object' && ((value as unknown) as { _events: any })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n if (typeof (global as any) !== 'undefined' && (value as unknown) === global) {\n return '[Global]';\n }\n\n if (typeof (window as any) !== 'undefined' && (value as unknown) === window) {\n return '[Window]';\n }\n\n if (typeof (document as any) !== 'undefined' && (value as unknown) === document) {\n return '[Document]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n // tslint:disable-next-line:no-tautology-expression\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n return value;\n}\n\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key: string, value: any, depth: number = +Infinity, memo: Memo = new Memo()): any {\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n\n // If value implements `toJSON` method, call it and return early\n // tslint:disable:no-unsafe-any\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // tslint:enable:no-unsafe-any\n\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n const normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n const source = getWalkSource(value);\n\n // Create an accumulator that will act as a parent for all future itterations of that branch\n const acc = Array.isArray(value) ? [] : {};\n\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n\n // Walk all keys of the source\n for (const innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n (acc as { [key: string]: any })[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n\n // Return accumulated values\n return acc;\n}\n\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\nexport function normalize(input: any, depth?: number): any {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return JSON.parse(JSON.stringify(input, (key: string, value: any) => walk(key, value, depth)));\n } catch (_oO) {\n return '**non-serializable**';\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: any, maxLength: number = 40): string {\n // tslint:disable:strict-type-predicates\n const keys = Object.keys(getWalkSource(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val: T): T {\n if (isPlainObject(val)) {\n const obj = val as { [key: string]: any };\n const rv: { [key: string]: any } = {};\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n return rv as T;\n }\n\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys) as any;\n }\n\n return val;\n}\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(p => !!p), !resolvedAbsolute).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n // tslint:disable:no-parameter-reassignment\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(path.split('/').filter(p => !!p), !isPathAbsolute).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n","import { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n /** Pending */\n PENDING = 'PENDING',\n /** Resolved / OK */\n RESOLVED = 'RESOLVED',\n /** Rejected / Error */\n REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<{\n onfulfilled?: ((value: T) => T | PromiseLike) | null;\n onrejected?: ((reason: any) => any) | null;\n }> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public toString(): string {\n return '[object SyncPromise]';\n }\n\n /** JSDoc */\n public static resolve(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n }\n\n /** JSDoc */\n public static reject(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n }\n\n /** JSDoc */\n public static all(collection: Array>): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n if (!Array.isArray(collection)) {\n reject(new TypeError(`Promise.all requires an array as input.`));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n let counter = collection.length;\n const resolvedCollection: U[] = [];\n\n collection.forEach((item, index) => {\n SyncPromise.resolve(item)\n .then(value => {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._attachHandler({\n onfulfilled: result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: reason => {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n // tslint:disable-next-line:no-unsafe-any\n resolve(val);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n // TODO: FIXME\n /** JSDoc */\n private readonly _attachHandler = (handler: {\n /** JSDoc */\n onfulfilled?(value: T): any;\n /** JSDoc */\n onrejected?(reason: any): any;\n }) => {\n this._handlers = this._handlers.concat(handler);\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n if (this._state === States.REJECTED) {\n this._handlers.forEach(handler => {\n if (handler.onrejected) {\n handler.onrejected(this._value);\n }\n });\n } else {\n this._handlers.forEach(handler => {\n if (handler.onfulfilled) {\n // tslint:disable-next-line:no-unsafe-any\n handler.onfulfilled(this._value);\n }\n });\n }\n\n this._handlers = [];\n };\n}\n\nexport { SyncPromise };\n","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer {\n public constructor(protected _limit?: number) {}\n\n /** Internal set of queued Promises */\n private readonly _buffer: Array> = [];\n\n /**\n * Says if the buffer is ready to take more requests\n */\n public isReady(): boolean {\n return this._limit === undefined || this.length() < this._limit;\n }\n\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns The original promise.\n */\n public add(task: PromiseLike): PromiseLike {\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n task\n .then(() => this.remove(task))\n .then(null, () =>\n this.remove(task).then(null, () => {\n // We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n public remove(task: PromiseLike): PromiseLike {\n const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n }\n\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n public length(): number {\n return this._buffer.length;\n }\n\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n public drain(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(this._buffer)\n .then(() => {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, () => {\n resolve(true);\n });\n });\n }\n}\n","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // It really needs 1 argument, not 0.\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore\n // tslint:disable:no-unused-expression\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n // tslint:disable-next-line:no-unused-expression\n new Headers();\n // tslint:disable-next-line:no-unused-expression\n new Request('');\n // tslint:disable-next-line:no-unused-expression\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\nfunction isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // tslint:disable-next-line:no-unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n if (doc) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // tslint:disable-next-line:no-unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n // tslint:disable-next-line: no-unsafe-any\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n // tslint:disable:no-unused-expression\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n const chrome = (global as any).chrome;\n // tslint:disable-next-line:no-unsafe-any\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","/* tslint:disable:only-arrow-functions no-unsafe-any */\n\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getFunctionName, getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n type: InstrumentHandlerType;\n callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n // tslint:disable-next-line:strict-type-predicates\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n return function(...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function(originalFetch: () => void): () => void {\n return function(...args: any[]): void {\n const commonHandlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...commonHandlerData,\n });\n\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n error,\n });\n throw error;\n },\n );\n };\n });\n}\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const url = args[1];\n this.__sentry_xhr__ = {\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const commonHandlerData = {\n args,\n startTimestamp: Date.now(),\n xhr,\n };\n\n triggerHandlers('xhr', {\n ...commonHandlerData,\n });\n\n xhr.addEventListener('readystatechange', function(): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function(this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n\n // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n ['EventTarget', 'Node'].forEach((target: string) => {\n const proto = (global as any)[target] && (global as any)[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerOrEventListenerObject, capture?: boolean, secure?: boolean) => void {\n if (fn && (fn as EventListenerObject).handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n } else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = fn as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n });\n}\n\nconst debounceDuration: number = 1000;\nlet debounceTimer: number = 0;\nlet keypressTimeout: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name: string, handler: Function, debounce: boolean = false): (event: Event) => void {\n return (event: Event) => {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined;\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n lastCapturedEvent = event;\n\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n if (debounce) {\n debounceTimer = setTimeout(() => {\n handler({ event, name });\n });\n } else {\n handler({ event, name });\n }\n };\n}\n\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler: Function): (event: Event) => void {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return (event: Event) => {\n let target;\n\n try {\n target = event.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n\n const tagName = target && (target as HTMLElement).tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !(target as HTMLElement).isContentEditable)) {\n return;\n }\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n clearTimeout(keypressTimeout);\n\n keypressTimeout = (setTimeout(() => {\n keypressTimeout = undefined;\n }, debounceDuration) as any) as number;\n };\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function(e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w\\.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n /** Protocol used to connect to Sentry. */\n public protocol!: DsnProtocol;\n /** Public authorization key. */\n public user!: string;\n /** private _authorization key (deprecated, optional). */\n public pass!: string;\n /** Hostname of the Sentry instance. */\n public host!: string;\n /** Port of the Sentry instance. */\n public port!: string;\n /** Path */\n public path!: string;\n /** Project ID */\n public projectId!: string;\n\n /** Creates a new Dsn component */\n public constructor(from: DsnLike) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n public toString(withPassword: boolean = false): string {\n // tslint:disable-next-line:no-this-assignment\n const { host, path, pass, port, projectId, protocol, user } = this;\n return (\n `${protocol}://${user}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }\n\n /** Parses a string into this Dsn. */\n private _fromString(str: string): void {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, user });\n }\n\n /** Maps Dsn components into this instance. */\n private _fromComponents(components: DsnComponents): void {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n }\n\n /** Validates this Dsn and throws on error. */\n private _validate(): void {\n ['protocol', 'user', 'host', 'projectId'].forEach(component => {\n if (!this[component as keyof DsnComponents]) {\n throw new SentryError(ERROR_MESSAGE);\n }\n });\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE);\n }\n }\n}\n","import {\n Breadcrumb,\n Event,\n EventHint,\n EventProcessor,\n Scope as ScopeInterface,\n Severity,\n Span,\n User,\n} from '@sentry/types';\nimport { getGlobalObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifiying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: string } = {};\n\n /** Extra */\n protected _extra: { [key: string]: any } = {};\n\n /** Contexts */\n protected _context: { [key: string]: any } = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction */\n protected _transaction?: string;\n\n /** Span */\n protected _span?: Span;\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n setTimeout(() => {\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n });\n }\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n // tslint:disable-next-line:strict-type-predicates\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransaction(transaction?: string): this {\n this._transaction = transaction;\n if (this._span) {\n (this._span as any).transaction = transaction;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: { [key: string]: any } | null): this {\n this._context = { ...this._context, [key]: context };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Internal getter for Span, used in Hub.\n * @hidden\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._context = { ...scope._context };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._transaction = scope._transaction;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n }\n return newScope;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._context = {};\n this._level = undefined;\n this._transaction = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const mergedBreadcrumb = {\n timestamp: timestampWithMs(),\n ...breadcrumb,\n };\n\n this._breadcrumbs =\n maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n ? [...this._breadcrumbs, mergedBreadcrumb].slice(-maxBreadcrumbs)\n : [...this._breadcrumbs, mergedBreadcrumb];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._context && Object.keys(this._context).length) {\n event.contexts = { ...this._context, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transaction) {\n event.transaction = this._transaction;\n }\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n}\n\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n","import {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n Event,\n EventHint,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Severity,\n Span,\n SpanContext,\n User,\n} from '@sentry/types';\nimport {\n consoleSandbox,\n dynamicRequire,\n getGlobalObject,\n isNodeEnv,\n logger,\n timestampWithMs,\n uuid4,\n} from '@sentry/utils';\n\nimport { Carrier, Layer } from './interfaces';\nimport { Scope } from './scope';\n\ndeclare module 'domain' {\n export let active: Domain;\n /**\n * Extension for domain interface\n */\n export interface Domain {\n __SENTRY__?: Carrier;\n }\n}\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be incresed when the global interface\n * changes a and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 3;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this._stack.push({ client, scope });\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n private _invokeClient(method: M, ...args: any[]): void {\n const top = this.getStackTop();\n if (top && top.client && top.client[method]) {\n (top.client as any)[method](...args, top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const stack = this.getStack();\n const parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined;\n const scope = Scope.clone(parentScope);\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n return this.getStack().pop() !== undefined;\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const top = this.getStackTop();\n\n if (!top.scope || !top.client) {\n return;\n }\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (top.client.getOptions && top.client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) {\n return;\n }\n\n const timestamp = timestampWithMs();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) {\n return;\n }\n\n top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const top = this.getStackTop();\n if (top.scope && top.client) {\n callback(top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) {\n return null;\n }\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild: boolean = false): Span {\n return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/** Returns the global shim registry. */\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Try to read the hub from an active domain, fallback to the registry if one doesnt exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n const domain = dynamicRequire(module, 'domain');\n const activeDomain = domain.active;\n\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return carrier.__SENTRY__.hub;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) {\n return false;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n","import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport { Breadcrumb, Event, Severity, User } from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\nfunction callOnHub(method: string, ...args: any[]): T {\n const hub = getCurrentHub();\n if (hub && hub[method as keyof Hub]) {\n // tslint:disable-next-line:no-unsafe-any\n return (hub[method as keyof Hub] as any)(...args);\n }\n throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\nexport function captureException(exception: any): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException,\n });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, level?: Severity): string {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureMessage', message, level, {\n originalException: message,\n syntheticException,\n });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n callOnHub('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n callOnHub('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: { [key: string]: any }): void {\n callOnHub('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: string }): void {\n callOnHub('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n\nexport function setExtra(key: string, extra: any): void {\n callOnHub('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\nexport function setTag(key: string, value: string): void {\n callOnHub('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n callOnHub('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n callOnHub('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\nexport function _callOnClient(method: string, ...args: any[]): void {\n callOnHub('_invokeClient', method, ...args);\n}\n","import { DsnLike } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Helper class to provide urls to different Sentry endpoints. */\nexport class API {\n /** The internally used Dsn object. */\n private readonly _dsnObject: Dsn;\n /** Create a new instance of API */\n public constructor(public dsn: DsnLike) {\n this._dsnObject = new Dsn(dsn);\n }\n\n /** Returns the Dsn object. */\n public getDsn(): Dsn {\n return this._dsnObject;\n }\n\n /** Returns a string with auth headers in the url to the store endpoint. */\n public getStoreEndpoint(): string {\n return `${this._getBaseUrl()}${this.getStoreEndpointPath()}`;\n }\n\n /** Returns the store endpoint with auth added in url encoded. */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n const dsn = this._dsnObject;\n const auth = {\n sentry_key: dsn.user, // sentry_key is currently used in tracing integration to identify internal sentry requests\n sentry_version: SENTRY_API_VERSION,\n };\n // Auth is intentionally sent as part of query string (NOT as custom HTTP header)\n // to avoid preflight CORS requests\n return `${this.getStoreEndpoint()}?${urlEncode(auth)}`;\n }\n\n /** Returns the base path of the url including the port. */\n private _getBaseUrl(): string {\n const dsn = this._dsnObject;\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}`;\n }\n\n /** Returns only the path component for the store endpoint. */\n public getStoreEndpointPath(): string {\n const dsn = this._dsnObject;\n return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n }\n\n /** Returns an object that can be used in request headers. */\n public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n const dsn = this._dsnObject;\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.user}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n }\n\n /** Returns the url to the report dialog endpoint. */\n public getReportDialogEndpoint(\n dialogOptions: {\n [key: string]: any;\n user?: { name?: string; email?: string };\n } = {},\n ): string {\n const dsn = this._dsnObject;\n const endpoint = `${this._getBaseUrl()}${dsn.path ? `/${dsn.path}` : ''}/api/embed/error-page/`;\n\n const encodedOptions = [];\n encodedOptions.push(`dsn=${dsn.toString()}`);\n for (const key in dialogOptions) {\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n }\n } else {\n encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n }\n }\n if (encodedOptions.length) {\n return `${endpoint}?${encodedOptions.join('&')}`;\n }\n\n return endpoint;\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport interface IntegrationIndex {\n [key: string]: Integration;\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n let integrations: Integration[] = [];\n if (Array.isArray(userIntegrations)) {\n const userIntegrationsNames = userIntegrations.map(i => i.name);\n const pickedIntegrationsNames: string[] = [];\n\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(defaultIntegration => {\n if (\n userIntegrationsNames.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames.indexOf(defaultIntegration.name) === -1\n ) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames.push(defaultIntegration.name);\n }\n });\n\n // Don't add same user integration twice\n userIntegrations.forEach(userIntegration => {\n if (pickedIntegrationsNames.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames.push(userIntegration.name);\n }\n });\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n } else {\n integrations = [...defaultIntegrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}\n","import { Scope } from '@sentry/hub';\nimport { Client, Event, EventHint, Integration, IntegrationClass, Options, SdkInfo, Severity } from '@sentry/types';\nimport { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, truncate, uuid4 } from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the enviornment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: Dsn;\n\n /** Array of used integrations. */\n protected readonly _integrations: IntegrationIndex = {};\n\n /** Is the client still processing a call? */\n protected _processing: boolean = false;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n this._processing = true;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(`${message}`, level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n promisedEvent\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._processEvent(event, hint, scope)\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): Dsn | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientProcessing(timeout).then(status => {\n clearInterval(status.interval);\n return this._getBackend()\n .getTransport()\n .close(timeout)\n .then(transportFlushed => status.ready && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * @inheritDoc\n */\n public getIntegrations(): IntegrationIndex {\n return this._integrations || {};\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Waits for the client to be done with processing. */\n protected _isClientProcessing(timeout?: number): PromiseLike<{ ready: boolean; interval: number }> {\n return new SyncPromise<{ ready: boolean; interval: number }>(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n let interval = 0;\n clearInterval(interval);\n\n interval = (setInterval(() => {\n if (!this._processing) {\n resolve({\n interval,\n ready: true,\n });\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n resolve({\n interval,\n ready: false,\n });\n }\n }\n }, tick) as unknown) as number;\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { environment, release, dist, maxValueLength = 250, normalizeDepth = 3 } = this.getOptions();\n\n const prepared: Event = { ...event };\n if (prepared.environment === undefined && environment !== undefined) {\n prepared.environment = environment;\n }\n if (prepared.release === undefined && release !== undefined) {\n prepared.release = release;\n }\n\n if (prepared.dist === undefined && dist !== undefined) {\n prepared.dist = dist;\n }\n\n if (prepared.message) {\n prepared.message = truncate(prepared.message, maxValueLength);\n }\n\n const exception = prepared.exception && prepared.exception.values && prepared.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = prepared.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n\n if (prepared.event_id === undefined) {\n prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4();\n }\n\n this._addIntegrations(prepared.sdk);\n\n // We prepare the result here with a resolved Event.\n let result = SyncPromise.resolve(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (scope) {\n // In case we have a hub we reassign it.\n result = scope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n // tslint:disable:no-unsafe-any\n return {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n protected _addIntegrations(sdkInfo?: SdkInfo): void {\n const integrationsArray = Object.keys(this._integrations);\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n const { beforeSend, sampleRate } = this.getOptions();\n\n if (!this._isEnabled()) {\n return SyncPromise.reject('SDK not enabled, will not send event.');\n }\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n if (typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject('This event has been sampled, will not send event.');\n }\n\n return new SyncPromise((resolve, reject) => {\n this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n reject('An event processor returned null, will not send event.');\n return;\n }\n\n let finalEvent: Event | null = prepared;\n\n const isInternalException = hint && hint.data && (hint.data as { [key: string]: any }).__sentry__ === true;\n if (isInternalException || !beforeSend) {\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n return;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n // tslint:disable-next-line:strict-type-predicates\n if (typeof beforeSendResult === 'undefined') {\n logger.error('`beforeSend` method has to return `null` or a valid event.');\n } else if (isThenable(beforeSendResult)) {\n this._handleAsyncBeforeSend(beforeSendResult as PromiseLike, resolve, reject);\n } else {\n finalEvent = beforeSendResult as Event | null;\n\n if (finalEvent === null) {\n logger.log('`beforeSend` returned `null`, will not send event.');\n resolve(null);\n return;\n }\n\n // From here on we are really async\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n }\n })\n .then(null, reason => {\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n reject(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n });\n }\n\n /**\n * Resolves before send Promise and calls resolve/reject on parent SyncPromise.\n */\n private _handleAsyncBeforeSend(\n beforeSend: PromiseLike,\n resolve: (event: Event) => void,\n reject: (reason: string) => void,\n ): void {\n beforeSend\n .then(processedEvent => {\n if (processedEvent === null) {\n reject('`beforeSend` returned `null`, will not send event.');\n return;\n }\n // From here on we are really async\n this._getBackend().sendEvent(processedEvent);\n resolve(processedEvent);\n })\n .then(null, e => {\n reject(`beforeSend rejected with ${e}`);\n });\n }\n}\n","import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return SyncPromise.resolve({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: Status.Skipped,\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return SyncPromise.resolve(true);\n }\n}\n","import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instanciate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates a {@link Event} from an exception. */\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates a {@link Event} from a plain message. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instanciate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n this._transport.sendEvent(event).then(null, reason => {\n logger.error(`Error while sending event: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n}\n","import { getCurrentHub } from '@sentry/hub';\nimport { Client, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** A class object that can instanciate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instanciate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass: ClientClass, options: O): void {\n if (options.debug === true) {\n logger.enable();\n }\n getCurrentHub().bindClient(new clientClass(options));\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n originalFunctionToString = Function.prototype.toString;\n\n Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n const context = this.__sentry_original__ || this;\n // tslint:disable-next-line:no-unsafe-any\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n blacklistUrls?: Array;\n ignoreErrors?: Array;\n ignoreInternal?: boolean;\n whitelistUrls?: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n public constructor(private readonly _options: InboundFiltersOptions = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n const options = self._mergeOptions(clientOptions);\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: InboundFiltersOptions): boolean {\n if (this._isSentryError(event, options)) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (this._isBlacklistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`blacklistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!this._isWhitelistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to not being matched by \\`whitelistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return (\n (event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false\n );\n } catch (_oO) {\n return false;\n }\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isBlacklistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.blacklistUrls || !options.blacklistUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.blacklistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isWhitelistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.whitelistUrls || !options.whitelistUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.whitelistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: InboundFiltersOptions = {}): InboundFiltersOptions {\n return {\n blacklistUrls: [...(this._options.blacklistUrls || []), ...(clientOptions.blacklistUrls || [])],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n whitelistUrls: [...(this._options.whitelistUrls || []), ...(clientOptions.whitelistUrls || [])],\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n const frames = event.stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n if (event.exception) {\n const frames =\n event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n return null;\n } catch (oO) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n }\n}\n","// tslint:disable:object-literal-sort-keys\n\n/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n args: string[];\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js))(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n/** JSDoc */\nexport function computeStackTrace(ex: any): StackTrace {\n // tslint:disable:no-unsafe-any\n\n let stack = null;\n const popSize: number = ex && ex.framesToPop;\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n // tslint:disable:no-conditional-assignment\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (let i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = (ex.columnNumber as number) + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n // tslint:disable:no-conditional-assignment\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .slice(0, STACKTRACE_LIMIT)\n .reverse();\n}\n","import { Event } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/** JSDoc */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n rejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n const domException = exception as DOMException;\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const objectException = exception as {};\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n// this._options.attachStacktrace\n/** JSDoc */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n","import { API } from '@sentry/core';\nimport { Event, Response, Transport, TransportOptions } from '@sentry/types';\nimport { PromiseBuffer, SentryError } from '@sentry/utils';\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @inheritDoc\n */\n public url: string;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n public constructor(public options: TransportOptions) {\n this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth();\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n}\n","import { Event, Response, Status } from '@sentry/types';\nimport { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\nconst global = getGlobalObject();\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n const defaultOptions: RequestInit = {\n body: JSON.stringify(event),\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n\n if (this.options.headers !== undefined) {\n defaultOptions.headers = this.options.headers;\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n global\n .fetch(this.url, defaultOptions)\n .then(response => {\n const status = Status.fromHttpCode(response.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(response);\n })\n .catch(reject);\n }),\n );\n }\n}\n","import { Event, Response, Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = () => {\n if (request.readyState !== 4) {\n return;\n }\n\n const status = Status.fromHttpCode(request.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(request);\n };\n\n request.open('POST', this.url);\n for (const header in this.options.headers) {\n if (this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(JSON.stringify(event));\n }),\n );\n }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils';\n\nimport { eventFromString, eventFromUnknownInput } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To whitelist certain errors instead, use {@link Options.whitelistUrls}.\n * By default, all errors will be sent.\n */\n blacklistUrls?: Array;\n\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.blacklistUrls}.\n * By default, all errors will be sent.\n */\n whitelistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n}\n","export const SDK_NAME = 'sentry.javascript.browser';\nexport const SDK_VERSION = '5.14.1';\n","import { API, BaseClient, Scope } from '@sentry/core';\nimport { DsnLike, Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n super(BrowserBackend, options);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n event.sdk = {\n ...event.sdk,\n name: SDK_NAME,\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client is disabled');\n return;\n }\n\n const dsn = options.dsn || this.getDsn();\n\n if (!options.eventId) {\n logger.error('Missing `eventId` option in showReportDialog call');\n return;\n }\n\n if (!dsn) {\n logger.error('Missing `Dsn` option in showReportDialog call');\n return;\n }\n\n const script = document.createElement('script');\n script.async = true;\n script.src = new API(dsn).getReportDialogEndpoint(options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n (document.head || document.body).appendChild(script);\n }\n}\n","import { captureException, withScope } from '@sentry/core';\nimport { Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils';\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n): any {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n const sentryWrapped: WrappedFunction = function(this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n // tslint:disable:no-unsafe-any\n try {\n // tslint:disable-next-line:strict-type-predicates\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n // tslint:enable:no-unsafe-any\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n const processedEvent = { ...event };\n\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n\n processedEvent.extra = {\n ...processedEvent.extra,\n arguments: args,\n };\n\n return processedEvent;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // tslint:disable-line:no-empty\n\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n } catch (_oO) {\n /*no-empty*/\n }\n\n return sentryWrapped;\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n onerror: boolean;\n onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /** JSDoc */\n private _onErrorHandlerInstalled: boolean = false;\n\n /** JSDoc */\n private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n }\n\n /** JSDoc */\n private _installGlobalOnErrorHandler(): void {\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const error = data.error;\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : this._enhanceEventWithInitialFrame(\n eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }),\n data.url,\n data.line,\n data.column,\n );\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n\n this._onErrorHandlerInstalled = true;\n }\n\n /** JSDoc */\n private _installGlobalOnUnhandledRejectionHandler(): void {\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (e: any) => {\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteRejection(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n\n event.level = Severity.Error;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n\n return;\n },\n type: 'unhandledrejection',\n });\n\n this._onUnhandledRejectionHandlerInstalled = true;\n }\n\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name;\n\n if (isString(message)) {\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n }\n\n /**\n * This function creates an Event from an TraceKitStackTrace that has part of it missing.\n */\n private _eventFromIncompleteRejection(error: any): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n value: `Non-Error promise rejection captured with value: ${error}`,\n },\n ],\n },\n };\n }\n\n /** JSDoc */\n private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /** JSDoc */\n private _ignoreOnError: number = 0;\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /** JSDoc */\n private _wrapTimeFunction(original: () => void): () => number {\n return function(this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n }\n\n /** JSDoc */\n private _wrapRAF(original: any): (callback: () => void) => any {\n return function(this: any, callback: () => void): () => void {\n return original(\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n }\n\n /** JSDoc */\n private _wrapEventTarget(target: string): void {\n const global = getGlobalObject() as { [key: string]: any };\n const proto = global[target] && global[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n // tslint:disable-next-line:no-unbound-method strict-type-predicates\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n wrap((fn as any) as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = (fn as any) as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n }\n\n /** JSDoc */\n private _wrapXHR(originalSend: () => void): () => void {\n return function(this: XMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function(original: WrappedFunction): Function {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n this._ignoreOnError = this._ignoreOnError;\n\n const global = getGlobalObject();\n\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n\n if ('XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n ].forEach(this._wrapEventTarget.bind(this));\n }\n}\n","import { API, getCurrentHub } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n} from '@sentry/utils';\n\nimport { BrowserClient } from '../client';\n\n/**\n * @hidden\n */\nexport interface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** JSDoc */\ninterface BreadcrumbIntegrations {\n console?: boolean;\n dom?: boolean;\n fetch?: boolean;\n history?: boolean;\n sentry?: boolean;\n xhr?: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /** JSDoc */\n private readonly _options: BreadcrumbIntegrations;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: BreadcrumbIntegrations) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Creates breadcrumbs from console API calls\n */\n private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }\n\n /**\n * Creates breadcrumbs from DOM API calls\n */\n private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node)\n : htmlTreeAsString((handlerData.event as unknown) as Node);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n },\n );\n }\n\n /**\n * Creates breadcrumbs from XHR API calls\n */\n private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: handlerData.xhr.__sentry_xhr__,\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n },\n );\n\n return;\n }\n\n // We only capture issued sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n addSentryBreadcrumb(handlerData.args[0]);\n }\n }\n\n /**\n * Creates breadcrumbs from fetch API calls\n */\n private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n const client = getCurrentHub().getClient();\n const dsn = client && client.getDsn();\n\n if (dsn) {\n const filterUrl = new API(dsn).getStoreEndpoint();\n // if Sentry key appears in URL, don't capture it as a request\n // but rather as our own 'sentry' type breadcrumb\n if (\n filterUrl &&\n handlerData.fetchData.url.indexOf(filterUrl) !== -1 &&\n handlerData.fetchData.method === 'POST' &&\n handlerData.args[1] &&\n handlerData.args[1].body\n ) {\n addSentryBreadcrumb(handlerData.args[1].body);\n return;\n }\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }\n\n /**\n * Creates breadcrumbs from history API calls\n */\n private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._consoleBreadcrumb(...args);\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._domBreadcrumb(...args);\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._xhrBreadcrumb(...args);\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._fetchBreadcrumb(...args);\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._historyBreadcrumb(...args);\n },\n type: 'history',\n });\n }\n }\n}\n\n/**\n * Create a breadcrumb of `sentry` from the events themselves\n */\nfunction addSentryBreadcrumb(serializedData: string): void {\n // There's always something that can go wrong with deserialization...\n try {\n const event = JSON.parse(serializedData);\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level || Severity.fromString('error'),\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n } catch (_oO) {\n logger.error('Error while adding sentry type breadcrumb');\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return self._handler(event, hint);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n }\n\n /**\n * @inheritDoc\n */\n private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, [exception, ...stack]);\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n if (!global.navigator || !global.location) {\n return event;\n }\n\n // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/\n const request = event.request || {};\n request.url = request.url || global.location.href;\n request.headers = request.headers || {};\n request.headers['User-Agent'] = global.navigator.userAgent;\n\n return {\n ...event,\n request,\n };\n }\n return event;\n });\n }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient, ReportDialogOptions } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n initAndBind(BrowserClient, options);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n const client = getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\nexport function wrap(fn: Function): any {\n return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any\n}\n","export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports };\n"],"names":["Severity","Status","global","CoreIntegrations.InboundFilters","CoreIntegrations.FunctionToString","wrap","internalWrap"],"mappings":";EAAA;AACA,EAAA,IAAY,QASX;EATD,WAAY,QAAQ;;MAElB,uCAAQ,CAAA;;MAER,yCAAS,CAAA;;MAET,yCAAS,CAAA;;MAET,6CAAW,CAAA;EACb,CAAC,EATW,QAAQ,KAAR,QAAQ,QASnB;;ECVD;AACA,EAAA,WAAY,QAAQ;;MAElB,2BAAe,CAAA;;MAEf,2BAAe,CAAA;;MAEf,+BAAmB,CAAA;;MAEnB,uBAAW,CAAA;;MAEX,yBAAa,CAAA;;MAEb,2BAAe,CAAA;;MAEf,iCAAqB,CAAA;EACvB,CAAC,EAfWA,gBAAQ,KAARA,gBAAQ,QAenB;EACD;EACA;EACA,WAAiB,QAAQ;;;;;;;MAOvB,SAAgB,UAAU,CAAC,KAAa;UACtC,QAAQ,KAAK;cACX,KAAK,OAAO;kBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;cACxB,KAAK,MAAM;kBACT,OAAO,QAAQ,CAAC,IAAI,CAAC;cACvB,KAAK,MAAM,CAAC;cACZ,KAAK,SAAS;kBACZ,OAAO,QAAQ,CAA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AM,CAAC,KAAK,CAAC,CAAC;EACnC,CAAC;EAED;;;;;;;AAOA,WAAgBC,MAAI,CAAC,EAAY;MAC/B,OAAOC,IAAY,CAAC,EAAE,CAAC,EAAE,CAAC;EAC5B,CAAC;;EC9JD,IAAI,kBAAkB,GAAG,EAAE,CAAC;EAE5B;EACA;EACA,MAAM,OAAO,GAAG,eAAe,EAAU,CAAC;EAC1C,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE;MACjD,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;GAClD;EACD;AAEA,QAAM,YAAY,qBACb,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,CACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/build/bundle.es6.min.js b/node_modules/@sentry/browser/build/bundle.es6.min.js deleted file mode 100644 index 6024e00..0000000 --- a/node_modules/@sentry/browser/build/bundle.es6.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! @sentry/browser 5.14.1 (de33eb09) | https://github.com/getsentry/sentry-javascript */ -var Sentry=function(t){var e,n,r,i;!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(e||(e={})),(n=t.Severity||(t.Severity={})).Fatal="fatal",n.Error="error",n.Warning="warning",n.Log="log",n.Info="info",n.Debug="debug",n.Critical="critical",function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(t.Severity||(t.Severity={})),function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(r||(r={})),function(t){t.fromHttpCode=function(e){if(e<400)return t.Ok;if(e>=400&&e<500)switch(e){case 401:return t.Unauthenticated;case 403:return t.PermissionDenied;case 404:return t.NotFound;case 409:return t.AlreadyExists;case 413:return t.FailedPrecondition;case 429:return t.ResourceExhausted;default:return t.InvalidArgument}if(e>=500&&e<600)switch(e){case 501:return t.Unimplemented;case 503:return t.Unavailable;case 504:return t.DeadlineExceeded;default:return t.InternalError}return t.UnknownError}}(r||(r={})),(i=t.Status||(t.Status={})).Unknown="unknown",i.Skipped="skipped",i.Success="success",i.RateLimit="rate_limit",i.Invalid="invalid",i.Failed="failed",function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));const s=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t});class o extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,s(this,new.target.prototype)}}function c(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return y(t,Error)}}function u(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function a(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function h(t){return"[object String]"===Object.prototype.toString.call(t)}function l(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function f(t){return"[object Object]"===Object.prototype.toString.call(t)}function d(t){return"undefined"!=typeof Event&&y(t,Event)}function p(t){return"undefined"!=typeof Element&&y(t,Element)}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t,e){try{return t instanceof e}catch(t){return!1}}function v(t,e=0){return"string"!=typeof t||0===e?t:t.length<=e?t:`${t.substr(0,e)}...`}function b(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function _(t){if(!t)return{};const e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function $(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){const e=t.exception.values[0];return e.type&&e.value?`${e.type}: ${e.value}`:e.type||e.value||t.event_id||""}return t.event_id||""}function k(t){const e=x();if(!("console"in e))return t();const n=e.console,r={};["debug","info","warn","error","log","assert"].forEach(t=>{t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)});const i=t();return Object.keys(r).forEach(t=>{n[t]=r[t]}),i}function S(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function T(t,e={}){try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach(n=>{t.exception.values[0].mechanism[n]=e[n]})}catch(t){}}function D(t){try{let e=t;const n=5,r=80,i=[];let s=0,o=0;const c=" > ",u=c.length;let a;for(;e&&s++1&&o+i.length*u+a.length>=r);)i.push(a),o+=a.length,e=e.parentNode;return i.reverse().join(c)}catch(t){return""}}function R(t){const e=t,n=[];let r,i,s,o,c;if(!e||!e.tagName)return"";if(n.push(e.tagName.toLowerCase()),e.id&&n.push(`#${e.id}`),(r=e.className)&&h(r))for(i=r.split(/\s+/),c=0;c{if(E())try{return w(module,"perf_hooks").performance}catch(t){return C}if(x().performance&&void 0===performance.timeOrigin){if(!performance.timing)return C;if(!performance.timing.navigationStart)return C;performance.timeOrigin=performance.timing.navigationStart}return x().performance||C})();function U(){return(M.timeOrigin+M.now())/1e3}const A=6e4;function L(t,e){if(!e)return A;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?A:r-t}const F="";function q(t){try{return t&&"function"==typeof t&&t.name||F}catch(t){return F}}const B=x(),H="Sentry Logger ";B.__SENTRY__=B.__SENTRY__||{};const P=B.__SENTRY__.logger||(B.__SENTRY__.logger=new class{constructor(){this.t=!1}disable(){this.t=!1}enable(){this.t=!0}log(...t){this.t&&k(()=>{B.console.log(`${H}[Log]: ${t.join(" ")}`)})}warn(...t){this.t&&k(()=>{B.console.warn(`${H}[Warn]: ${t.join(" ")}`)})}error(...t){this.t&&k(()=>{B.console.error(`${H}[Error]: ${t.join(" ")}`)})}});class W{constructor(){this.i="function"==typeof WeakSet,this.s=this.i?new WeakSet:[]}memoize(t){if(this.i)return!!this.s.has(t)||(this.s.add(t),!1);for(let e=0;e"}try{n.currentTarget=p(e.currentTarget)?D(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget=""}"undefined"!=typeof CustomEvent&&y(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e);return n}return t}function z(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function J(t,e=3,n=102400){const r=Q(t,e);return z(r)>n?J(t,e-1,n):r}function V(t,e){return"domain"===e&&t&&"object"==typeof t&&t.o?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":f(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${q(t)}]`:t;var n}function K(t,e,n=1/0,r=new W){if(0===n)return function(t){const e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";const n=V(t);return l(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=V(e,t);if(l(i))return i;const s=G(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=K(t,s[t],n-1,r));return r.unmemoize(e),o}function Q(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>K(t,n,e)))}catch(t){return"**non-serializable**"}}function Y(t,e=40){const n=Object.keys(G(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return v(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:v(r,e)}return""}var Z;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(Z||(Z={}));class tt{constructor(t){this.u=Z.PENDING,this.h=[],this.l=(t=>{this.p(Z.RESOLVED,t)}),this.m=(t=>{this.p(Z.REJECTED,t)}),this.p=((t,e)=>{this.u===Z.PENDING&&(m(e)?e.then(this.l,this.m):(this.u=t,this.v=e,this.g()))}),this.j=(t=>{this.h=this.h.concat(t),this.g()}),this.g=(()=>{this.u!==Z.PENDING&&(this.u===Z.REJECTED?this.h.forEach(t=>{t.onrejected&&t.onrejected(this.v)}):this.h.forEach(t=>{t.onfulfilled&&t.onfulfilled(this.v)}),this.h=[])});try{t(this.l,this.m)}catch(t){this.m(t)}}toString(){return"[object SyncPromise]"}static resolve(t){return new tt(e=>{e(t)})}static reject(t){return new tt((e,n)=>{n(t)})}static all(t){return new tt((e,n)=>{if(!Array.isArray(t))return void n(new TypeError("Promise.all requires an array as input."));if(0===t.length)return void e([]);let r=t.length;const i=[];t.forEach((t,s)=>{tt.resolve(t).then(t=>{i[s]=t,0===(r-=1)&&e(i)}).then(null,n)})})}then(t,e){return new tt((n,r)=>{this.j({onfulfilled:e=>{if(t)try{return void n(t(e))}catch(t){return void r(t)}else n(e)},onrejected:t=>{if(e)try{return void n(e(t))}catch(t){return void r(t)}else r(t)}})})}catch(t){return this.then(t=>t,t)}finally(t){return new tt((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}}class et{constructor(t){this.O=t,this._=[]}isReady(){return void 0===this.O||this.length()this.remove(t)).then(null,()=>this.remove(t).then(null,()=>{})),t):tt.reject(new o("Not adding Promise due to buffer limit reached."))}remove(t){return this._.splice(this._.indexOf(t),1)[0]}length(){return this._.length}drain(t){return new tt(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);tt.all(this._).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}function nt(){if(!("fetch"in x()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function rt(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function it(){if(!nt())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const st=x(),ot={},ct={};function ut(t){if(!ct[t])switch(ct[t]=!0,t){case"console":!function(){if(!("console"in st))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in st.console&&X(st.console,t,function(e){return function(...n){ht("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,st.console,n)}})})}();break;case"dom":!function(){if(!("document"in st))return;st.document.addEventListener("click",bt("click",ht.bind(null,"dom")),!1),st.document.addEventListener("keypress",gt(ht.bind(null,"dom")),!1),["EventTarget","Node"].forEach(t=>{const e=st[t]&&st[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(X(e,"addEventListener",function(t){return function(e,n,r){return n&&n.handleEvent?("click"===e&&X(n,"handleEvent",function(t){return function(e){return bt("click",ht.bind(null,"dom"))(e),t.call(this,e)}}),"keypress"===e&&X(n,"handleEvent",function(t){return function(e){return gt(ht.bind(null,"dom"))(e),t.call(this,e)}})):("click"===e&&bt("click",ht.bind(null,"dom"),!0)(this),"keypress"===e&>(ht.bind(null,"dom"))(this)),t.call(this,e,n,r)}}),X(e,"removeEventListener",function(t){return function(e,n,r){let i=n;try{i=i&&(i.__sentry_wrapped__||i)}catch(t){}return t.call(this,e,i,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in st))return;const t=XMLHttpRequest.prototype;X(t,"open",function(t){return function(...e){const n=e[1];return this.__sentry_xhr__={method:h(e[0])?e[0].toUpperCase():e[0],url:e[1]},h(n)&&"POST"===this.__sentry_xhr__.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0),t.apply(this,e)}}),X(t,"send",function(t){return function(...e){const n=this,r={args:e,startTimestamp:Date.now(),xhr:n};return ht("xhr",Object.assign({},r)),n.addEventListener("readystatechange",function(){if(4===n.readyState){try{n.__sentry_xhr__&&(n.__sentry_xhr__.status_code=n.status)}catch(t){}ht("xhr",Object.assign({},r,{endTimestamp:Date.now()}))}}),t.apply(this,e)}})}();break;case"fetch":!function(){if(!function(){if(!nt())return!1;const t=x();if(rt(t.fetch))return!0;let e=!1;const n=t.document;if(n)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(e=rt(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){P.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;X(st,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:lt(e),url:ft(e)},startTimestamp:Date.now()};return ht("fetch",Object.assign({},n)),t.apply(st,e).then(t=>(ht("fetch",Object.assign({},n,{endTimestamp:Date.now(),response:t})),t),t=>{throw ht("fetch",Object.assign({},n,{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=x(),e=t.chrome,n=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&r}())return;const t=st.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=dt,e=String(n);dt=e,ht("history",{from:t,to:e})}return t.apply(this,e)}}st.onpopstate=function(...e){const n=st.location.href,r=dt;if(dt=n,ht("history",{from:r,to:n}),t)return t.apply(this,e)},X(st.history,"pushState",e),X(st.history,"replaceState",e)}();break;case"error":wt=st.onerror,st.onerror=function(t,e,n,r,i){return ht("error",{column:r,error:i,line:n,msg:t,url:e}),!!wt&&wt.apply(this,arguments)};break;case"unhandledrejection":Et=st.onunhandledrejection,st.onunhandledrejection=function(t){return ht("unhandledrejection",t),!Et||Et.apply(this,arguments)};break;default:P.warn("unknown instrumentation type:",t)}}function at(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(ot[t.type]=ot[t.type]||[],ot[t.type].push(t.callback),ut(t.type))}function ht(t,e){if(t&&ot[t])for(const n of ot[t]||[])try{n(e)}catch(e){P.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${q(n)}\nError: ${e}`)}}function lt(t=[]){return"Request"in st&&y(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function ft(t=[]){return"string"==typeof t[0]?t[0]:"Request"in st&&y(t[0],Request)?t[0].url:String(t[0])}let dt;const pt=1e3;let mt,yt,vt=0;function bt(t,e,n=!1){return r=>{mt=void 0,r&&yt!==r&&(yt=r,vt&&clearTimeout(vt),n?vt=setTimeout(()=>{e({event:r,name:t})}):e({event:r,name:t}))}}function gt(t){return e=>{let n;try{n=e.target}catch(t){return}const r=n&&n.tagName;r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)&&(mt||bt("input",t)(e),clearTimeout(mt),mt=setTimeout(()=>{mt=void 0},pt))}}let wt=null;let Et=null;const jt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,xt="Invalid Dsn";class Ot{constructor(t){"string"==typeof t?this.$(t):this.k(t),this.S()}toString(t=!1){const{host:e,path:n,pass:r,port:i,projectId:s,protocol:o,user:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${e}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}$(t){const e=jt.exec(t);if(!e)throw new o(xt);const[n,r,i="",s,c="",u]=e.slice(1);let a="",h=u;const l=h.split("/");l.length>1&&(a=l.slice(0,-1).join("/"),h=l.pop()),this.k({host:s,pass:i,path:a,projectId:h,port:c,protocol:n,user:r})}k(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId}S(){if(["protocol","user","host","projectId"].forEach(t=>{if(!this[t])throw new o(xt)}),"http"!==this.protocol&&"https"!==this.protocol)throw new o(xt);if(this.port&&isNaN(parseInt(this.port,10)))throw new o(xt)}}class _t{constructor(){this.T=!1,this.D=[],this.R=[],this.I=[],this.N={},this.C={},this.M={},this.U={}}addScopeListener(t){this.D.push(t)}addEventProcessor(t){return this.R.push(t),this}A(){this.T||(this.T=!0,setTimeout(()=>{this.D.forEach(t=>{t(this)}),this.T=!1}))}L(t,e,n,r=0){return new tt((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);m(c)?c.then(e=>this.L(t,e,n,r+1).then(i)).then(null,s):this.L(t,c,n,r+1).then(i).then(null,s)}})}setUser(t){return this.N=t||{},this.A(),this}setTags(t){return this.C=Object.assign({},this.C,t),this.A(),this}setTag(t,e){return this.C=Object.assign({},this.C,{[t]:e}),this.A(),this}setExtras(t){return this.M=Object.assign({},this.M,t),this.A(),this}setExtra(t,e){return this.M=Object.assign({},this.M,{[t]:e}),this.A(),this}setFingerprint(t){return this.F=t,this.A(),this}setLevel(t){return this.q=t,this.A(),this}setTransaction(t){return this.B=t,this.H&&(this.H.transaction=t),this.A(),this}setContext(t,e){return this.U=Object.assign({},this.U,{[t]:e}),this.A(),this}setSpan(t){return this.H=t,this.A(),this}getSpan(){return this.H}static clone(t){const e=new _t;return t&&(e.I=[...t.I],e.C=Object.assign({},t.C),e.M=Object.assign({},t.M),e.U=Object.assign({},t.U),e.N=t.N,e.q=t.q,e.H=t.H,e.B=t.B,e.F=t.F,e.R=[...t.R]),e}clear(){return this.I=[],this.C={},this.M={},this.N={},this.U={},this.q=void 0,this.B=void 0,this.F=void 0,this.H=void 0,this.A(),this}addBreadcrumb(t,e){const n=Object.assign({timestamp:U()},t);return this.I=void 0!==e&&e>=0?[...this.I,n].slice(-e):[...this.I,n],this.A(),this}clearBreadcrumbs(){return this.I=[],this.A(),this}P(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.F&&(t.fingerprint=t.fingerprint.concat(this.F)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}applyToEvent(t,e){return this.M&&Object.keys(this.M).length&&(t.extra=Object.assign({},this.M,t.extra)),this.C&&Object.keys(this.C).length&&(t.tags=Object.assign({},this.C,t.tags)),this.N&&Object.keys(this.N).length&&(t.user=Object.assign({},this.N,t.user)),this.U&&Object.keys(this.U).length&&(t.contexts=Object.assign({},this.U,t.contexts)),this.q&&(t.level=this.q),this.B&&(t.transaction=this.B),this.H&&(t.contexts=Object.assign({trace:this.H.getTraceContext()},t.contexts)),this.P(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.I],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.L([...$t(),...this.R],t,e)}}function $t(){const t=x();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function kt(t){$t().push(t)}const St=3,Tt=100,Dt=100;class Rt{constructor(t,e=new _t,n=St){this.W=n,this.X=[],this.X.push({client:t,scope:e})}G(t,...e){const n=this.getStackTop();n&&n.client&&n.client[t]&&n.client[t](...e,n.scope)}isOlderThan(t){return this.W0?t[t.length-1].scope:void 0,n=_t.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n}popScope(){return void 0!==this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.X}getStackTop(){return this.X[this.X.length-1]}captureException(t,e){const n=this.J=O();let r=e;if(!e){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}r={originalException:t,syntheticException:e}}return this.G("captureException",t,Object.assign({},r,{event_id:n})),n}captureMessage(t,e,n){const r=this.J=O();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.G("captureMessage",t,e,Object.assign({},i,{event_id:r})),r}captureEvent(t,e){const n=this.J=O();return this.G("captureEvent",t,Object.assign({},e,{event_id:n})),n}lastEventId(){return this.J}addBreadcrumb(t,e){const n=this.getStackTop();if(!n.scope||!n.client)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:i=Tt}=n.client.getOptions&&n.client.getOptions()||{};if(i<=0)return;const s=U(),o=Object.assign({timestamp:s},t),c=r?k(()=>r(o,e)):o;null!==c&&n.scope.addBreadcrumb(c,Math.min(i,Dt))}setUser(t){const e=this.getStackTop();e.scope&&e.scope.setUser(t)}setTags(t){const e=this.getStackTop();e.scope&&e.scope.setTags(t)}setExtras(t){const e=this.getStackTop();e.scope&&e.scope.setExtras(t)}setTag(t,e){const n=this.getStackTop();n.scope&&n.scope.setTag(t,e)}setExtra(t,e){const n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)}setContext(t,e){const n=this.getStackTop();n.scope&&n.scope.setContext(t,e)}configureScope(t){const e=this.getStackTop();e.scope&&e.client&&t(e.scope)}run(t){const e=Nt(this);try{t(this)}finally{Nt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return P.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t,e=!1){return this.V("startSpan",t,e)}traceHeaders(){return this.V("traceHeaders")}V(t,...e){const n=It().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);P.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function It(){const t=x();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Nt(t){const e=It(),n=Ut(e);return At(e,t),n}function Ct(){const t=It();return Mt(t)&&!Ut(t).isOlderThan(St)||At(t,new Rt),E()?function(t){try{const e=w(module,"domain"),n=e.active;if(!n)return Ut(t);if(!Mt(n)||Ut(n).isOlderThan(St)){const e=Ut(t).getStackTop();At(n,new Rt(e.client,_t.clone(e.scope)))}return Ut(n)}catch(e){return Ut(t)}}(t):Ut(t)}function Mt(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Ut(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new Rt,t.__SENTRY__.hub)}function At(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function Lt(t,...e){const n=Ct();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}return Lt("captureException",t,{originalException:t,syntheticException:e})}function Ft(t){Lt("withScope",t)}const qt="7";class Bt{constructor(t){this.dsn=t,this.K=new Ot(t)}getDsn(){return this.K}getStoreEndpoint(){return`${this.Y()}${this.getStoreEndpointPath()}`}getStoreEndpointWithUrlEncodedAuth(){const t={sentry_key:this.K.user,sentry_version:qt};return`${this.getStoreEndpoint()}?${e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}`;var e}Y(){const t=this.K,e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}`}getStoreEndpointPath(){const t=this.K;return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,e){const n=this.K,r=[`Sentry sentry_version=${qt}`];return r.push(`sentry_client=${t}/${e}`),r.push(`sentry_key=${n.user}`),n.pass&&r.push(`sentry_secret=${n.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const e=this.K,n=`${this.Y()}${e.path?`/${e.path}`:""}/api/embed/error-page/`,r=[];r.push(`dsn=${e.toString()}`);for(const e in t)if("user"===e){if(!t.user)continue;t.user.name&&r.push(`name=${encodeURIComponent(t.user.name)}`),t.user.email&&r.push(`email=${encodeURIComponent(t.user.email)}`)}else r.push(`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`);return r.length?`${n}?${r.join("&")}`:n}}const Ht=[];function Pt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[];if(Array.isArray(n)){const t=n.map(t=>t.name),i=[];e.forEach(e=>{-1===t.indexOf(e.name)&&-1===i.indexOf(e.name)&&(r.push(e),i.push(e.name))}),n.forEach(t=>{-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=[...e];const i=r.map(t=>t.name);return-1!==i.indexOf("Debug")&&r.push(...r.splice(i.indexOf("Debug"),1)),r}(t).forEach(t=>{e[t.name]=t,function(t){-1===Ht.indexOf(t.name)&&(t.setupOnce(kt,Ct),Ht.push(t.name),P.log(`Integration installed: ${t.name}`))}(t)}),e}class Wt{constructor(t,e){this.Z={},this.tt=!1,this.et=new t(e),this.nt=e,e.dsn&&(this.rt=new Ot(e.dsn)),this.it()&&(this.Z=Pt(this.nt))}captureException(t,e,n){let r=e&&e.event_id;return this.tt=!0,this.st().eventFromException(t,e).then(t=>this.ot(t,e,n)).then(t=>{r=t&&t.event_id,this.tt=!1}).then(null,t=>{P.error(t),this.tt=!1}),r}captureMessage(t,e,n,r){let i=n&&n.event_id;return this.tt=!0,(l(t)?this.st().eventFromMessage(`${t}`,e,n):this.st().eventFromException(t,n)).then(t=>this.ot(t,n,r)).then(t=>{i=t&&t.event_id,this.tt=!1}).then(null,t=>{P.error(t),this.tt=!1}),i}captureEvent(t,e,n){let r=e&&e.event_id;return this.tt=!0,this.ot(t,e,n).then(t=>{r=t&&t.event_id,this.tt=!1}).then(null,t=>{P.error(t),this.tt=!1}),r}getDsn(){return this.rt}getOptions(){return this.nt}flush(t){return this.ct(t).then(e=>(clearInterval(e.interval),this.st().getTransport().close(t).then(t=>e.ready&&t)))}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}getIntegrations(){return this.Z||{}}getIntegration(t){try{return this.Z[t.id]||null}catch(e){return P.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}ct(t){return new tt(e=>{let n=0;let r=0;clearInterval(r),r=setInterval(()=>{this.tt?(n+=1,t&&n>=t&&e({interval:r,ready:!1})):e({interval:r,ready:!0})},1)})}st(){return this.et}it(){return!1!==this.getOptions().enabled&&void 0!==this.rt}ut(t,e,n){const{environment:r,release:i,dist:s,maxValueLength:o=250,normalizeDepth:c=3}=this.getOptions(),u=Object.assign({},t);void 0===u.environment&&void 0!==r&&(u.environment=r),void 0===u.release&&void 0!==i&&(u.release=i),void 0===u.dist&&void 0!==s&&(u.dist=s),u.message&&(u.message=v(u.message,o));const a=u.exception&&u.exception.values&&u.exception.values[0];a&&a.value&&(a.value=v(a.value,o));const h=u.request;h&&h.url&&(h.url=v(h.url,o)),void 0===u.event_id&&(u.event_id=n&&n.event_id?n.event_id:O()),this.at(u.sdk);let l=tt.resolve(u);return e&&(l=e.applyToEvent(u,n)),l.then(t=>"number"==typeof c&&c>0?this.ht(t,c):t)}ht(t,e){return t?Object.assign({},t,t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>Object.assign({},t,t.data&&{data:Q(t.data,e)}))},t.user&&{user:Q(t.user,e)},t.contexts&&{contexts:Q(t.contexts,e)},t.extra&&{extra:Q(t.extra,e)}):null}at(t){const e=Object.keys(this.Z);t&&e.length>0&&(t.integrations=e)}ot(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions();return this.it()?"number"==typeof i&&Math.random()>i?tt.reject("This event has been sampled, will not send event."):new tt((i,s)=>{this.ut(t,n,e).then(t=>{if(null===t)return void s("An event processor returned null, will not send event.");let n=t;if(e&&e.data&&!0===e.data.__sentry__||!r)return this.st().sendEvent(n),void i(n);const o=r(t,e);if(void 0===o)P.error("`beforeSend` method has to return `null` or a valid event.");else if(m(o))this.lt(o,i,s);else{if(null===(n=o))return P.log("`beforeSend` returned `null`, will not send event."),void i(null);this.st().sendEvent(n),i(n)}}).then(null,t=>{this.captureException(t,{data:{__sentry__:!0},originalException:t}),s(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}):tt.reject("SDK not enabled, will not send event.")}lt(t,e,n){t.then(t=>{null!==t?(this.st().sendEvent(t),e(t)):n("`beforeSend` returned `null`, will not send event.")}).then(null,t=>{n(`beforeSend rejected with ${t}`)})}}class Xt{sendEvent(e){return tt.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return tt.resolve(!0)}}class Gt{constructor(t){this.nt=t,this.nt.dsn||P.warn("No DSN provided, backend will not do anything."),this.ft=this.dt()}dt(){return new Xt}eventFromException(t,e){throw new o("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new o("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.ft.sendEvent(t).then(null,t=>{P.error(`Error while sending event: ${t}`)})}getTransport(){return this.ft}}let zt;class Jt{constructor(){this.name=Jt.id}setupOnce(){zt=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return zt.apply(e,t)}}}Jt.id="FunctionToString";const Vt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Kt{constructor(t={}){this.nt=t,this.name=Kt.id}setupOnce(){kt(t=>{const e=Ct();if(!e)return t;const n=e.getIntegration(Kt);if(n){const r=e.getClient(),i=r?r.getOptions():{},s=n.pt(i);if(n.yt(t,s))return null}return t})}yt(t,e){return this.vt(t,e)?(P.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${$(t)}`),!0):this.bt(t,e)?(P.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${$(t)}`),!0):this.gt(t,e)?(P.warn(`Event dropped due to being matched by \`blacklistUrls\` option.\nEvent: ${$(t)}.\nUrl: ${this.wt(t)}`),!0):!this.Et(t,e)&&(P.warn(`Event dropped due to not being matched by \`whitelistUrls\` option.\nEvent: ${$(t)}.\nUrl: ${this.wt(t)}`),!0)}vt(t,e={}){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(t){return!1}}bt(t,e={}){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.jt(t).some(t=>e.ignoreErrors.some(e=>g(t,e)))}gt(t,e={}){if(!e.blacklistUrls||!e.blacklistUrls.length)return!1;const n=this.wt(t);return!!n&&e.blacklistUrls.some(t=>g(n,t))}Et(t,e={}){if(!e.whitelistUrls||!e.whitelistUrls.length)return!0;const n=this.wt(t);return!n||e.whitelistUrls.some(t=>g(n,t))}pt(t={}){return{blacklistUrls:[...this.nt.blacklistUrls||[],...t.blacklistUrls||[]],ignoreErrors:[...this.nt.ignoreErrors||[],...t.ignoreErrors||[],...Vt],ignoreInternal:void 0===this.nt.ignoreInternal||this.nt.ignoreInternal,whitelistUrls:[...this.nt.whitelistUrls||[],...t.whitelistUrls||[]]}}jt(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return P.error(`Cannot extract message for event ${$(t)}`),[]}return[]}wt(t){try{if(t.stacktrace){const e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){const e=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return e&&e[e.length-1].filename||null}return null}catch(e){return P.error(`Cannot extract url for event ${$(t)}`),null}}}Kt.id="InboundFilters";var Qt=Object.freeze({FunctionToString:Jt,InboundFilters:Kt});const Yt="?",Zt=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,te=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,ee=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ne=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,re=/\((\S*)(?::(\d+))(?::(\d+))\)/;function ie(t){let e=null;const n=t&&t.framesToPop;try{if(e=function(t){if(!t||!t.stacktrace)return null;const e=t.stacktrace,n=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=e.split("\n"),s=[];let o;for(let t=0;t eval")>-1)&&(i=ne.exec(s[3]))?(s[1]=s[1]||"eval",s[3]=i[1],s[4]=i[2],s[5]=""):0!==c||s[5]||void 0===t.columnNumber||(e[0].column=t.columnNumber+1),o={url:s[3],func:s[1]||Yt,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}!o.func&&o.line&&(o.func=Yt),e.push(o)}if(!e.length)return null;return{message:oe(t),name:t.name,stack:e}}(t))return se(e,n)}catch(t){}return{message:oe(t),name:t&&t.name,stack:[],failed:!0}}function se(t,e){try{return Object.assign({},t,{stack:t.stack.slice(e)})}catch(e){return t}}function oe(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const ce=50;function ue(t){const e=he(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function ae(t){return{exception:{values:[ue(t)]}}}function he(t){if(!t||!t.length)return[];let e=t;const n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.map(t=>({colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line})).slice(0,ce).reverse()}function le(t,e,n={}){let r;if(u(t)&&t.error){return r=ae(ie(t=t.error))}if(a(t)||(i=t,"[object DOMException]"===Object.prototype.toString.call(i))){const i=t,s=i.name||(a(i)?"DOMError":"DOMException"),o=i.message?`${s}: ${i.message}`:s;return S(r=fe(o,e,n),o),r}var i;if(c(t))return r=ae(ie(t));if(f(t)||d(t)){return T(r=function(t,e,n){const r={exception:{values:[{type:d(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${Y(t)}`}]},extra:{__serialized__:J(t)}};if(e){const t=he(ie(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return S(r=fe(t,e,n),`${t}`,void 0),T(r,{synthetic:!0}),r}function fe(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=he(ie(e).stack);r.stacktrace={frames:t}}return r}class de{constructor(t){this.options=t,this._=new et(30),this.url=new Bt(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){throw new o("Transport Class has to implement `sendEvent` method")}close(t){return this._.drain(t)}}const pe=x();class me extends de{constructor(){super(...arguments),this.xt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now()){pe.fetch(this.url,n).then(n=>{const i=t.Status.fromHttpCode(n.status);if(i!==t.Status.Success){if(i===t.Status.RateLimit){const t=Date.now();this.xt=new Date(t+L(t,n.headers.get("Retry-After"))),P.warn(`Too many requests, backing off till: ${this.xt}`)}r(n)}else e({status:i})}).catch(r)}))}}class ye extends de{constructor(){super(...arguments),this.xt=new Date(Date.now())}sendEvent(e){return new Date(Date.now()){const i=new XMLHttpRequest;i.onreadystatechange=(()=>{if(4!==i.readyState)return;const e=t.Status.fromHttpCode(i.status);if(e!==t.Status.Success){if(e===t.Status.RateLimit){const t=Date.now();this.xt=new Date(t+L(t,i.getResponseHeader("Retry-After"))),P.warn(`Too many requests, backing off till: ${this.xt}`)}r(i)}else n({status:e})}),i.open("POST",this.url);for(const t in this.options.headers)this.options.headers.hasOwnProperty(t)&&i.setRequestHeader(t,this.options.headers[t]);i.send(JSON.stringify(e))}))}}var ve=Object.freeze({BaseTransport:de,FetchTransport:me,XHRTransport:ye});class be extends Gt{dt(){if(!this.nt.dsn)return super.dt();const t=Object.assign({},this.nt.transportOptions,{dsn:this.nt.dsn});return this.nt.transport?new this.nt.transport(t):nt()?new me(t):new ye(t)}eventFromException(e,n){const r=le(e,n&&n.syntheticException||void 0,{attachStacktrace:this.nt.attachStacktrace});return T(r,{handled:!0,type:"generic"}),r.level=t.Severity.Error,n&&n.event_id&&(r.event_id=n.event_id),tt.resolve(r)}eventFromMessage(e,n=t.Severity.Info,r){const i=fe(e,r&&r.syntheticException||void 0,{attachStacktrace:this.nt.attachStacktrace});return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),tt.resolve(i)}}const ge="sentry.javascript.browser",we="5.14.1";class Ee extends Wt{constructor(t={}){super(be,t)}ut(t,e,n){return t.platform=t.platform||"javascript",t.sdk=Object.assign({},t.sdk,{name:ge,packages:[...t.sdk&&t.sdk.packages||[],{name:"npm:@sentry/browser",version:we}],version:we}),super.ut(t,e,n)}showReportDialog(t={}){const e=x().document;if(!e)return;if(!this.it())return void P.error("Trying to call showReportDialog with Sentry Client is disabled");const n=t.dsn||this.getDsn();if(!t.eventId)return void P.error("Missing `eventId` option in showReportDialog call");if(!n)return void P.error("Missing `Dsn` option in showReportDialog call");const r=e.createElement("script");r.async=!0,r.src=new Bt(n).getReportDialogEndpoint(t),t.onLoad&&(r.onload=t.onLoad),(e.head||e.body).appendChild(r)}}let je=0;function xe(){return je>0}function Oe(t,e={},n){if("function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>Oe(t,e));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(t){throw je+=1,setTimeout(()=>{je-=1}),Ft(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(S(n,void 0,void 0),T(n,e.mechanism)),n.extra=Object.assign({},n.extra,{arguments:r}),n}),captureException(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}t.prototype=t.prototype||{},sentryWrapped.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:sentryWrapped}),Object.defineProperties(sentryWrapped,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}class _e{constructor(t){this.name=_e.id,this.Ot=!1,this._t=!1,this.nt=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.nt.onerror&&(P.log("Global Handler attached: onerror"),this.$t()),this.nt.onunhandledrejection&&(P.log("Global Handler attached: onunhandledrejection"),this.kt())}$t(){this.Ot||(at({callback:t=>{const e=t.error,n=Ct(),r=n.getIntegration(_e),i=e&&!0===e.__sentry_own_request__;if(!r||xe()||i)return;const s=n.getClient(),o=l(e)?this.St(t.msg,t.url,t.line,t.column):this.Tt(le(e,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);T(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.Ot=!0)}kt(){this._t||(at({callback:e=>{let n=e;try{"reason"in e?n=e.reason:"detail"in e&&"reason"in e.detail&&(n=e.detail.reason)}catch(t){}const r=Ct(),i=r.getIntegration(_e),s=n&&!0===n.__sentry_own_request__;if(!i||xe()||s)return!0;const o=r.getClient(),c=l(n)?this.Dt(n):le(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,T(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this._t=!0)}St(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s,o=u(t)?t.message:t;if(h(o)){const t=o.match(i);t&&(s=t[1],o=t[2])}const c={exception:{values:[{type:s||"Error",value:o}]}};return this.Tt(c,e,n,r)}Dt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${t}`}]}}}Tt(t,e,n,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];const i=isNaN(parseInt(r,10))?void 0:r,s=isNaN(parseInt(n,10))?void 0:n,o=h(e)&&e.length>0?e:function(){try{return document.location.href}catch(t){return""}}();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:i,filename:o,function:"?",in_app:!0,lineno:s}),t}}_e.id="GlobalHandlers";class $e{constructor(){this.Rt=0,this.name=$e.id}It(t){return function(...e){const n=e[0];return e[0]=Oe(n,{mechanism:{data:{function:q(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}Nt(t){return function(e){return t(Oe(e,{mechanism:{data:{function:"requestAnimationFrame",handler:q(t)},handled:!0,type:"instrument"}}))}}Ct(t){const e=x(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(X(n,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Oe(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:q(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Oe(r,{mechanism:{data:{function:"addEventListener",handler:q(r),target:t},handled:!0,type:"instrument"}}),i)}}),X(n,"removeEventListener",function(t){return function(e,n,r){let i=n;try{i=i&&(i.__sentry_wrapped__||i)}catch(t){}return t.call(this,e,i,r)}}))}Mt(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&X(n,t,function(e){const n={mechanism:{data:{function:t,handler:q(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=q(e.__sentry_original__)),Oe(e,n)})}),t.apply(this,e)}}setupOnce(){this.Rt=this.Rt;const t=x();X(t,"setTimeout",this.It.bind(this)),X(t,"setInterval",this.It.bind(this)),X(t,"requestAnimationFrame",this.Nt.bind(this)),"XMLHttpRequest"in t&&X(XMLHttpRequest.prototype,"send",this.Mt.bind(this)),["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"].forEach(this.Ct.bind(this))}}$e.id="TryCatch";class ke{constructor(t){this.name=ke.id,this.nt=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}Ut(e){const n={category:"console",data:{arguments:e.args,logger:"console"},level:t.Severity.fromString(e.level),message:b(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${b(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}Ct().addBreadcrumb(n,{input:e.args,level:e.level})}At(t){let e;try{e=t.event.target?D(t.event.target):D(t.event)}catch(t){e=""}0!==e.length&&Ct().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name})}Lt(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;Ct().addBreadcrumb({category:"xhr",data:t.xhr.__sentry_xhr__,type:"http"},{xhr:t.xhr})}else t.xhr.__sentry_own_request__&&Se(t.args[0])}Ft(e){if(!e.endTimestamp)return;const n=Ct().getClient(),r=n&&n.getDsn();if(r){const t=new Bt(r).getStoreEndpoint();if(t&&-1!==e.fetchData.url.indexOf(t)&&"POST"===e.fetchData.method&&e.args[1]&&e.args[1].body)return void Se(e.args[1].body)}e.error?Ct().addBreadcrumb({category:"fetch",data:Object.assign({},e.fetchData,{status_code:e.response.status}),level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):Ct().addBreadcrumb({category:"fetch",data:Object.assign({},e.fetchData,{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})}qt(t){const e=x();let n=t.from,r=t.to;const i=_(e.location.href);let s=_(n);const o=_(r);s.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Ct().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}setupOnce(){this.nt.console&&at({callback:(...t)=>{this.Ut(...t)},type:"console"}),this.nt.dom&&at({callback:(...t)=>{this.At(...t)},type:"dom"}),this.nt.xhr&&at({callback:(...t)=>{this.Lt(...t)},type:"xhr"}),this.nt.fetch&&at({callback:(...t)=>{this.Ft(...t)},type:"fetch"}),this.nt.history&&at({callback:(...t)=>{this.qt(...t)},type:"history"})}}function Se(e){try{const n=JSON.parse(e);Ct().addBreadcrumb({category:`sentry.${"transaction"===n.type?"transaction":"event"}`,event_id:n.event_id,level:n.level||t.Severity.fromString("error"),message:$(n)},{event:n})}catch(t){P.error("Error while adding sentry type breadcrumb")}}ke.id="Breadcrumbs";const Te="cause",De=5;class Re{constructor(t={}){this.name=Re.id,this.Bt=t.key||Te,this.O=t.limit||De}setupOnce(){kt((t,e)=>{const n=Ct().getIntegration(Re);return n?n.Ht(t,e):t})}Ht(t,e){if(!(t.exception&&t.exception.values&&e&&y(e.originalException,Error)))return t;const n=this.Pt(e.originalException,this.Bt);return t.exception.values=[...n,...t.exception.values],t}Pt(t,e,n=[]){if(!y(t[e],Error)||n.length+1>=this.O)return n;const r=ue(ie(t[e]));return this.Pt(t[e],e,[r,...n])}}Re.id="LinkedErrors";const Ie=x();class Ne{constructor(){this.name=Ne.id}setupOnce(){kt(t=>{if(Ct().getIntegration(Ne)){if(!Ie.navigator||!Ie.location)return t;const e=t.request||{};return e.url=e.url||Ie.location.href,e.headers=e.headers||{},e.headers["User-Agent"]=Ie.navigator.userAgent,Object.assign({},t,{request:e})}return t})}}Ne.id="UserAgent";var Ce=Object.freeze({GlobalHandlers:_e,TryCatch:$e,Breadcrumbs:ke,LinkedErrors:Re,UserAgent:Ne});const Me=[new Kt,new Jt,new $e,new ke,new _e,new Re,new Ne];let Ue={};const Ae=x();Ae.Sentry&&Ae.Sentry.Integrations&&(Ue=Ae.Sentry.Integrations);const Le=Object.assign({},Ue,Qt,Ce);return t.BrowserClient=Ee,t.Hub=Rt,t.Integrations=Le,t.SDK_NAME=ge,t.SDK_VERSION=we,t.Scope=_t,t.Transports=ve,t.addBreadcrumb=function(t){Lt("addBreadcrumb",t)},t.addGlobalEventProcessor=kt,t.captureEvent=function(t){return Lt("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}return Lt("captureMessage",t,e,{originalException:t,syntheticException:n})},t.close=function(t){const e=Ct().getClient();return e?e.close(t):tt.reject(!1)},t.configureScope=function(t){Lt("configureScope",t)},t.defaultIntegrations=Me,t.flush=function(t){const e=Ct().getClient();return e?e.flush(t):tt.reject(!1)},t.forceLoad=function(){},t.getCurrentHub=Ct,t.getHubFromCarrier=Ut,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=Me),void 0===t.release){const e=x();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&P.enable(),Ct().bindClient(new t(e))}(Ee,t)},t.lastEventId=function(){return Ct().lastEventId()},t.onLoad=function(t){t()},t.setContext=function(t,e){Lt("setContext",t,e)},t.setExtra=function(t,e){Lt("setExtra",t,e)},t.setExtras=function(t){Lt("setExtras",t)},t.setTag=function(t,e){Lt("setTag",t,e)},t.setTags=function(t){Lt("setTags",t)},t.setUser=function(t){Lt("setUser",t)},t.showReportDialog=function(t={}){t.eventId||(t.eventId=Ct().lastEventId());const e=Ct().getClient();e&&e.showReportDialog(t)},t.withScope=Ft,t.wrap=function(t){return Oe(t)()},t}({}); -//# sourceMappingURL=bundle.es6.min.js.map diff --git a/node_modules/@sentry/browser/build/bundle.es6.min.js.map b/node_modules/@sentry/browser/build/bundle.es6.min.js.map deleted file mode 100644 index 04634ad..0000000 --- a/node_modules/@sentry/browser/build/bundle.es6.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bundle.es6.min.js","sources":["../../types/src/loglevel.ts","../../types/src/severity.ts","../../types/src/span.ts","../../types/src/status.ts","../../utils/src/polyfill.ts","../../utils/src/error.ts","../../utils/src/is.ts","../../utils/src/string.ts","../../utils/src/misc.ts","../../utils/src/logger.ts","../../utils/src/memo.ts","../../utils/src/object.ts","../../utils/src/syncpromise.ts","../../utils/src/promisebuffer.ts","../../utils/src/supports.ts","../../utils/src/instrument.ts","../../utils/src/dsn.ts","../../hub/src/scope.ts","../../hub/src/hub.ts","../../minimal/src/index.ts","../../core/src/api.ts","../../core/src/integration.ts","../../core/src/baseclient.ts","../../core/src/transports/noop.ts","../../core/src/basebackend.ts","../../core/src/integrations/functiontostring.ts","../../core/src/integrations/inboundfilters.ts","../src/tracekit.ts","../src/parsers.ts","../src/eventbuilder.ts","../src/transports/base.ts","../src/transports/fetch.ts","../src/transports/xhr.ts","../src/backend.ts","../src/version.ts","../src/client.ts","../src/helpers.ts","../src/integrations/globalhandlers.ts","../src/integrations/trycatch.ts","../src/integrations/breadcrumbs.ts","../src/integrations/linkederrors.ts","../src/integrations/useragent.ts","../src/sdk.ts","../src/index.ts","../../core/src/sdk.ts"],"sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n /** No logs will be generated. */\n None = 0,\n /** Only SDK internal errors will be logged. */\n Error = 1,\n /** Information useful for debugging the SDK will be logged. */\n Debug = 2,\n /** All SDK actions will be logged. */\n Verbose = 3,\n}\n","/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n","/** Span holding trace_id, span_id */\nexport interface Span {\n /** Sets the finish timestamp on the current span and sends it if it was a transaction */\n finish(useLastSpanTimestamp?: boolean): string | undefined;\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): object;\n /** Convert the object to JSON */\n toJSON(): object;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * @param status http code used to set the status\n */\n setStatus(status: SpanStatus): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n}\n\n/** Interface holder all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n /**\n * Operation of the Span.\n */\n op?: string;\n /**\n * Completion status of the Span.\n */\n status?: SpanStatus;\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n /**\n * Has the sampling decision been made?\n */\n sampled?: boolean;\n /**\n * Span ID\n */\n spanId?: string;\n /**\n * Trace ID\n */\n traceId?: string;\n /**\n * Transaction of the Span.\n */\n transaction?: string;\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n}\n\n/** The status of an Span. */\nexport enum SpanStatus {\n /** The operation completed successfully. */\n Ok = 'ok',\n /** Deadline expired before operation could complete. */\n DeadlineExceeded = 'deadline_exceeded',\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n Unauthenticated = 'unauthenticated',\n /** 403 Forbidden */\n PermissionDenied = 'permission_denied',\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n NotFound = 'not_found',\n /** 429 Too Many Requests */\n ResourceExhausted = 'resource_exhausted',\n /** Client specified an invalid argument. 4xx. */\n InvalidArgument = 'invalid_argument',\n /** 501 Not Implemented */\n Unimplemented = 'unimplemented',\n /** 503 Service Unavailable */\n Unavailable = 'unavailable',\n /** Other/generic 5xx. */\n InternalError = 'internal_error',\n /** Unknown. Any non-standard HTTP status code. */\n UnknownError = 'unknown_error',\n /** The operation was cancelled (typically by the user). */\n Cancelled = 'cancelled',\n /** Already exists (409) */\n AlreadyExists = 'already_exists',\n /** Operation was rejected because the system is not in a state required for the operation's */\n FailedPrecondition = 'failed_precondition',\n /** The operation was aborted, typically due to a concurrency issue. */\n Aborted = 'aborted',\n /** Operation was attempted past the valid range. */\n OutOfRange = 'out_of_range',\n /** Unrecoverable data loss or corruption */\n DataLoss = 'data_loss',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace SpanStatus {\n /**\n * Converts a HTTP status code into a {@link SpanStatus}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or {@link SpanStatus.UnknownError}.\n */\n // tslint:disable-next-line:completed-docs\n export function fromHttpCode(httpStatus: number): SpanStatus {\n if (httpStatus < 400) {\n return SpanStatus.Ok;\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return SpanStatus.Unauthenticated;\n case 403:\n return SpanStatus.PermissionDenied;\n case 404:\n return SpanStatus.NotFound;\n case 409:\n return SpanStatus.AlreadyExists;\n case 413:\n return SpanStatus.FailedPrecondition;\n case 429:\n return SpanStatus.ResourceExhausted;\n default:\n return SpanStatus.InvalidArgument;\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return SpanStatus.Unimplemented;\n case 503:\n return SpanStatus.Unavailable;\n case 504:\n return SpanStatus.DeadlineExceeded;\n default:\n return SpanStatus.InternalError;\n }\n }\n\n return SpanStatus.UnknownError;\n }\n}\n","/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n","export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n // tslint:disable:no-unsafe-any\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n","/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: any): boolean {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: any): boolean {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): boolean {\n // tslint:disable:no-unsafe-any\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n // tslint:enable:no-unsafe-any\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: any): boolean {\n // tslint:disable-next-line:no-unsafe-any\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n","import { isRegExp } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n colno = ll; // tslint:disable-line:no-parameter-reassignment\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n","import { Event, Integration, StackFrame, WrappedFunction } from '@sentry/types';\n\nimport { isString } from './is';\nimport { snipLine } from './string';\n\n/** Internal */\ninterface SentryGlobal {\n Sentry?: {\n Integrations?: Integration[];\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n };\n}\n\n/**\n * Requires a module which is protected _against bundler minification.\n *\n * @param request The module path to resolve\n */\nexport function dynamicRequire(mod: any, request: string): any {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // tslint:disable:strict-type-predicates\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n\nconst fallbackGlobalObject = {};\n\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject(): T & SentryGlobal {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject) as T & SentryGlobal;\n}\n// tslint:enable:strict-type-predicates\n\n/**\n * Extended Window interface that allows for Crypto API usage in IE browsers\n */\ninterface MsCryptoWindow extends Window {\n msCrypto?: Crypto;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const global = getGlobalObject() as MsCryptoWindow;\n const crypto = global.crypto || global.msCrypto;\n\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n const arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n // tslint:disable-next-line:no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // tslint:disable-next-line:no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n const pad = (num: number): string => {\n let v = num.toString(16);\n while (v.length < 4) {\n v = `0${v}`;\n }\n return v;\n };\n\n return (\n pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])\n );\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n // tslint:disable-next-line:no-bitwise\n const r = (Math.random() * 16) | 0;\n // tslint:disable-next-line:no-bitwise\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(\n url: string,\n): {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n} {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n const exception = event.exception.values[0];\n\n if (exception.type && exception.value) {\n return `${exception.type}: ${exception.value}`;\n }\n return exception.type || exception.value || event.event_id || '';\n }\n return event.event_id || '';\n}\n\n/** JSDoc */\ninterface ExtensibleConsole extends Console {\n [key: string]: any;\n}\n\n/** JSDoc */\nexport function consoleSandbox(callback: () => any): any {\n const global = getGlobalObject();\n const levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n if (!('console' in global)) {\n return callback();\n }\n\n const originalConsole = global.console as ExtensibleConsole;\n const wrappedLevels: { [key: string]: any } = {};\n\n // Restore all wrapped console methods\n levels.forEach(level => {\n if (level in global.console && (originalConsole[level] as WrappedFunction).__sentry_original__) {\n wrappedLevels[level] = originalConsole[level] as WrappedFunction;\n originalConsole[level] = (originalConsole[level] as WrappedFunction).__sentry_original__;\n }\n });\n\n // Perform callback manipulations\n const result = callback();\n\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level];\n });\n\n return result;\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(\n event: Event,\n mechanism: {\n [key: string]: any;\n } = {},\n): void {\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception!.values![0].mechanism = event.exception!.values![0].mechanism || {};\n Object.keys(mechanism).forEach(key => {\n // @ts-ignore\n event.exception!.values![0].mechanism[key] = mechanism[key];\n });\n } catch (_oO) {\n // no-empty\n }\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown): string {\n const elem = el as {\n getAttribute(key: string): string; // tslint:disable-line:completed-docs\n tagName?: string;\n id?: string;\n className?: string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n const attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\nconst INITIAL_TIME = Date.now();\nlet prevNow = 0;\n\nconst performanceFallback: Pick = {\n now(): number {\n let now = Date.now() - INITIAL_TIME;\n if (now < prevNow) {\n now = prevNow;\n }\n prevNow = now;\n return now;\n },\n timeOrigin: INITIAL_TIME,\n};\n\nexport const crossPlatformPerformance: Pick = (() => {\n if (isNodeEnv()) {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: Performance };\n return perfHooks.performance;\n } catch (_) {\n return performanceFallback;\n }\n }\n\n if (getGlobalObject().performance) {\n // Polyfill for performance.timeOrigin.\n //\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // tslint:disable-next-line:strict-type-predicates\n if (performance.timeOrigin === undefined) {\n // For webworkers it could mean we don't have performance.timing then we fallback\n // tslint:disable-next-line:deprecation\n if (!performance.timing) {\n return performanceFallback;\n }\n // tslint:disable-next-line:deprecation\n if (!performance.timing.navigationStart) {\n return performanceFallback;\n }\n\n // @ts-ignore\n // tslint:disable-next-line:deprecation\n performance.timeOrigin = performance.timing.navigationStart;\n }\n }\n\n return getGlobalObject().performance || performanceFallback;\n})();\n\n/**\n * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock.\n */\nexport function timestampWithMs(): number {\n return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000;\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\nconst defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now: number, header?: string | number | null): number {\n if (!header) {\n return defaultRetryAfter;\n }\n\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return defaultRetryAfter;\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n const lineno = frame.lineno || 0;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n","import { consoleSandbox, getGlobalObject } from './misc';\n\n// TODO: Implement different loggers for different environments\nconst global = getGlobalObject();\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** JSDoc */\nclass Logger {\n /** JSDoc */\n private _enabled: boolean;\n\n /** JSDoc */\n public constructor() {\n this._enabled = false;\n }\n\n /** JSDoc */\n public disable(): void {\n this._enabled = false;\n }\n\n /** JSDoc */\n public enable(): void {\n this._enabled = true;\n }\n\n /** JSDoc */\n public log(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.log(`${PREFIX}[Log]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public warn(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public error(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.error(`${PREFIX}[Error]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nconst logger = (global.__SENTRY__.logger as Logger) || (global.__SENTRY__.logger = new Logger());\n\nexport { logger };\n","// tslint:disable:no-unsafe-any\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n /** Determines if WeakSet is available */\n private readonly _hasWeakSet: boolean;\n /** Either WeakSet or Array */\n private readonly _inner: any;\n\n public constructor() {\n // tslint:disable-next-line\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n public memoize(obj: any): boolean {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < this._inner.length; i++) {\n const value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n }\n\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n public unmemoize(obj: any): void {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (let i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n }\n}\n","import { ExtendedError, WrappedFunction } from '@sentry/types';\n\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName, htmlTreeAsString } from './misc';\nimport { truncate } from './string';\n\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacement: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacement(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n // tslint:disable-next-line:strict-type-predicates\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`,\n )\n .join('&');\n}\n\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\nfunction getWalkSource(\n value: any,\n): {\n [key: string]: any;\n} {\n if (isError(value)) {\n const error = value as ExtendedError;\n const err: {\n stack: string | undefined;\n message: string;\n name: string;\n [key: string]: any;\n } = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n\n for (const i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n\n return err;\n }\n\n if (isEvent(value)) {\n /**\n * Event-like interface that's usable in browser and node\n */\n interface SimpleEvent {\n [key: string]: unknown;\n type: string;\n target?: unknown;\n currentTarget?: unknown;\n }\n\n const event = value as SimpleEvent;\n\n const source: {\n [key: string]: any;\n } = {};\n\n source.type = event.type;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n source.target = isElement(event.target)\n ? htmlTreeAsString(event.target)\n : Object.prototype.toString.call(event.target);\n } catch (_oO) {\n source.target = '';\n }\n\n try {\n source.currentTarget = isElement(event.currentTarget)\n ? htmlTreeAsString(event.currentTarget)\n : Object.prototype.toString.call(event.currentTarget);\n } catch (_oO) {\n source.currentTarget = '';\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event.detail;\n }\n\n for (const i in event) {\n if (Object.prototype.hasOwnProperty.call(event, i)) {\n source[i] = event;\n }\n }\n\n return source;\n }\n\n return value as {\n [key: string]: any;\n };\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // tslint:disable-next-line:no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n\n/** JSDoc */\nexport function normalizeToSize(\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const serialized = normalize(object, depth);\n\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return serialized as T;\n}\n\n/** Transforms any input value into a string form, either primitive value or a type of the input */\nfunction serializeValue(value: any): any {\n const type = Object.prototype.toString.call(value);\n\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n\n const normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction normalizeValue(value: T, key?: any): T | string {\n if (key === 'domain' && value && typeof value === 'object' && ((value as unknown) as { _events: any })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n if (typeof (global as any) !== 'undefined' && (value as unknown) === global) {\n return '[Global]';\n }\n\n if (typeof (window as any) !== 'undefined' && (value as unknown) === window) {\n return '[Window]';\n }\n\n if (typeof (document as any) !== 'undefined' && (value as unknown) === document) {\n return '[Document]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n // tslint:disable-next-line:no-tautology-expression\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n return value;\n}\n\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key: string, value: any, depth: number = +Infinity, memo: Memo = new Memo()): any {\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n\n // If value implements `toJSON` method, call it and return early\n // tslint:disable:no-unsafe-any\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // tslint:enable:no-unsafe-any\n\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n const normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n const source = getWalkSource(value);\n\n // Create an accumulator that will act as a parent for all future itterations of that branch\n const acc = Array.isArray(value) ? [] : {};\n\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n\n // Walk all keys of the source\n for (const innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n (acc as { [key: string]: any })[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n\n // Return accumulated values\n return acc;\n}\n\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\nexport function normalize(input: any, depth?: number): any {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return JSON.parse(JSON.stringify(input, (key: string, value: any) => walk(key, value, depth)));\n } catch (_oO) {\n return '**non-serializable**';\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: any, maxLength: number = 40): string {\n // tslint:disable:strict-type-predicates\n const keys = Object.keys(getWalkSource(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val: T): T {\n if (isPlainObject(val)) {\n const obj = val as { [key: string]: any };\n const rv: { [key: string]: any } = {};\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n return rv as T;\n }\n\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys) as any;\n }\n\n return val;\n}\n","import { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n /** Pending */\n PENDING = 'PENDING',\n /** Resolved / OK */\n RESOLVED = 'RESOLVED',\n /** Rejected / Error */\n REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<{\n onfulfilled?: ((value: T) => T | PromiseLike) | null;\n onrejected?: ((reason: any) => any) | null;\n }> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public toString(): string {\n return '[object SyncPromise]';\n }\n\n /** JSDoc */\n public static resolve(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n }\n\n /** JSDoc */\n public static reject(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n }\n\n /** JSDoc */\n public static all(collection: Array>): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n if (!Array.isArray(collection)) {\n reject(new TypeError(`Promise.all requires an array as input.`));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n let counter = collection.length;\n const resolvedCollection: U[] = [];\n\n collection.forEach((item, index) => {\n SyncPromise.resolve(item)\n .then(value => {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._attachHandler({\n onfulfilled: result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: reason => {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n // tslint:disable-next-line:no-unsafe-any\n resolve(val);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n // TODO: FIXME\n /** JSDoc */\n private readonly _attachHandler = (handler: {\n /** JSDoc */\n onfulfilled?(value: T): any;\n /** JSDoc */\n onrejected?(reason: any): any;\n }) => {\n this._handlers = this._handlers.concat(handler);\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n if (this._state === States.REJECTED) {\n this._handlers.forEach(handler => {\n if (handler.onrejected) {\n handler.onrejected(this._value);\n }\n });\n } else {\n this._handlers.forEach(handler => {\n if (handler.onfulfilled) {\n // tslint:disable-next-line:no-unsafe-any\n handler.onfulfilled(this._value);\n }\n });\n }\n\n this._handlers = [];\n };\n}\n\nexport { SyncPromise };\n","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer {\n public constructor(protected _limit?: number) {}\n\n /** Internal set of queued Promises */\n private readonly _buffer: Array> = [];\n\n /**\n * Says if the buffer is ready to take more requests\n */\n public isReady(): boolean {\n return this._limit === undefined || this.length() < this._limit;\n }\n\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns The original promise.\n */\n public add(task: PromiseLike): PromiseLike {\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n task\n .then(() => this.remove(task))\n .then(null, () =>\n this.remove(task).then(null, () => {\n // We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n public remove(task: PromiseLike): PromiseLike {\n const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n }\n\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n public length(): number {\n return this._buffer.length;\n }\n\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n public drain(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(this._buffer)\n .then(() => {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, () => {\n resolve(true);\n });\n });\n }\n}\n","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // It really needs 1 argument, not 0.\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore\n // tslint:disable:no-unused-expression\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n // tslint:disable-next-line:no-unused-expression\n new Headers();\n // tslint:disable-next-line:no-unused-expression\n new Request('');\n // tslint:disable-next-line:no-unused-expression\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\nfunction isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // tslint:disable-next-line:no-unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n if (doc) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // tslint:disable-next-line:no-unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n // tslint:disable-next-line: no-unsafe-any\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n // tslint:disable:no-unused-expression\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n const chrome = (global as any).chrome;\n // tslint:disable-next-line:no-unsafe-any\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","/* tslint:disable:only-arrow-functions no-unsafe-any */\n\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getFunctionName, getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n type: InstrumentHandlerType;\n callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n // tslint:disable-next-line:strict-type-predicates\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n return function(...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function(originalFetch: () => void): () => void {\n return function(...args: any[]): void {\n const commonHandlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...commonHandlerData,\n });\n\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n error,\n });\n throw error;\n },\n );\n };\n });\n}\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const url = args[1];\n this.__sentry_xhr__ = {\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const commonHandlerData = {\n args,\n startTimestamp: Date.now(),\n xhr,\n };\n\n triggerHandlers('xhr', {\n ...commonHandlerData,\n });\n\n xhr.addEventListener('readystatechange', function(): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function(this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n\n // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n ['EventTarget', 'Node'].forEach((target: string) => {\n const proto = (global as any)[target] && (global as any)[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerOrEventListenerObject, capture?: boolean, secure?: boolean) => void {\n if (fn && (fn as EventListenerObject).handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n } else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = fn as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n });\n}\n\nconst debounceDuration: number = 1000;\nlet debounceTimer: number = 0;\nlet keypressTimeout: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name: string, handler: Function, debounce: boolean = false): (event: Event) => void {\n return (event: Event) => {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined;\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n lastCapturedEvent = event;\n\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n if (debounce) {\n debounceTimer = setTimeout(() => {\n handler({ event, name });\n });\n } else {\n handler({ event, name });\n }\n };\n}\n\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler: Function): (event: Event) => void {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return (event: Event) => {\n let target;\n\n try {\n target = event.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n\n const tagName = target && (target as HTMLElement).tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !(target as HTMLElement).isContentEditable)) {\n return;\n }\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n clearTimeout(keypressTimeout);\n\n keypressTimeout = (setTimeout(() => {\n keypressTimeout = undefined;\n }, debounceDuration) as any) as number;\n };\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function(e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w\\.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n /** Protocol used to connect to Sentry. */\n public protocol!: DsnProtocol;\n /** Public authorization key. */\n public user!: string;\n /** private _authorization key (deprecated, optional). */\n public pass!: string;\n /** Hostname of the Sentry instance. */\n public host!: string;\n /** Port of the Sentry instance. */\n public port!: string;\n /** Path */\n public path!: string;\n /** Project ID */\n public projectId!: string;\n\n /** Creates a new Dsn component */\n public constructor(from: DsnLike) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n public toString(withPassword: boolean = false): string {\n // tslint:disable-next-line:no-this-assignment\n const { host, path, pass, port, projectId, protocol, user } = this;\n return (\n `${protocol}://${user}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }\n\n /** Parses a string into this Dsn. */\n private _fromString(str: string): void {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, user });\n }\n\n /** Maps Dsn components into this instance. */\n private _fromComponents(components: DsnComponents): void {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n }\n\n /** Validates this Dsn and throws on error. */\n private _validate(): void {\n ['protocol', 'user', 'host', 'projectId'].forEach(component => {\n if (!this[component as keyof DsnComponents]) {\n throw new SentryError(ERROR_MESSAGE);\n }\n });\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE);\n }\n }\n}\n","import {\n Breadcrumb,\n Event,\n EventHint,\n EventProcessor,\n Scope as ScopeInterface,\n Severity,\n Span,\n User,\n} from '@sentry/types';\nimport { getGlobalObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifiying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: string } = {};\n\n /** Extra */\n protected _extra: { [key: string]: any } = {};\n\n /** Contexts */\n protected _context: { [key: string]: any } = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction */\n protected _transaction?: string;\n\n /** Span */\n protected _span?: Span;\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n setTimeout(() => {\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n });\n }\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n // tslint:disable-next-line:strict-type-predicates\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransaction(transaction?: string): this {\n this._transaction = transaction;\n if (this._span) {\n (this._span as any).transaction = transaction;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: { [key: string]: any } | null): this {\n this._context = { ...this._context, [key]: context };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Internal getter for Span, used in Hub.\n * @hidden\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._context = { ...scope._context };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._transaction = scope._transaction;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n }\n return newScope;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._context = {};\n this._level = undefined;\n this._transaction = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const mergedBreadcrumb = {\n timestamp: timestampWithMs(),\n ...breadcrumb,\n };\n\n this._breadcrumbs =\n maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n ? [...this._breadcrumbs, mergedBreadcrumb].slice(-maxBreadcrumbs)\n : [...this._breadcrumbs, mergedBreadcrumb];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._context && Object.keys(this._context).length) {\n event.contexts = { ...this._context, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transaction) {\n event.transaction = this._transaction;\n }\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n}\n\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n","import {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n Event,\n EventHint,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Severity,\n Span,\n SpanContext,\n User,\n} from '@sentry/types';\nimport {\n consoleSandbox,\n dynamicRequire,\n getGlobalObject,\n isNodeEnv,\n logger,\n timestampWithMs,\n uuid4,\n} from '@sentry/utils';\n\nimport { Carrier, Layer } from './interfaces';\nimport { Scope } from './scope';\n\ndeclare module 'domain' {\n export let active: Domain;\n /**\n * Extension for domain interface\n */\n export interface Domain {\n __SENTRY__?: Carrier;\n }\n}\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be incresed when the global interface\n * changes a and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 3;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this._stack.push({ client, scope });\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n private _invokeClient(method: M, ...args: any[]): void {\n const top = this.getStackTop();\n if (top && top.client && top.client[method]) {\n (top.client as any)[method](...args, top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const stack = this.getStack();\n const parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined;\n const scope = Scope.clone(parentScope);\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n return this.getStack().pop() !== undefined;\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const top = this.getStackTop();\n\n if (!top.scope || !top.client) {\n return;\n }\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (top.client.getOptions && top.client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) {\n return;\n }\n\n const timestamp = timestampWithMs();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) {\n return;\n }\n\n top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const top = this.getStackTop();\n if (top.scope && top.client) {\n callback(top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) {\n return null;\n }\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild: boolean = false): Span {\n return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/** Returns the global shim registry. */\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Try to read the hub from an active domain, fallback to the registry if one doesnt exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n const domain = dynamicRequire(module, 'domain');\n const activeDomain = domain.active;\n\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return carrier.__SENTRY__.hub;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) {\n return false;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n","import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport { Breadcrumb, Event, Severity, User } from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\nfunction callOnHub(method: string, ...args: any[]): T {\n const hub = getCurrentHub();\n if (hub && hub[method as keyof Hub]) {\n // tslint:disable-next-line:no-unsafe-any\n return (hub[method as keyof Hub] as any)(...args);\n }\n throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\nexport function captureException(exception: any): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException,\n });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, level?: Severity): string {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureMessage', message, level, {\n originalException: message,\n syntheticException,\n });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n callOnHub('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n callOnHub('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: { [key: string]: any }): void {\n callOnHub('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: string }): void {\n callOnHub('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n\nexport function setExtra(key: string, extra: any): void {\n callOnHub('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\nexport function setTag(key: string, value: string): void {\n callOnHub('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n callOnHub('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n callOnHub('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\nexport function _callOnClient(method: string, ...args: any[]): void {\n callOnHub('_invokeClient', method, ...args);\n}\n","import { DsnLike } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Helper class to provide urls to different Sentry endpoints. */\nexport class API {\n /** The internally used Dsn object. */\n private readonly _dsnObject: Dsn;\n /** Create a new instance of API */\n public constructor(public dsn: DsnLike) {\n this._dsnObject = new Dsn(dsn);\n }\n\n /** Returns the Dsn object. */\n public getDsn(): Dsn {\n return this._dsnObject;\n }\n\n /** Returns a string with auth headers in the url to the store endpoint. */\n public getStoreEndpoint(): string {\n return `${this._getBaseUrl()}${this.getStoreEndpointPath()}`;\n }\n\n /** Returns the store endpoint with auth added in url encoded. */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n const dsn = this._dsnObject;\n const auth = {\n sentry_key: dsn.user, // sentry_key is currently used in tracing integration to identify internal sentry requests\n sentry_version: SENTRY_API_VERSION,\n };\n // Auth is intentionally sent as part of query string (NOT as custom HTTP header)\n // to avoid preflight CORS requests\n return `${this.getStoreEndpoint()}?${urlEncode(auth)}`;\n }\n\n /** Returns the base path of the url including the port. */\n private _getBaseUrl(): string {\n const dsn = this._dsnObject;\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}`;\n }\n\n /** Returns only the path component for the store endpoint. */\n public getStoreEndpointPath(): string {\n const dsn = this._dsnObject;\n return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n }\n\n /** Returns an object that can be used in request headers. */\n public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n const dsn = this._dsnObject;\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.user}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n }\n\n /** Returns the url to the report dialog endpoint. */\n public getReportDialogEndpoint(\n dialogOptions: {\n [key: string]: any;\n user?: { name?: string; email?: string };\n } = {},\n ): string {\n const dsn = this._dsnObject;\n const endpoint = `${this._getBaseUrl()}${dsn.path ? `/${dsn.path}` : ''}/api/embed/error-page/`;\n\n const encodedOptions = [];\n encodedOptions.push(`dsn=${dsn.toString()}`);\n for (const key in dialogOptions) {\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n }\n } else {\n encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n }\n }\n if (encodedOptions.length) {\n return `${endpoint}?${encodedOptions.join('&')}`;\n }\n\n return endpoint;\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport interface IntegrationIndex {\n [key: string]: Integration;\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n let integrations: Integration[] = [];\n if (Array.isArray(userIntegrations)) {\n const userIntegrationsNames = userIntegrations.map(i => i.name);\n const pickedIntegrationsNames: string[] = [];\n\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(defaultIntegration => {\n if (\n userIntegrationsNames.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames.indexOf(defaultIntegration.name) === -1\n ) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames.push(defaultIntegration.name);\n }\n });\n\n // Don't add same user integration twice\n userIntegrations.forEach(userIntegration => {\n if (pickedIntegrationsNames.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames.push(userIntegration.name);\n }\n });\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n } else {\n integrations = [...defaultIntegrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}\n","import { Scope } from '@sentry/hub';\nimport { Client, Event, EventHint, Integration, IntegrationClass, Options, SdkInfo, Severity } from '@sentry/types';\nimport { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, truncate, uuid4 } from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the enviornment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: Dsn;\n\n /** Array of used integrations. */\n protected readonly _integrations: IntegrationIndex = {};\n\n /** Is the client still processing a call? */\n protected _processing: boolean = false;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n this._processing = true;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(`${message}`, level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n promisedEvent\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._processEvent(event, hint, scope)\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): Dsn | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientProcessing(timeout).then(status => {\n clearInterval(status.interval);\n return this._getBackend()\n .getTransport()\n .close(timeout)\n .then(transportFlushed => status.ready && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * @inheritDoc\n */\n public getIntegrations(): IntegrationIndex {\n return this._integrations || {};\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Waits for the client to be done with processing. */\n protected _isClientProcessing(timeout?: number): PromiseLike<{ ready: boolean; interval: number }> {\n return new SyncPromise<{ ready: boolean; interval: number }>(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n let interval = 0;\n clearInterval(interval);\n\n interval = (setInterval(() => {\n if (!this._processing) {\n resolve({\n interval,\n ready: true,\n });\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n resolve({\n interval,\n ready: false,\n });\n }\n }\n }, tick) as unknown) as number;\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { environment, release, dist, maxValueLength = 250, normalizeDepth = 3 } = this.getOptions();\n\n const prepared: Event = { ...event };\n if (prepared.environment === undefined && environment !== undefined) {\n prepared.environment = environment;\n }\n if (prepared.release === undefined && release !== undefined) {\n prepared.release = release;\n }\n\n if (prepared.dist === undefined && dist !== undefined) {\n prepared.dist = dist;\n }\n\n if (prepared.message) {\n prepared.message = truncate(prepared.message, maxValueLength);\n }\n\n const exception = prepared.exception && prepared.exception.values && prepared.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = prepared.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n\n if (prepared.event_id === undefined) {\n prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4();\n }\n\n this._addIntegrations(prepared.sdk);\n\n // We prepare the result here with a resolved Event.\n let result = SyncPromise.resolve(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (scope) {\n // In case we have a hub we reassign it.\n result = scope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n // tslint:disable:no-unsafe-any\n return {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n protected _addIntegrations(sdkInfo?: SdkInfo): void {\n const integrationsArray = Object.keys(this._integrations);\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n const { beforeSend, sampleRate } = this.getOptions();\n\n if (!this._isEnabled()) {\n return SyncPromise.reject('SDK not enabled, will not send event.');\n }\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n if (typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject('This event has been sampled, will not send event.');\n }\n\n return new SyncPromise((resolve, reject) => {\n this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n reject('An event processor returned null, will not send event.');\n return;\n }\n\n let finalEvent: Event | null = prepared;\n\n const isInternalException = hint && hint.data && (hint.data as { [key: string]: any }).__sentry__ === true;\n if (isInternalException || !beforeSend) {\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n return;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n // tslint:disable-next-line:strict-type-predicates\n if (typeof beforeSendResult === 'undefined') {\n logger.error('`beforeSend` method has to return `null` or a valid event.');\n } else if (isThenable(beforeSendResult)) {\n this._handleAsyncBeforeSend(beforeSendResult as PromiseLike, resolve, reject);\n } else {\n finalEvent = beforeSendResult as Event | null;\n\n if (finalEvent === null) {\n logger.log('`beforeSend` returned `null`, will not send event.');\n resolve(null);\n return;\n }\n\n // From here on we are really async\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n }\n })\n .then(null, reason => {\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n reject(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n });\n }\n\n /**\n * Resolves before send Promise and calls resolve/reject on parent SyncPromise.\n */\n private _handleAsyncBeforeSend(\n beforeSend: PromiseLike,\n resolve: (event: Event) => void,\n reject: (reason: string) => void,\n ): void {\n beforeSend\n .then(processedEvent => {\n if (processedEvent === null) {\n reject('`beforeSend` returned `null`, will not send event.');\n return;\n }\n // From here on we are really async\n this._getBackend().sendEvent(processedEvent);\n resolve(processedEvent);\n })\n .then(null, e => {\n reject(`beforeSend rejected with ${e}`);\n });\n }\n}\n","import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return SyncPromise.resolve({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: Status.Skipped,\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return SyncPromise.resolve(true);\n }\n}\n","import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instanciate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates a {@link Event} from an exception. */\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates a {@link Event} from a plain message. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instanciate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n this._transport.sendEvent(event).then(null, reason => {\n logger.error(`Error while sending event: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n originalFunctionToString = Function.prototype.toString;\n\n Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n const context = this.__sentry_original__ || this;\n // tslint:disable-next-line:no-unsafe-any\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n blacklistUrls?: Array;\n ignoreErrors?: Array;\n ignoreInternal?: boolean;\n whitelistUrls?: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n public constructor(private readonly _options: InboundFiltersOptions = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n const options = self._mergeOptions(clientOptions);\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: InboundFiltersOptions): boolean {\n if (this._isSentryError(event, options)) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (this._isBlacklistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`blacklistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!this._isWhitelistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to not being matched by \\`whitelistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return (\n (event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false\n );\n } catch (_oO) {\n return false;\n }\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isBlacklistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.blacklistUrls || !options.blacklistUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.blacklistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isWhitelistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.whitelistUrls || !options.whitelistUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.whitelistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: InboundFiltersOptions = {}): InboundFiltersOptions {\n return {\n blacklistUrls: [...(this._options.blacklistUrls || []), ...(clientOptions.blacklistUrls || [])],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n whitelistUrls: [...(this._options.whitelistUrls || []), ...(clientOptions.whitelistUrls || [])],\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n const frames = event.stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n if (event.exception) {\n const frames =\n event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n return null;\n } catch (oO) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n }\n}\n","// tslint:disable:object-literal-sort-keys\n\n/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n args: string[];\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js))(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n/** JSDoc */\nexport function computeStackTrace(ex: any): StackTrace {\n // tslint:disable:no-unsafe-any\n\n let stack = null;\n const popSize: number = ex && ex.framesToPop;\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n // tslint:disable:no-conditional-assignment\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (let i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = (ex.columnNumber as number) + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n // tslint:disable:no-conditional-assignment\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .slice(0, STACKTRACE_LIMIT)\n .reverse();\n}\n","import { Event } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/** JSDoc */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n rejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n const domException = exception as DOMException;\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const objectException = exception as {};\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n// this._options.attachStacktrace\n/** JSDoc */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n","import { API } from '@sentry/core';\nimport { Event, Response, Transport, TransportOptions } from '@sentry/types';\nimport { PromiseBuffer, SentryError } from '@sentry/utils';\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @inheritDoc\n */\n public url: string;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n public constructor(public options: TransportOptions) {\n this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth();\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n}\n","import { Event, Response, Status } from '@sentry/types';\nimport { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\nconst global = getGlobalObject();\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n const defaultOptions: RequestInit = {\n body: JSON.stringify(event),\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n\n if (this.options.headers !== undefined) {\n defaultOptions.headers = this.options.headers;\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n global\n .fetch(this.url, defaultOptions)\n .then(response => {\n const status = Status.fromHttpCode(response.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(response);\n })\n .catch(reject);\n }),\n );\n }\n}\n","import { Event, Response, Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = () => {\n if (request.readyState !== 4) {\n return;\n }\n\n const status = Status.fromHttpCode(request.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(request);\n };\n\n request.open('POST', this.url);\n for (const header in this.options.headers) {\n if (this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(JSON.stringify(event));\n }),\n );\n }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils';\n\nimport { eventFromString, eventFromUnknownInput } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To whitelist certain errors instead, use {@link Options.whitelistUrls}.\n * By default, all errors will be sent.\n */\n blacklistUrls?: Array;\n\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.blacklistUrls}.\n * By default, all errors will be sent.\n */\n whitelistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n}\n","export const SDK_NAME = 'sentry.javascript.browser';\nexport const SDK_VERSION = '5.14.1';\n","import { API, BaseClient, Scope } from '@sentry/core';\nimport { DsnLike, Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n super(BrowserBackend, options);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n event.sdk = {\n ...event.sdk,\n name: SDK_NAME,\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client is disabled');\n return;\n }\n\n const dsn = options.dsn || this.getDsn();\n\n if (!options.eventId) {\n logger.error('Missing `eventId` option in showReportDialog call');\n return;\n }\n\n if (!dsn) {\n logger.error('Missing `Dsn` option in showReportDialog call');\n return;\n }\n\n const script = document.createElement('script');\n script.async = true;\n script.src = new API(dsn).getReportDialogEndpoint(options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n (document.head || document.body).appendChild(script);\n }\n}\n","import { captureException, withScope } from '@sentry/core';\nimport { Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils';\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n): any {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n const sentryWrapped: WrappedFunction = function(this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n // tslint:disable:no-unsafe-any\n try {\n // tslint:disable-next-line:strict-type-predicates\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n // tslint:enable:no-unsafe-any\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n const processedEvent = { ...event };\n\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n\n processedEvent.extra = {\n ...processedEvent.extra,\n arguments: args,\n };\n\n return processedEvent;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // tslint:disable-line:no-empty\n\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n } catch (_oO) {\n /*no-empty*/\n }\n\n return sentryWrapped;\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n onerror: boolean;\n onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /** JSDoc */\n private _onErrorHandlerInstalled: boolean = false;\n\n /** JSDoc */\n private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n }\n\n /** JSDoc */\n private _installGlobalOnErrorHandler(): void {\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const error = data.error;\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : this._enhanceEventWithInitialFrame(\n eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }),\n data.url,\n data.line,\n data.column,\n );\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n\n this._onErrorHandlerInstalled = true;\n }\n\n /** JSDoc */\n private _installGlobalOnUnhandledRejectionHandler(): void {\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (e: any) => {\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteRejection(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n\n event.level = Severity.Error;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n\n return;\n },\n type: 'unhandledrejection',\n });\n\n this._onUnhandledRejectionHandlerInstalled = true;\n }\n\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name;\n\n if (isString(message)) {\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n }\n\n /**\n * This function creates an Event from an TraceKitStackTrace that has part of it missing.\n */\n private _eventFromIncompleteRejection(error: any): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n value: `Non-Error promise rejection captured with value: ${error}`,\n },\n ],\n },\n };\n }\n\n /** JSDoc */\n private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /** JSDoc */\n private _ignoreOnError: number = 0;\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /** JSDoc */\n private _wrapTimeFunction(original: () => void): () => number {\n return function(this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n }\n\n /** JSDoc */\n private _wrapRAF(original: any): (callback: () => void) => any {\n return function(this: any, callback: () => void): () => void {\n return original(\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n }\n\n /** JSDoc */\n private _wrapEventTarget(target: string): void {\n const global = getGlobalObject() as { [key: string]: any };\n const proto = global[target] && global[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n // tslint:disable-next-line:no-unbound-method strict-type-predicates\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n wrap((fn as any) as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = (fn as any) as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n }\n\n /** JSDoc */\n private _wrapXHR(originalSend: () => void): () => void {\n return function(this: XMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function(original: WrappedFunction): Function {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n this._ignoreOnError = this._ignoreOnError;\n\n const global = getGlobalObject();\n\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n\n if ('XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n ].forEach(this._wrapEventTarget.bind(this));\n }\n}\n","import { API, getCurrentHub } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n} from '@sentry/utils';\n\nimport { BrowserClient } from '../client';\n\n/**\n * @hidden\n */\nexport interface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** JSDoc */\ninterface BreadcrumbIntegrations {\n console?: boolean;\n dom?: boolean;\n fetch?: boolean;\n history?: boolean;\n sentry?: boolean;\n xhr?: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /** JSDoc */\n private readonly _options: BreadcrumbIntegrations;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: BreadcrumbIntegrations) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Creates breadcrumbs from console API calls\n */\n private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }\n\n /**\n * Creates breadcrumbs from DOM API calls\n */\n private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node)\n : htmlTreeAsString((handlerData.event as unknown) as Node);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n },\n );\n }\n\n /**\n * Creates breadcrumbs from XHR API calls\n */\n private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: handlerData.xhr.__sentry_xhr__,\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n },\n );\n\n return;\n }\n\n // We only capture issued sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n addSentryBreadcrumb(handlerData.args[0]);\n }\n }\n\n /**\n * Creates breadcrumbs from fetch API calls\n */\n private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n const client = getCurrentHub().getClient();\n const dsn = client && client.getDsn();\n\n if (dsn) {\n const filterUrl = new API(dsn).getStoreEndpoint();\n // if Sentry key appears in URL, don't capture it as a request\n // but rather as our own 'sentry' type breadcrumb\n if (\n filterUrl &&\n handlerData.fetchData.url.indexOf(filterUrl) !== -1 &&\n handlerData.fetchData.method === 'POST' &&\n handlerData.args[1] &&\n handlerData.args[1].body\n ) {\n addSentryBreadcrumb(handlerData.args[1].body);\n return;\n }\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }\n\n /**\n * Creates breadcrumbs from history API calls\n */\n private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._consoleBreadcrumb(...args);\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._domBreadcrumb(...args);\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._xhrBreadcrumb(...args);\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._fetchBreadcrumb(...args);\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._historyBreadcrumb(...args);\n },\n type: 'history',\n });\n }\n }\n}\n\n/**\n * Create a breadcrumb of `sentry` from the events themselves\n */\nfunction addSentryBreadcrumb(serializedData: string): void {\n // There's always something that can go wrong with deserialization...\n try {\n const event = JSON.parse(serializedData);\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level || Severity.fromString('error'),\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n } catch (_oO) {\n logger.error('Error while adding sentry type breadcrumb');\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return self._handler(event, hint);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n }\n\n /**\n * @inheritDoc\n */\n private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, [exception, ...stack]);\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n if (!global.navigator || !global.location) {\n return event;\n }\n\n // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/\n const request = event.request || {};\n request.url = request.url || global.location.href;\n request.headers = request.headers || {};\n request.headers['User-Agent'] = global.navigator.userAgent;\n\n return {\n ...event,\n request,\n };\n }\n return event;\n });\n }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient, ReportDialogOptions } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n initAndBind(BrowserClient, options);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n const client = getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\nexport function wrap(fn: Function): any {\n return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any\n}\n","export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports };\n","import { getCurrentHub } from '@sentry/hub';\nimport { Client, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** A class object that can instanciate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instanciate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass: ClientClass, options: O): void {\n if (options.debug === true) {\n logger.enable();\n }\n getCurrentHub().bindClient(new clientClass(options));\n}\n"],"names":["LogLevel","Severity","SpanStatus","Status","level","Debug","Info","Warning","Error","Fatal","Critical","Log","httpStatus","Ok","Unauthenticated","PermissionDenied","NotFound","AlreadyExists","FailedPrecondition","ResourceExhausted","InvalidArgument","Unimplemented","Unavailable","DeadlineExceeded","InternalError","UnknownError","code","Success","RateLimit","Invalid","Failed","Unknown","setPrototypeOf","Object","__proto__","Array","obj","proto","prop","hasOwnProperty","SentryError","[object Object]","message","super","this","name","prototype","constructor","isError","wat","toString","call","isInstanceOf","isErrorEvent","isDOMError","isString","isPrimitive","isPlainObject","isEvent","Event","isElement","Element","isThenable","Boolean","then","base","_e","truncate","str","max","length","substr","safeJoin","input","delimiter","isArray","output","i","value","push","String","e","join","isMatchingPattern","pattern","test","indexOf","dynamicRequire","mod","request","require","isNodeEnv","process","fallbackGlobalObject","getGlobalObject","global","window","self","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","replace","c","r","Math","random","parseUrl","url","match","query","fragment","host","path","protocol","relative","getEventDescription","event","exception","values","type","event_id","consoleSandbox","callback","originalConsole","console","wrappedLevels","forEach","__sentry_original__","result","keys","addExceptionTypeValue","addExceptionMechanism","mechanism","key","_oO","htmlTreeAsString","elem","currentElem","MAX_TRAVERSE_HEIGHT","MAX_OUTPUT_LEN","out","height","len","separator","sepLength","nextStr","_htmlElementAsString","parentNode","reverse","el","className","classes","attr","tagName","toLowerCase","id","split","attrWhitelist","getAttribute","INITIAL_TIME","Date","now","prevNow","performanceFallback","timeOrigin","crossPlatformPerformance","module","performance","_","undefined","timing","navigationStart","timestampWithMs","defaultRetryAfter","parseRetryAfterHeader","header","headerDelay","parseInt","isNaN","headerDate","parse","defaultFunctionName","getFunctionName","fn","PREFIX","__SENTRY__","logger","_enabled","args","log","warn","error","Memo","_hasWeakSet","WeakSet","_inner","has","add","delete","splice","fill","source","replacement","original","wrapped","defineProperties","enumerable","_Oo","getWalkSource","err","stack","target","currentTarget","CustomEvent","detail","jsonSize","encodeURI","utf8Length","JSON","stringify","normalizeToSize","object","depth","maxSize","serialized","normalize","normalizeValue","_events","document","walk","Infinity","memo","normalized","serializeValue","toJSON","acc","memoize","innerKey","unmemoize","extractExceptionKeysForMessage","maxLength","sort","includedKeys","slice","States","SyncPromise","executor","PENDING","_setResult","RESOLVED","reason","REJECTED","state","_state","_resolve","_reject","_value","_executeHandlers","handler","_handlers","concat","onrejected","onfulfilled","resolve","reject","collection","TypeError","counter","resolvedCollection","item","index","_attachHandler","val","onfinally","isRejected","PromiseBuffer","_limit","task","isReady","_buffer","remove","timeout","capturedSetTimeout","setTimeout","all","clearTimeout","supportsFetch","Headers","Request","Response","isNativeFetch","func","supportsReferrerPolicy","referrerPolicy","handlers","instrumented","instrument","originalConsoleLevel","triggerHandlers","Function","apply","instrumentConsole","addEventListener","domEventHandler","bind","keypressEventHandler","eventName","options","handleEvent","innerOriginal","__sentry_wrapped__","instrumentDOM","xhrproto","XMLHttpRequest","originalOpen","__sentry_xhr__","method","toUpperCase","__sentry_own_request__","originalSend","xhr","commonHandlerData","startTimestamp","readyState","status_code","status","endTimestamp","instrumentXHR","fetch","doc","sandbox","createElement","hidden","head","appendChild","contentWindow","removeChild","supportsNativeFetch","originalFetch","fetchData","getFetchMethod","getFetchUrl","response","instrumentFetch","chrome","isChromePackagedApp","app","runtime","hasHistoryApi","history","pushState","replaceState","supportsHistory","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","from","lastHref","to","location","href","instrumentHistory","_oldOnErrorHandler","onerror","msg","line","column","arguments","_oldOnUnhandledRejectionHandler","onunhandledrejection","addInstrumentationHandler","data","fetchArgs","debounceDuration","keypressTimeout","lastCapturedEvent","debounceTimer","debounce","isContentEditable","DSN_REGEX","ERROR_MESSAGE","Dsn","_fromString","_fromComponents","_validate","withPassword","pass","port","projectId","user","exec","lastPath","pop","components","component","Scope","_scopeListeners","_eventProcessors","_notifyingListeners","processors","hint","processor","final","_notifyEventProcessors","_user","_notifyScopeListeners","tags","_tags","extras","_extra","extra","fingerprint","_fingerprint","_level","transaction","_transaction","_span","context","_context","span","scope","newScope","_breadcrumbs","breadcrumb","maxBreadcrumbs","mergedBreadcrumb","timestamp","contexts","trace","getTraceContext","_applyFingerprint","breadcrumbs","getGlobalEventProcessors","globalEventProcessors","addGlobalEventProcessor","API_VERSION","DEFAULT_BREADCRUMBS","MAX_BREADCRUMBS","Hub","client","_version","_stack","top","getStackTop","version","getStack","parentScope","clone","getClient","pushScope","popScope","eventId","_lastEventId","finalHint","syntheticException","originalException","_invokeClient","beforeBreadcrumb","getOptions","finalBreadcrumb","addBreadcrumb","min","setUser","setTags","setExtras","setTag","setExtra","setContext","oldHub","makeMain","integration","getIntegration","spanOrSpanContext","forceNoChild","_callExtensionMethod","sentry","getMainCarrier","extensions","carrier","hub","registry","getHubFromCarrier","setHubOnCarrier","getCurrentHub","hasHubOnCarrier","isOlderThan","domain","activeDomain","active","registryHubTopStack","getHubFromActiveDomain","callOnHub","captureException","withScope","SENTRY_API_VERSION","API","dsn","_dsnObject","_getBaseUrl","getStoreEndpointPath","auth","sentry_key","sentry_version","getStoreEndpoint","map","encodeURIComponent","clientName","clientVersion","Content-Type","X-Sentry-Auth","dialogOptions","endpoint","encodedOptions","email","installedIntegrations","setupIntegrations","integrations","defaultIntegrations","userIntegrations","userIntegrationsNames","pickedIntegrationsNames","defaultIntegration","userIntegration","integrationsNames","getIntegrationsToSetup","setupOnce","setupIntegration","BaseClient","backendClass","_backend","_options","_dsn","_isEnabled","_integrations","_processing","_getBackend","eventFromException","_processEvent","finalEvent","eventFromMessage","_isClientProcessing","clearInterval","interval","getTransport","close","transportFlushed","ready","flush","enabled","ticked","setInterval","environment","release","dist","maxValueLength","normalizeDepth","prepared","_addIntegrations","sdk","applyToEvent","evt","_normalizeEvent","b","sdkInfo","integrationsArray","beforeSend","sampleRate","_prepareEvent","__sentry__","sendEvent","beforeSendResult","_handleAsyncBeforeSend","processedEvent","NoopTransport","Skipped","BaseBackend","_transport","_setupTransport","_exception","_hint","_message","originalFunctionToString","FunctionToString","DEFAULT_IGNORE_ERRORS","InboundFilters","clientOptions","_mergeOptions","_shouldDropEvent","_isSentryError","_isIgnoredError","_isBlacklistedUrl","_getEventFilterUrl","_isWhitelistedUrl","ignoreInternal","ignoreErrors","_getPossibleEventMessages","some","blacklistUrls","whitelistUrls","oO","stacktrace","frames","filename","UNKNOWN_FUNCTION","gecko","winjs","geckoEval","chromeEval","computeStackTrace","ex","popSize","framesToPop","opera10Regex","opera11Regex","lines","parts","element","extractMessage","computeStackTraceFromStacktraceProp","popFrames","isEval","submatch","isNative","columnNumber","computeStackTraceFromStackProp","failed","STACKTRACE_LIMIT","exceptionFromStacktrace","prepareFramesForEvent","eventFromStacktrace","localStack","firstFrameFunction","lastFrameFunction","frame","colno","function","in_app","lineno","eventFromUnknownInput","domException","eventFromString","rejection","__serialized__","eventFromPlainObject","synthetic","attachStacktrace","BaseTransport","getStoreEndpointWithUrlEncodedAuth","drain","FetchTransport","_disabledUntil","Promise","defaultOptions","body","headers","fromHttpCode","get","catch","XHRTransport","onreadystatechange","getResponseHeader","open","setRequestHeader","send","BrowserBackend","transportOptions","transport","handled","SDK_NAME","SDK_VERSION","BrowserClient","platform","packages","getDsn","script","async","src","getReportDialogEndpoint","onLoad","onload","ignoreOnError","shouldIgnoreOnError","wrap","before","sentryWrapped","wrappedArguments","arg","addEventProcessor","property","defineProperty","getOwnPropertyDescriptor","configurable","GlobalHandlers","stackTraceLimit","_installGlobalOnErrorHandler","_installGlobalOnUnhandledRejectionHandler","_onErrorHandlerInstalled","currentHub","hasIntegration","isFailedOwnDelivery","_eventFromIncompleteOnError","_enhanceEventWithInitialFrame","captureEvent","_onUnhandledRejectionHandlerInstalled","_eventFromIncompleteRejection","ERROR_TYPES_RE","groups","getLocationHref","TryCatch","originalCallback","wrapOptions","_ignoreOnError","_wrapTimeFunction","_wrapRAF","_wrapXHR","_wrapEventTarget","Breadcrumbs","dom","handlerData","category","fromString","addSentryBreadcrumb","filterUrl","parsedLoc","parsedFrom","parsedTo","_consoleBreadcrumb","_domBreadcrumb","_xhrBreadcrumb","_fetchBreadcrumb","_historyBreadcrumb","serializedData","DEFAULT_KEY","DEFAULT_LIMIT","LinkedErrors","_key","limit","_handler","linkedErrors","_walkErrorTree","UserAgent","navigator","userAgent","CoreIntegrations.InboundFilters","CoreIntegrations.FunctionToString","windowIntegrations","_window","Sentry","Integrations","INTEGRATIONS","CoreIntegrations","BrowserIntegrations","SENTRY_RELEASE","clientClass","debug","enable","bindClient","initAndBind","lastEventId","showReportDialog","internalWrap"],"mappings":";uBACA,IAAYA,ECAAC,ECwFAC,ECxFAC,GHAZ,SAAYH,GAEVA,mBAEAA,qBAEAA,qBAEAA,yBARF,CAAYA,IAAAA,QCAAC,EAAAA,aAAAA,8BAIVA,gBAEAA,oBAEAA,YAEAA,cAEAA,gBAEAA,sBAIF,SAAiBA,GAOCA,aAAhB,SAA2BG,GACzB,OAAQA,GACN,IAAK,QACH,OAAOH,EAASI,MAClB,IAAK,OACH,OAAOJ,EAASK,KAClB,IAAK,OACL,IAAK,UACH,OAAOL,EAASM,QAClB,IAAK,QACH,OAAON,EAASO,MAClB,IAAK,QACH,OAAOP,EAASQ,MAClB,IAAK,WACH,OAAOR,EAASS,SAClB,IAAK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c,mCAgEP5H,GACnB,OAAOkkB,GAAalkB,EAAbkkB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/build/bundle.js b/node_modules/@sentry/browser/build/bundle.js deleted file mode 100644 index 906843b..0000000 --- a/node_modules/@sentry/browser/build/bundle.js +++ /dev/null @@ -1,5692 +0,0 @@ -/*! @sentry/browser 5.14.1 (de33eb09) | https://github.com/getsentry/sentry-javascript */ -var Sentry = (function (exports) { - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. All rights reserved. - Licensed under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of the - License at http://www.apache.org/licenses/LICENSE-2.0 - - THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED - WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, - MERCHANTABLITY OR NON-INFRINGEMENT. - - See the Apache Version 2.0 License for specific language governing permissions - and limitations under the License. - ***************************************************************************** */ - /* 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); - }; - - function __extends(d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - - 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); - }; - - 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) - t[p[i]] = s[p[i]]; - return t; - } - - 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; - } - - function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - } - - function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - } - - function __awaiter(thisArg, _arguments, P, generator) { - 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) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } - - 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 }; - } - } - - function __exportStar(m, exports) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } - - function __values(o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; - if (m) return m.call(o); - return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - } - - 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; - } - - function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - } - - function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - } - - 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]); } - } - - 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; } - } - - 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); } - } - - function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - } - 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; - } - - function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; - } - - var tslib_1 = /*#__PURE__*/Object.freeze({ - __extends: __extends, - get __assign () { return __assign; }, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __exportStar: __exportStar, - __values: __values, - __read: __read, - __spread: __spread, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault - }); - - /** Console logging verbosity for the SDK. */ - var LogLevel; - (function (LogLevel) { - /** No logs will be generated. */ - LogLevel[LogLevel["None"] = 0] = "None"; - /** Only SDK internal errors will be logged. */ - LogLevel[LogLevel["Error"] = 1] = "Error"; - /** Information useful for debugging the SDK will be logged. */ - LogLevel[LogLevel["Debug"] = 2] = "Debug"; - /** All SDK actions will be logged. */ - LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; - })(LogLevel || (LogLevel = {})); - - /** JSDoc */ - (function (Severity) { - /** JSDoc */ - Severity["Fatal"] = "fatal"; - /** JSDoc */ - Severity["Error"] = "error"; - /** JSDoc */ - Severity["Warning"] = "warning"; - /** JSDoc */ - Severity["Log"] = "log"; - /** JSDoc */ - Severity["Info"] = "info"; - /** JSDoc */ - Severity["Debug"] = "debug"; - /** JSDoc */ - Severity["Critical"] = "critical"; - })(exports.Severity || (exports.Severity = {})); - // tslint:disable:completed-docs - // tslint:disable:no-unnecessary-qualifier no-namespace - (function (Severity) { - /** - * Converts a string-based level into a {@link Severity}. - * - * @param level string representation of Severity - * @returns Severity - */ - function fromString(level) { - switch (level) { - case 'debug': - return Severity.Debug; - case 'info': - return Severity.Info; - case 'warn': - case 'warning': - return Severity.Warning; - case 'error': - return Severity.Error; - case 'fatal': - return Severity.Fatal; - case 'critical': - return Severity.Critical; - case 'log': - default: - return Severity.Log; - } - } - Severity.fromString = fromString; - })(exports.Severity || (exports.Severity = {})); - - /** The status of an Span. */ - var SpanStatus; - (function (SpanStatus) { - /** The operation completed successfully. */ - SpanStatus["Ok"] = "ok"; - /** Deadline expired before operation could complete. */ - SpanStatus["DeadlineExceeded"] = "deadline_exceeded"; - /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ - SpanStatus["Unauthenticated"] = "unauthenticated"; - /** 403 Forbidden */ - SpanStatus["PermissionDenied"] = "permission_denied"; - /** 404 Not Found. Some requested entity (file or directory) was not found. */ - SpanStatus["NotFound"] = "not_found"; - /** 429 Too Many Requests */ - SpanStatus["ResourceExhausted"] = "resource_exhausted"; - /** Client specified an invalid argument. 4xx. */ - SpanStatus["InvalidArgument"] = "invalid_argument"; - /** 501 Not Implemented */ - SpanStatus["Unimplemented"] = "unimplemented"; - /** 503 Service Unavailable */ - SpanStatus["Unavailable"] = "unavailable"; - /** Other/generic 5xx. */ - SpanStatus["InternalError"] = "internal_error"; - /** Unknown. Any non-standard HTTP status code. */ - SpanStatus["UnknownError"] = "unknown_error"; - /** The operation was cancelled (typically by the user). */ - SpanStatus["Cancelled"] = "cancelled"; - /** Already exists (409) */ - SpanStatus["AlreadyExists"] = "already_exists"; - /** Operation was rejected because the system is not in a state required for the operation's */ - SpanStatus["FailedPrecondition"] = "failed_precondition"; - /** The operation was aborted, typically due to a concurrency issue. */ - SpanStatus["Aborted"] = "aborted"; - /** Operation was attempted past the valid range. */ - SpanStatus["OutOfRange"] = "out_of_range"; - /** Unrecoverable data loss or corruption */ - SpanStatus["DataLoss"] = "data_loss"; - })(SpanStatus || (SpanStatus = {})); - // tslint:disable:no-unnecessary-qualifier no-namespace - (function (SpanStatus) { - /** - * Converts a HTTP status code into a {@link SpanStatus}. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or {@link SpanStatus.UnknownError}. - */ - // tslint:disable-next-line:completed-docs - function fromHttpCode(httpStatus) { - if (httpStatus < 400) { - return SpanStatus.Ok; - } - if (httpStatus >= 400 && httpStatus < 500) { - switch (httpStatus) { - case 401: - return SpanStatus.Unauthenticated; - case 403: - return SpanStatus.PermissionDenied; - case 404: - return SpanStatus.NotFound; - case 409: - return SpanStatus.AlreadyExists; - case 413: - return SpanStatus.FailedPrecondition; - case 429: - return SpanStatus.ResourceExhausted; - default: - return SpanStatus.InvalidArgument; - } - } - if (httpStatus >= 500 && httpStatus < 600) { - switch (httpStatus) { - case 501: - return SpanStatus.Unimplemented; - case 503: - return SpanStatus.Unavailable; - case 504: - return SpanStatus.DeadlineExceeded; - default: - return SpanStatus.InternalError; - } - } - return SpanStatus.UnknownError; - } - SpanStatus.fromHttpCode = fromHttpCode; - })(SpanStatus || (SpanStatus = {})); - - /** The status of an event. */ - (function (Status) { - /** The status could not be determined. */ - Status["Unknown"] = "unknown"; - /** The event was skipped due to configuration or callbacks. */ - Status["Skipped"] = "skipped"; - /** The event was sent to Sentry successfully. */ - Status["Success"] = "success"; - /** The client is currently rate limited and will try again later. */ - Status["RateLimit"] = "rate_limit"; - /** The event could not be processed. */ - Status["Invalid"] = "invalid"; - /** A server-side error ocurred during submission. */ - Status["Failed"] = "failed"; - })(exports.Status || (exports.Status = {})); - // tslint:disable:completed-docs - // tslint:disable:no-unnecessary-qualifier no-namespace - (function (Status) { - /** - * Converts a HTTP status code into a {@link Status}. - * - * @param code The HTTP response status code. - * @returns The send status or {@link Status.Unknown}. - */ - function fromHttpCode(code) { - if (code >= 200 && code < 300) { - return Status.Success; - } - if (code === 429) { - return Status.RateLimit; - } - if (code >= 400 && code < 500) { - return Status.Invalid; - } - if (code >= 500) { - return Status.Failed; - } - return Status.Unknown; - } - Status.fromHttpCode = fromHttpCode; - })(exports.Status || (exports.Status = {})); - - /** - * Consumes the promise and logs the error when it rejects. - * @param promise A promise to forget. - */ - - var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method - /** - * setPrototypeOf polyfill using __proto__ - */ - function setProtoOf(obj, proto) { - // @ts-ignore - obj.__proto__ = proto; - return obj; - } - /** - * setPrototypeOf polyfill using mixin - */ - function mixinProperties(obj, proto) { - for (var prop in proto) { - if (!obj.hasOwnProperty(prop)) { - // @ts-ignore - obj[prop] = proto[prop]; - } - } - return obj; - } - - /** An error emitted by Sentry SDKs and related utilities. */ - var SentryError = /** @class */ (function (_super) { - __extends(SentryError, _super); - function SentryError(message) { - var _newTarget = this.constructor; - var _this = _super.call(this, message) || this; - _this.message = message; - // tslint:disable:no-unsafe-any - _this.name = _newTarget.prototype.constructor.name; - setPrototypeOf(_this, _newTarget.prototype); - return _this; - } - return SentryError; - }(Error)); - - /** - * Checks whether given value's type is one of a few Error or Error-like - * {@link isError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isError(wat) { - switch (Object.prototype.toString.call(wat)) { - case '[object Error]': - return true; - case '[object Exception]': - return true; - case '[object DOMException]': - return true; - default: - return isInstanceOf(wat, Error); - } - } - /** - * Checks whether given value's type is ErrorEvent - * {@link isErrorEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isErrorEvent(wat) { - return Object.prototype.toString.call(wat) === '[object ErrorEvent]'; - } - /** - * Checks whether given value's type is DOMError - * {@link isDOMError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isDOMError(wat) { - return Object.prototype.toString.call(wat) === '[object DOMError]'; - } - /** - * Checks whether given value's type is DOMException - * {@link isDOMException}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isDOMException(wat) { - return Object.prototype.toString.call(wat) === '[object DOMException]'; - } - /** - * Checks whether given value's type is a string - * {@link isString}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isString(wat) { - return Object.prototype.toString.call(wat) === '[object String]'; - } - /** - * Checks whether given value's is a primitive (undefined, null, number, boolean, string) - * {@link isPrimitive}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isPrimitive(wat) { - return wat === null || (typeof wat !== 'object' && typeof wat !== 'function'); - } - /** - * Checks whether given value's type is an object literal - * {@link isPlainObject}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isPlainObject(wat) { - return Object.prototype.toString.call(wat) === '[object Object]'; - } - /** - * Checks whether given value's type is an Event instance - * {@link isEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isEvent(wat) { - // tslint:disable-next-line:strict-type-predicates - return typeof Event !== 'undefined' && isInstanceOf(wat, Event); - } - /** - * Checks whether given value's type is an Element instance - * {@link isElement}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isElement(wat) { - // tslint:disable-next-line:strict-type-predicates - return typeof Element !== 'undefined' && isInstanceOf(wat, Element); - } - /** - * Checks whether given value's type is an regexp - * {@link isRegExp}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isRegExp(wat) { - return Object.prototype.toString.call(wat) === '[object RegExp]'; - } - /** - * Checks whether given value has a then function. - * @param wat A value to be checked. - */ - function isThenable(wat) { - // tslint:disable:no-unsafe-any - return Boolean(wat && wat.then && typeof wat.then === 'function'); - // tslint:enable:no-unsafe-any - } - /** - * Checks whether given value's type is a SyntheticEvent - * {@link isSyntheticEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ - function isSyntheticEvent(wat) { - // tslint:disable-next-line:no-unsafe-any - return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; - } - /** - * Checks whether given value's type is an instance of provided constructor. - * {@link isInstanceOf}. - * - * @param wat A value to be checked. - * @param base A constructor to be used in a check. - * @returns A boolean representing the result. - */ - function isInstanceOf(wat, base) { - try { - // tslint:disable-next-line:no-unsafe-any - return wat instanceof base; - } - catch (_e) { - return false; - } - } - - /** - * Truncates given string to the maximum characters count - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ - function truncate(str, max) { - if (max === void 0) { max = 0; } - // tslint:disable-next-line:strict-type-predicates - if (typeof str !== 'string' || max === 0) { - return str; - } - return str.length <= max ? str : str.substr(0, max) + "..."; - } - /** - * Join values in array - * @param input array of values to be joined together - * @param delimiter string to be placed in-between values - * @returns Joined values - */ - function safeJoin(input, delimiter) { - if (!Array.isArray(input)) { - return ''; - } - var output = []; - // tslint:disable-next-line:prefer-for-of - for (var i = 0; i < input.length; i++) { - var value = input[i]; - try { - output.push(String(value)); - } - catch (e) { - output.push('[value cannot be serialized]'); - } - } - return output.join(delimiter); - } - /** - * Checks if the value matches a regex or includes the string - * @param value The string value to be checked against - * @param pattern Either a regex or a string that must be contained in value - */ - function isMatchingPattern(value, pattern) { - if (isRegExp(pattern)) { - return pattern.test(value); - } - if (typeof pattern === 'string') { - return value.indexOf(pattern) !== -1; - } - return false; - } - - /** - * Requires a module which is protected _against bundler minification. - * - * @param request The module path to resolve - */ - function dynamicRequire(mod, request) { - // tslint:disable-next-line: no-unsafe-any - return mod.require(request); - } - /** - * Checks whether we're in the Node.js or Browser environment - * - * @returns Answer to given question - */ - function isNodeEnv() { - // tslint:disable:strict-type-predicates - return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'; - } - var fallbackGlobalObject = {}; - /** - * Safely get global scope object - * - * @returns Global scope object - */ - function getGlobalObject() { - return (isNodeEnv() - ? global - : typeof window !== 'undefined' - ? window - : typeof self !== 'undefined' - ? self - : fallbackGlobalObject); - } - /** - * UUID4 generator - * - * @returns string Generated UUID4. - */ - function uuid4() { - var global = getGlobalObject(); - var crypto = global.crypto || global.msCrypto; - if (!(crypto === void 0) && crypto.getRandomValues) { - // Use window.crypto API if available - var arr = new Uint16Array(8); - crypto.getRandomValues(arr); - // set 4 in byte 7 - // tslint:disable-next-line:no-bitwise - arr[3] = (arr[3] & 0xfff) | 0x4000; - // set 2 most significant bits of byte 9 to '10' - // tslint:disable-next-line:no-bitwise - arr[4] = (arr[4] & 0x3fff) | 0x8000; - var pad = function (num) { - var v = num.toString(16); - while (v.length < 4) { - v = "0" + v; - } - return v; - }; - return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])); - } - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 - return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - // tslint:disable-next-line:no-bitwise - var r = (Math.random() * 16) | 0; - // tslint:disable-next-line:no-bitwise - var v = c === 'x' ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); - } - /** - * Parses string form of URL into an object - * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B - * // intentionally using regex and not href parsing trick because React Native and other - * // environments where DOM might not be available - * @returns parsed URL object - */ - function parseUrl(url) { - if (!url) { - return {}; - } - var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); - if (!match) { - return {}; - } - // coerce to undefined values to empty string so we don't get 'undefined' - var query = match[6] || ''; - var fragment = match[8] || ''; - return { - host: match[4], - path: match[5], - protocol: match[2], - relative: match[5] + query + fragment, - }; - } - /** - * Extracts either message or type+value from an event that can be used for user-facing logs - * @returns event's description - */ - function getEventDescription(event) { - if (event.message) { - return event.message; - } - if (event.exception && event.exception.values && event.exception.values[0]) { - var exception = event.exception.values[0]; - if (exception.type && exception.value) { - return exception.type + ": " + exception.value; - } - return exception.type || exception.value || event.event_id || ''; - } - return event.event_id || ''; - } - /** JSDoc */ - function consoleSandbox(callback) { - var global = getGlobalObject(); - var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert']; - if (!('console' in global)) { - return callback(); - } - var originalConsole = global.console; - var wrappedLevels = {}; - // Restore all wrapped console methods - levels.forEach(function (level) { - if (level in global.console && originalConsole[level].__sentry_original__) { - wrappedLevels[level] = originalConsole[level]; - originalConsole[level] = originalConsole[level].__sentry_original__; - } - }); - // Perform callback manipulations - var result = callback(); - // Revert restoration to wrapped state - Object.keys(wrappedLevels).forEach(function (level) { - originalConsole[level] = wrappedLevels[level]; - }); - return result; - } - /** - * Adds exception values, type and value to an synthetic Exception. - * @param event The event to modify. - * @param value Value of the exception. - * @param type Type of the exception. - * @hidden - */ - function addExceptionTypeValue(event, value, type) { - event.exception = event.exception || {}; - event.exception.values = event.exception.values || []; - event.exception.values[0] = event.exception.values[0] || {}; - event.exception.values[0].value = event.exception.values[0].value || value || ''; - event.exception.values[0].type = event.exception.values[0].type || type || 'Error'; - } - /** - * Adds exception mechanism to a given event. - * @param event The event to modify. - * @param mechanism Mechanism of the mechanism. - * @hidden - */ - function addExceptionMechanism(event, mechanism) { - if (mechanism === void 0) { mechanism = {}; } - // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better? - try { - // @ts-ignore - // tslint:disable:no-non-null-assertion - event.exception.values[0].mechanism = event.exception.values[0].mechanism || {}; - Object.keys(mechanism).forEach(function (key) { - // @ts-ignore - event.exception.values[0].mechanism[key] = mechanism[key]; - }); - } - catch (_oO) { - // no-empty - } - } - /** - * A safe form of location.href - */ - function getLocationHref() { - try { - return document.location.href; - } - catch (oO) { - return ''; - } - } - /** - * Given a child DOM element, returns a query-selector statement describing that - * and its ancestors - * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] - * @returns generated DOM path - */ - function htmlTreeAsString(elem) { - // try/catch both: - // - accessing event.target (see getsentry/raven-js#838, #768) - // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly - // - can throw an exception in some circumstances. - try { - var currentElem = elem; - var MAX_TRAVERSE_HEIGHT = 5; - var MAX_OUTPUT_LEN = 80; - var out = []; - var height = 0; - var len = 0; - var separator = ' > '; - var sepLength = separator.length; - var nextStr = void 0; - while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { - nextStr = _htmlElementAsString(currentElem); - // bail out if - // - nextStr is the 'html' element - // - the length of the string that would be created exceeds MAX_OUTPUT_LEN - // (ignore this limit if we are on the first iteration) - if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) { - break; - } - out.push(nextStr); - len += nextStr.length; - currentElem = currentElem.parentNode; - } - return out.reverse().join(separator); - } - catch (_oO) { - return ''; - } - } - /** - * Returns a simple, query-selector representation of a DOM element - * e.g. [HTMLElement] => input#foo.btn[name=baz] - * @returns generated DOM path - */ - function _htmlElementAsString(el) { - var elem = el; - var out = []; - var className; - var classes; - var key; - var attr; - var i; - if (!elem || !elem.tagName) { - return ''; - } - out.push(elem.tagName.toLowerCase()); - if (elem.id) { - out.push("#" + elem.id); - } - className = elem.className; - if (className && isString(className)) { - classes = className.split(/\s+/); - for (i = 0; i < classes.length; i++) { - out.push("." + classes[i]); - } - } - var attrWhitelist = ['type', 'name', 'title', 'alt']; - for (i = 0; i < attrWhitelist.length; i++) { - key = attrWhitelist[i]; - attr = elem.getAttribute(key); - if (attr) { - out.push("[" + key + "=\"" + attr + "\"]"); - } - } - return out.join(''); - } - var INITIAL_TIME = Date.now(); - var prevNow = 0; - var performanceFallback = { - now: function () { - var now = Date.now() - INITIAL_TIME; - if (now < prevNow) { - now = prevNow; - } - prevNow = now; - return now; - }, - timeOrigin: INITIAL_TIME, - }; - var crossPlatformPerformance = (function () { - if (isNodeEnv()) { - try { - var perfHooks = dynamicRequire(module, 'perf_hooks'); - return perfHooks.performance; - } - catch (_) { - return performanceFallback; - } - } - if (getGlobalObject().performance) { - // Polyfill for performance.timeOrigin. - // - // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin - // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing. - // tslint:disable-next-line:strict-type-predicates - if (performance.timeOrigin === undefined) { - // For webworkers it could mean we don't have performance.timing then we fallback - // tslint:disable-next-line:deprecation - if (!performance.timing) { - return performanceFallback; - } - // tslint:disable-next-line:deprecation - if (!performance.timing.navigationStart) { - return performanceFallback; - } - // @ts-ignore - // tslint:disable-next-line:deprecation - performance.timeOrigin = performance.timing.navigationStart; - } - } - return getGlobalObject().performance || performanceFallback; - })(); - /** - * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock. - */ - function timestampWithMs() { - return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000; - } - var defaultRetryAfter = 60 * 1000; // 60 seconds - /** - * Extracts Retry-After value from the request header or returns default value - * @param now current unix timestamp - * @param header string representation of 'Retry-After' header - */ - function parseRetryAfterHeader(now, header) { - if (!header) { - return defaultRetryAfter; - } - var headerDelay = parseInt("" + header, 10); - if (!isNaN(headerDelay)) { - return headerDelay * 1000; - } - var headerDate = Date.parse("" + header); - if (!isNaN(headerDate)) { - return headerDate - now; - } - return defaultRetryAfter; - } - var defaultFunctionName = ''; - /** - * Safely extract function name from itself - */ - function getFunctionName(fn) { - try { - if (!fn || typeof fn !== 'function') { - return defaultFunctionName; - } - return fn.name || defaultFunctionName; - } - catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - return defaultFunctionName; - } - } - - // TODO: Implement different loggers for different environments - var global$1 = getGlobalObject(); - /** Prefix for logging strings */ - var PREFIX = 'Sentry Logger '; - /** JSDoc */ - var Logger = /** @class */ (function () { - /** JSDoc */ - function Logger() { - this._enabled = false; - } - /** JSDoc */ - Logger.prototype.disable = function () { - this._enabled = false; - }; - /** JSDoc */ - Logger.prototype.enable = function () { - this._enabled = true; - }; - /** JSDoc */ - Logger.prototype.log = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._enabled) { - return; - } - consoleSandbox(function () { - global$1.console.log(PREFIX + "[Log]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - /** JSDoc */ - Logger.prototype.warn = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._enabled) { - return; - } - consoleSandbox(function () { - global$1.console.warn(PREFIX + "[Warn]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - /** JSDoc */ - Logger.prototype.error = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._enabled) { - return; - } - consoleSandbox(function () { - global$1.console.error(PREFIX + "[Error]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - return Logger; - }()); - // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used - global$1.__SENTRY__ = global$1.__SENTRY__ || {}; - var logger = global$1.__SENTRY__.logger || (global$1.__SENTRY__.logger = new Logger()); - - // tslint:disable:no-unsafe-any - /** - * Memo class used for decycle json objects. Uses WeakSet if available otherwise array. - */ - var Memo = /** @class */ (function () { - function Memo() { - // tslint:disable-next-line - this._hasWeakSet = typeof WeakSet === 'function'; - this._inner = this._hasWeakSet ? new WeakSet() : []; - } - /** - * Sets obj to remember. - * @param obj Object to remember - */ - Memo.prototype.memoize = function (obj) { - if (this._hasWeakSet) { - if (this._inner.has(obj)) { - return true; - } - this._inner.add(obj); - return false; - } - // tslint:disable-next-line:prefer-for-of - for (var i = 0; i < this._inner.length; i++) { - var value = this._inner[i]; - if (value === obj) { - return true; - } - } - this._inner.push(obj); - return false; - }; - /** - * Removes object from internal storage. - * @param obj Object to forget - */ - Memo.prototype.unmemoize = function (obj) { - if (this._hasWeakSet) { - this._inner.delete(obj); - } - else { - for (var i = 0; i < this._inner.length; i++) { - if (this._inner[i] === obj) { - this._inner.splice(i, 1); - break; - } - } - } - }; - return Memo; - }()); - - /** - * Wrap a given object method with a higher-order function - * - * @param source An object that contains a method to be wrapped. - * @param name A name of method to be wrapped. - * @param replacement A function that should be used to wrap a given method. - * @returns void - */ - function fill(source, name, replacement) { - if (!(name in source)) { - return; - } - var original = source[name]; - var wrapped = replacement(original); - // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work - // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" - // tslint:disable-next-line:strict-type-predicates - if (typeof wrapped === 'function') { - try { - wrapped.prototype = wrapped.prototype || {}; - Object.defineProperties(wrapped, { - __sentry_original__: { - enumerable: false, - value: original, - }, - }); - } - catch (_Oo) { - // This can throw if multiple fill happens on a global object like XMLHttpRequest - // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 - } - } - source[name] = wrapped; - } - /** - * Encodes given object into url-friendly format - * - * @param object An object that contains serializable values - * @returns string Encoded - */ - function urlEncode(object) { - return Object.keys(object) - .map( - // tslint:disable-next-line:no-unsafe-any - function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); }) - .join('&'); - } - /** - * Transforms any object into an object literal with all it's attributes - * attached to it. - * - * @param value Initial source that we have to transform in order to be usable by the serializer - */ - function getWalkSource(value) { - if (isError(value)) { - var error = value; - var err = { - message: error.message, - name: error.name, - stack: error.stack, - }; - for (var i in error) { - if (Object.prototype.hasOwnProperty.call(error, i)) { - err[i] = error[i]; - } - } - return err; - } - if (isEvent(value)) { - var event_1 = value; - var source = {}; - source.type = event_1.type; - // Accessing event.target can throw (see getsentry/raven-js#838, #768) - try { - source.target = isElement(event_1.target) - ? htmlTreeAsString(event_1.target) - : Object.prototype.toString.call(event_1.target); - } - catch (_oO) { - source.target = ''; - } - try { - source.currentTarget = isElement(event_1.currentTarget) - ? htmlTreeAsString(event_1.currentTarget) - : Object.prototype.toString.call(event_1.currentTarget); - } - catch (_oO) { - source.currentTarget = ''; - } - // tslint:disable-next-line:strict-type-predicates - if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) { - source.detail = event_1.detail; - } - for (var i in event_1) { - if (Object.prototype.hasOwnProperty.call(event_1, i)) { - source[i] = event_1; - } - } - return source; - } - return value; - } - /** Calculates bytes size of input string */ - function utf8Length(value) { - // tslint:disable-next-line:no-bitwise - return ~-encodeURI(value).split(/%..|./).length; - } - /** Calculates bytes size of input object */ - function jsonSize(value) { - return utf8Length(JSON.stringify(value)); - } - /** JSDoc */ - function normalizeToSize(object, - // Default Node.js REPL depth - depth, - // 100kB, as 200kB is max payload size, so half sounds reasonable - maxSize) { - if (depth === void 0) { depth = 3; } - if (maxSize === void 0) { maxSize = 100 * 1024; } - var serialized = normalize(object, depth); - if (jsonSize(serialized) > maxSize) { - return normalizeToSize(object, depth - 1, maxSize); - } - return serialized; - } - /** Transforms any input value into a string form, either primitive value or a type of the input */ - function serializeValue(value) { - var type = Object.prototype.toString.call(value); - // Node.js REPL notation - if (typeof value === 'string') { - return value; - } - if (type === '[object Object]') { - return '[Object]'; - } - if (type === '[object Array]') { - return '[Array]'; - } - var normalized = normalizeValue(value); - return isPrimitive(normalized) ? normalized : type; - } - /** - * normalizeValue() - * - * Takes unserializable input and make it serializable friendly - * - * - translates undefined/NaN values to "[undefined]"/"[NaN]" respectively, - * - serializes Error objects - * - filter global objects - */ - // tslint:disable-next-line:cyclomatic-complexity - function normalizeValue(value, key) { - if (key === 'domain' && value && typeof value === 'object' && value._events) { - return '[Domain]'; - } - if (key === 'domainEmitter') { - return '[DomainEmitter]'; - } - if (typeof global !== 'undefined' && value === global) { - return '[Global]'; - } - if (typeof window !== 'undefined' && value === window) { - return '[Window]'; - } - if (typeof document !== 'undefined' && value === document) { - return '[Document]'; - } - // React's SyntheticEvent thingy - if (isSyntheticEvent(value)) { - return '[SyntheticEvent]'; - } - // tslint:disable-next-line:no-tautology-expression - if (typeof value === 'number' && value !== value) { - return '[NaN]'; - } - if (value === void 0) { - return '[undefined]'; - } - if (typeof value === 'function') { - return "[Function: " + getFunctionName(value) + "]"; - } - return value; - } - /** - * Walks an object to perform a normalization on it - * - * @param key of object that's walked in current iteration - * @param value object to be walked - * @param depth Optional number indicating how deep should walking be performed - * @param memo Optional Memo class handling decycling - */ - function walk(key, value, depth, memo) { - if (depth === void 0) { depth = +Infinity; } - if (memo === void 0) { memo = new Memo(); } - // If we reach the maximum depth, serialize whatever has left - if (depth === 0) { - return serializeValue(value); - } - // If value implements `toJSON` method, call it and return early - // tslint:disable:no-unsafe-any - if (value !== null && value !== undefined && typeof value.toJSON === 'function') { - return value.toJSON(); - } - // tslint:enable:no-unsafe-any - // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further - var normalized = normalizeValue(value, key); - if (isPrimitive(normalized)) { - return normalized; - } - // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself - var source = getWalkSource(value); - // Create an accumulator that will act as a parent for all future itterations of that branch - var acc = Array.isArray(value) ? [] : {}; - // If we already walked that branch, bail out, as it's circular reference - if (memo.memoize(value)) { - return '[Circular ~]'; - } - // Walk all keys of the source - for (var innerKey in source) { - // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration. - if (!Object.prototype.hasOwnProperty.call(source, innerKey)) { - continue; - } - // Recursively walk through all the child nodes - acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo); - } - // Once walked through all the branches, remove the parent from memo storage - memo.unmemoize(value); - // Return accumulated values - return acc; - } - /** - * normalize() - * - * - Creates a copy to prevent original input mutation - * - Skip non-enumerablers - * - Calls `toJSON` if implemented - * - Removes circular references - * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format - * - Translates known global objects/Classes to a string representations - * - Takes care of Error objects serialization - * - Optionally limit depth of final output - */ - function normalize(input, depth) { - try { - // tslint:disable-next-line:no-unsafe-any - return JSON.parse(JSON.stringify(input, function (key, value) { return walk(key, value, depth); })); - } - catch (_oO) { - return '**non-serializable**'; - } - } - /** - * Given any captured exception, extract its keys and create a sorted - * and truncated list that will be used inside the event message. - * eg. `Non-error exception captured with keys: foo, bar, baz` - */ - function extractExceptionKeysForMessage(exception, maxLength) { - if (maxLength === void 0) { maxLength = 40; } - // tslint:disable:strict-type-predicates - var keys = Object.keys(getWalkSource(exception)); - keys.sort(); - if (!keys.length) { - return '[object has no keys]'; - } - if (keys[0].length >= maxLength) { - return truncate(keys[0], maxLength); - } - for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) { - var serialized = keys.slice(0, includedKeys).join(', '); - if (serialized.length > maxLength) { - continue; - } - if (includedKeys === keys.length) { - return serialized; - } - return truncate(serialized, maxLength); - } - return ''; - } - - // Slightly modified (no IE8 support, ES6) and transcribed to TypeScript - - /** SyncPromise internal states */ - var States; - (function (States) { - /** Pending */ - States["PENDING"] = "PENDING"; - /** Resolved / OK */ - States["RESOLVED"] = "RESOLVED"; - /** Rejected / Error */ - States["REJECTED"] = "REJECTED"; - })(States || (States = {})); - /** - * Thenable class that behaves like a Promise and follows it's interface - * but is not async internally - */ - var SyncPromise = /** @class */ (function () { - function SyncPromise(executor) { - var _this = this; - this._state = States.PENDING; - this._handlers = []; - /** JSDoc */ - this._resolve = function (value) { - _this._setResult(States.RESOLVED, value); - }; - /** JSDoc */ - this._reject = function (reason) { - _this._setResult(States.REJECTED, reason); - }; - /** JSDoc */ - this._setResult = function (state, value) { - if (_this._state !== States.PENDING) { - return; - } - if (isThenable(value)) { - value.then(_this._resolve, _this._reject); - return; - } - _this._state = state; - _this._value = value; - _this._executeHandlers(); - }; - // TODO: FIXME - /** JSDoc */ - this._attachHandler = function (handler) { - _this._handlers = _this._handlers.concat(handler); - _this._executeHandlers(); - }; - /** JSDoc */ - this._executeHandlers = function () { - if (_this._state === States.PENDING) { - return; - } - if (_this._state === States.REJECTED) { - _this._handlers.forEach(function (handler) { - if (handler.onrejected) { - handler.onrejected(_this._value); - } - }); - } - else { - _this._handlers.forEach(function (handler) { - if (handler.onfulfilled) { - // tslint:disable-next-line:no-unsafe-any - handler.onfulfilled(_this._value); - } - }); - } - _this._handlers = []; - }; - try { - executor(this._resolve, this._reject); - } - catch (e) { - this._reject(e); - } - } - /** JSDoc */ - SyncPromise.prototype.toString = function () { - return '[object SyncPromise]'; - }; - /** JSDoc */ - SyncPromise.resolve = function (value) { - return new SyncPromise(function (resolve) { - resolve(value); - }); - }; - /** JSDoc */ - SyncPromise.reject = function (reason) { - return new SyncPromise(function (_, reject) { - reject(reason); - }); - }; - /** JSDoc */ - SyncPromise.all = function (collection) { - return new SyncPromise(function (resolve, reject) { - if (!Array.isArray(collection)) { - reject(new TypeError("Promise.all requires an array as input.")); - return; - } - if (collection.length === 0) { - resolve([]); - return; - } - var counter = collection.length; - var resolvedCollection = []; - collection.forEach(function (item, index) { - SyncPromise.resolve(item) - .then(function (value) { - resolvedCollection[index] = value; - counter -= 1; - if (counter !== 0) { - return; - } - resolve(resolvedCollection); - }) - .then(null, reject); - }); - }); - }; - /** JSDoc */ - SyncPromise.prototype.then = function (onfulfilled, onrejected) { - var _this = this; - return new SyncPromise(function (resolve, reject) { - _this._attachHandler({ - onfulfilled: function (result) { - if (!onfulfilled) { - // TODO: ¯\_(ツ)_/¯ - // TODO: FIXME - resolve(result); - return; - } - try { - resolve(onfulfilled(result)); - return; - } - catch (e) { - reject(e); - return; - } - }, - onrejected: function (reason) { - if (!onrejected) { - reject(reason); - return; - } - try { - resolve(onrejected(reason)); - return; - } - catch (e) { - reject(e); - return; - } - }, - }); - }); - }; - /** JSDoc */ - SyncPromise.prototype.catch = function (onrejected) { - return this.then(function (val) { return val; }, onrejected); - }; - /** JSDoc */ - SyncPromise.prototype.finally = function (onfinally) { - var _this = this; - return new SyncPromise(function (resolve, reject) { - var val; - var isRejected; - return _this.then(function (value) { - isRejected = false; - val = value; - if (onfinally) { - onfinally(); - } - }, function (reason) { - isRejected = true; - val = reason; - if (onfinally) { - onfinally(); - } - }).then(function () { - if (isRejected) { - reject(val); - return; - } - // tslint:disable-next-line:no-unsafe-any - resolve(val); - }); - }); - }; - return SyncPromise; - }()); - - /** A simple queue that holds promises. */ - var PromiseBuffer = /** @class */ (function () { - function PromiseBuffer(_limit) { - this._limit = _limit; - /** Internal set of queued Promises */ - this._buffer = []; - } - /** - * Says if the buffer is ready to take more requests - */ - PromiseBuffer.prototype.isReady = function () { - return this._limit === undefined || this.length() < this._limit; - }; - /** - * Add a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns The original promise. - */ - PromiseBuffer.prototype.add = function (task) { - var _this = this; - if (!this.isReady()) { - return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.')); - } - if (this._buffer.indexOf(task) === -1) { - this._buffer.push(task); - } - task - .then(function () { return _this.remove(task); }) - .then(null, function () { - return _this.remove(task).then(null, function () { - // We have to add this catch here otherwise we have an unhandledPromiseRejection - // because it's a new Promise chain. - }); - }); - return task; - }; - /** - * Remove a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns Removed promise. - */ - PromiseBuffer.prototype.remove = function (task) { - var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0]; - return removedTask; - }; - /** - * This function returns the number of unresolved promises in the queue. - */ - PromiseBuffer.prototype.length = function () { - return this._buffer.length; - }; - /** - * This will drain the whole queue, returns true if queue is empty or drained. - * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false. - * - * @param timeout Number in ms to wait until it resolves with false. - */ - PromiseBuffer.prototype.drain = function (timeout) { - var _this = this; - return new SyncPromise(function (resolve) { - var capturedSetTimeout = setTimeout(function () { - if (timeout && timeout > 0) { - resolve(false); - } - }, timeout); - SyncPromise.all(_this._buffer) - .then(function () { - clearTimeout(capturedSetTimeout); - resolve(true); - }) - .then(null, function () { - resolve(true); - }); - }); - }; - return PromiseBuffer; - }()); - - /** - * Tells whether current environment supports Fetch API - * {@link supportsFetch}. - * - * @returns Answer to the given question. - */ - function supportsFetch() { - if (!('fetch' in getGlobalObject())) { - return false; - } - try { - // tslint:disable-next-line:no-unused-expression - new Headers(); - // tslint:disable-next-line:no-unused-expression - new Request(''); - // tslint:disable-next-line:no-unused-expression - new Response(); - return true; - } - catch (e) { - return false; - } - } - /** - * isNativeFetch checks if the given function is a native implementation of fetch() - */ - function isNativeFetch(func) { - return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); - } - /** - * Tells whether current environment supports Fetch API natively - * {@link supportsNativeFetch}. - * - * @returns true if `window.fetch` is natively implemented, false otherwise - */ - function supportsNativeFetch() { - if (!supportsFetch()) { - return false; - } - var global = getGlobalObject(); - // Fast path to avoid DOM I/O - // tslint:disable-next-line:no-unbound-method - if (isNativeFetch(global.fetch)) { - return true; - } - // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) - // so create a "pure" iframe to see if that has native fetch - var result = false; - var doc = global.document; - if (doc) { - try { - var sandbox = doc.createElement('iframe'); - sandbox.hidden = true; - doc.head.appendChild(sandbox); - if (sandbox.contentWindow && sandbox.contentWindow.fetch) { - // tslint:disable-next-line:no-unbound-method - result = isNativeFetch(sandbox.contentWindow.fetch); - } - doc.head.removeChild(sandbox); - } - catch (err) { - logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); - } - } - return result; - } - /** - * Tells whether current environment supports Referrer Policy API - * {@link supportsReferrerPolicy}. - * - * @returns Answer to the given question. - */ - function supportsReferrerPolicy() { - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default - // https://caniuse.com/#feat=referrer-policy - // It doesn't. And it throw exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - if (!supportsFetch()) { - return false; - } - try { - // tslint:disable:no-unused-expression - new Request('_', { - referrerPolicy: 'origin', - }); - return true; - } - catch (e) { - return false; - } - } - /** - * Tells whether current environment supports History API - * {@link supportsHistory}. - * - * @returns Answer to the given question. - */ - function supportsHistory() { - // NOTE: in Chrome App environment, touching history.pushState, *even inside - // a try/catch block*, will cause Chrome to output an error to console.error - // borrowed from: https://github.com/angular/angular.js/pull/13945/files - var global = getGlobalObject(); - var chrome = global.chrome; - // tslint:disable-next-line:no-unsafe-any - var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; - var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState; - return !isChromePackagedApp && hasHistoryApi; - } - - /* tslint:disable:only-arrow-functions no-unsafe-any */ - var global$2 = getGlobalObject(); - /** - * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc. - * - Console API - * - Fetch API - * - XHR API - * - History API - * - DOM API (click/typing) - * - Error API - * - UnhandledRejection API - */ - var handlers = {}; - var instrumented = {}; - /** Instruments given API */ - function instrument(type) { - if (instrumented[type]) { - return; - } - instrumented[type] = true; - switch (type) { - case 'console': - instrumentConsole(); - break; - case 'dom': - instrumentDOM(); - break; - case 'xhr': - instrumentXHR(); - break; - case 'fetch': - instrumentFetch(); - break; - case 'history': - instrumentHistory(); - break; - case 'error': - instrumentError(); - break; - case 'unhandledrejection': - instrumentUnhandledRejection(); - break; - default: - logger.warn('unknown instrumentation type:', type); - } - } - /** - * Add handler that will be called when given type of instrumentation triggers. - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ - function addInstrumentationHandler(handler) { - // tslint:disable-next-line:strict-type-predicates - if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') { - return; - } - handlers[handler.type] = handlers[handler.type] || []; - handlers[handler.type].push(handler.callback); - instrument(handler.type); - } - /** JSDoc */ - function triggerHandlers(type, data) { - var e_1, _a; - if (!type || !handlers[type]) { - return; - } - try { - for (var _b = __values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) { - var handler = _c.value; - try { - handler(data); - } - catch (e) { - logger.error("Error while triggering instrumentation handler.\nType: " + type + "\nName: " + getFunctionName(handler) + "\nError: " + e); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - } - /** JSDoc */ - function instrumentConsole() { - if (!('console' in global$2)) { - return; - } - ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) { - if (!(level in global$2.console)) { - return; - } - fill(global$2.console, level, function (originalConsoleLevel) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - triggerHandlers('console', { args: args, level: level }); - // this fails for some browsers. :( - if (originalConsoleLevel) { - Function.prototype.apply.call(originalConsoleLevel, global$2.console, args); - } - }; - }); - }); - } - /** JSDoc */ - function instrumentFetch() { - if (!supportsNativeFetch()) { - return; - } - fill(global$2, 'fetch', function (originalFetch) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var commonHandlerData = { - args: args, - fetchData: { - method: getFetchMethod(args), - url: getFetchUrl(args), - }, - startTimestamp: Date.now(), - }; - triggerHandlers('fetch', __assign({}, commonHandlerData)); - return originalFetch.apply(global$2, args).then(function (response) { - triggerHandlers('fetch', __assign({}, commonHandlerData, { endTimestamp: Date.now(), response: response })); - return response; - }, function (error) { - triggerHandlers('fetch', __assign({}, commonHandlerData, { endTimestamp: Date.now(), error: error })); - throw error; - }); - }; - }); - } - /** Extract `method` from fetch call arguments */ - function getFetchMethod(fetchArgs) { - if (fetchArgs === void 0) { fetchArgs = []; } - if ('Request' in global$2 && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) { - return String(fetchArgs[0].method).toUpperCase(); - } - if (fetchArgs[1] && fetchArgs[1].method) { - return String(fetchArgs[1].method).toUpperCase(); - } - return 'GET'; - } - /** Extract `url` from fetch call arguments */ - function getFetchUrl(fetchArgs) { - if (fetchArgs === void 0) { fetchArgs = []; } - if (typeof fetchArgs[0] === 'string') { - return fetchArgs[0]; - } - if ('Request' in global$2 && isInstanceOf(fetchArgs[0], Request)) { - return fetchArgs[0].url; - } - return String(fetchArgs[0]); - } - /** JSDoc */ - function instrumentXHR() { - if (!('XMLHttpRequest' in global$2)) { - return; - } - var xhrproto = XMLHttpRequest.prototype; - fill(xhrproto, 'open', function (originalOpen) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var url = args[1]; - this.__sentry_xhr__ = { - method: isString(args[0]) ? args[0].toUpperCase() : args[0], - url: args[1], - }; - // if Sentry key appears in URL, don't capture it as a request - if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) { - this.__sentry_own_request__ = true; - } - return originalOpen.apply(this, args); - }; - }); - fill(xhrproto, 'send', function (originalSend) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var xhr = this; // tslint:disable-line:no-this-assignment - var commonHandlerData = { - args: args, - startTimestamp: Date.now(), - xhr: xhr, - }; - triggerHandlers('xhr', __assign({}, commonHandlerData)); - xhr.addEventListener('readystatechange', function () { - if (xhr.readyState === 4) { - try { - // touching statusCode in some platforms throws - // an exception - if (xhr.__sentry_xhr__) { - xhr.__sentry_xhr__.status_code = xhr.status; - } - } - catch (e) { - /* do nothing */ - } - triggerHandlers('xhr', __assign({}, commonHandlerData, { endTimestamp: Date.now() })); - } - }); - return originalSend.apply(this, args); - }; - }); - } - var lastHref; - /** JSDoc */ - function instrumentHistory() { - if (!supportsHistory()) { - return; - } - var oldOnPopState = global$2.onpopstate; - global$2.onpopstate = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var to = global$2.location.href; - // keep track of the current URL state, as we always receive only the updated state - var from = lastHref; - lastHref = to; - triggerHandlers('history', { - from: from, - to: to, - }); - if (oldOnPopState) { - return oldOnPopState.apply(this, args); - } - }; - /** @hidden */ - function historyReplacementFunction(originalHistoryFunction) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var url = args.length > 2 ? args[2] : undefined; - if (url) { - // coerce to string (this is what pushState does) - var from = lastHref; - var to = String(url); - // keep track of the current URL state, as we always receive only the updated state - lastHref = to; - triggerHandlers('history', { - from: from, - to: to, - }); - } - return originalHistoryFunction.apply(this, args); - }; - } - fill(global$2.history, 'pushState', historyReplacementFunction); - fill(global$2.history, 'replaceState', historyReplacementFunction); - } - /** JSDoc */ - function instrumentDOM() { - if (!('document' in global$2)) { - return; - } - // Capture breadcrumbs from any click that is unhandled / bubbled up all the way - // to the document. Do this before we instrument addEventListener. - global$2.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false); - global$2.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false); - // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses. - ['EventTarget', 'Node'].forEach(function (target) { - var proto = global$2[target] && global$2[target].prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - fill(proto, 'addEventListener', function (original) { - return function (eventName, fn, options) { - if (fn && fn.handleEvent) { - if (eventName === 'click') { - fill(fn, 'handleEvent', function (innerOriginal) { - return function (event) { - domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event); - return innerOriginal.call(this, event); - }; - }); - } - if (eventName === 'keypress') { - fill(fn, 'handleEvent', function (innerOriginal) { - return function (event) { - keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event); - return innerOriginal.call(this, event); - }; - }); - } - } - else { - if (eventName === 'click') { - domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this); - } - if (eventName === 'keypress') { - keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this); - } - } - return original.call(this, eventName, fn, options); - }; - }); - fill(proto, 'removeEventListener', function (original) { - return function (eventName, fn, options) { - var callback = fn; - try { - callback = callback && (callback.__sentry_wrapped__ || callback); - } - catch (e) { - // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments - } - return original.call(this, eventName, callback, options); - }; - }); - }); - } - var debounceDuration = 1000; - var debounceTimer = 0; - var keypressTimeout; - var lastCapturedEvent; - /** - * Wraps addEventListener to capture UI breadcrumbs - * @param name the event name (e.g. "click") - * @param handler function that will be triggered - * @param debounce decides whether it should wait till another event loop - * @returns wrapped breadcrumb events handler - * @hidden - */ - function domEventHandler(name, handler, debounce) { - if (debounce === void 0) { debounce = false; } - return function (event) { - // reset keypress timeout; e.g. triggering a 'click' after - // a 'keypress' will reset the keypress debounce so that a new - // set of keypresses can be recorded - keypressTimeout = undefined; - // It's possible this handler might trigger multiple times for the same - // event (e.g. event propagation through node ancestors). Ignore if we've - // already captured the event. - if (!event || lastCapturedEvent === event) { - return; - } - lastCapturedEvent = event; - if (debounceTimer) { - clearTimeout(debounceTimer); - } - if (debounce) { - debounceTimer = setTimeout(function () { - handler({ event: event, name: name }); - }); - } - else { - handler({ event: event, name: name }); - } - }; - } - /** - * Wraps addEventListener to capture keypress UI events - * @param handler function that will be triggered - * @returns wrapped keypress events handler - * @hidden - */ - function keypressEventHandler(handler) { - // TODO: if somehow user switches keypress target before - // debounce timeout is triggered, we will only capture - // a single breadcrumb from the FIRST target (acceptable?) - return function (event) { - var target; - try { - target = event.target; - } - catch (e) { - // just accessing event properties can throw an exception in some rare circumstances - // see: https://github.com/getsentry/raven-js/issues/838 - return; - } - var tagName = target && target.tagName; - // only consider keypress events on actual input elements - // this will disregard keypresses targeting body (e.g. tabbing - // through elements, hotkeys, etc) - if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)) { - return; - } - // record first keypress in a series, but ignore subsequent - // keypresses until debounce clears - if (!keypressTimeout) { - domEventHandler('input', handler)(event); - } - clearTimeout(keypressTimeout); - keypressTimeout = setTimeout(function () { - keypressTimeout = undefined; - }, debounceDuration); - }; - } - var _oldOnErrorHandler = null; - /** JSDoc */ - function instrumentError() { - _oldOnErrorHandler = global$2.onerror; - global$2.onerror = function (msg, url, line, column, error) { - triggerHandlers('error', { - column: column, - error: error, - line: line, - msg: msg, - url: url, - }); - if (_oldOnErrorHandler) { - return _oldOnErrorHandler.apply(this, arguments); - } - return false; - }; - } - var _oldOnUnhandledRejectionHandler = null; - /** JSDoc */ - function instrumentUnhandledRejection() { - _oldOnUnhandledRejectionHandler = global$2.onunhandledrejection; - global$2.onunhandledrejection = function (e) { - triggerHandlers('unhandledrejection', e); - if (_oldOnUnhandledRejectionHandler) { - return _oldOnUnhandledRejectionHandler.apply(this, arguments); - } - return true; - }; - } - - /** Regular expression used to parse a Dsn. */ - var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/; - /** Error message */ - var ERROR_MESSAGE = 'Invalid Dsn'; - /** The Sentry Dsn, identifying a Sentry instance and project. */ - var Dsn = /** @class */ (function () { - /** Creates a new Dsn component */ - function Dsn(from) { - if (typeof from === 'string') { - this._fromString(from); - } - else { - this._fromComponents(from); - } - this._validate(); - } - /** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private _representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ - Dsn.prototype.toString = function (withPassword) { - if (withPassword === void 0) { withPassword = false; } - // tslint:disable-next-line:no-this-assignment - var _a = this, host = _a.host, path = _a.path, pass = _a.pass, port = _a.port, projectId = _a.projectId, protocol = _a.protocol, user = _a.user; - return (protocol + "://" + user + (withPassword && pass ? ":" + pass : '') + - ("@" + host + (port ? ":" + port : '') + "/" + (path ? path + "/" : path) + projectId)); - }; - /** Parses a string into this Dsn. */ - Dsn.prototype._fromString = function (str) { - var match = DSN_REGEX.exec(str); - if (!match) { - throw new SentryError(ERROR_MESSAGE); - } - var _a = __read(match.slice(1), 6), protocol = _a[0], user = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5]; - var path = ''; - var projectId = lastPath; - var split = projectId.split('/'); - if (split.length > 1) { - path = split.slice(0, -1).join('/'); - projectId = split.pop(); - } - this._fromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, user: user }); - }; - /** Maps Dsn components into this instance. */ - Dsn.prototype._fromComponents = function (components) { - this.protocol = components.protocol; - this.user = components.user; - this.pass = components.pass || ''; - this.host = components.host; - this.port = components.port || ''; - this.path = components.path || ''; - this.projectId = components.projectId; - }; - /** Validates this Dsn and throws on error. */ - Dsn.prototype._validate = function () { - var _this = this; - ['protocol', 'user', 'host', 'projectId'].forEach(function (component) { - if (!_this[component]) { - throw new SentryError(ERROR_MESSAGE); - } - }); - if (this.protocol !== 'http' && this.protocol !== 'https') { - throw new SentryError(ERROR_MESSAGE); - } - if (this.port && isNaN(parseInt(this.port, 10))) { - throw new SentryError(ERROR_MESSAGE); - } - }; - return Dsn; - }()); - - /** - * 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 notifiying 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._context = {}; - } - /** - * 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; - }; - /** - * This will be called on every set call. - */ - Scope.prototype._notifyScopeListeners = function () { - var _this = this; - if (!this._notifyingListeners) { - this._notifyingListeners = true; - setTimeout(function () { - _this._scopeListeners.forEach(function (callback) { - callback(_this); - }); - _this._notifyingListeners = false; - }); - } - }; - /** - * 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]; - // tslint:disable-next-line:strict-type-predicates - if (event === null || typeof processor !== 'function') { - resolve(event); - } - else { - var result = processor(__assign({}, event), hint); - if (isThenable(result)) { - result - .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); }) - .then(null, reject); - } - else { - _this._notifyEventProcessors(processors, result, hint, index + 1) - .then(resolve) - .then(null, reject); - } - } - }); - }; - /** - * @inheritDoc - */ - Scope.prototype.setUser = function (user) { - this._user = user || {}; - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setTags = function (tags) { - this._tags = __assign({}, this._tags, tags); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setTag = function (key, value) { - var _a; - this._tags = __assign({}, this._tags, (_a = {}, _a[key] = value, _a)); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setExtras = function (extras) { - this._extra = __assign({}, this._extra, extras); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setExtra = function (key, extra) { - var _a; - this._extra = __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.setTransaction = function (transaction) { - this._transaction = transaction; - if (this._span) { - this._span.transaction = transaction; - } - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setContext = function (key, context) { - var _a; - this._context = __assign({}, this._context, (_a = {}, _a[key] = context, _a)); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setSpan = function (span) { - this._span = span; - this._notifyScopeListeners(); - return this; - }; - /** - * Internal getter for Span, used in Hub. - * @hidden - */ - Scope.prototype.getSpan = function () { - return this._span; - }; - /** - * 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._context = __assign({}, scope._context); - newScope._user = scope._user; - newScope._level = scope._level; - newScope._span = scope._span; - newScope._transaction = scope._transaction; - newScope._fingerprint = scope._fingerprint; - newScope._eventProcessors = __spread(scope._eventProcessors); - } - return newScope; - }; - /** - * @inheritDoc - */ - Scope.prototype.clear = function () { - this._breadcrumbs = []; - this._tags = {}; - this._extra = {}; - this._user = {}; - this._context = {}; - this._level = undefined; - this._transaction = undefined; - this._fingerprint = undefined; - this._span = undefined; - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) { - var mergedBreadcrumb = __assign({ timestamp: timestampWithMs() }, breadcrumb); - this._breadcrumbs = - maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0 - ? __spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxBreadcrumbs) - : __spread(this._breadcrumbs, [mergedBreadcrumb]); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.clearBreadcrumbs = function () { - this._breadcrumbs = []; - this._notifyScopeListeners(); - return this; - }; - /** - * 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; - } - }; - /** - * 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 informartion about the original exception. - * @hidden - */ - Scope.prototype.applyToEvent = function (event, hint) { - if (this._extra && Object.keys(this._extra).length) { - event.extra = __assign({}, this._extra, event.extra); - } - if (this._tags && Object.keys(this._tags).length) { - event.tags = __assign({}, this._tags, event.tags); - } - if (this._user && Object.keys(this._user).length) { - event.user = __assign({}, this._user, event.user); - } - if (this._context && Object.keys(this._context).length) { - event.contexts = __assign({}, this._context, event.contexts); - } - if (this._level) { - event.level = this._level; - } - if (this._transaction) { - event.transaction = this._transaction; - } - if (this._span) { - event.contexts = __assign({ trace: this._span.getTraceContext() }, event.contexts); - } - this._applyFingerprint(event); - event.breadcrumbs = __spread((event.breadcrumbs || []), this._breadcrumbs); - event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined; - return this._notifyEventProcessors(__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint); - }; - return Scope; - }()); - /** - * Retruns the global event processors. - */ - function getGlobalEventProcessors() { - var global = getGlobalObject(); - global.__SENTRY__ = global.__SENTRY__ || {}; - global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || []; - return global.__SENTRY__.globalEventProcessors; - } - /** - * Add a EventProcessor to be kept globally. - * @param callback EventProcessor to add - */ - function addGlobalEventProcessor(callback) { - getGlobalEventProcessors().push(callback); - } - - /** - * API compatibility version of this hub. - * - * WARNING: This number should only be incresed when the global interface - * changes a and new methods are introduced. - * - * @hidden - */ - var API_VERSION = 3; - /** - * Default maximum number of breadcrumbs added to an event. Can be overwritten - * with {@link Options.maxBreadcrumbs}. - */ - var DEFAULT_BREADCRUMBS = 100; - /** - * Absolute maximum number of breadcrumbs added to an event. The - * `maxBreadcrumbs` option cannot be higher than this value. - */ - var MAX_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._stack.push({ client: client, scope: scope }); - } - /** - * 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. - */ - Hub.prototype._invokeClient = function (method) { - var _a; - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var top = this.getStackTop(); - if (top && top.client && top.client[method]) { - (_a = top.client)[method].apply(_a, __spread(args, [top.scope])); - } - }; - /** - * @inheritDoc - */ - Hub.prototype.isOlderThan = function (version) { - return this._version < version; - }; - /** - * @inheritDoc - */ - Hub.prototype.bindClient = function (client) { - var top = this.getStackTop(); - top.client = client; - }; - /** - * @inheritDoc - */ - Hub.prototype.pushScope = function () { - // We want to clone the content of prev scope - var stack = this.getStack(); - var parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined; - var scope = Scope.clone(parentScope); - this.getStack().push({ - client: this.getClient(), - scope: scope, - }); - return scope; - }; - /** - * @inheritDoc - */ - Hub.prototype.popScope = function () { - return this.getStack().pop() !== undefined; - }; - /** - * @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 - */ - Hub.prototype.captureException = function (exception, hint) { - var eventId = (this._lastEventId = uuid4()); - var finalHint = hint; - // If there's no explicit hint provided, mimick 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({}, finalHint, { event_id: eventId })); - return eventId; - }; - /** - * @inheritDoc - */ - Hub.prototype.captureMessage = function (message, level, hint) { - var eventId = (this._lastEventId = uuid4()); - var finalHint = hint; - // If there's no explicit hint provided, mimick 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({}, finalHint, { event_id: eventId })); - return eventId; - }; - /** - * @inheritDoc - */ - Hub.prototype.captureEvent = function (event, hint) { - var eventId = (this._lastEventId = uuid4()); - this._invokeClient('captureEvent', event, __assign({}, hint, { event_id: eventId })); - return eventId; - }; - /** - * @inheritDoc - */ - Hub.prototype.lastEventId = function () { - return this._lastEventId; - }; - /** - * @inheritDoc - */ - Hub.prototype.addBreadcrumb = function (breadcrumb, hint) { - var top = this.getStackTop(); - if (!top.scope || !top.client) { - return; - } - var _a = (top.client.getOptions && top.client.getOptions()) || {}, _b = _a.beforeBreadcrumb, beforeBreadcrumb = _b === void 0 ? null : _b, _c = _a.maxBreadcrumbs, maxBreadcrumbs = _c === void 0 ? DEFAULT_BREADCRUMBS : _c; - if (maxBreadcrumbs <= 0) { - return; - } - var timestamp = timestampWithMs(); - var mergedBreadcrumb = __assign({ timestamp: timestamp }, breadcrumb); - var finalBreadcrumb = beforeBreadcrumb - ? consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); }) - : mergedBreadcrumb; - if (finalBreadcrumb === null) { - return; - } - top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS)); - }; - /** - * @inheritDoc - */ - Hub.prototype.setUser = function (user) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setUser(user); - }; - /** - * @inheritDoc - */ - Hub.prototype.setTags = function (tags) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setTags(tags); - }; - /** - * @inheritDoc - */ - Hub.prototype.setExtras = function (extras) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setExtras(extras); - }; - /** - * @inheritDoc - */ - Hub.prototype.setTag = function (key, value) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setTag(key, value); - }; - /** - * @inheritDoc - */ - Hub.prototype.setExtra = function (key, extra) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setExtra(key, extra); - }; - /** - * @inheritDoc - */ - Hub.prototype.setContext = function (name, context) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setContext(name, context); - }; - /** - * @inheritDoc - */ - Hub.prototype.configureScope = function (callback) { - var top = this.getStackTop(); - if (top.scope && top.client) { - callback(top.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) { - logger.warn("Cannot retrieve integration " + integration.id + " from the current Hub"); - return null; - } - }; - /** - * @inheritDoc - */ - Hub.prototype.startSpan = function (spanOrSpanContext, forceNoChild) { - if (forceNoChild === void 0) { forceNoChild = false; } - return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild); - }; - /** - * @inheritDoc - */ - Hub.prototype.traceHeaders = function () { - return this._callExtensionMethod('traceHeaders'); - }; - /** - * Calls global extension method and binding current instance to the function call - */ - // @ts-ignore - 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__; - // tslint:disable-next-line: strict-type-predicates - if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') { - return sentry.extensions[method].apply(this, args); - } - logger.warn("Extension method " + method + " couldn't be found, doing nothing."); - }; - return Hub; - }()); - /** Returns the global shim registry. */ - 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 - */ - 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. - */ - 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); - } - /** - * Try to read the hub from an active domain, fallback to the registry if one doesnt exist - * @returns discovered hub - */ - function getHubFromActiveDomain(registry) { - try { - // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack. - // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser - // for example so we do not have to shim it and use `getCurrentHub` universally. - var domain = dynamicRequire(module, 'domain'); - var activeDomain = domain.active; - // If there no active domain, just return global hub - if (!activeDomain) { - return getHubFromCarrier(registry); - } - // If there's no hub on current domain, or its 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) { - if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) { - return true; - } - return false; - } - /** - * This will create a new {@link Hub} and add to the passed object on - * __SENTRY__.hub. - * @param carrier object - * @hidden - */ - function getHubFromCarrier(carrier) { - if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) { - return carrier.__SENTRY__.hub; - } - carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - carrier.__SENTRY__.hub = new Hub(); - return carrier.__SENTRY__.hub; - } - /** - * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute - * @param carrier object - * @param hub Hub - */ - function setHubOnCarrier(carrier, hub) { - if (!carrier) { - return false; - } - carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - carrier.__SENTRY__.hub = hub; - return true; - } - - /** - * This calls a function on the current hub. - * @param method function to call on hub. - * @param args to pass to function. - */ - function callOnHub(method) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var hub = getCurrentHub(); - if (hub && hub[method]) { - // tslint:disable-next-line:no-unsafe-any - return hub[method].apply(hub, __spread(args)); - } - throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report."); - } - /** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @returns The generated eventId. - */ - function captureException(exception) { - var syntheticException; - try { - throw new Error('Sentry syntheticException'); - } - catch (exception) { - syntheticException = exception; - } - return callOnHub('captureException', exception, { - originalException: exception, - syntheticException: syntheticException, - }); - } - /** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @returns The generated eventId. - */ - function captureMessage(message, level) { - var syntheticException; - try { - throw new Error(message); - } - catch (exception) { - syntheticException = exception; - } - return callOnHub('captureMessage', message, level, { - originalException: message, - syntheticException: syntheticException, - }); - } - /** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @returns The generated eventId. - */ - function captureEvent(event) { - return callOnHub('captureEvent', event); - } - /** - * Callback to set context information onto the scope. - * @param callback Callback function that receives Scope. - */ - function configureScope(callback) { - callOnHub('configureScope', callback); - } - /** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - */ - function addBreadcrumb(breadcrumb) { - callOnHub('addBreadcrumb', breadcrumb); - } - /** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ - function setContext(name, context) { - callOnHub('setContext', name, context); - } - /** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ - function setExtras(extras) { - callOnHub('setExtras', extras); - } - /** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ - function setTags(tags) { - callOnHub('setTags', tags); - } - /** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ - function setExtra(key, extra) { - callOnHub('setExtra', key, extra); - } - /** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ - function setTag(key, value) { - callOnHub('setTag', key, value); - } - /** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ - function setUser(user) { - callOnHub('setUser', user); - } - /** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - * - * @param callback that will be enclosed into push/popScope. - */ - function withScope(callback) { - callOnHub('withScope', callback); - } - - var SENTRY_API_VERSION = '7'; - /** Helper class to provide urls to different Sentry endpoints. */ - var API = /** @class */ (function () { - /** Create a new instance of API */ - function API(dsn) { - this.dsn = dsn; - this._dsnObject = new Dsn(dsn); - } - /** Returns the Dsn object. */ - API.prototype.getDsn = function () { - return this._dsnObject; - }; - /** Returns a string with auth headers in the url to the store endpoint. */ - API.prototype.getStoreEndpoint = function () { - return "" + this._getBaseUrl() + this.getStoreEndpointPath(); - }; - /** Returns the store endpoint with auth added in url encoded. */ - API.prototype.getStoreEndpointWithUrlEncodedAuth = function () { - var dsn = this._dsnObject; - var auth = { - sentry_key: dsn.user, - sentry_version: SENTRY_API_VERSION, - }; - // Auth is intentionally sent as part of query string (NOT as custom HTTP header) - // to avoid preflight CORS requests - return this.getStoreEndpoint() + "?" + urlEncode(auth); - }; - /** Returns the base path of the url including the port. */ - API.prototype._getBaseUrl = function () { - var dsn = this._dsnObject; - var protocol = dsn.protocol ? dsn.protocol + ":" : ''; - var port = dsn.port ? ":" + dsn.port : ''; - return protocol + "//" + dsn.host + port; - }; - /** Returns only the path component for the store endpoint. */ - API.prototype.getStoreEndpointPath = function () { - var dsn = this._dsnObject; - return (dsn.path ? "/" + dsn.path : '') + "/api/" + dsn.projectId + "/store/"; - }; - /** Returns an object that can be used in request headers. */ - API.prototype.getRequestHeaders = function (clientName, clientVersion) { - var dsn = this._dsnObject; - var header = ["Sentry sentry_version=" + SENTRY_API_VERSION]; - header.push("sentry_client=" + clientName + "/" + clientVersion); - header.push("sentry_key=" + dsn.user); - if (dsn.pass) { - header.push("sentry_secret=" + dsn.pass); - } - return { - 'Content-Type': 'application/json', - 'X-Sentry-Auth': header.join(', '), - }; - }; - /** Returns the url to the report dialog endpoint. */ - API.prototype.getReportDialogEndpoint = function (dialogOptions) { - if (dialogOptions === void 0) { dialogOptions = {}; } - var dsn = this._dsnObject; - var endpoint = "" + this._getBaseUrl() + (dsn.path ? "/" + dsn.path : '') + "/api/embed/error-page/"; - var encodedOptions = []; - encodedOptions.push("dsn=" + dsn.toString()); - for (var key in dialogOptions) { - if (key === 'user') { - if (!dialogOptions.user) { - continue; - } - if (dialogOptions.user.name) { - encodedOptions.push("name=" + encodeURIComponent(dialogOptions.user.name)); - } - if (dialogOptions.user.email) { - encodedOptions.push("email=" + encodeURIComponent(dialogOptions.user.email)); - } - } - else { - encodedOptions.push(encodeURIComponent(key) + "=" + encodeURIComponent(dialogOptions[key])); - } - } - if (encodedOptions.length) { - return endpoint + "?" + encodedOptions.join('&'); - } - return endpoint; - }; - return API; - }()); - - var installedIntegrations = []; - /** Gets integration to install */ - function getIntegrationsToSetup(options) { - var defaultIntegrations = (options.defaultIntegrations && __spread(options.defaultIntegrations)) || []; - var userIntegrations = options.integrations; - var integrations = []; - if (Array.isArray(userIntegrations)) { - var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; }); - var pickedIntegrationsNames_1 = []; - // Leave only unique default integrations, that were not overridden with provided user integrations - defaultIntegrations.forEach(function (defaultIntegration) { - if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 && - pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) { - integrations.push(defaultIntegration); - pickedIntegrationsNames_1.push(defaultIntegration.name); - } - }); - // Don't add same user integration twice - userIntegrations.forEach(function (userIntegration) { - if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) { - integrations.push(userIntegration); - pickedIntegrationsNames_1.push(userIntegration.name); - } - }); - } - else if (typeof userIntegrations === 'function') { - integrations = userIntegrations(defaultIntegrations); - integrations = Array.isArray(integrations) ? integrations : [integrations]; - } - else { - integrations = __spread(defaultIntegrations); - } - // Make sure that if present, `Debug` integration will always run last - var integrationsNames = integrations.map(function (i) { return i.name; }); - var alwaysLastToRun = 'Debug'; - if (integrationsNames.indexOf(alwaysLastToRun) !== -1) { - integrations.push.apply(integrations, __spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1))); - } - return integrations; - } - /** Setup given integration */ - function setupIntegration(integration) { - if (installedIntegrations.indexOf(integration.name) !== -1) { - return; - } - integration.setupOnce(addGlobalEventProcessor, getCurrentHub); - installedIntegrations.push(integration.name); - logger.log("Integration installed: " + integration.name); - } - /** - * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default - * integrations are added unless they were already provided before. - * @param integrations array of integration instances - * @param withDefault should enable default integrations - */ - function setupIntegrations(options) { - var integrations = {}; - getIntegrationsToSetup(options).forEach(function (integration) { - integrations[integration.name] = integration; - setupIntegration(integration); - }); - return integrations; - } - - /** - * Base implementation for all JavaScript SDK clients. - * - * Call the constructor with the corresponding backend constructor and options - * specific to the client subclass. To access these options later, use - * {@link Client.getOptions}. Also, the Backend instance is available via - * {@link Client.getBackend}. - * - * If a Dsn is specified in the options, it will be parsed and stored. Use - * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is - * invalid, the constructor will throw a {@link SentryException}. Note that - * without a valid Dsn, the SDK will not send any events to Sentry. - * - * Before sending an event via the backend, it is passed through - * {@link BaseClient.prepareEvent} to add SDK information and scope data - * (breadcrumbs and context). To add more custom information, override this - * method and extend the resulting prepared event. - * - * To issue automatically created events (e.g. via instrumentation), use - * {@link Client.captureEvent}. It will prepare the event and pass it through - * the callback lifecycle. To issue auto-breadcrumbs, use - * {@link Client.addBreadcrumb}. - * - * @example - * class NodeClient extends BaseClient { - * public constructor(options: NodeOptions) { - * super(NodeBackend, options); - * } - * - * // ... - * } - */ - var BaseClient = /** @class */ (function () { - /** - * Initializes this client instance. - * - * @param backendClass A constructor function to create the backend. - * @param options Options for the client. - */ - function BaseClient(backendClass, options) { - /** Array of used integrations. */ - this._integrations = {}; - /** Is the client still processing a call? */ - this._processing = false; - this._backend = new backendClass(options); - this._options = options; - if (options.dsn) { - this._dsn = new Dsn(options.dsn); - } - if (this._isEnabled()) { - this._integrations = setupIntegrations(this._options); - } - } - /** - * @inheritDoc - */ - BaseClient.prototype.captureException = function (exception, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - this._getBackend() - .eventFromException(exception, hint) - .then(function (event) { return _this._processEvent(event, hint, scope); }) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.captureMessage = function (message, level, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - var promisedEvent = isPrimitive(message) - ? this._getBackend().eventFromMessage("" + message, level, hint) - : this._getBackend().eventFromException(message, hint); - promisedEvent - .then(function (event) { return _this._processEvent(event, hint, scope); }) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.captureEvent = function (event, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - this._processEvent(event, hint, scope) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getDsn = function () { - return this._dsn; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getOptions = function () { - return this._options; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.flush = function (timeout) { - var _this = this; - return this._isClientProcessing(timeout).then(function (status) { - clearInterval(status.interval); - return _this._getBackend() - .getTransport() - .close(timeout) - .then(function (transportFlushed) { return status.ready && transportFlushed; }); - }); - }; - /** - * @inheritDoc - */ - BaseClient.prototype.close = function (timeout) { - var _this = this; - return this.flush(timeout).then(function (result) { - _this.getOptions().enabled = false; - return result; - }); - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getIntegrations = function () { - return this._integrations || {}; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getIntegration = function (integration) { - try { - return this._integrations[integration.id] || null; - } - catch (_oO) { - logger.warn("Cannot retrieve integration " + integration.id + " from the current Client"); - return null; - } - }; - /** Waits for the client to be done with processing. */ - BaseClient.prototype._isClientProcessing = function (timeout) { - var _this = this; - return new SyncPromise(function (resolve) { - var ticked = 0; - var tick = 1; - var interval = 0; - clearInterval(interval); - interval = setInterval(function () { - if (!_this._processing) { - resolve({ - interval: interval, - ready: true, - }); - } - else { - ticked += tick; - if (timeout && ticked >= timeout) { - resolve({ - interval: interval, - ready: false, - }); - } - } - }, tick); - }); - }; - /** Returns the current backend. */ - BaseClient.prototype._getBackend = function () { - return this._backend; - }; - /** Determines whether this SDK is enabled and a valid Dsn is present. */ - BaseClient.prototype._isEnabled = function () { - return this.getOptions().enabled !== false && this._dsn !== undefined; - }; - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - */ - BaseClient.prototype._prepareEvent = function (event, scope, hint) { - var _this = this; - var _a = this.getOptions(), environment = _a.environment, release = _a.release, dist = _a.dist, _b = _a.maxValueLength, maxValueLength = _b === void 0 ? 250 : _b, _c = _a.normalizeDepth, normalizeDepth = _c === void 0 ? 3 : _c; - var prepared = __assign({}, event); - if (prepared.environment === undefined && environment !== undefined) { - prepared.environment = environment; - } - if (prepared.release === undefined && release !== undefined) { - prepared.release = release; - } - if (prepared.dist === undefined && dist !== undefined) { - prepared.dist = dist; - } - if (prepared.message) { - prepared.message = truncate(prepared.message, maxValueLength); - } - var exception = prepared.exception && prepared.exception.values && prepared.exception.values[0]; - if (exception && exception.value) { - exception.value = truncate(exception.value, maxValueLength); - } - var request = prepared.request; - if (request && request.url) { - request.url = truncate(request.url, maxValueLength); - } - if (prepared.event_id === undefined) { - prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4(); - } - this._addIntegrations(prepared.sdk); - // We prepare the result here with a resolved Event. - var result = SyncPromise.resolve(prepared); - // This should be the last thing called, since we want that - // {@link Hub.addEventProcessor} gets the finished prepared event. - if (scope) { - // In case we have a hub we reassign it. - result = scope.applyToEvent(prepared, hint); - } - return result.then(function (evt) { - // tslint:disable-next-line:strict-type-predicates - if (typeof normalizeDepth === 'number' && normalizeDepth > 0) { - return _this._normalizeEvent(evt, normalizeDepth); - } - return evt; - }); - }; - /** - * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization. - * Normalized keys: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * @param event Event - * @returns Normalized event - */ - BaseClient.prototype._normalizeEvent = function (event, depth) { - if (!event) { - return null; - } - // tslint:disable:no-unsafe-any - return __assign({}, event, (event.breadcrumbs && { - breadcrumbs: event.breadcrumbs.map(function (b) { return (__assign({}, b, (b.data && { - data: normalize(b.data, depth), - }))); }), - }), (event.user && { - user: normalize(event.user, depth), - }), (event.contexts && { - contexts: normalize(event.contexts, depth), - }), (event.extra && { - extra: normalize(event.extra, depth), - })); - }; - /** - * This function adds all used integrations to the SDK info in the event. - * @param sdkInfo The sdkInfo of the event that will be filled with all integrations. - */ - BaseClient.prototype._addIntegrations = function (sdkInfo) { - var integrationsArray = Object.keys(this._integrations); - if (sdkInfo && integrationsArray.length > 0) { - sdkInfo.integrations = integrationsArray; - } - }; - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - BaseClient.prototype._processEvent = function (event, hint, scope) { - var _this = this; - var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate; - if (!this._isEnabled()) { - return SyncPromise.reject('SDK not enabled, will not send event.'); - } - // 1.0 === 100% events are sent - // 0.0 === 0% events are sent - if (typeof sampleRate === 'number' && Math.random() > sampleRate) { - return SyncPromise.reject('This event has been sampled, will not send event.'); - } - return new SyncPromise(function (resolve, reject) { - _this._prepareEvent(event, scope, hint) - .then(function (prepared) { - if (prepared === null) { - reject('An event processor returned null, will not send event.'); - return; - } - var finalEvent = prepared; - var isInternalException = hint && hint.data && hint.data.__sentry__ === true; - if (isInternalException || !beforeSend) { - _this._getBackend().sendEvent(finalEvent); - resolve(finalEvent); - return; - } - var beforeSendResult = beforeSend(prepared, hint); - // tslint:disable-next-line:strict-type-predicates - if (typeof beforeSendResult === 'undefined') { - logger.error('`beforeSend` method has to return `null` or a valid event.'); - } - else if (isThenable(beforeSendResult)) { - _this._handleAsyncBeforeSend(beforeSendResult, resolve, reject); - } - else { - finalEvent = beforeSendResult; - if (finalEvent === null) { - logger.log('`beforeSend` returned `null`, will not send event.'); - resolve(null); - return; - } - // From here on we are really async - _this._getBackend().sendEvent(finalEvent); - resolve(finalEvent); - } - }) - .then(null, function (reason) { - _this.captureException(reason, { - data: { - __sentry__: true, - }, - originalException: reason, - }); - reject("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: " + reason); - }); - }); - }; - /** - * Resolves before send Promise and calls resolve/reject on parent SyncPromise. - */ - BaseClient.prototype._handleAsyncBeforeSend = function (beforeSend, resolve, reject) { - var _this = this; - beforeSend - .then(function (processedEvent) { - if (processedEvent === null) { - reject('`beforeSend` returned `null`, will not send event.'); - return; - } - // From here on we are really async - _this._getBackend().sendEvent(processedEvent); - resolve(processedEvent); - }) - .then(null, function (e) { - reject("beforeSend rejected with " + e); - }); - }; - return BaseClient; - }()); - - /** Noop transport */ - var NoopTransport = /** @class */ (function () { - function NoopTransport() { - } - /** - * @inheritDoc - */ - NoopTransport.prototype.sendEvent = function (_) { - return SyncPromise.resolve({ - reason: "NoopTransport: Event has been skipped because no Dsn is configured.", - status: exports.Status.Skipped, - }); - }; - /** - * @inheritDoc - */ - NoopTransport.prototype.close = function (_) { - return SyncPromise.resolve(true); - }; - return NoopTransport; - }()); - - /** - * This is the base implemention of a Backend. - * @hidden - */ - var BaseBackend = /** @class */ (function () { - /** Creates a new backend instance. */ - function BaseBackend(options) { - this._options = options; - if (!this._options.dsn) { - logger.warn('No DSN provided, backend will not do anything.'); - } - this._transport = this._setupTransport(); - } - /** - * Sets up the transport so it can be used later to send requests. - */ - BaseBackend.prototype._setupTransport = function () { - return new NoopTransport(); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.eventFromException = function (_exception, _hint) { - throw new SentryError('Backend has to implement `eventFromException` method'); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) { - throw new SentryError('Backend has to implement `eventFromMessage` method'); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.sendEvent = function (event) { - this._transport.sendEvent(event).then(null, function (reason) { - logger.error("Error while sending event: " + reason); - }); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.getTransport = function () { - return this._transport; - }; - return BaseBackend; - }()); - - /** - * Internal function to create a new SDK client instance. The client is - * installed and then bound to the current scope. - * - * @param clientClass The client class to instanciate. - * @param options Options to pass to the client. - */ - function initAndBind(clientClass, options) { - if (options.debug === true) { - logger.enable(); - } - getCurrentHub().bindClient(new clientClass(options)); - } - - var originalFunctionToString; - /** Patch toString calls to return proper name for wrapped functions */ - var FunctionToString = /** @class */ (function () { - function FunctionToString() { - /** - * @inheritDoc - */ - this.name = FunctionToString.id; - } - /** - * @inheritDoc - */ - FunctionToString.prototype.setupOnce = function () { - originalFunctionToString = Function.prototype.toString; - Function.prototype.toString = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var context = this.__sentry_original__ || this; - // tslint:disable-next-line:no-unsafe-any - return originalFunctionToString.apply(context, args); - }; - }; - /** - * @inheritDoc - */ - FunctionToString.id = 'FunctionToString'; - return FunctionToString; - }()); - - // "Script error." is hard coded into browsers for errors that it can't read. - // this is the result of a script being pulled in from an external domain and CORS. - var DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/]; - /** Inbound filters configurable by the user */ - var InboundFilters = /** @class */ (function () { - function InboundFilters(_options) { - if (_options === void 0) { _options = {}; } - this._options = _options; - /** - * @inheritDoc - */ - this.name = InboundFilters.id; - } - /** - * @inheritDoc - */ - InboundFilters.prototype.setupOnce = function () { - addGlobalEventProcessor(function (event) { - var hub = getCurrentHub(); - if (!hub) { - return event; - } - var self = hub.getIntegration(InboundFilters); - if (self) { - var client = hub.getClient(); - var clientOptions = client ? client.getOptions() : {}; - var options = self._mergeOptions(clientOptions); - if (self._shouldDropEvent(event, options)) { - return null; - } - } - return event; - }); - }; - /** JSDoc */ - InboundFilters.prototype._shouldDropEvent = function (event, options) { - if (this._isSentryError(event, options)) { - logger.warn("Event dropped due to being internal Sentry Error.\nEvent: " + getEventDescription(event)); - return true; - } - if (this._isIgnoredError(event, options)) { - logger.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: " + getEventDescription(event)); - return true; - } - if (this._isBlacklistedUrl(event, options)) { - logger.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: " + getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); - return true; - } - if (!this._isWhitelistedUrl(event, options)) { - logger.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: " + getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); - return true; - } - return false; - }; - /** JSDoc */ - InboundFilters.prototype._isSentryError = function (event, options) { - if (options === void 0) { options = {}; } - if (!options.ignoreInternal) { - return false; - } - try { - return ((event && - event.exception && - event.exception.values && - event.exception.values[0] && - event.exception.values[0].type === 'SentryError') || - false); - } - catch (_oO) { - return false; - } - }; - /** JSDoc */ - InboundFilters.prototype._isIgnoredError = function (event, options) { - if (options === void 0) { options = {}; } - if (!options.ignoreErrors || !options.ignoreErrors.length) { - return false; - } - return this._getPossibleEventMessages(event).some(function (message) { - // Not sure why TypeScript complains here... - return options.ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); }); - }); - }; - /** JSDoc */ - InboundFilters.prototype._isBlacklistedUrl = function (event, options) { - if (options === void 0) { options = {}; } - // TODO: Use Glob instead? - if (!options.blacklistUrls || !options.blacklistUrls.length) { - return false; - } - var url = this._getEventFilterUrl(event); - return !url ? false : options.blacklistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); - }; - /** JSDoc */ - InboundFilters.prototype._isWhitelistedUrl = function (event, options) { - if (options === void 0) { options = {}; } - // TODO: Use Glob instead? - if (!options.whitelistUrls || !options.whitelistUrls.length) { - return true; - } - var url = this._getEventFilterUrl(event); - return !url ? true : options.whitelistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); - }; - /** JSDoc */ - InboundFilters.prototype._mergeOptions = function (clientOptions) { - if (clientOptions === void 0) { clientOptions = {}; } - return { - blacklistUrls: __spread((this._options.blacklistUrls || []), (clientOptions.blacklistUrls || [])), - ignoreErrors: __spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS), - ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true, - whitelistUrls: __spread((this._options.whitelistUrls || []), (clientOptions.whitelistUrls || [])), - }; - }; - /** JSDoc */ - InboundFilters.prototype._getPossibleEventMessages = function (event) { - if (event.message) { - return [event.message]; - } - if (event.exception) { - try { - var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c; - return ["" + value, type + ": " + value]; - } - catch (oO) { - logger.error("Cannot extract message for event " + getEventDescription(event)); - return []; - } - } - return []; - }; - /** JSDoc */ - InboundFilters.prototype._getEventFilterUrl = function (event) { - try { - if (event.stacktrace) { - var frames_1 = event.stacktrace.frames; - return (frames_1 && frames_1[frames_1.length - 1].filename) || null; - } - if (event.exception) { - var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames; - return (frames_2 && frames_2[frames_2.length - 1].filename) || null; - } - return null; - } - catch (oO) { - logger.error("Cannot extract url for event " + getEventDescription(event)); - return null; - } - }; - /** - * @inheritDoc - */ - InboundFilters.id = 'InboundFilters'; - return InboundFilters; - }()); - - - - var CoreIntegrations = /*#__PURE__*/Object.freeze({ - FunctionToString: FunctionToString, - InboundFilters: InboundFilters - }); - - // tslint:disable:object-literal-sort-keys - // global reference to slice - var UNKNOWN_FUNCTION = '?'; - // Chromium based browsers: Chrome, Brave, new Opera, new Edge - var chrome = /^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; - // gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it - // generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js - // We need this specific case for now because we want no other regex to match. - var gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i; - var winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; - var geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; - var chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/; - /** JSDoc */ - function computeStackTrace(ex) { - // tslint:disable:no-unsafe-any - var stack = null; - var popSize = ex && ex.framesToPop; - try { - // This must be tried first because Opera 10 *destroys* - // its stacktrace property if you try to access the stack - // property first!! - stack = computeStackTraceFromStacktraceProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } - catch (e) { - // no-empty - } - try { - stack = computeStackTraceFromStackProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } - catch (e) { - // no-empty - } - return { - message: extractMessage(ex), - name: ex && ex.name, - stack: [], - failed: true, - }; - } - /** JSDoc */ - // tslint:disable-next-line:cyclomatic-complexity - function computeStackTraceFromStackProp(ex) { - // tslint:disable:no-conditional-assignment - if (!ex || !ex.stack) { - return null; - } - var stack = []; - var lines = ex.stack.split('\n'); - var isEval; - var submatch; - var parts; - var element; - for (var i = 0; i < lines.length; ++i) { - if ((parts = chrome.exec(lines[i]))) { - var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line - isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line - if (isEval && (submatch = chromeEval.exec(parts[2]))) { - // throw out eval line/column and use top-most line/column number - parts[2] = submatch[1]; // url - parts[3] = submatch[2]; // line - parts[4] = submatch[3]; // column - } - element = { - // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at ` - // prefix here seems like the quickest solution for now. - url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - args: isNative ? [parts[2]] : [], - line: parts[3] ? +parts[3] : null, - column: parts[4] ? +parts[4] : null, - }; - } - else if ((parts = winjs.exec(lines[i]))) { - element = { - url: parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - args: [], - line: +parts[3], - column: parts[4] ? +parts[4] : null, - }; - } - else if ((parts = gecko.exec(lines[i]))) { - isEval = parts[3] && parts[3].indexOf(' > eval') > -1; - if (isEval && (submatch = geckoEval.exec(parts[3]))) { - // throw out eval line/column and use top-most line number - parts[1] = parts[1] || "eval"; - parts[3] = submatch[1]; - parts[4] = submatch[2]; - parts[5] = ''; // no column when eval - } - else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) { - // FireFox uses this awesome columnNumber property for its top frame - // Also note, Firefox's column number is 0-based and everything else expects 1-based, - // so adding 1 - // NOTE: this hack doesn't work if top-most frame is eval - stack[0].column = ex.columnNumber + 1; - } - element = { - url: parts[3], - func: parts[1] || UNKNOWN_FUNCTION, - args: parts[2] ? parts[2].split(',') : [], - line: parts[4] ? +parts[4] : null, - column: parts[5] ? +parts[5] : null, - }; - } - else { - continue; - } - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - if (!stack.length) { - return null; - } - return { - message: extractMessage(ex), - name: ex.name, - stack: stack, - }; - } - /** JSDoc */ - function computeStackTraceFromStacktraceProp(ex) { - if (!ex || !ex.stacktrace) { - return null; - } - // Access and store the stacktrace property before doing ANYTHING - // else to it because Opera is not very good at providing it - // reliably in other circumstances. - var stacktrace = ex.stacktrace; - var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; - var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i; - var lines = stacktrace.split('\n'); - var stack = []; - var parts; - for (var line = 0; line < lines.length; line += 2) { - // tslint:disable:no-conditional-assignment - var element = null; - if ((parts = opera10Regex.exec(lines[line]))) { - element = { - url: parts[2], - func: parts[3], - args: [], - line: +parts[1], - column: null, - }; - } - else if ((parts = opera11Regex.exec(lines[line]))) { - element = { - url: parts[6], - func: parts[3] || parts[4], - args: parts[5] ? parts[5].split(',') : [], - line: +parts[1], - column: +parts[2], - }; - } - if (element) { - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - } - if (!stack.length) { - return null; - } - return { - message: extractMessage(ex), - name: ex.name, - stack: stack, - }; - } - /** Remove N number of frames from the stack */ - function popFrames(stacktrace, popSize) { - try { - return __assign({}, stacktrace, { stack: stacktrace.stack.slice(popSize) }); - } - catch (e) { - return stacktrace; - } - } - /** - * There are cases where stacktrace.message is an Event object - * https://github.com/getsentry/sentry-javascript/issues/1949 - * In this specific case we try to extract stacktrace.message.error.message - */ - function extractMessage(ex) { - var message = ex && ex.message; - if (!message) { - return 'No error message'; - } - if (message.error && typeof message.error.message === 'string') { - return message.error.message; - } - return message; - } - - var STACKTRACE_LIMIT = 50; - /** - * This function creates an exception from an TraceKitStackTrace - * @param stacktrace TraceKitStackTrace that will be converted to an exception - * @hidden - */ - function exceptionFromStacktrace(stacktrace) { - var frames = prepareFramesForEvent(stacktrace.stack); - var exception = { - type: stacktrace.name, - value: stacktrace.message, - }; - if (frames && frames.length) { - exception.stacktrace = { frames: frames }; - } - // tslint:disable-next-line:strict-type-predicates - if (exception.type === undefined && exception.value === '') { - exception.value = 'Unrecoverable error caught'; - } - return exception; - } - /** - * @hidden - */ - function eventFromPlainObject(exception, syntheticException, rejection) { - var event = { - exception: { - values: [ - { - type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error', - value: "Non-Error " + (rejection ? 'promise rejection' : 'exception') + " captured with keys: " + extractExceptionKeysForMessage(exception), - }, - ], - }, - extra: { - __serialized__: normalizeToSize(exception), - }, - }; - if (syntheticException) { - var stacktrace = computeStackTrace(syntheticException); - var frames_1 = prepareFramesForEvent(stacktrace.stack); - event.stacktrace = { - frames: frames_1, - }; - } - return event; - } - /** - * @hidden - */ - function eventFromStacktrace(stacktrace) { - var exception = exceptionFromStacktrace(stacktrace); - return { - exception: { - values: [exception], - }, - }; - } - /** - * @hidden - */ - function prepareFramesForEvent(stack) { - if (!stack || !stack.length) { - return []; - } - var localStack = stack; - var firstFrameFunction = localStack[0].func || ''; - var lastFrameFunction = localStack[localStack.length - 1].func || ''; - // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call) - if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { - localStack = localStack.slice(1); - } - // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call) - if (lastFrameFunction.indexOf('sentryWrapped') !== -1) { - localStack = localStack.slice(0, -1); - } - // The frame where the crash happened, should be the last entry in the array - return localStack - .map(function (frame) { return ({ - colno: frame.column === null ? undefined : frame.column, - filename: frame.url || localStack[0].url, - function: frame.func || '?', - in_app: true, - lineno: frame.line === null ? undefined : frame.line, - }); }) - .slice(0, STACKTRACE_LIMIT) - .reverse(); - } - - /** JSDoc */ - function eventFromUnknownInput(exception, syntheticException, options) { - if (options === void 0) { options = {}; } - var event; - if (isErrorEvent(exception) && exception.error) { - // If it is an ErrorEvent with `error` property, extract it to get actual Error - var errorEvent = exception; - exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment - event = eventFromStacktrace(computeStackTrace(exception)); - return event; - } - if (isDOMError(exception) || isDOMException(exception)) { - // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers) - // then we just extract the name and message, as they don't provide anything else - // https://developer.mozilla.org/en-US/docs/Web/API/DOMError - // https://developer.mozilla.org/en-US/docs/Web/API/DOMException - var domException = exception; - var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException'); - var message = domException.message ? name_1 + ": " + domException.message : name_1; - event = eventFromString(message, syntheticException, options); - addExceptionTypeValue(event, message); - return event; - } - if (isError(exception)) { - // we have a real Error object, do nothing - event = eventFromStacktrace(computeStackTrace(exception)); - return event; - } - if (isPlainObject(exception) || isEvent(exception)) { - // If it is plain Object or Event, serialize it manually and extract options - // This will allow us to group events based on top-level keys - // which is much better than creating new group when any key/value change - var objectException = exception; - event = eventFromPlainObject(objectException, syntheticException, options.rejection); - addExceptionMechanism(event, { - synthetic: true, - }); - return event; - } - // If none of previous checks were valid, then it means that it's not: - // - an instance of DOMError - // - an instance of DOMException - // - an instance of Event - // - an instance of Error - // - a valid ErrorEvent (one with an error property) - // - a plain Object - // - // So bail out and capture it as a simple message: - event = eventFromString(exception, syntheticException, options); - addExceptionTypeValue(event, "" + exception, undefined); - addExceptionMechanism(event, { - synthetic: true, - }); - return event; - } - // this._options.attachStacktrace - /** JSDoc */ - function eventFromString(input, syntheticException, options) { - if (options === void 0) { options = {}; } - var event = { - message: input, - }; - if (options.attachStacktrace && syntheticException) { - var stacktrace = computeStackTrace(syntheticException); - var frames_1 = prepareFramesForEvent(stacktrace.stack); - event.stacktrace = { - frames: frames_1, - }; - } - return event; - } - - /** Base Transport class implementation */ - var BaseTransport = /** @class */ (function () { - function BaseTransport(options) { - this.options = options; - /** A simple buffer holding all requests. */ - this._buffer = new PromiseBuffer(30); - this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth(); - } - /** - * @inheritDoc - */ - BaseTransport.prototype.sendEvent = function (_) { - throw new SentryError('Transport Class has to implement `sendEvent` method'); - }; - /** - * @inheritDoc - */ - BaseTransport.prototype.close = function (timeout) { - return this._buffer.drain(timeout); - }; - return BaseTransport; - }()); - - var global$3 = getGlobalObject(); - /** `fetch` based transport */ - var FetchTransport = /** @class */ (function (_super) { - __extends(FetchTransport, _super); - function FetchTransport() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** Locks transport after receiving 429 response */ - _this._disabledUntil = new Date(Date.now()); - return _this; - } - /** - * @inheritDoc - */ - FetchTransport.prototype.sendEvent = function (event) { - var _this = this; - if (new Date(Date.now()) < this._disabledUntil) { - return Promise.reject({ - event: event, - reason: "Transport locked till " + this._disabledUntil + " due to too many requests.", - status: 429, - }); - } - var defaultOptions = { - body: JSON.stringify(event), - method: 'POST', - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default - // https://caniuse.com/#feat=referrer-policy - // It doesn't. And it throw exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''), - }; - if (this.options.headers !== undefined) { - defaultOptions.headers = this.options.headers; - } - return this._buffer.add(new SyncPromise(function (resolve, reject) { - global$3 - .fetch(_this.url, defaultOptions) - .then(function (response) { - var status = exports.Status.fromHttpCode(response.status); - if (status === exports.Status.Success) { - resolve({ status: status }); - return; - } - if (status === exports.Status.RateLimit) { - var now = Date.now(); - _this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After'))); - logger.warn("Too many requests, backing off till: " + _this._disabledUntil); - } - reject(response); - }) - .catch(reject); - })); - }; - return FetchTransport; - }(BaseTransport)); - - /** `XHR` based transport */ - var XHRTransport = /** @class */ (function (_super) { - __extends(XHRTransport, _super); - function XHRTransport() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** Locks transport after receiving 429 response */ - _this._disabledUntil = new Date(Date.now()); - return _this; - } - /** - * @inheritDoc - */ - XHRTransport.prototype.sendEvent = function (event) { - var _this = this; - if (new Date(Date.now()) < this._disabledUntil) { - return Promise.reject({ - event: event, - reason: "Transport locked till " + this._disabledUntil + " due to too many requests.", - status: 429, - }); - } - return this._buffer.add(new SyncPromise(function (resolve, reject) { - var request = new XMLHttpRequest(); - request.onreadystatechange = function () { - if (request.readyState !== 4) { - return; - } - var status = exports.Status.fromHttpCode(request.status); - if (status === exports.Status.Success) { - resolve({ status: status }); - return; - } - if (status === exports.Status.RateLimit) { - var now = Date.now(); - _this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After'))); - logger.warn("Too many requests, backing off till: " + _this._disabledUntil); - } - reject(request); - }; - request.open('POST', _this.url); - for (var header in _this.options.headers) { - if (_this.options.headers.hasOwnProperty(header)) { - request.setRequestHeader(header, _this.options.headers[header]); - } - } - request.send(JSON.stringify(event)); - })); - }; - return XHRTransport; - }(BaseTransport)); - - - - var index = /*#__PURE__*/Object.freeze({ - BaseTransport: BaseTransport, - FetchTransport: FetchTransport, - XHRTransport: XHRTransport - }); - - /** - * The Sentry Browser SDK Backend. - * @hidden - */ - var BrowserBackend = /** @class */ (function (_super) { - __extends(BrowserBackend, _super); - function BrowserBackend() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @inheritDoc - */ - BrowserBackend.prototype._setupTransport = function () { - if (!this._options.dsn) { - // We return the noop transport here in case there is no Dsn. - return _super.prototype._setupTransport.call(this); - } - var transportOptions = __assign({}, this._options.transportOptions, { dsn: this._options.dsn }); - if (this._options.transport) { - return new this._options.transport(transportOptions); - } - if (supportsFetch()) { - return new FetchTransport(transportOptions); - } - return new XHRTransport(transportOptions); - }; - /** - * @inheritDoc - */ - BrowserBackend.prototype.eventFromException = function (exception, hint) { - var syntheticException = (hint && hint.syntheticException) || undefined; - var event = eventFromUnknownInput(exception, syntheticException, { - attachStacktrace: this._options.attachStacktrace, - }); - addExceptionMechanism(event, { - handled: true, - type: 'generic', - }); - event.level = exports.Severity.Error; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return SyncPromise.resolve(event); - }; - /** - * @inheritDoc - */ - BrowserBackend.prototype.eventFromMessage = function (message, level, hint) { - if (level === void 0) { level = exports.Severity.Info; } - var syntheticException = (hint && hint.syntheticException) || undefined; - var event = eventFromString(message, syntheticException, { - attachStacktrace: this._options.attachStacktrace, - }); - event.level = level; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return SyncPromise.resolve(event); - }; - return BrowserBackend; - }(BaseBackend)); - - var SDK_NAME = 'sentry.javascript.browser'; - var SDK_VERSION = '5.14.1'; - - /** - * The Sentry Browser SDK Client. - * - * @see BrowserOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ - var BrowserClient = /** @class */ (function (_super) { - __extends(BrowserClient, _super); - /** - * Creates a new Browser SDK instance. - * - * @param options Configuration options for this SDK. - */ - function BrowserClient(options) { - if (options === void 0) { options = {}; } - return _super.call(this, BrowserBackend, options) || this; - } - /** - * @inheritDoc - */ - BrowserClient.prototype._prepareEvent = function (event, scope, hint) { - event.platform = event.platform || 'javascript'; - event.sdk = __assign({}, event.sdk, { name: SDK_NAME, packages: __spread(((event.sdk && event.sdk.packages) || []), [ - { - name: 'npm:@sentry/browser', - version: SDK_VERSION, - }, - ]), version: SDK_VERSION }); - return _super.prototype._prepareEvent.call(this, event, scope, hint); - }; - /** - * Show a report dialog to the user to send feedback to a specific event. - * - * @param options Set individual options for the dialog - */ - BrowserClient.prototype.showReportDialog = function (options) { - if (options === void 0) { options = {}; } - // doesn't work without a document (React Native) - var document = getGlobalObject().document; - if (!document) { - return; - } - if (!this._isEnabled()) { - logger.error('Trying to call showReportDialog with Sentry Client is disabled'); - return; - } - var dsn = options.dsn || this.getDsn(); - if (!options.eventId) { - logger.error('Missing `eventId` option in showReportDialog call'); - return; - } - if (!dsn) { - logger.error('Missing `Dsn` option in showReportDialog call'); - return; - } - var script = document.createElement('script'); - script.async = true; - script.src = new API(dsn).getReportDialogEndpoint(options); - if (options.onLoad) { - script.onload = options.onLoad; - } - (document.head || document.body).appendChild(script); - }; - return BrowserClient; - }(BaseClient)); - - var ignoreOnError = 0; - /** - * @hidden - */ - function shouldIgnoreOnError() { - return ignoreOnError > 0; - } - /** - * @hidden - */ - function ignoreNextOnError() { - // onerror should trigger before setTimeout - ignoreOnError += 1; - setTimeout(function () { - ignoreOnError -= 1; - }); - } - /** - * Instruments the given function and sends an event to Sentry every time the - * function throws an exception. - * - * @param fn A function to wrap. - * @returns The wrapped function. - * @hidden - */ - function wrap(fn, options, before) { - if (options === void 0) { options = {}; } - // tslint:disable-next-line:strict-type-predicates - if (typeof fn !== 'function') { - return fn; - } - try { - // We don't wanna wrap it twice - if (fn.__sentry__) { - return fn; - } - // If this has already been wrapped in the past, return that wrapped function - if (fn.__sentry_wrapped__) { - return fn.__sentry_wrapped__; - } - } - catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - // Bail on wrapping and return the function as-is (defers to window.onerror). - return fn; - } - var sentryWrapped = function () { - var args = Array.prototype.slice.call(arguments); - // tslint:disable:no-unsafe-any - try { - // tslint:disable-next-line:strict-type-predicates - if (before && typeof before === 'function') { - before.apply(this, arguments); - } - var wrappedArguments = args.map(function (arg) { return wrap(arg, options); }); - if (fn.handleEvent) { - // Attempt to invoke user-land function - // NOTE: If you are a Sentry user, and you are seeing this stack frame, it - // means the sentry.javascript SDK caught an error invoking your application code. This - // is expected behavior and NOT indicative of a bug with sentry.javascript. - return fn.handleEvent.apply(this, wrappedArguments); - } - // Attempt to invoke user-land function - // NOTE: If you are a Sentry user, and you are seeing this stack frame, it - // means the sentry.javascript SDK caught an error invoking your application code. This - // is expected behavior and NOT indicative of a bug with sentry.javascript. - return fn.apply(this, wrappedArguments); - // tslint:enable:no-unsafe-any - } - catch (ex) { - ignoreNextOnError(); - withScope(function (scope) { - scope.addEventProcessor(function (event) { - var processedEvent = __assign({}, event); - if (options.mechanism) { - addExceptionTypeValue(processedEvent, undefined, undefined); - addExceptionMechanism(processedEvent, options.mechanism); - } - processedEvent.extra = __assign({}, processedEvent.extra, { arguments: args }); - return processedEvent; - }); - captureException(ex); - }); - throw ex; - } - }; - // Accessing some objects may throw - // ref: https://github.com/getsentry/sentry-javascript/issues/1168 - try { - for (var property in fn) { - if (Object.prototype.hasOwnProperty.call(fn, property)) { - sentryWrapped[property] = fn[property]; - } - } - } - catch (_oO) { } // tslint:disable-line:no-empty - fn.prototype = fn.prototype || {}; - sentryWrapped.prototype = fn.prototype; - Object.defineProperty(fn, '__sentry_wrapped__', { - enumerable: false, - value: sentryWrapped, - }); - // Signal that this function has been wrapped/filled already - // for both debugging and to prevent it to being wrapped/filled twice - Object.defineProperties(sentryWrapped, { - __sentry__: { - enumerable: false, - value: true, - }, - __sentry_original__: { - enumerable: false, - value: fn, - }, - }); - // Restore original function name (not all browsers allow that) - try { - var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name'); - if (descriptor.configurable) { - Object.defineProperty(sentryWrapped, 'name', { - get: function () { - return fn.name; - }, - }); - } - } - catch (_oO) { - /*no-empty*/ - } - return sentryWrapped; - } - - /** Global handlers */ - var GlobalHandlers = /** @class */ (function () { - /** JSDoc */ - function GlobalHandlers(options) { - /** - * @inheritDoc - */ - this.name = GlobalHandlers.id; - /** JSDoc */ - this._onErrorHandlerInstalled = false; - /** JSDoc */ - this._onUnhandledRejectionHandlerInstalled = false; - this._options = __assign({ onerror: true, onunhandledrejection: true }, options); - } - /** - * @inheritDoc - */ - GlobalHandlers.prototype.setupOnce = function () { - Error.stackTraceLimit = 50; - if (this._options.onerror) { - logger.log('Global Handler attached: onerror'); - this._installGlobalOnErrorHandler(); - } - if (this._options.onunhandledrejection) { - logger.log('Global Handler attached: onunhandledrejection'); - this._installGlobalOnUnhandledRejectionHandler(); - } - }; - /** JSDoc */ - GlobalHandlers.prototype._installGlobalOnErrorHandler = function () { - var _this = this; - if (this._onErrorHandlerInstalled) { - return; - } - addInstrumentationHandler({ - callback: function (data) { - var error = data.error; - var currentHub = getCurrentHub(); - var hasIntegration = currentHub.getIntegration(GlobalHandlers); - var isFailedOwnDelivery = error && error.__sentry_own_request__ === true; - if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) { - return; - } - var client = currentHub.getClient(); - var event = isPrimitive(error) - ? _this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column) - : _this._enhanceEventWithInitialFrame(eventFromUnknownInput(error, undefined, { - attachStacktrace: client && client.getOptions().attachStacktrace, - rejection: false, - }), data.url, data.line, data.column); - addExceptionMechanism(event, { - handled: false, - type: 'onerror', - }); - currentHub.captureEvent(event, { - originalException: error, - }); - }, - type: 'error', - }); - this._onErrorHandlerInstalled = true; - }; - /** JSDoc */ - GlobalHandlers.prototype._installGlobalOnUnhandledRejectionHandler = function () { - var _this = this; - if (this._onUnhandledRejectionHandlerInstalled) { - return; - } - addInstrumentationHandler({ - callback: function (e) { - var error = e; - // dig the object of the rejection out of known event types - try { - // PromiseRejectionEvents store the object of the rejection under 'reason' - // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent - if ('reason' in e) { - error = e.reason; - } - // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents - // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into - // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec - // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and - // https://github.com/getsentry/sentry-javascript/issues/2380 - else if ('detail' in e && 'reason' in e.detail) { - error = e.detail.reason; - } - } - catch (_oO) { - // no-empty - } - var currentHub = getCurrentHub(); - var hasIntegration = currentHub.getIntegration(GlobalHandlers); - var isFailedOwnDelivery = error && error.__sentry_own_request__ === true; - if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) { - return true; - } - var client = currentHub.getClient(); - var event = isPrimitive(error) - ? _this._eventFromIncompleteRejection(error) - : eventFromUnknownInput(error, undefined, { - attachStacktrace: client && client.getOptions().attachStacktrace, - rejection: true, - }); - event.level = exports.Severity.Error; - addExceptionMechanism(event, { - handled: false, - type: 'onunhandledrejection', - }); - currentHub.captureEvent(event, { - originalException: error, - }); - return; - }, - type: 'unhandledrejection', - }); - this._onUnhandledRejectionHandlerInstalled = true; - }; - /** - * This function creates a stack from an old, error-less onerror handler. - */ - GlobalHandlers.prototype._eventFromIncompleteOnError = function (msg, url, line, column) { - var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; - // If 'message' is ErrorEvent, get real message from inside - var message = isErrorEvent(msg) ? msg.message : msg; - var name; - if (isString(message)) { - var groups = message.match(ERROR_TYPES_RE); - if (groups) { - name = groups[1]; - message = groups[2]; - } - } - var event = { - exception: { - values: [ - { - type: name || 'Error', - value: message, - }, - ], - }, - }; - return this._enhanceEventWithInitialFrame(event, url, line, column); - }; - /** - * This function creates an Event from an TraceKitStackTrace that has part of it missing. - */ - GlobalHandlers.prototype._eventFromIncompleteRejection = function (error) { - return { - exception: { - values: [ - { - type: 'UnhandledRejection', - value: "Non-Error promise rejection captured with value: " + error, - }, - ], - }, - }; - }; - /** JSDoc */ - GlobalHandlers.prototype._enhanceEventWithInitialFrame = function (event, url, line, column) { - event.exception = event.exception || {}; - event.exception.values = event.exception.values || []; - event.exception.values[0] = event.exception.values[0] || {}; - event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {}; - event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || []; - var colno = isNaN(parseInt(column, 10)) ? undefined : column; - var lineno = isNaN(parseInt(line, 10)) ? undefined : line; - var filename = isString(url) && url.length > 0 ? url : getLocationHref(); - if (event.exception.values[0].stacktrace.frames.length === 0) { - event.exception.values[0].stacktrace.frames.push({ - colno: colno, - filename: filename, - function: '?', - in_app: true, - lineno: lineno, - }); - } - return event; - }; - /** - * @inheritDoc - */ - GlobalHandlers.id = 'GlobalHandlers'; - return GlobalHandlers; - }()); - - /** Wrap timer functions and event targets to catch errors and provide better meta data */ - var TryCatch = /** @class */ (function () { - function TryCatch() { - /** JSDoc */ - this._ignoreOnError = 0; - /** - * @inheritDoc - */ - this.name = TryCatch.id; - } - /** JSDoc */ - TryCatch.prototype._wrapTimeFunction = function (original) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var originalCallback = args[0]; - args[0] = wrap(originalCallback, { - mechanism: { - data: { function: getFunctionName(original) }, - handled: true, - type: 'instrument', - }, - }); - return original.apply(this, args); - }; - }; - /** JSDoc */ - TryCatch.prototype._wrapRAF = function (original) { - return function (callback) { - return original(wrap(callback, { - mechanism: { - data: { - function: 'requestAnimationFrame', - handler: getFunctionName(original), - }, - handled: true, - type: 'instrument', - }, - })); - }; - }; - /** JSDoc */ - TryCatch.prototype._wrapEventTarget = function (target) { - var global = getGlobalObject(); - var proto = global[target] && global[target].prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - fill(proto, 'addEventListener', function (original) { - return function (eventName, fn, options) { - try { - // tslint:disable-next-line:no-unbound-method strict-type-predicates - if (typeof fn.handleEvent === 'function') { - fn.handleEvent = wrap(fn.handleEvent.bind(fn), { - mechanism: { - data: { - function: 'handleEvent', - handler: getFunctionName(fn), - target: target, - }, - handled: true, - type: 'instrument', - }, - }); - } - } - catch (err) { - // can sometimes get 'Permission denied to access property "handle Event' - } - return original.call(this, eventName, wrap(fn, { - mechanism: { - data: { - function: 'addEventListener', - handler: getFunctionName(fn), - target: target, - }, - handled: true, - type: 'instrument', - }, - }), options); - }; - }); - fill(proto, 'removeEventListener', function (original) { - return function (eventName, fn, options) { - var callback = fn; - try { - callback = callback && (callback.__sentry_wrapped__ || callback); - } - catch (e) { - // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments - } - return original.call(this, eventName, callback, options); - }; - }); - }; - /** JSDoc */ - TryCatch.prototype._wrapXHR = function (originalSend) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var xhr = this; // tslint:disable-line:no-this-assignment - var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange']; - xmlHttpRequestProps.forEach(function (prop) { - if (prop in xhr && typeof xhr[prop] === 'function') { - fill(xhr, prop, function (original) { - var wrapOptions = { - mechanism: { - data: { - function: prop, - handler: getFunctionName(original), - }, - handled: true, - type: 'instrument', - }, - }; - // If Instrument integration has been called before TryCatch, get the name of original function - if (original.__sentry_original__) { - wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__); - } - // Otherwise wrap directly - return wrap(original, wrapOptions); - }); - } - }); - return originalSend.apply(this, args); - }; - }; - /** - * Wrap timer functions and event targets to catch errors - * and provide better metadata. - */ - TryCatch.prototype.setupOnce = function () { - this._ignoreOnError = this._ignoreOnError; - var global = getGlobalObject(); - fill(global, 'setTimeout', this._wrapTimeFunction.bind(this)); - fill(global, 'setInterval', this._wrapTimeFunction.bind(this)); - fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this)); - if ('XMLHttpRequest' in global) { - fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this)); - } - [ - 'EventTarget', - 'Window', - 'Node', - 'ApplicationCache', - 'AudioTrackList', - 'ChannelMergerNode', - 'CryptoOperation', - 'EventSource', - 'FileReader', - 'HTMLUnknownElement', - 'IDBDatabase', - 'IDBRequest', - 'IDBTransaction', - 'KeyOperation', - 'MediaController', - 'MessagePort', - 'ModalWindow', - 'Notification', - 'SVGElementInstance', - 'Screen', - 'TextTrack', - 'TextTrackCue', - 'TextTrackList', - 'WebSocket', - 'WebSocketWorker', - 'Worker', - 'XMLHttpRequest', - 'XMLHttpRequestEventTarget', - 'XMLHttpRequestUpload', - ].forEach(this._wrapEventTarget.bind(this)); - }; - /** - * @inheritDoc - */ - TryCatch.id = 'TryCatch'; - return TryCatch; - }()); - - /** - * Default Breadcrumbs instrumentations - * TODO: Deprecated - with v6, this will be renamed to `Instrument` - */ - var Breadcrumbs = /** @class */ (function () { - /** - * @inheritDoc - */ - function Breadcrumbs(options) { - /** - * @inheritDoc - */ - this.name = Breadcrumbs.id; - this._options = __assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options); - } - /** - * Creates breadcrumbs from console API calls - */ - Breadcrumbs.prototype._consoleBreadcrumb = function (handlerData) { - var breadcrumb = { - category: 'console', - data: { - arguments: handlerData.args, - logger: 'console', - }, - level: exports.Severity.fromString(handlerData.level), - message: safeJoin(handlerData.args, ' '), - }; - if (handlerData.level === 'assert') { - if (handlerData.args[0] === false) { - breadcrumb.message = "Assertion failed: " + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'); - breadcrumb.data.arguments = handlerData.args.slice(1); - } - else { - // Don't capture a breadcrumb for passed assertions - return; - } - } - getCurrentHub().addBreadcrumb(breadcrumb, { - input: handlerData.args, - level: handlerData.level, - }); - }; - /** - * Creates breadcrumbs from DOM API calls - */ - Breadcrumbs.prototype._domBreadcrumb = function (handlerData) { - var target; - // Accessing event.target can throw (see getsentry/raven-js#838, #768) - try { - target = handlerData.event.target - ? htmlTreeAsString(handlerData.event.target) - : htmlTreeAsString(handlerData.event); - } - catch (e) { - target = ''; - } - if (target.length === 0) { - return; - } - getCurrentHub().addBreadcrumb({ - category: "ui." + handlerData.name, - message: target, - }, { - event: handlerData.event, - name: handlerData.name, - }); - }; - /** - * Creates breadcrumbs from XHR API calls - */ - Breadcrumbs.prototype._xhrBreadcrumb = function (handlerData) { - if (handlerData.endTimestamp) { - // We only capture complete, non-sentry requests - if (handlerData.xhr.__sentry_own_request__) { - return; - } - getCurrentHub().addBreadcrumb({ - category: 'xhr', - data: handlerData.xhr.__sentry_xhr__, - type: 'http', - }, { - xhr: handlerData.xhr, - }); - return; - } - // We only capture issued sentry requests - if (handlerData.xhr.__sentry_own_request__) { - addSentryBreadcrumb(handlerData.args[0]); - } - }; - /** - * Creates breadcrumbs from fetch API calls - */ - Breadcrumbs.prototype._fetchBreadcrumb = function (handlerData) { - // We only capture complete fetch requests - if (!handlerData.endTimestamp) { - return; - } - var client = getCurrentHub().getClient(); - var dsn = client && client.getDsn(); - if (dsn) { - var filterUrl = new API(dsn).getStoreEndpoint(); - // if Sentry key appears in URL, don't capture it as a request - // but rather as our own 'sentry' type breadcrumb - if (filterUrl && - handlerData.fetchData.url.indexOf(filterUrl) !== -1 && - handlerData.fetchData.method === 'POST' && - handlerData.args[1] && - handlerData.args[1].body) { - addSentryBreadcrumb(handlerData.args[1].body); - return; - } - } - if (handlerData.error) { - getCurrentHub().addBreadcrumb({ - category: 'fetch', - data: __assign({}, handlerData.fetchData, { status_code: handlerData.response.status }), - level: exports.Severity.Error, - type: 'http', - }, { - data: handlerData.error, - input: handlerData.args, - }); - } - else { - getCurrentHub().addBreadcrumb({ - category: 'fetch', - data: __assign({}, handlerData.fetchData, { status_code: handlerData.response.status }), - type: 'http', - }, { - input: handlerData.args, - response: handlerData.response, - }); - } - }; - /** - * Creates breadcrumbs from history API calls - */ - Breadcrumbs.prototype._historyBreadcrumb = function (handlerData) { - var global = getGlobalObject(); - var from = handlerData.from; - var to = handlerData.to; - var parsedLoc = parseUrl(global.location.href); - var parsedFrom = parseUrl(from); - var parsedTo = parseUrl(to); - // Initial pushState doesn't provide `from` information - if (!parsedFrom.path) { - parsedFrom = parsedLoc; - } - // Use only the path component of the URL if the URL matches the current - // document (almost all the time when using pushState) - if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) { - // tslint:disable-next-line:no-parameter-reassignment - to = parsedTo.relative; - } - if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) { - // tslint:disable-next-line:no-parameter-reassignment - from = parsedFrom.relative; - } - getCurrentHub().addBreadcrumb({ - category: 'navigation', - data: { - from: from, - to: to, - }, - }); - }; - /** - * Instrument browser built-ins w/ breadcrumb capturing - * - Console API - * - DOM API (click/typing) - * - XMLHttpRequest API - * - Fetch API - * - History API - */ - Breadcrumbs.prototype.setupOnce = function () { - var _this = this; - if (this._options.console) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._consoleBreadcrumb.apply(_this, __spread(args)); - }, - type: 'console', - }); - } - if (this._options.dom) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._domBreadcrumb.apply(_this, __spread(args)); - }, - type: 'dom', - }); - } - if (this._options.xhr) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._xhrBreadcrumb.apply(_this, __spread(args)); - }, - type: 'xhr', - }); - } - if (this._options.fetch) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._fetchBreadcrumb.apply(_this, __spread(args)); - }, - type: 'fetch', - }); - } - if (this._options.history) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._historyBreadcrumb.apply(_this, __spread(args)); - }, - type: 'history', - }); - } - }; - /** - * @inheritDoc - */ - Breadcrumbs.id = 'Breadcrumbs'; - return Breadcrumbs; - }()); - /** - * Create a breadcrumb of `sentry` from the events themselves - */ - function addSentryBreadcrumb(serializedData) { - // There's always something that can go wrong with deserialization... - try { - var event_1 = JSON.parse(serializedData); - getCurrentHub().addBreadcrumb({ - category: "sentry." + (event_1.type === 'transaction' ? 'transaction' : 'event'), - event_id: event_1.event_id, - level: event_1.level || exports.Severity.fromString('error'), - message: getEventDescription(event_1), - }, { - event: event_1, - }); - } - catch (_oO) { - logger.error('Error while adding sentry type breadcrumb'); - } - } - - var DEFAULT_KEY = 'cause'; - var DEFAULT_LIMIT = 5; - /** Adds SDK info to an event. */ - var LinkedErrors = /** @class */ (function () { - /** - * @inheritDoc - */ - function LinkedErrors(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = LinkedErrors.id; - this._key = options.key || DEFAULT_KEY; - this._limit = options.limit || DEFAULT_LIMIT; - } - /** - * @inheritDoc - */ - LinkedErrors.prototype.setupOnce = function () { - addGlobalEventProcessor(function (event, hint) { - var self = getCurrentHub().getIntegration(LinkedErrors); - if (self) { - return self._handler(event, hint); - } - return event; - }); - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype._handler = function (event, hint) { - if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) { - return event; - } - var linkedErrors = this._walkErrorTree(hint.originalException, this._key); - event.exception.values = __spread(linkedErrors, event.exception.values); - return event; - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype._walkErrorTree = function (error, key, stack) { - if (stack === void 0) { stack = []; } - if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) { - return stack; - } - var stacktrace = computeStackTrace(error[key]); - var exception = exceptionFromStacktrace(stacktrace); - return this._walkErrorTree(error[key], key, __spread([exception], stack)); - }; - /** - * @inheritDoc - */ - LinkedErrors.id = 'LinkedErrors'; - return LinkedErrors; - }()); - - var global$4 = getGlobalObject(); - /** UserAgent */ - var UserAgent = /** @class */ (function () { - function UserAgent() { - /** - * @inheritDoc - */ - this.name = UserAgent.id; - } - /** - * @inheritDoc - */ - UserAgent.prototype.setupOnce = function () { - addGlobalEventProcessor(function (event) { - if (getCurrentHub().getIntegration(UserAgent)) { - if (!global$4.navigator || !global$4.location) { - return event; - } - // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/ - var request = event.request || {}; - request.url = request.url || global$4.location.href; - request.headers = request.headers || {}; - request.headers['User-Agent'] = global$4.navigator.userAgent; - return __assign({}, event, { request: request }); - } - return event; - }); - }; - /** - * @inheritDoc - */ - UserAgent.id = 'UserAgent'; - return UserAgent; - }()); - - - - var BrowserIntegrations = /*#__PURE__*/Object.freeze({ - GlobalHandlers: GlobalHandlers, - TryCatch: TryCatch, - Breadcrumbs: Breadcrumbs, - LinkedErrors: LinkedErrors, - UserAgent: UserAgent - }); - - var defaultIntegrations = [ - new InboundFilters(), - new FunctionToString(), - new TryCatch(), - new Breadcrumbs(), - new GlobalHandlers(), - new LinkedErrors(), - new UserAgent(), - ]; - /** - * The Sentry Browser SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible when - * loading the web page. To set context information or send manual events, use - * the provided methods. - * - * @example - * - * ``` - * - * import { init } from '@sentry/browser'; - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * import { configureScope } from '@sentry/browser'; - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * import { addBreadcrumb } from '@sentry/browser'; - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * - * ``` - * - * import * as Sentry from '@sentry/browser'; - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link BrowserOptions} for documentation on configuration options. - */ - function init(options) { - if (options === void 0) { options = {}; } - if (options.defaultIntegrations === undefined) { - options.defaultIntegrations = defaultIntegrations; - } - if (options.release === undefined) { - var window_1 = getGlobalObject(); - // This supports the variable that sentry-webpack-plugin injects - if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) { - options.release = window_1.SENTRY_RELEASE.id; - } - } - initAndBind(BrowserClient, options); - } - /** - * Present the user with a report dialog. - * - * @param options Everything is optional, we try to fetch all info need from the global scope. - */ - function showReportDialog(options) { - if (options === void 0) { options = {}; } - if (!options.eventId) { - options.eventId = getCurrentHub().lastEventId(); - } - var client = getCurrentHub().getClient(); - if (client) { - client.showReportDialog(options); - } - } - /** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ - function lastEventId() { - return getCurrentHub().lastEventId(); - } - /** - * This function is here to be API compatible with the loader. - * @hidden - */ - function forceLoad() { - // Noop - } - /** - * This function is here to be API compatible with the loader. - * @hidden - */ - function onLoad(callback) { - callback(); - } - /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ - function flush(timeout) { - var client = getCurrentHub().getClient(); - if (client) { - return client.flush(timeout); - } - return SyncPromise.reject(false); - } - /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ - function close(timeout) { - var client = getCurrentHub().getClient(); - if (client) { - return client.close(timeout); - } - return SyncPromise.reject(false); - } - /** - * Wrap code within a try/catch block so the SDK is able to capture errors. - * - * @param fn A function to wrap. - * - * @returns The result of wrapped function call. - */ - function wrap$1(fn) { - return wrap(fn)(); // tslint:disable-line:no-unsafe-any - } - - var windowIntegrations = {}; - // This block is needed to add compatibility with the integrations packages when used with a CDN - // tslint:disable: no-unsafe-any - var _window = getGlobalObject(); - if (_window.Sentry && _window.Sentry.Integrations) { - windowIntegrations = _window.Sentry.Integrations; - } - // tslint:enable: no-unsafe-any - var INTEGRATIONS = __assign({}, windowIntegrations, CoreIntegrations, BrowserIntegrations); - - exports.BrowserClient = BrowserClient; - exports.Hub = Hub; - exports.Integrations = INTEGRATIONS; - exports.SDK_NAME = SDK_NAME; - exports.SDK_VERSION = SDK_VERSION; - exports.Scope = Scope; - exports.Transports = index; - exports.addBreadcrumb = addBreadcrumb; - exports.addGlobalEventProcessor = addGlobalEventProcessor; - exports.captureEvent = captureEvent; - exports.captureException = captureException; - exports.captureMessage = captureMessage; - exports.close = close; - exports.configureScope = configureScope; - exports.defaultIntegrations = defaultIntegrations; - exports.flush = flush; - exports.forceLoad = forceLoad; - exports.getCurrentHub = getCurrentHub; - exports.getHubFromCarrier = getHubFromCarrier; - exports.init = init; - exports.lastEventId = lastEventId; - exports.onLoad = onLoad; - exports.setContext = setContext; - exports.setExtra = setExtra; - exports.setExtras = setExtras; - exports.setTag = setTag; - exports.setTags = setTags; - exports.setUser = setUser; - exports.showReportDialog = showReportDialog; - exports.withScope = withScope; - exports.wrap = wrap$1; - - return exports; - -}({})); -//# sourceMappingURL=bundle.js.map diff --git a/node_modules/@sentry/browser/build/bundle.js.map b/node_modules/@sentry/browser/build/bundle.js.map deleted file mode 100644 index f511baf..0000000 --- a/node_modules/@sentry/browser/build/bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bundle.js","sources":["../../types/src/loglevel.ts","../../types/src/severity.ts","../../types/src/span.ts","../../types/src/status.ts","../../utils/src/async.ts","../../utils/src/polyfill.ts","../../utils/src/error.ts","../../utils/src/is.ts","../../utils/src/string.ts","../../utils/src/misc.ts","../../utils/src/logger.ts","../../utils/src/memo.ts","../../utils/src/object.ts","../../utils/src/path.ts","../../utils/src/syncpromise.ts","../../utils/src/promisebuffer.ts","../../utils/src/supports.ts","../../utils/src/instrument.ts","../../utils/src/dsn.ts","../../hub/src/scope.ts","../../hub/src/hub.ts","../../minimal/src/index.ts","../../core/src/api.ts","../../core/src/integration.ts","../../core/src/baseclient.ts","../../core/src/transports/noop.ts","../../core/src/basebackend.ts","../../core/src/sdk.ts","../../core/src/integrations/functiontostring.ts","../../core/src/integrations/inboundfilters.ts","../src/tracekit.ts","../src/parsers.ts","../src/eventbuilder.ts","../src/transports/base.ts","../src/transports/fetch.ts","../src/transports/xhr.ts","../src/backend.ts","../src/version.ts","../src/client.ts","../src/helpers.ts","../src/integrations/globalhandlers.ts","../src/integrations/trycatch.ts","../src/integrations/breadcrumbs.ts","../src/integrations/linkederrors.ts","../src/integrations/useragent.ts","../src/sdk.ts","../src/index.ts"],"sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n /** No logs will be generated. */\n None = 0,\n /** Only SDK internal errors will be logged. */\n Error = 1,\n /** Information useful for debugging the SDK will be logged. */\n Debug = 2,\n /** All SDK actions will be logged. */\n Verbose = 3,\n}\n","/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n","/** Span holding trace_id, span_id */\nexport interface Span {\n /** Sets the finish timestamp on the current span and sends it if it was a transaction */\n finish(useLastSpanTimestamp?: boolean): string | undefined;\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): object;\n /** Convert the object to JSON */\n toJSON(): object;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * @param status http code used to set the status\n */\n setStatus(status: SpanStatus): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n}\n\n/** Interface holder all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n /**\n * Operation of the Span.\n */\n op?: string;\n /**\n * Completion status of the Span.\n */\n status?: SpanStatus;\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n /**\n * Has the sampling decision been made?\n */\n sampled?: boolean;\n /**\n * Span ID\n */\n spanId?: string;\n /**\n * Trace ID\n */\n traceId?: string;\n /**\n * Transaction of the Span.\n */\n transaction?: string;\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n}\n\n/** The status of an Span. */\nexport enum SpanStatus {\n /** The operation completed successfully. */\n Ok = 'ok',\n /** Deadline expired before operation could complete. */\n DeadlineExceeded = 'deadline_exceeded',\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n Unauthenticated = 'unauthenticated',\n /** 403 Forbidden */\n PermissionDenied = 'permission_denied',\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n NotFound = 'not_found',\n /** 429 Too Many Requests */\n ResourceExhausted = 'resource_exhausted',\n /** Client specified an invalid argument. 4xx. */\n InvalidArgument = 'invalid_argument',\n /** 501 Not Implemented */\n Unimplemented = 'unimplemented',\n /** 503 Service Unavailable */\n Unavailable = 'unavailable',\n /** Other/generic 5xx. */\n InternalError = 'internal_error',\n /** Unknown. Any non-standard HTTP status code. */\n UnknownError = 'unknown_error',\n /** The operation was cancelled (typically by the user). */\n Cancelled = 'cancelled',\n /** Already exists (409) */\n AlreadyExists = 'already_exists',\n /** Operation was rejected because the system is not in a state required for the operation's */\n FailedPrecondition = 'failed_precondition',\n /** The operation was aborted, typically due to a concurrency issue. */\n Aborted = 'aborted',\n /** Operation was attempted past the valid range. */\n OutOfRange = 'out_of_range',\n /** Unrecoverable data loss or corruption */\n DataLoss = 'data_loss',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace SpanStatus {\n /**\n * Converts a HTTP status code into a {@link SpanStatus}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or {@link SpanStatus.UnknownError}.\n */\n // tslint:disable-next-line:completed-docs\n export function fromHttpCode(httpStatus: number): SpanStatus {\n if (httpStatus < 400) {\n return SpanStatus.Ok;\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return SpanStatus.Unauthenticated;\n case 403:\n return SpanStatus.PermissionDenied;\n case 404:\n return SpanStatus.NotFound;\n case 409:\n return SpanStatus.AlreadyExists;\n case 413:\n return SpanStatus.FailedPrecondition;\n case 429:\n return SpanStatus.ResourceExhausted;\n default:\n return SpanStatus.InvalidArgument;\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return SpanStatus.Unimplemented;\n case 503:\n return SpanStatus.Unavailable;\n case 504:\n return SpanStatus.DeadlineExceeded;\n default:\n return SpanStatus.InternalError;\n }\n }\n\n return SpanStatus.UnknownError;\n }\n}\n","/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\nexport function forget(promise: PromiseLike): void {\n promise.then(null, e => {\n // TODO: Use a better logging mechanism\n console.error(e);\n });\n}\n","export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n // tslint:disable:no-unsafe-any\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n","/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: any): boolean {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: any): boolean {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): boolean {\n // tslint:disable:no-unsafe-any\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n // tslint:enable:no-unsafe-any\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: any): boolean {\n // tslint:disable-next-line:no-unsafe-any\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n","import { isRegExp } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n colno = ll; // tslint:disable-line:no-parameter-reassignment\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n","import { Event, Integration, StackFrame, WrappedFunction } from '@sentry/types';\n\nimport { isString } from './is';\nimport { snipLine } from './string';\n\n/** Internal */\ninterface SentryGlobal {\n Sentry?: {\n Integrations?: Integration[];\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n };\n}\n\n/**\n * Requires a module which is protected _against bundler minification.\n *\n * @param request The module path to resolve\n */\nexport function dynamicRequire(mod: any, request: string): any {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // tslint:disable:strict-type-predicates\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n\nconst fallbackGlobalObject = {};\n\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject(): T & SentryGlobal {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject) as T & SentryGlobal;\n}\n// tslint:enable:strict-type-predicates\n\n/**\n * Extended Window interface that allows for Crypto API usage in IE browsers\n */\ninterface MsCryptoWindow extends Window {\n msCrypto?: Crypto;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const global = getGlobalObject() as MsCryptoWindow;\n const crypto = global.crypto || global.msCrypto;\n\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n const arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n // tslint:disable-next-line:no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // tslint:disable-next-line:no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n const pad = (num: number): string => {\n let v = num.toString(16);\n while (v.length < 4) {\n v = `0${v}`;\n }\n return v;\n };\n\n return (\n pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])\n );\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n // tslint:disable-next-line:no-bitwise\n const r = (Math.random() * 16) | 0;\n // tslint:disable-next-line:no-bitwise\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(\n url: string,\n): {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n} {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n const exception = event.exception.values[0];\n\n if (exception.type && exception.value) {\n return `${exception.type}: ${exception.value}`;\n }\n return exception.type || exception.value || event.event_id || '';\n }\n return event.event_id || '';\n}\n\n/** JSDoc */\ninterface ExtensibleConsole extends Console {\n [key: string]: any;\n}\n\n/** JSDoc */\nexport function consoleSandbox(callback: () => any): any {\n const global = getGlobalObject();\n const levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n if (!('console' in global)) {\n return callback();\n }\n\n const originalConsole = global.console as ExtensibleConsole;\n const wrappedLevels: { [key: string]: any } = {};\n\n // Restore all wrapped console methods\n levels.forEach(level => {\n if (level in global.console && (originalConsole[level] as WrappedFunction).__sentry_original__) {\n wrappedLevels[level] = originalConsole[level] as WrappedFunction;\n originalConsole[level] = (originalConsole[level] as WrappedFunction).__sentry_original__;\n }\n });\n\n // Perform callback manipulations\n const result = callback();\n\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level];\n });\n\n return result;\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(\n event: Event,\n mechanism: {\n [key: string]: any;\n } = {},\n): void {\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception!.values![0].mechanism = event.exception!.values![0].mechanism || {};\n Object.keys(mechanism).forEach(key => {\n // @ts-ignore\n event.exception!.values![0].mechanism[key] = mechanism[key];\n });\n } catch (_oO) {\n // no-empty\n }\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown): string {\n const elem = el as {\n getAttribute(key: string): string; // tslint:disable-line:completed-docs\n tagName?: string;\n id?: string;\n className?: string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n const attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\nconst INITIAL_TIME = Date.now();\nlet prevNow = 0;\n\nconst performanceFallback: Pick = {\n now(): number {\n let now = Date.now() - INITIAL_TIME;\n if (now < prevNow) {\n now = prevNow;\n }\n prevNow = now;\n return now;\n },\n timeOrigin: INITIAL_TIME,\n};\n\nexport const crossPlatformPerformance: Pick = (() => {\n if (isNodeEnv()) {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: Performance };\n return perfHooks.performance;\n } catch (_) {\n return performanceFallback;\n }\n }\n\n if (getGlobalObject().performance) {\n // Polyfill for performance.timeOrigin.\n //\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // tslint:disable-next-line:strict-type-predicates\n if (performance.timeOrigin === undefined) {\n // For webworkers it could mean we don't have performance.timing then we fallback\n // tslint:disable-next-line:deprecation\n if (!performance.timing) {\n return performanceFallback;\n }\n // tslint:disable-next-line:deprecation\n if (!performance.timing.navigationStart) {\n return performanceFallback;\n }\n\n // @ts-ignore\n // tslint:disable-next-line:deprecation\n performance.timeOrigin = performance.timing.navigationStart;\n }\n }\n\n return getGlobalObject().performance || performanceFallback;\n})();\n\n/**\n * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock.\n */\nexport function timestampWithMs(): number {\n return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000;\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\nconst defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now: number, header?: string | number | null): number {\n if (!header) {\n return defaultRetryAfter;\n }\n\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return defaultRetryAfter;\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n const lineno = frame.lineno || 0;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n","import { consoleSandbox, getGlobalObject } from './misc';\n\n// TODO: Implement different loggers for different environments\nconst global = getGlobalObject();\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** JSDoc */\nclass Logger {\n /** JSDoc */\n private _enabled: boolean;\n\n /** JSDoc */\n public constructor() {\n this._enabled = false;\n }\n\n /** JSDoc */\n public disable(): void {\n this._enabled = false;\n }\n\n /** JSDoc */\n public enable(): void {\n this._enabled = true;\n }\n\n /** JSDoc */\n public log(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.log(`${PREFIX}[Log]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public warn(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public error(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.error(`${PREFIX}[Error]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nconst logger = (global.__SENTRY__.logger as Logger) || (global.__SENTRY__.logger = new Logger());\n\nexport { logger };\n","// tslint:disable:no-unsafe-any\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n /** Determines if WeakSet is available */\n private readonly _hasWeakSet: boolean;\n /** Either WeakSet or Array */\n private readonly _inner: any;\n\n public constructor() {\n // tslint:disable-next-line\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n public memoize(obj: any): boolean {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < this._inner.length; i++) {\n const value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n }\n\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n public unmemoize(obj: any): void {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (let i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n }\n}\n","import { ExtendedError, WrappedFunction } from '@sentry/types';\n\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName, htmlTreeAsString } from './misc';\nimport { truncate } from './string';\n\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacement: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacement(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n // tslint:disable-next-line:strict-type-predicates\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`,\n )\n .join('&');\n}\n\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\nfunction getWalkSource(\n value: any,\n): {\n [key: string]: any;\n} {\n if (isError(value)) {\n const error = value as ExtendedError;\n const err: {\n stack: string | undefined;\n message: string;\n name: string;\n [key: string]: any;\n } = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n\n for (const i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n\n return err;\n }\n\n if (isEvent(value)) {\n /**\n * Event-like interface that's usable in browser and node\n */\n interface SimpleEvent {\n [key: string]: unknown;\n type: string;\n target?: unknown;\n currentTarget?: unknown;\n }\n\n const event = value as SimpleEvent;\n\n const source: {\n [key: string]: any;\n } = {};\n\n source.type = event.type;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n source.target = isElement(event.target)\n ? htmlTreeAsString(event.target)\n : Object.prototype.toString.call(event.target);\n } catch (_oO) {\n source.target = '';\n }\n\n try {\n source.currentTarget = isElement(event.currentTarget)\n ? htmlTreeAsString(event.currentTarget)\n : Object.prototype.toString.call(event.currentTarget);\n } catch (_oO) {\n source.currentTarget = '';\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event.detail;\n }\n\n for (const i in event) {\n if (Object.prototype.hasOwnProperty.call(event, i)) {\n source[i] = event;\n }\n }\n\n return source;\n }\n\n return value as {\n [key: string]: any;\n };\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // tslint:disable-next-line:no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n\n/** JSDoc */\nexport function normalizeToSize(\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const serialized = normalize(object, depth);\n\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return serialized as T;\n}\n\n/** Transforms any input value into a string form, either primitive value or a type of the input */\nfunction serializeValue(value: any): any {\n const type = Object.prototype.toString.call(value);\n\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n\n const normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction normalizeValue(value: T, key?: any): T | string {\n if (key === 'domain' && value && typeof value === 'object' && ((value as unknown) as { _events: any })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n if (typeof (global as any) !== 'undefined' && (value as unknown) === global) {\n return '[Global]';\n }\n\n if (typeof (window as any) !== 'undefined' && (value as unknown) === window) {\n return '[Window]';\n }\n\n if (typeof (document as any) !== 'undefined' && (value as unknown) === document) {\n return '[Document]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n // tslint:disable-next-line:no-tautology-expression\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n return value;\n}\n\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key: string, value: any, depth: number = +Infinity, memo: Memo = new Memo()): any {\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n\n // If value implements `toJSON` method, call it and return early\n // tslint:disable:no-unsafe-any\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // tslint:enable:no-unsafe-any\n\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n const normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n const source = getWalkSource(value);\n\n // Create an accumulator that will act as a parent for all future itterations of that branch\n const acc = Array.isArray(value) ? [] : {};\n\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n\n // Walk all keys of the source\n for (const innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n (acc as { [key: string]: any })[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n\n // Return accumulated values\n return acc;\n}\n\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\nexport function normalize(input: any, depth?: number): any {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return JSON.parse(JSON.stringify(input, (key: string, value: any) => walk(key, value, depth)));\n } catch (_oO) {\n return '**non-serializable**';\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: any, maxLength: number = 40): string {\n // tslint:disable:strict-type-predicates\n const keys = Object.keys(getWalkSource(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val: T): T {\n if (isPlainObject(val)) {\n const obj = val as { [key: string]: any };\n const rv: { [key: string]: any } = {};\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n return rv as T;\n }\n\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys) as any;\n }\n\n return val;\n}\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(p => !!p), !resolvedAbsolute).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n // tslint:disable:no-parameter-reassignment\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(path.split('/').filter(p => !!p), !isPathAbsolute).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n","import { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n /** Pending */\n PENDING = 'PENDING',\n /** Resolved / OK */\n RESOLVED = 'RESOLVED',\n /** Rejected / Error */\n REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<{\n onfulfilled?: ((value: T) => T | PromiseLike) | null;\n onrejected?: ((reason: any) => any) | null;\n }> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public toString(): string {\n return '[object SyncPromise]';\n }\n\n /** JSDoc */\n public static resolve(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n }\n\n /** JSDoc */\n public static reject(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n }\n\n /** JSDoc */\n public static all(collection: Array>): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n if (!Array.isArray(collection)) {\n reject(new TypeError(`Promise.all requires an array as input.`));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n let counter = collection.length;\n const resolvedCollection: U[] = [];\n\n collection.forEach((item, index) => {\n SyncPromise.resolve(item)\n .then(value => {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._attachHandler({\n onfulfilled: result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: reason => {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n // tslint:disable-next-line:no-unsafe-any\n resolve(val);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n // TODO: FIXME\n /** JSDoc */\n private readonly _attachHandler = (handler: {\n /** JSDoc */\n onfulfilled?(value: T): any;\n /** JSDoc */\n onrejected?(reason: any): any;\n }) => {\n this._handlers = this._handlers.concat(handler);\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n if (this._state === States.REJECTED) {\n this._handlers.forEach(handler => {\n if (handler.onrejected) {\n handler.onrejected(this._value);\n }\n });\n } else {\n this._handlers.forEach(handler => {\n if (handler.onfulfilled) {\n // tslint:disable-next-line:no-unsafe-any\n handler.onfulfilled(this._value);\n }\n });\n }\n\n this._handlers = [];\n };\n}\n\nexport { SyncPromise };\n","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer {\n public constructor(protected _limit?: number) {}\n\n /** Internal set of queued Promises */\n private readonly _buffer: Array> = [];\n\n /**\n * Says if the buffer is ready to take more requests\n */\n public isReady(): boolean {\n return this._limit === undefined || this.length() < this._limit;\n }\n\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns The original promise.\n */\n public add(task: PromiseLike): PromiseLike {\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n task\n .then(() => this.remove(task))\n .then(null, () =>\n this.remove(task).then(null, () => {\n // We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n public remove(task: PromiseLike): PromiseLike {\n const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n }\n\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n public length(): number {\n return this._buffer.length;\n }\n\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n public drain(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(this._buffer)\n .then(() => {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, () => {\n resolve(true);\n });\n });\n }\n}\n","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // It really needs 1 argument, not 0.\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore\n // tslint:disable:no-unused-expression\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n // tslint:disable-next-line:no-unused-expression\n new Headers();\n // tslint:disable-next-line:no-unused-expression\n new Request('');\n // tslint:disable-next-line:no-unused-expression\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\nfunction isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // tslint:disable-next-line:no-unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n if (doc) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // tslint:disable-next-line:no-unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n // tslint:disable-next-line: no-unsafe-any\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n // tslint:disable:no-unused-expression\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n const chrome = (global as any).chrome;\n // tslint:disable-next-line:no-unsafe-any\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","/* tslint:disable:only-arrow-functions no-unsafe-any */\n\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getFunctionName, getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n type: InstrumentHandlerType;\n callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n // tslint:disable-next-line:strict-type-predicates\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n return function(...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function(originalFetch: () => void): () => void {\n return function(...args: any[]): void {\n const commonHandlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...commonHandlerData,\n });\n\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n error,\n });\n throw error;\n },\n );\n };\n });\n}\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const url = args[1];\n this.__sentry_xhr__ = {\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const commonHandlerData = {\n args,\n startTimestamp: Date.now(),\n xhr,\n };\n\n triggerHandlers('xhr', {\n ...commonHandlerData,\n });\n\n xhr.addEventListener('readystatechange', function(): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function(this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n\n // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n ['EventTarget', 'Node'].forEach((target: string) => {\n const proto = (global as any)[target] && (global as any)[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerOrEventListenerObject, capture?: boolean, secure?: boolean) => void {\n if (fn && (fn as EventListenerObject).handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n } else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = fn as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n });\n}\n\nconst debounceDuration: number = 1000;\nlet debounceTimer: number = 0;\nlet keypressTimeout: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name: string, handler: Function, debounce: boolean = false): (event: Event) => void {\n return (event: Event) => {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined;\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n lastCapturedEvent = event;\n\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n if (debounce) {\n debounceTimer = setTimeout(() => {\n handler({ event, name });\n });\n } else {\n handler({ event, name });\n }\n };\n}\n\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler: Function): (event: Event) => void {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return (event: Event) => {\n let target;\n\n try {\n target = event.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n\n const tagName = target && (target as HTMLElement).tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !(target as HTMLElement).isContentEditable)) {\n return;\n }\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n clearTimeout(keypressTimeout);\n\n keypressTimeout = (setTimeout(() => {\n keypressTimeout = undefined;\n }, debounceDuration) as any) as number;\n };\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function(e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w\\.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n /** Protocol used to connect to Sentry. */\n public protocol!: DsnProtocol;\n /** Public authorization key. */\n public user!: string;\n /** private _authorization key (deprecated, optional). */\n public pass!: string;\n /** Hostname of the Sentry instance. */\n public host!: string;\n /** Port of the Sentry instance. */\n public port!: string;\n /** Path */\n public path!: string;\n /** Project ID */\n public projectId!: string;\n\n /** Creates a new Dsn component */\n public constructor(from: DsnLike) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n public toString(withPassword: boolean = false): string {\n // tslint:disable-next-line:no-this-assignment\n const { host, path, pass, port, projectId, protocol, user } = this;\n return (\n `${protocol}://${user}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }\n\n /** Parses a string into this Dsn. */\n private _fromString(str: string): void {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, user });\n }\n\n /** Maps Dsn components into this instance. */\n private _fromComponents(components: DsnComponents): void {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n }\n\n /** Validates this Dsn and throws on error. */\n private _validate(): void {\n ['protocol', 'user', 'host', 'projectId'].forEach(component => {\n if (!this[component as keyof DsnComponents]) {\n throw new SentryError(ERROR_MESSAGE);\n }\n });\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE);\n }\n }\n}\n","import {\n Breadcrumb,\n Event,\n EventHint,\n EventProcessor,\n Scope as ScopeInterface,\n Severity,\n Span,\n User,\n} from '@sentry/types';\nimport { getGlobalObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifiying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: string } = {};\n\n /** Extra */\n protected _extra: { [key: string]: any } = {};\n\n /** Contexts */\n protected _context: { [key: string]: any } = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction */\n protected _transaction?: string;\n\n /** Span */\n protected _span?: Span;\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n setTimeout(() => {\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n });\n }\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n // tslint:disable-next-line:strict-type-predicates\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransaction(transaction?: string): this {\n this._transaction = transaction;\n if (this._span) {\n (this._span as any).transaction = transaction;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: { [key: string]: any } | null): this {\n this._context = { ...this._context, [key]: context };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Internal getter for Span, used in Hub.\n * @hidden\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._context = { ...scope._context };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._transaction = scope._transaction;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n }\n return newScope;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._context = {};\n this._level = undefined;\n this._transaction = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const mergedBreadcrumb = {\n timestamp: timestampWithMs(),\n ...breadcrumb,\n };\n\n this._breadcrumbs =\n maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n ? [...this._breadcrumbs, mergedBreadcrumb].slice(-maxBreadcrumbs)\n : [...this._breadcrumbs, mergedBreadcrumb];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._context && Object.keys(this._context).length) {\n event.contexts = { ...this._context, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transaction) {\n event.transaction = this._transaction;\n }\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n}\n\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n","import {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n Event,\n EventHint,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Severity,\n Span,\n SpanContext,\n User,\n} from '@sentry/types';\nimport {\n consoleSandbox,\n dynamicRequire,\n getGlobalObject,\n isNodeEnv,\n logger,\n timestampWithMs,\n uuid4,\n} from '@sentry/utils';\n\nimport { Carrier, Layer } from './interfaces';\nimport { Scope } from './scope';\n\ndeclare module 'domain' {\n export let active: Domain;\n /**\n * Extension for domain interface\n */\n export interface Domain {\n __SENTRY__?: Carrier;\n }\n}\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be incresed when the global interface\n * changes a and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 3;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this._stack.push({ client, scope });\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n private _invokeClient(method: M, ...args: any[]): void {\n const top = this.getStackTop();\n if (top && top.client && top.client[method]) {\n (top.client as any)[method](...args, top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const stack = this.getStack();\n const parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined;\n const scope = Scope.clone(parentScope);\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n return this.getStack().pop() !== undefined;\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const top = this.getStackTop();\n\n if (!top.scope || !top.client) {\n return;\n }\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (top.client.getOptions && top.client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) {\n return;\n }\n\n const timestamp = timestampWithMs();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) {\n return;\n }\n\n top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const top = this.getStackTop();\n if (top.scope && top.client) {\n callback(top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) {\n return null;\n }\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild: boolean = false): Span {\n return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/** Returns the global shim registry. */\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Try to read the hub from an active domain, fallback to the registry if one doesnt exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n const domain = dynamicRequire(module, 'domain');\n const activeDomain = domain.active;\n\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return carrier.__SENTRY__.hub;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) {\n return false;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n","import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport { Breadcrumb, Event, Severity, User } from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\nfunction callOnHub(method: string, ...args: any[]): T {\n const hub = getCurrentHub();\n if (hub && hub[method as keyof Hub]) {\n // tslint:disable-next-line:no-unsafe-any\n return (hub[method as keyof Hub] as any)(...args);\n }\n throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\nexport function captureException(exception: any): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException,\n });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, level?: Severity): string {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureMessage', message, level, {\n originalException: message,\n syntheticException,\n });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n callOnHub('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n callOnHub('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: { [key: string]: any }): void {\n callOnHub('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: string }): void {\n callOnHub('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n\nexport function setExtra(key: string, extra: any): void {\n callOnHub('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\nexport function setTag(key: string, value: string): void {\n callOnHub('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n callOnHub('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n callOnHub('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\nexport function _callOnClient(method: string, ...args: any[]): void {\n callOnHub('_invokeClient', method, ...args);\n}\n","import { DsnLike } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Helper class to provide urls to different Sentry endpoints. */\nexport class API {\n /** The internally used Dsn object. */\n private readonly _dsnObject: Dsn;\n /** Create a new instance of API */\n public constructor(public dsn: DsnLike) {\n this._dsnObject = new Dsn(dsn);\n }\n\n /** Returns the Dsn object. */\n public getDsn(): Dsn {\n return this._dsnObject;\n }\n\n /** Returns a string with auth headers in the url to the store endpoint. */\n public getStoreEndpoint(): string {\n return `${this._getBaseUrl()}${this.getStoreEndpointPath()}`;\n }\n\n /** Returns the store endpoint with auth added in url encoded. */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n const dsn = this._dsnObject;\n const auth = {\n sentry_key: dsn.user, // sentry_key is currently used in tracing integration to identify internal sentry requests\n sentry_version: SENTRY_API_VERSION,\n };\n // Auth is intentionally sent as part of query string (NOT as custom HTTP header)\n // to avoid preflight CORS requests\n return `${this.getStoreEndpoint()}?${urlEncode(auth)}`;\n }\n\n /** Returns the base path of the url including the port. */\n private _getBaseUrl(): string {\n const dsn = this._dsnObject;\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}`;\n }\n\n /** Returns only the path component for the store endpoint. */\n public getStoreEndpointPath(): string {\n const dsn = this._dsnObject;\n return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n }\n\n /** Returns an object that can be used in request headers. */\n public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n const dsn = this._dsnObject;\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.user}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n }\n\n /** Returns the url to the report dialog endpoint. */\n public getReportDialogEndpoint(\n dialogOptions: {\n [key: string]: any;\n user?: { name?: string; email?: string };\n } = {},\n ): string {\n const dsn = this._dsnObject;\n const endpoint = `${this._getBaseUrl()}${dsn.path ? `/${dsn.path}` : ''}/api/embed/error-page/`;\n\n const encodedOptions = [];\n encodedOptions.push(`dsn=${dsn.toString()}`);\n for (const key in dialogOptions) {\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n }\n } else {\n encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n }\n }\n if (encodedOptions.length) {\n return `${endpoint}?${encodedOptions.join('&')}`;\n }\n\n return endpoint;\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport interface IntegrationIndex {\n [key: string]: Integration;\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n let integrations: Integration[] = [];\n if (Array.isArray(userIntegrations)) {\n const userIntegrationsNames = userIntegrations.map(i => i.name);\n const pickedIntegrationsNames: string[] = [];\n\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(defaultIntegration => {\n if (\n userIntegrationsNames.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames.indexOf(defaultIntegration.name) === -1\n ) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames.push(defaultIntegration.name);\n }\n });\n\n // Don't add same user integration twice\n userIntegrations.forEach(userIntegration => {\n if (pickedIntegrationsNames.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames.push(userIntegration.name);\n }\n });\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n } else {\n integrations = [...defaultIntegrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}\n","import { Scope } from '@sentry/hub';\nimport { Client, Event, EventHint, Integration, IntegrationClass, Options, SdkInfo, Severity } from '@sentry/types';\nimport { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, truncate, uuid4 } from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the enviornment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: Dsn;\n\n /** Array of used integrations. */\n protected readonly _integrations: IntegrationIndex = {};\n\n /** Is the client still processing a call? */\n protected _processing: boolean = false;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n this._processing = true;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(`${message}`, level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n promisedEvent\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._processEvent(event, hint, scope)\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): Dsn | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientProcessing(timeout).then(status => {\n clearInterval(status.interval);\n return this._getBackend()\n .getTransport()\n .close(timeout)\n .then(transportFlushed => status.ready && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * @inheritDoc\n */\n public getIntegrations(): IntegrationIndex {\n return this._integrations || {};\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Waits for the client to be done with processing. */\n protected _isClientProcessing(timeout?: number): PromiseLike<{ ready: boolean; interval: number }> {\n return new SyncPromise<{ ready: boolean; interval: number }>(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n let interval = 0;\n clearInterval(interval);\n\n interval = (setInterval(() => {\n if (!this._processing) {\n resolve({\n interval,\n ready: true,\n });\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n resolve({\n interval,\n ready: false,\n });\n }\n }\n }, tick) as unknown) as number;\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { environment, release, dist, maxValueLength = 250, normalizeDepth = 3 } = this.getOptions();\n\n const prepared: Event = { ...event };\n if (prepared.environment === undefined && environment !== undefined) {\n prepared.environment = environment;\n }\n if (prepared.release === undefined && release !== undefined) {\n prepared.release = release;\n }\n\n if (prepared.dist === undefined && dist !== undefined) {\n prepared.dist = dist;\n }\n\n if (prepared.message) {\n prepared.message = truncate(prepared.message, maxValueLength);\n }\n\n const exception = prepared.exception && prepared.exception.values && prepared.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = prepared.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n\n if (prepared.event_id === undefined) {\n prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4();\n }\n\n this._addIntegrations(prepared.sdk);\n\n // We prepare the result here with a resolved Event.\n let result = SyncPromise.resolve(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (scope) {\n // In case we have a hub we reassign it.\n result = scope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n // tslint:disable:no-unsafe-any\n return {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n protected _addIntegrations(sdkInfo?: SdkInfo): void {\n const integrationsArray = Object.keys(this._integrations);\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n const { beforeSend, sampleRate } = this.getOptions();\n\n if (!this._isEnabled()) {\n return SyncPromise.reject('SDK not enabled, will not send event.');\n }\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n if (typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject('This event has been sampled, will not send event.');\n }\n\n return new SyncPromise((resolve, reject) => {\n this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n reject('An event processor returned null, will not send event.');\n return;\n }\n\n let finalEvent: Event | null = prepared;\n\n const isInternalException = hint && hint.data && (hint.data as { [key: string]: any }).__sentry__ === true;\n if (isInternalException || !beforeSend) {\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n return;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n // tslint:disable-next-line:strict-type-predicates\n if (typeof beforeSendResult === 'undefined') {\n logger.error('`beforeSend` method has to return `null` or a valid event.');\n } else if (isThenable(beforeSendResult)) {\n this._handleAsyncBeforeSend(beforeSendResult as PromiseLike, resolve, reject);\n } else {\n finalEvent = beforeSendResult as Event | null;\n\n if (finalEvent === null) {\n logger.log('`beforeSend` returned `null`, will not send event.');\n resolve(null);\n return;\n }\n\n // From here on we are really async\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n }\n })\n .then(null, reason => {\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n reject(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n });\n }\n\n /**\n * Resolves before send Promise and calls resolve/reject on parent SyncPromise.\n */\n private _handleAsyncBeforeSend(\n beforeSend: PromiseLike,\n resolve: (event: Event) => void,\n reject: (reason: string) => void,\n ): void {\n beforeSend\n .then(processedEvent => {\n if (processedEvent === null) {\n reject('`beforeSend` returned `null`, will not send event.');\n return;\n }\n // From here on we are really async\n this._getBackend().sendEvent(processedEvent);\n resolve(processedEvent);\n })\n .then(null, e => {\n reject(`beforeSend rejected with ${e}`);\n });\n }\n}\n","import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return SyncPromise.resolve({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: Status.Skipped,\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return SyncPromise.resolve(true);\n }\n}\n","import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instanciate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates a {@link Event} from an exception. */\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates a {@link Event} from a plain message. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instanciate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n this._transport.sendEvent(event).then(null, reason => {\n logger.error(`Error while sending event: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n}\n","import { getCurrentHub } from '@sentry/hub';\nimport { Client, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** A class object that can instanciate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instanciate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass: ClientClass, options: O): void {\n if (options.debug === true) {\n logger.enable();\n }\n getCurrentHub().bindClient(new clientClass(options));\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n originalFunctionToString = Function.prototype.toString;\n\n Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n const context = this.__sentry_original__ || this;\n // tslint:disable-next-line:no-unsafe-any\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n blacklistUrls?: Array;\n ignoreErrors?: Array;\n ignoreInternal?: boolean;\n whitelistUrls?: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n public constructor(private readonly _options: InboundFiltersOptions = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n const options = self._mergeOptions(clientOptions);\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: InboundFiltersOptions): boolean {\n if (this._isSentryError(event, options)) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (this._isBlacklistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`blacklistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!this._isWhitelistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to not being matched by \\`whitelistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return (\n (event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false\n );\n } catch (_oO) {\n return false;\n }\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isBlacklistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.blacklistUrls || !options.blacklistUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.blacklistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isWhitelistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.whitelistUrls || !options.whitelistUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.whitelistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: InboundFiltersOptions = {}): InboundFiltersOptions {\n return {\n blacklistUrls: [...(this._options.blacklistUrls || []), ...(clientOptions.blacklistUrls || [])],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n whitelistUrls: [...(this._options.whitelistUrls || []), ...(clientOptions.whitelistUrls || [])],\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n const frames = event.stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n if (event.exception) {\n const frames =\n event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n return null;\n } catch (oO) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n }\n}\n","// tslint:disable:object-literal-sort-keys\n\n/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n args: string[];\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js))(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n/** JSDoc */\nexport function computeStackTrace(ex: any): StackTrace {\n // tslint:disable:no-unsafe-any\n\n let stack = null;\n const popSize: number = ex && ex.framesToPop;\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n // tslint:disable:no-conditional-assignment\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (let i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = (ex.columnNumber as number) + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n // tslint:disable:no-conditional-assignment\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .slice(0, STACKTRACE_LIMIT)\n .reverse();\n}\n","import { Event } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/** JSDoc */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n rejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n const domException = exception as DOMException;\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const objectException = exception as {};\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n// this._options.attachStacktrace\n/** JSDoc */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n","import { API } from '@sentry/core';\nimport { Event, Response, Transport, TransportOptions } from '@sentry/types';\nimport { PromiseBuffer, SentryError } from '@sentry/utils';\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @inheritDoc\n */\n public url: string;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n public constructor(public options: TransportOptions) {\n this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth();\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n}\n","import { Event, Response, Status } from '@sentry/types';\nimport { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\nconst global = getGlobalObject();\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n const defaultOptions: RequestInit = {\n body: JSON.stringify(event),\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n\n if (this.options.headers !== undefined) {\n defaultOptions.headers = this.options.headers;\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n global\n .fetch(this.url, defaultOptions)\n .then(response => {\n const status = Status.fromHttpCode(response.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(response);\n })\n .catch(reject);\n }),\n );\n }\n}\n","import { Event, Response, Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = () => {\n if (request.readyState !== 4) {\n return;\n }\n\n const status = Status.fromHttpCode(request.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(request);\n };\n\n request.open('POST', this.url);\n for (const header in this.options.headers) {\n if (this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(JSON.stringify(event));\n }),\n );\n }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils';\n\nimport { eventFromString, eventFromUnknownInput } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To whitelist certain errors instead, use {@link Options.whitelistUrls}.\n * By default, all errors will be sent.\n */\n blacklistUrls?: Array;\n\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.blacklistUrls}.\n * By default, all errors will be sent.\n */\n whitelistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n}\n","export const SDK_NAME = 'sentry.javascript.browser';\nexport const SDK_VERSION = '5.14.1';\n","import { API, BaseClient, Scope } from '@sentry/core';\nimport { DsnLike, Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n super(BrowserBackend, options);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n event.sdk = {\n ...event.sdk,\n name: SDK_NAME,\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client is disabled');\n return;\n }\n\n const dsn = options.dsn || this.getDsn();\n\n if (!options.eventId) {\n logger.error('Missing `eventId` option in showReportDialog call');\n return;\n }\n\n if (!dsn) {\n logger.error('Missing `Dsn` option in showReportDialog call');\n return;\n }\n\n const script = document.createElement('script');\n script.async = true;\n script.src = new API(dsn).getReportDialogEndpoint(options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n (document.head || document.body).appendChild(script);\n }\n}\n","import { captureException, withScope } from '@sentry/core';\nimport { Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils';\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n): any {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n const sentryWrapped: WrappedFunction = function(this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n // tslint:disable:no-unsafe-any\n try {\n // tslint:disable-next-line:strict-type-predicates\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n // tslint:enable:no-unsafe-any\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n const processedEvent = { ...event };\n\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n\n processedEvent.extra = {\n ...processedEvent.extra,\n arguments: args,\n };\n\n return processedEvent;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // tslint:disable-line:no-empty\n\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n } catch (_oO) {\n /*no-empty*/\n }\n\n return sentryWrapped;\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n onerror: boolean;\n onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /** JSDoc */\n private _onErrorHandlerInstalled: boolean = false;\n\n /** JSDoc */\n private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n }\n\n /** JSDoc */\n private _installGlobalOnErrorHandler(): void {\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const error = data.error;\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : this._enhanceEventWithInitialFrame(\n eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }),\n data.url,\n data.line,\n data.column,\n );\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n\n this._onErrorHandlerInstalled = true;\n }\n\n /** JSDoc */\n private _installGlobalOnUnhandledRejectionHandler(): void {\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (e: any) => {\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteRejection(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n\n event.level = Severity.Error;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n\n return;\n },\n type: 'unhandledrejection',\n });\n\n this._onUnhandledRejectionHandlerInstalled = true;\n }\n\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name;\n\n if (isString(message)) {\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n }\n\n /**\n * This function creates an Event from an TraceKitStackTrace that has part of it missing.\n */\n private _eventFromIncompleteRejection(error: any): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n value: `Non-Error promise rejection captured with value: ${error}`,\n },\n ],\n },\n };\n }\n\n /** JSDoc */\n private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /** JSDoc */\n private _ignoreOnError: number = 0;\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /** JSDoc */\n private _wrapTimeFunction(original: () => void): () => number {\n return function(this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n }\n\n /** JSDoc */\n private _wrapRAF(original: any): (callback: () => void) => any {\n return function(this: any, callback: () => void): () => void {\n return original(\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n }\n\n /** JSDoc */\n private _wrapEventTarget(target: string): void {\n const global = getGlobalObject() as { [key: string]: any };\n const proto = global[target] && global[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n // tslint:disable-next-line:no-unbound-method strict-type-predicates\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n wrap((fn as any) as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = (fn as any) as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n }\n\n /** JSDoc */\n private _wrapXHR(originalSend: () => void): () => void {\n return function(this: XMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function(original: WrappedFunction): Function {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n this._ignoreOnError = this._ignoreOnError;\n\n const global = getGlobalObject();\n\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n\n if ('XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n ].forEach(this._wrapEventTarget.bind(this));\n }\n}\n","import { API, getCurrentHub } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n} from '@sentry/utils';\n\nimport { BrowserClient } from '../client';\n\n/**\n * @hidden\n */\nexport interface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** JSDoc */\ninterface BreadcrumbIntegrations {\n console?: boolean;\n dom?: boolean;\n fetch?: boolean;\n history?: boolean;\n sentry?: boolean;\n xhr?: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /** JSDoc */\n private readonly _options: BreadcrumbIntegrations;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: BreadcrumbIntegrations) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Creates breadcrumbs from console API calls\n */\n private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }\n\n /**\n * Creates breadcrumbs from DOM API calls\n */\n private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node)\n : htmlTreeAsString((handlerData.event as unknown) as Node);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n },\n );\n }\n\n /**\n * Creates breadcrumbs from XHR API calls\n */\n private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: handlerData.xhr.__sentry_xhr__,\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n },\n );\n\n return;\n }\n\n // We only capture issued sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n addSentryBreadcrumb(handlerData.args[0]);\n }\n }\n\n /**\n * Creates breadcrumbs from fetch API calls\n */\n private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n const client = getCurrentHub().getClient();\n const dsn = client && client.getDsn();\n\n if (dsn) {\n const filterUrl = new API(dsn).getStoreEndpoint();\n // if Sentry key appears in URL, don't capture it as a request\n // but rather as our own 'sentry' type breadcrumb\n if (\n filterUrl &&\n handlerData.fetchData.url.indexOf(filterUrl) !== -1 &&\n handlerData.fetchData.method === 'POST' &&\n handlerData.args[1] &&\n handlerData.args[1].body\n ) {\n addSentryBreadcrumb(handlerData.args[1].body);\n return;\n }\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }\n\n /**\n * Creates breadcrumbs from history API calls\n */\n private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._consoleBreadcrumb(...args);\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._domBreadcrumb(...args);\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._xhrBreadcrumb(...args);\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._fetchBreadcrumb(...args);\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._historyBreadcrumb(...args);\n },\n type: 'history',\n });\n }\n }\n}\n\n/**\n * Create a breadcrumb of `sentry` from the events themselves\n */\nfunction addSentryBreadcrumb(serializedData: string): void {\n // There's always something that can go wrong with deserialization...\n try {\n const event = JSON.parse(serializedData);\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level || Severity.fromString('error'),\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n } catch (_oO) {\n logger.error('Error while adding sentry type breadcrumb');\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return self._handler(event, hint);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n }\n\n /**\n * @inheritDoc\n */\n private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, [exception, ...stack]);\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n if (!global.navigator || !global.location) {\n return event;\n }\n\n // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/\n const request = event.request || {};\n request.url = request.url || global.location.href;\n request.headers = request.headers || {};\n request.headers['User-Agent'] = global.navigator.userAgent;\n\n return {\n ...event,\n request,\n };\n }\n return event;\n });\n }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient, ReportDialogOptions } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n initAndBind(BrowserClient, options);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n const client = getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\nexport function wrap(fn: Function): any {\n return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any\n}\n","export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports };\n"],"names":["Severity","Status","tslib_1.__extends","global","tslib_1.__values","tslib_1.__spread","CoreIntegrations.InboundFilters","CoreIntegrations.FunctionToString","wrap","internalWrap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;AACA,IAAA,IAAY,QASX;IATD,WAAY,QAAQ;;QAElB,uCAAQ,CAAA;;QAER,yCAAS,CAAA;;QAET,yCAAS,CAAA;;QAET,6CAAW,CAAA;IACb,CAAC,EATW,QAAQ,KAAR,QAAQ,QASnB;;ICVD;AACA,IAAA,WAAY,QAAQ;;QAElB,2BAAe,CAAA;;QAEf,2BAAe,CAAA;;QAEf,+BAAmB,CA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AM,IAAI,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE;QACjD,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;KAClD;IACD;QAEM,YAAY,gBACb,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,CACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/build/bundle.min.js b/node_modules/@sentry/browser/build/bundle.min.js deleted file mode 100644 index ca3b9f2..0000000 --- a/node_modules/@sentry/browser/build/bundle.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! @sentry/browser 5.14.1 (de33eb09) | https://github.com/getsentry/sentry-javascript */ -var Sentry=function(n){var t=function(n,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,r)};function r(n,r){function e(){this.constructor=n}t(n,r),n.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var e=function(){return(e=Object.assign||function(n){for(var t,r=1,e=arguments.length;r=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}}}function o(n,t){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var e,i,o=r.call(n),u=[];try{for(;(void 0===t||t-- >0)&&!(e=o.next()).done;)u.push(e.value)}catch(n){i={error:n}}finally{try{e&&!e.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}function u(){for(var n=[],t=0;t=400&&t<500)switch(t){case 401:return n.Unauthenticated;case 403:return n.PermissionDenied;case 404:return n.NotFound;case 409:return n.AlreadyExists;case 413:return n.FailedPrecondition;case 429:return n.ResourceExhausted;default:return n.InvalidArgument}if(t>=500&&t<600)switch(t){case 501:return n.Unimplemented;case 503:return n.Unavailable;case 504:return n.DeadlineExceeded;default:return n.InternalError}return n.UnknownError}}(s||(s={})),(f=n.Status||(n.Status={})).Unknown="unknown",f.Skipped="skipped",f.Success="success",f.RateLimit="rate_limit",f.Invalid="invalid",f.Failed="failed",function(n){n.fromHttpCode=function(t){return t>=200&&t<300?n.Success:429===t?n.RateLimit:t>=400&&t<500?n.Invalid:t>=500?n.Failed:n.Unknown}}(n.Status||(n.Status={}));var h=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,t){return n.__proto__=t,n}:function(n,t){for(var r in t)n.hasOwnProperty(r)||(n[r]=t[r]);return n});var v=function(n){function t(t){var r=this.constructor,e=n.call(this,t)||this;return e.message=t,e.name=r.prototype.constructor.name,h(e,r.prototype),e}return r(t,n),t}(Error);function l(n){switch(Object.prototype.toString.call(n)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return x(n,Error)}}function d(n){return"[object ErrorEvent]"===Object.prototype.toString.call(n)}function p(n){return"[object DOMError]"===Object.prototype.toString.call(n)}function y(n){return"[object String]"===Object.prototype.toString.call(n)}function m(n){return null===n||"object"!=typeof n&&"function"!=typeof n}function b(n){return"[object Object]"===Object.prototype.toString.call(n)}function w(n){return"undefined"!=typeof Event&&x(n,Event)}function g(n){return"undefined"!=typeof Element&&x(n,Element)}function E(n){return Boolean(n&&n.then&&"function"==typeof n.then)}function x(n,t){try{return n instanceof t}catch(n){return!1}}function j(n,t){return void 0===t&&(t=0),"string"!=typeof n||0===t?n:n.length<=t?n:n.substr(0,t)+"..."}function k(n,t){if(!Array.isArray(n))return"";for(var r=[],e=0;e"}return n.event_id||""}function C(n){var t=D();if(!("console"in t))return n();var r=t.console,e={};["debug","info","warn","error","log","assert"].forEach(function(n){n in t.console&&r[n].__sentry_original__&&(e[n]=r[n],r[n]=r[n].__sentry_original__)});var i=n();return Object.keys(e).forEach(function(n){r[n]=e[n]}),i}function M(n,t,r){n.exception=n.exception||{},n.exception.values=n.exception.values||[],n.exception.values[0]=n.exception.values[0]||{},n.exception.values[0].value=n.exception.values[0].value||t||"",n.exception.values[0].type=n.exception.values[0].type||r||"Error"}function A(n,t){void 0===t&&(t={});try{n.exception.values[0].mechanism=n.exception.values[0].mechanism||{},Object.keys(t).forEach(function(r){n.exception.values[0].mechanism[r]=t[r]})}catch(n){}}function U(n){try{for(var t=n,r=[],e=0,i=0,o=" > ".length,u=void 0;t&&e++<5&&!("html"===(u=q(t))||e>1&&i+r.length*o+u.length>=80);)r.push(u),i+=u.length,t=t.parentNode;return r.reverse().join(" > ")}catch(n){return""}}function q(n){var t,r,e,i,o,u=n,c=[];if(!u||!u.tagName)return"";if(c.push(u.tagName.toLowerCase()),u.id&&c.push("#"+u.id),(t=u.className)&&y(t))for(r=t.split(/\s+/),o=0;o"}try{o.currentTarget=g(i.currentTarget)?U(i.currentTarget):Object.prototype.toString.call(i.currentTarget)}catch(n){o.currentTarget=""}for(var e in"undefined"!=typeof CustomEvent&&x(n,CustomEvent)&&(o.detail=i.detail),i)Object.prototype.hasOwnProperty.call(i,e)&&(o[e]=i);return o}return n}function tn(n){return function(n){return~-encodeURI(n).split(/%..|./).length}(JSON.stringify(n))}function rn(n,t,r){void 0===t&&(t=3),void 0===r&&(r=102400);var e=un(n,t);return tn(e)>r?rn(n,t-1,r):e}function en(n,t){return"domain"===t&&n&&"object"==typeof n&&n.u?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof global&&n===global?"[Global]":"undefined"!=typeof window&&n===window?"[Window]":"undefined"!=typeof document&&n===document?"[Document]":b(r=n)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r?"[SyntheticEvent]":"number"==typeof n&&n!=n?"[NaN]":void 0===n?"[undefined]":"function"==typeof n?"[Function: "+G(n)+"]":n;var r}function on(n,t,r,e){if(void 0===r&&(r=1/0),void 0===e&&(e=new Y),0===r)return function(n){var t=Object.prototype.toString.call(n);if("string"==typeof n)return n;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var r=en(n);return m(r)?r:t}(t);if(null!=t&&"function"==typeof t.toJSON)return t.toJSON();var i=en(t,n);if(m(i))return i;var o=nn(t),u=Array.isArray(t)?[]:{};if(e.memoize(t))return"[Circular ~]";for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(u[c]=on(c,o[c],r-1,e));return e.unmemoize(t),u}function un(n,t){try{return JSON.parse(JSON.stringify(n,function(n,r){return on(n,r,t)}))}catch(n){return"**non-serializable**"}}function cn(n,t){void 0===t&&(t=40);var r=Object.keys(nn(n));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return j(r[0],t);for(var e=r.length;e>0;e--){var i=r.slice(0,e).join(", ");if(!(i.length>t))return e===r.length?i:j(i,t)}return""}!function(n){n.PENDING="PENDING",n.RESOLVED="RESOLVED",n.REJECTED="REJECTED"}(K||(K={}));var an=function(){function n(n){var t=this;this.s=K.PENDING,this.h=[],this.v=function(n){t.l(K.RESOLVED,n)},this.p=function(n){t.l(K.REJECTED,n)},this.l=function(n,r){t.s===K.PENDING&&(E(r)?r.then(t.v,t.p):(t.s=n,t.m=r,t.g()))},this.j=function(n){t.h=t.h.concat(n),t.g()},this.g=function(){t.s!==K.PENDING&&(t.s===K.REJECTED?t.h.forEach(function(n){n.onrejected&&n.onrejected(t.m)}):t.h.forEach(function(n){n.onfulfilled&&n.onfulfilled(t.m)}),t.h=[])};try{n(this.v,this.p)}catch(n){this.p(n)}}return n.prototype.toString=function(){return"[object SyncPromise]"},n.resolve=function(t){return new n(function(n){n(t)})},n.reject=function(t){return new n(function(n,r){r(t)})},n.all=function(t){return new n(function(r,e){if(Array.isArray(t))if(0!==t.length){var i=t.length,o=[];t.forEach(function(t,u){n.resolve(t).then(function(n){o[u]=n,0===(i-=1)&&r(o)}).then(null,e)})}else r([]);else e(new TypeError("Promise.all requires an array as input."))})},n.prototype.then=function(t,r){var e=this;return new n(function(n,i){e.j({onfulfilled:function(r){if(t)try{return void n(t(r))}catch(n){return void i(n)}else n(r)},onrejected:function(t){if(r)try{return void n(r(t))}catch(n){return void i(n)}else i(t)}})})},n.prototype.catch=function(n){return this.then(function(n){return n},n)},n.prototype.finally=function(t){var r=this;return new n(function(n,e){var i,o;return r.then(function(n){o=!1,i=n,t&&t()},function(n){o=!0,i=n,t&&t()}).then(function(){o?e(i):n(i)})})},n}(),sn=function(){function n(n){this.k=n,this._=[]}return n.prototype.isReady=function(){return void 0===this.k||this.length()0&&r(!1)},n);an.all(t._).then(function(){clearTimeout(e),r(!0)}).then(null,function(){r(!0)})})},n}();function fn(){if(!("fetch"in D()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(n){return!1}}function hn(n){return n&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(n.toString())}function vn(){if(!fn())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(n){return!1}}var ln,dn=D(),pn={},yn={};function mn(n){if(!yn[n])switch(yn[n]=!0,n){case"console":!function(){if(!("console"in dn))return;["debug","info","warn","error","log","assert"].forEach(function(n){n in dn.console&&Z(dn.console,n,function(t){return function(){for(var r=[],e=0;e2?t[2]:void 0;if(e){var i=ln,o=String(e);ln=o,wn("history",{from:i,to:o})}return n.apply(this,t)}}dn.onpopstate=function(){for(var n=[],t=0;t1&&(h=d.slice(0,-1).join("/"),l=d.pop()),this.O({host:a,pass:c,path:h,projectId:l,port:f,protocol:e,user:i})},n.prototype.O=function(n){this.protocol=n.protocol,this.user=n.user,this.pass=n.pass||"",this.host=n.host,this.port=n.port||"",this.path=n.path||"",this.projectId=n.projectId},n.prototype.T=function(){var n=this;if(["protocol","user","host","projectId"].forEach(function(t){if(!n[t])throw new v("Invalid Dsn")}),"http"!==this.protocol&&"https"!==this.protocol)throw new v("Invalid Dsn");if(this.port&&isNaN(parseInt(this.port,10)))throw new v("Invalid Dsn")},n}(),In=function(){function n(){this.D=!1,this.R=[],this.N=[],this.I=[],this.C={},this.M={},this.A={},this.U={}}return n.prototype.addScopeListener=function(n){this.R.push(n)},n.prototype.addEventProcessor=function(n){return this.N.push(n),this},n.prototype.q=function(){var n=this;this.D||(this.D=!0,setTimeout(function(){n.R.forEach(function(t){t(n)}),n.D=!1}))},n.prototype.L=function(n,t,r,i){var o=this;return void 0===i&&(i=0),new an(function(u,c){var a=n[i];if(null===t||"function"!=typeof a)u(t);else{var s=a(e({},t),r);E(s)?s.then(function(t){return o.L(n,t,r,i+1).then(u)}).then(null,c):o.L(n,s,r,i+1).then(u).then(null,c)}})},n.prototype.setUser=function(n){return this.C=n||{},this.q(),this},n.prototype.setTags=function(n){return this.M=e({},this.M,n),this.q(),this},n.prototype.setTag=function(n,t){var r;return this.M=e({},this.M,((r={})[n]=t,r)),this.q(),this},n.prototype.setExtras=function(n){return this.A=e({},this.A,n),this.q(),this},n.prototype.setExtra=function(n,t){var r;return this.A=e({},this.A,((r={})[n]=t,r)),this.q(),this},n.prototype.setFingerprint=function(n){return this.H=n,this.q(),this},n.prototype.setLevel=function(n){return this.P=n,this.q(),this},n.prototype.setTransaction=function(n){return this.F=n,this.W&&(this.W.transaction=n),this.q(),this},n.prototype.setContext=function(n,t){var r;return this.U=e({},this.U,((r={})[n]=t,r)),this.q(),this},n.prototype.setSpan=function(n){return this.W=n,this.q(),this},n.prototype.getSpan=function(){return this.W},n.clone=function(t){var r=new n;return t&&(r.I=u(t.I),r.M=e({},t.M),r.A=e({},t.A),r.U=e({},t.U),r.C=t.C,r.P=t.P,r.W=t.W,r.F=t.F,r.H=t.H,r.N=u(t.N)),r},n.prototype.clear=function(){return this.I=[],this.M={},this.A={},this.C={},this.U={},this.P=void 0,this.F=void 0,this.H=void 0,this.W=void 0,this.q(),this},n.prototype.addBreadcrumb=function(n,t){var r=e({timestamp:W()},n);return this.I=void 0!==t&&t>=0?u(this.I,[r]).slice(-t):u(this.I,[r]),this.q(),this},n.prototype.clearBreadcrumbs=function(){return this.I=[],this.q(),this},n.prototype.X=function(n){n.fingerprint=n.fingerprint?Array.isArray(n.fingerprint)?n.fingerprint:[n.fingerprint]:[],this.H&&(n.fingerprint=n.fingerprint.concat(this.H)),n.fingerprint&&!n.fingerprint.length&&delete n.fingerprint},n.prototype.applyToEvent=function(n,t){return this.A&&Object.keys(this.A).length&&(n.extra=e({},this.A,n.extra)),this.M&&Object.keys(this.M).length&&(n.tags=e({},this.M,n.tags)),this.C&&Object.keys(this.C).length&&(n.user=e({},this.C,n.user)),this.U&&Object.keys(this.U).length&&(n.contexts=e({},this.U,n.contexts)),this.P&&(n.level=this.P),this.F&&(n.transaction=this.F),this.W&&(n.contexts=e({trace:this.W.getTraceContext()},n.contexts)),this.X(n),n.breadcrumbs=u(n.breadcrumbs||[],this.I),n.breadcrumbs=n.breadcrumbs.length>0?n.breadcrumbs:void 0,this.L(u(Cn(),this.N),n,t)},n}();function Cn(){var n=D();return n.__SENTRY__=n.__SENTRY__||{},n.__SENTRY__.globalEventProcessors=n.__SENTRY__.globalEventProcessors||[],n.__SENTRY__.globalEventProcessors}function Mn(n){Cn().push(n)}var An=3,Un=function(){function n(n,t,r){void 0===t&&(t=new In),void 0===r&&(r=An),this.B=r,this.$=[],this.$.push({client:n,scope:t})}return n.prototype.G=function(n){for(var t,r=[],e=1;e0?n[n.length-1].scope:void 0,r=In.clone(t);return this.getStack().push({client:this.getClient(),scope:r}),r},n.prototype.popScope=function(){return void 0!==this.getStack().pop()},n.prototype.withScope=function(n){var t=this.pushScope();try{n(t)}finally{this.popScope()}},n.prototype.getClient=function(){return this.getStackTop().client},n.prototype.getScope=function(){return this.getStackTop().scope},n.prototype.getStack=function(){return this.$},n.prototype.getStackTop=function(){return this.$[this.$.length-1]},n.prototype.captureException=function(n,t){var r=this.J=R(),i=t;if(!t){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(n){o=n}i={originalException:n,syntheticException:o}}return this.G("captureException",n,e({},i,{event_id:r})),r},n.prototype.captureMessage=function(n,t,r){var i=this.J=R(),o=r;if(!r){var u=void 0;try{throw new Error(n)}catch(n){u=n}o={originalException:n,syntheticException:u}}return this.G("captureMessage",n,t,e({},o,{event_id:i})),i},n.prototype.captureEvent=function(n,t){var r=this.J=R();return this.G("captureEvent",n,e({},t,{event_id:r})),r},n.prototype.lastEventId=function(){return this.J},n.prototype.addBreadcrumb=function(n,t){var r=this.getStackTop();if(r.scope&&r.client){var i=r.client.getOptions&&r.client.getOptions()||{},o=i.beforeBreadcrumb,u=void 0===o?null:o,c=i.maxBreadcrumbs,a=void 0===c?100:c;if(!(a<=0)){var s=W(),f=e({timestamp:s},n),h=u?C(function(){return u(f,t)}):f;null!==h&&r.scope.addBreadcrumb(h,Math.min(a,100))}}},n.prototype.setUser=function(n){var t=this.getStackTop();t.scope&&t.scope.setUser(n)},n.prototype.setTags=function(n){var t=this.getStackTop();t.scope&&t.scope.setTags(n)},n.prototype.setExtras=function(n){var t=this.getStackTop();t.scope&&t.scope.setExtras(n)},n.prototype.setTag=function(n,t){var r=this.getStackTop();r.scope&&r.scope.setTag(n,t)},n.prototype.setExtra=function(n,t){var r=this.getStackTop();r.scope&&r.scope.setExtra(n,t)},n.prototype.setContext=function(n,t){var r=this.getStackTop();r.scope&&r.scope.setContext(n,t)},n.prototype.configureScope=function(n){var t=this.getStackTop();t.scope&&t.client&&n(t.scope)},n.prototype.run=function(n){var t=Ln(this);try{n(this)}finally{Ln(t)}},n.prototype.getIntegration=function(n){var t=this.getClient();if(!t)return null;try{return t.getIntegration(n)}catch(t){return Q.warn("Cannot retrieve integration "+n.id+" from the current Hub"),null}},n.prototype.startSpan=function(n,t){return void 0===t&&(t=!1),this.V("startSpan",n,t)},n.prototype.traceHeaders=function(){return this.V("traceHeaders")},n.prototype.V=function(n){for(var t=[],r=1;r=n&&r({interval:i,ready:!1})):r({interval:i,ready:!0})},1)})},n.prototype.on=function(){return this.tn},n.prototype.in=function(){return!1!==this.getOptions().enabled&&void 0!==this.en},n.prototype.an=function(n,t,r){var i=this,o=this.getOptions(),u=o.environment,c=o.release,a=o.dist,s=o.maxValueLength,f=void 0===s?250:s,h=o.normalizeDepth,v=void 0===h?3:h,l=e({},n);void 0===l.environment&&void 0!==u&&(l.environment=u),void 0===l.release&&void 0!==c&&(l.release=c),void 0===l.dist&&void 0!==a&&(l.dist=a),l.message&&(l.message=j(l.message,f));var d=l.exception&&l.exception.values&&l.exception.values[0];d&&d.value&&(d.value=j(d.value,f));var p=l.request;p&&p.url&&(p.url=j(p.url,f)),void 0===l.event_id&&(l.event_id=r&&r.event_id?r.event_id:R()),this.sn(l.sdk);var y=an.resolve(l);return t&&(y=t.applyToEvent(l,r)),y.then(function(n){return"number"==typeof v&&v>0?i.fn(n,v):n})},n.prototype.fn=function(n,t){return n?e({},n,n.breadcrumbs&&{breadcrumbs:n.breadcrumbs.map(function(n){return e({},n,n.data&&{data:un(n.data,t)})})},n.user&&{user:un(n.user,t)},n.contexts&&{contexts:un(n.contexts,t)},n.extra&&{extra:un(n.extra,t)}):null},n.prototype.sn=function(n){var t=Object.keys(this.Z);n&&t.length>0&&(n.integrations=t)},n.prototype.un=function(n,t,r){var e=this,i=this.getOptions(),o=i.beforeSend,u=i.sampleRate;return this.in()?"number"==typeof u&&Math.random()>u?an.reject("This event has been sampled, will not send event."):new an(function(i,u){e.an(n,r,t).then(function(n){if(null!==n){var r=n;if(t&&t.data&&!0===t.data.__sentry__||!o)return e.on().sendEvent(r),void i(r);var c=o(n,t);if(void 0===c)Q.error("`beforeSend` method has to return `null` or a valid event.");else if(E(c))e.hn(c,i,u);else{if(null===(r=c))return Q.log("`beforeSend` returned `null`, will not send event."),void i(null);e.on().sendEvent(r),i(r)}}else u("An event processor returned null, will not send event.")}).then(null,function(n){e.captureException(n,{data:{__sentry__:!0},originalException:n}),u("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+n)})}):an.reject("SDK not enabled, will not send event.")},n.prototype.hn=function(n,t,r){var e=this;n.then(function(n){null!==n?(e.on().sendEvent(n),t(n)):r("`beforeSend` returned `null`, will not send event.")}).then(null,function(n){r("beforeSend rejected with "+n)})},n}(),Kn=function(){function t(){}return t.prototype.sendEvent=function(t){return an.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:n.Status.Skipped})},t.prototype.close=function(n){return an.resolve(!0)},t}(),Qn=function(){function n(n){this.rn=n,this.rn.dsn||Q.warn("No DSN provided, backend will not do anything."),this.vn=this.ln()}return n.prototype.ln=function(){return new Kn},n.prototype.eventFromException=function(n,t){throw new v("Backend has to implement `eventFromException` method")},n.prototype.eventFromMessage=function(n,t,r){throw new v("Backend has to implement `eventFromMessage` method")},n.prototype.sendEvent=function(n){this.vn.sendEvent(n).then(null,function(n){Q.error("Error while sending event: "+n)})},n.prototype.getTransport=function(){return this.vn},n}();var Yn=function(){function n(){this.name=n.id}return n.prototype.setupOnce=function(){zn=Function.prototype.toString,Function.prototype.toString=function(){for(var n=[],t=0;t|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,it=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,ot=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ut=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ct=/\((\S*)(?::(\d+))(?::(\d+))\)/;function at(n){var t=null,r=n&&n.framesToPop;try{if(t=function(n){if(!n||!n.stacktrace)return null;for(var t,r=n.stacktrace,e=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,i=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=r.split("\n"),u=[],c=0;c eval")>-1&&(t=ut.exec(r[3]))?(r[1]=r[1]||"eval",r[3]=t[1],r[4]=t[2],r[5]=""):0!==u||r[5]||void 0===n.columnNumber||(i[0].column=n.columnNumber+1),e={url:r[3],func:r[1]||rt,args:r[2]?r[2].split(","):[],line:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}!e.func&&e.line&&(e.func=rt),i.push(e)}if(!i.length)return null;return{message:ft(n),name:n.name,stack:i}}(n))return st(t,r)}catch(n){}return{message:ft(n),name:n&&n.name,stack:[],failed:!0}}function st(n,t){try{return e({},n,{stack:n.stack.slice(t)})}catch(t){return n}}function ft(n){var t=n&&n.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}var ht=50;function vt(n){var t=dt(n.stack),r={type:n.name,value:n.message};return t&&t.length&&(r.stacktrace={frames:t}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function lt(n){return{exception:{values:[vt(n)]}}}function dt(n){if(!n||!n.length)return[];var t=n,r=t[0].func||"",e=t[t.length-1].func||"";return-1===r.indexOf("captureMessage")&&-1===r.indexOf("captureException")||(t=t.slice(1)),-1!==e.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.map(function(n){return{colno:null===n.column?void 0:n.column,filename:n.url||t[0].url,function:n.func||"?",in_app:!0,lineno:null===n.line?void 0:n.line}}).slice(0,ht).reverse()}function pt(n,t,r){var e,i;if(void 0===r&&(r={}),d(n)&&n.error)return e=lt(at(n=n.error));if(p(n)||(i=n,"[object DOMException]"===Object.prototype.toString.call(i))){var o=n,u=o.name||(p(o)?"DOMError":"DOMException"),c=o.message?u+": "+o.message:u;return M(e=yt(c,t,r),c),e}return l(n)?e=lt(at(n)):b(n)||w(n)?(A(e=function(n,t,r){var e={exception:{values:[{type:w(n)?n.constructor.name:r?"UnhandledRejection":"Error",value:"Non-Error "+(r?"promise rejection":"exception")+" captured with keys: "+cn(n)}]},extra:{__serialized__:rn(n)}};if(t){var i=dt(at(t).stack);e.stacktrace={frames:i}}return e}(n,t,r.rejection),{synthetic:!0}),e):(M(e=yt(n,t,r),""+n,void 0),A(e,{synthetic:!0}),e)}function yt(n,t,r){void 0===r&&(r={});var e={message:n};if(r.attachStacktrace&&t){var i=dt(at(t).stack);e.stacktrace={frames:i}}return e}var mt=function(){function n(n){this.options=n,this._=new sn(30),this.url=new $n(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return n.prototype.sendEvent=function(n){throw new v("Transport Class has to implement `sendEvent` method")},n.prototype.close=function(n){return this._.drain(n)},n}(),bt=D(),wt=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.xn=new Date(Date.now()),n}return r(e,t),e.prototype.sendEvent=function(t){var r=this;if(new Date(Date.now())0}function Ot(n,t,r){if(void 0===t&&(t={}),"function"!=typeof n)return n;try{if(n.__sentry__)return n;if(n.__sentry_wrapped__)return n.__sentry_wrapped__}catch(t){return n}var sentryWrapped=function(){var i=Array.prototype.slice.call(arguments);try{r&&"function"==typeof r&&r.apply(this,arguments);var o=i.map(function(n){return Ot(n,t)});return n.handleEvent?n.handleEvent.apply(this,o):n.apply(this,o)}catch(n){throw _t+=1,setTimeout(function(){_t-=1}),Bn(function(r){r.addEventProcessor(function(n){var r=e({},n);return t.mechanism&&(M(r,void 0,void 0),A(r,t.mechanism)),r.extra=e({},r.extra,{arguments:i}),r}),captureException(n)}),n}};try{for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(sentryWrapped[i]=n[i])}catch(n){}n.prototype=n.prototype||{},sentryWrapped.prototype=n.prototype,Object.defineProperty(n,"__sentry_wrapped__",{enumerable:!1,value:sentryWrapped}),Object.defineProperties(sentryWrapped,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:n}});try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:function(){return n.name}})}catch(n){}return sentryWrapped}var Tt=function(){function t(n){this.name=t.id,this.jn=!1,this.kn=!1,this.rn=e({onerror:!0,onunhandledrejection:!0},n)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50,this.rn.onerror&&(Q.log("Global Handler attached: onerror"),this._n()),this.rn.onunhandledrejection&&(Q.log("Global Handler attached: onunhandledrejection"),this.Sn())},t.prototype._n=function(){var n=this;this.jn||(bn({callback:function(r){var e=r.error,i=Hn(),o=i.getIntegration(t),u=e&&!0===e.__sentry_own_request__;if(o&&!St()&&!u){var c=i.getClient(),a=m(e)?n.On(r.msg,r.url,r.line,r.column):n.Tn(pt(e,void 0,{attachStacktrace:c&&c.getOptions().attachStacktrace,rejection:!1}),r.url,r.line,r.column);A(a,{handled:!1,type:"onerror"}),i.captureEvent(a,{originalException:e})}},type:"error"}),this.jn=!0)},t.prototype.Sn=function(){var r=this;this.kn||(bn({callback:function(e){var i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch(n){}var o=Hn(),u=o.getIntegration(t),c=i&&!0===i.__sentry_own_request__;if(!u||St()||c)return!0;var a=o.getClient(),s=m(i)?r.Dn(i):pt(i,void 0,{attachStacktrace:a&&a.getOptions().attachStacktrace,rejection:!0});s.level=n.Severity.Error,A(s,{handled:!1,type:"onunhandledrejection"}),o.captureEvent(s,{originalException:i})},type:"unhandledrejection"}),this.kn=!0)},t.prototype.On=function(n,t,r,e){var i,o=d(n)?n.message:n;if(y(o)){var u=o.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);u&&(i=u[1],o=u[2])}var c={exception:{values:[{type:i||"Error",value:o}]}};return this.Tn(c,t,r,e)},t.prototype.Dn=function(n){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+n}]}}},t.prototype.Tn=function(n,t,r,e){n.exception=n.exception||{},n.exception.values=n.exception.values||[],n.exception.values[0]=n.exception.values[0]||{},n.exception.values[0].stacktrace=n.exception.values[0].stacktrace||{},n.exception.values[0].stacktrace.frames=n.exception.values[0].stacktrace.frames||[];var i=isNaN(parseInt(e,10))?void 0:e,o=isNaN(parseInt(r,10))?void 0:r,u=y(t)&&t.length>0?t:function(){try{return document.location.href}catch(n){return""}}();return 0===n.exception.values[0].stacktrace.frames.length&&n.exception.values[0].stacktrace.frames.push({colno:i,filename:u,function:"?",in_app:!0,lineno:o}),n},t.id="GlobalHandlers",t}(),Dt=function(){function n(){this.Rn=0,this.name=n.id}return n.prototype.Nn=function(n){return function(){for(var t=[],r=0;r"}0!==t.length&&Hn().addBreadcrumb({category:"ui."+n.name,message:t},{event:n.event,name:n.name})},t.prototype.qn=function(n){if(n.endTimestamp){if(n.xhr.__sentry_own_request__)return;Hn().addBreadcrumb({category:"xhr",data:n.xhr.__sentry_xhr__,type:"http"},{xhr:n.xhr})}else n.xhr.__sentry_own_request__&&Nt(n.args[0])},t.prototype.Ln=function(t){if(t.endTimestamp){var r=Hn().getClient(),i=r&&r.getDsn();if(i){var o=new $n(i).getStoreEndpoint();if(o&&-1!==t.fetchData.url.indexOf(o)&&"POST"===t.fetchData.method&&t.args[1]&&t.args[1].body)return void Nt(t.args[1].body)}t.error?Hn().addBreadcrumb({category:"fetch",data:e({},t.fetchData,{status_code:t.response.status}),level:n.Severity.Error,type:"http"},{data:t.error,input:t.args}):Hn().addBreadcrumb({category:"fetch",data:e({},t.fetchData,{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})}},t.prototype.Hn=function(n){var t=D(),r=n.from,e=n.to,i=N(t.location.href),o=N(r),u=N(e);o.path||(o=i),i.protocol===u.protocol&&i.host===u.host&&(e=u.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),Hn().addBreadcrumb({category:"navigation",data:{from:r,to:e}})},t.prototype.setupOnce=function(){var n=this;this.rn.console&&bn({callback:function(){for(var t=[],r=0;r=this.k)return r;var e=vt(at(n[t]));return this.Wn(n[t],t,u([e],r))},n.id="LinkedErrors",n}(),At=D(),Ut=function(){function n(){this.name=n.id}return n.prototype.setupOnce=function(){Mn(function(t){if(Hn().getIntegration(n)){if(!At.navigator||!At.location)return t;var r=t.request||{};return r.url=r.url||At.location.href,r.headers=r.headers||{},r.headers["User-Agent"]=At.navigator.userAgent,e({},t,{request:r})}return t})},n.id="UserAgent",n}(),qt=Object.freeze({GlobalHandlers:Tt,TryCatch:Dt,Breadcrumbs:Rt,LinkedErrors:Mt,UserAgent:Ut}),Lt=[new nt,new Yn,new Dt,new Rt,new Tt,new Mt,new Ut];var Ht={},Pt=D();Pt.Sentry&&Pt.Sentry.Integrations&&(Ht=Pt.Sentry.Integrations);var Ft=e({},Ht,tt,qt);return n.BrowserClient=kt,n.Hub=Un,n.Integrations=Ft,n.SDK_NAME=jt,n.SDK_VERSION="5.14.1",n.Scope=In,n.Transports=Et,n.addBreadcrumb=function(n){Xn("addBreadcrumb",n)},n.addGlobalEventProcessor=Mn,n.captureEvent=function(n){return Xn("captureEvent",n)},n.captureException=captureException,n.captureMessage=function(n,t){var r;try{throw new Error(n)}catch(n){r=n}return Xn("captureMessage",n,t,{originalException:n,syntheticException:r})},n.close=function(n){var t=Hn().getClient();return t?t.close(n):an.reject(!1)},n.configureScope=function(n){Xn("configureScope",n)},n.defaultIntegrations=Lt,n.flush=function(n){var t=Hn().getClient();return t?t.flush(n):an.reject(!1)},n.forceLoad=function(){},n.getCurrentHub=Hn,n.getHubFromCarrier=Fn,n.init=function(n){if(void 0===n&&(n={}),void 0===n.defaultIntegrations&&(n.defaultIntegrations=Lt),void 0===n.release){var t=D();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(n.release=t.SENTRY_RELEASE.id)}!function(n,t){!0===t.debug&&Q.enable(),Hn().bindClient(new n(t))}(kt,n)},n.lastEventId=function(){return Hn().lastEventId()},n.onLoad=function(n){n()},n.setContext=function(n,t){Xn("setContext",n,t)},n.setExtra=function(n,t){Xn("setExtra",n,t)},n.setExtras=function(n){Xn("setExtras",n)},n.setTag=function(n,t){Xn("setTag",n,t)},n.setTags=function(n){Xn("setTags",n)},n.setUser=function(n){Xn("setUser",n)},n.showReportDialog=function(n){void 0===n&&(n={}),n.eventId||(n.eventId=Hn().lastEventId());var t=Hn().getClient();t&&t.showReportDialog(n)},n.withScope=Bn,n.wrap=function(n){return Ot(n)()},n}({}); -//# sourceMappingURL=bundle.min.js.map diff --git a/node_modules/@sentry/browser/build/bundle.min.js.map b/node_modules/@sentry/browser/build/bundle.min.js.map deleted file mode 100644 index e29c91b..0000000 --- a/node_modules/@sentry/browser/build/bundle.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bundle.min.js","sources":["../../types/src/loglevel.ts","../../types/src/severity.ts","../../types/src/span.ts","../../types/src/status.ts","../../utils/src/polyfill.ts","../../utils/src/error.ts","../../utils/src/is.ts","../../utils/src/string.ts","../../utils/src/misc.ts","../../utils/src/logger.ts","../../utils/src/syncpromise.ts","../../utils/src/memo.ts","../../utils/src/object.ts","../../utils/src/promisebuffer.ts","../../utils/src/supports.ts","../../utils/src/instrument.ts","../../utils/src/dsn.ts","../../hub/src/scope.ts","../../hub/src/hub.ts","../../minimal/src/index.ts","../../core/src/api.ts","../../core/src/integration.ts","../../core/src/baseclient.ts","../../core/src/integrations/functiontostring.ts","../../core/src/transports/noop.ts","../../core/src/basebackend.ts","../../core/src/integrations/inboundfilters.ts","../src/tracekit.ts","../src/parsers.ts","../src/eventbuilder.ts","../src/transports/base.ts","../src/transports/fetch.ts","../src/transports/xhr.ts","../src/backend.ts","../src/version.ts","../src/client.ts","../src/helpers.ts","../src/integrations/globalhandlers.ts","../src/integrations/trycatch.ts","../src/integrations/breadcrumbs.ts","../src/integrations/linkederrors.ts","../src/integrations/useragent.ts","../src/sdk.ts","../src/index.ts","../../core/src/sdk.ts"],"sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n /** No logs will be generated. */\n None = 0,\n /** Only SDK internal errors will be logged. */\n Error = 1,\n /** Information useful for debugging the SDK will be logged. */\n Debug = 2,\n /** All SDK actions will be logged. */\n Verbose = 3,\n}\n","/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n","/** Span holding trace_id, span_id */\nexport interface Span {\n /** Sets the finish timestamp on the current span and sends it if it was a transaction */\n finish(useLastSpanTimestamp?: boolean): string | undefined;\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): object;\n /** Convert the object to JSON */\n toJSON(): object;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * @param status http code used to set the status\n */\n setStatus(status: SpanStatus): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n}\n\n/** Interface holder all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n /**\n * Operation of the Span.\n */\n op?: string;\n /**\n * Completion status of the Span.\n */\n status?: SpanStatus;\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n /**\n * Has the sampling decision been made?\n */\n sampled?: boolean;\n /**\n * Span ID\n */\n spanId?: string;\n /**\n * Trace ID\n */\n traceId?: string;\n /**\n * Transaction of the Span.\n */\n transaction?: string;\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n}\n\n/** The status of an Span. */\nexport enum SpanStatus {\n /** The operation completed successfully. */\n Ok = 'ok',\n /** Deadline expired before operation could complete. */\n DeadlineExceeded = 'deadline_exceeded',\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n Unauthenticated = 'unauthenticated',\n /** 403 Forbidden */\n PermissionDenied = 'permission_denied',\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n NotFound = 'not_found',\n /** 429 Too Many Requests */\n ResourceExhausted = 'resource_exhausted',\n /** Client specified an invalid argument. 4xx. */\n InvalidArgument = 'invalid_argument',\n /** 501 Not Implemented */\n Unimplemented = 'unimplemented',\n /** 503 Service Unavailable */\n Unavailable = 'unavailable',\n /** Other/generic 5xx. */\n InternalError = 'internal_error',\n /** Unknown. Any non-standard HTTP status code. */\n UnknownError = 'unknown_error',\n /** The operation was cancelled (typically by the user). */\n Cancelled = 'cancelled',\n /** Already exists (409) */\n AlreadyExists = 'already_exists',\n /** Operation was rejected because the system is not in a state required for the operation's */\n FailedPrecondition = 'failed_precondition',\n /** The operation was aborted, typically due to a concurrency issue. */\n Aborted = 'aborted',\n /** Operation was attempted past the valid range. */\n OutOfRange = 'out_of_range',\n /** Unrecoverable data loss or corruption */\n DataLoss = 'data_loss',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace SpanStatus {\n /**\n * Converts a HTTP status code into a {@link SpanStatus}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or {@link SpanStatus.UnknownError}.\n */\n // tslint:disable-next-line:completed-docs\n export function fromHttpCode(httpStatus: number): SpanStatus {\n if (httpStatus < 400) {\n return SpanStatus.Ok;\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return SpanStatus.Unauthenticated;\n case 403:\n return SpanStatus.PermissionDenied;\n case 404:\n return SpanStatus.NotFound;\n case 409:\n return SpanStatus.AlreadyExists;\n case 413:\n return SpanStatus.FailedPrecondition;\n case 429:\n return SpanStatus.ResourceExhausted;\n default:\n return SpanStatus.InvalidArgument;\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return SpanStatus.Unimplemented;\n case 503:\n return SpanStatus.Unavailable;\n case 504:\n return SpanStatus.DeadlineExceeded;\n default:\n return SpanStatus.InternalError;\n }\n }\n\n return SpanStatus.UnknownError;\n }\n}\n","/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n","export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n // tslint:disable:no-unsafe-any\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n","/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: any): boolean {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: any): boolean {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): boolean {\n // tslint:disable:no-unsafe-any\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n // tslint:enable:no-unsafe-any\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: any): boolean {\n // tslint:disable-next-line:no-unsafe-any\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n","import { isRegExp } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n colno = ll; // tslint:disable-line:no-parameter-reassignment\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n","import { Event, Integration, StackFrame, WrappedFunction } from '@sentry/types';\n\nimport { isString } from './is';\nimport { snipLine } from './string';\n\n/** Internal */\ninterface SentryGlobal {\n Sentry?: {\n Integrations?: Integration[];\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n };\n}\n\n/**\n * Requires a module which is protected _against bundler minification.\n *\n * @param request The module path to resolve\n */\nexport function dynamicRequire(mod: any, request: string): any {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // tslint:disable:strict-type-predicates\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n\nconst fallbackGlobalObject = {};\n\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject(): T & SentryGlobal {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject) as T & SentryGlobal;\n}\n// tslint:enable:strict-type-predicates\n\n/**\n * Extended Window interface that allows for Crypto API usage in IE browsers\n */\ninterface MsCryptoWindow extends Window {\n msCrypto?: Crypto;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const global = getGlobalObject() as MsCryptoWindow;\n const crypto = global.crypto || global.msCrypto;\n\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n const arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n // tslint:disable-next-line:no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // tslint:disable-next-line:no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n const pad = (num: number): string => {\n let v = num.toString(16);\n while (v.length < 4) {\n v = `0${v}`;\n }\n return v;\n };\n\n return (\n pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])\n );\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n // tslint:disable-next-line:no-bitwise\n const r = (Math.random() * 16) | 0;\n // tslint:disable-next-line:no-bitwise\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(\n url: string,\n): {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n} {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n const exception = event.exception.values[0];\n\n if (exception.type && exception.value) {\n return `${exception.type}: ${exception.value}`;\n }\n return exception.type || exception.value || event.event_id || '';\n }\n return event.event_id || '';\n}\n\n/** JSDoc */\ninterface ExtensibleConsole extends Console {\n [key: string]: any;\n}\n\n/** JSDoc */\nexport function consoleSandbox(callback: () => any): any {\n const global = getGlobalObject();\n const levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n if (!('console' in global)) {\n return callback();\n }\n\n const originalConsole = global.console as ExtensibleConsole;\n const wrappedLevels: { [key: string]: any } = {};\n\n // Restore all wrapped console methods\n levels.forEach(level => {\n if (level in global.console && (originalConsole[level] as WrappedFunction).__sentry_original__) {\n wrappedLevels[level] = originalConsole[level] as WrappedFunction;\n originalConsole[level] = (originalConsole[level] as WrappedFunction).__sentry_original__;\n }\n });\n\n // Perform callback manipulations\n const result = callback();\n\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level];\n });\n\n return result;\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(\n event: Event,\n mechanism: {\n [key: string]: any;\n } = {},\n): void {\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception!.values![0].mechanism = event.exception!.values![0].mechanism || {};\n Object.keys(mechanism).forEach(key => {\n // @ts-ignore\n event.exception!.values![0].mechanism[key] = mechanism[key];\n });\n } catch (_oO) {\n // no-empty\n }\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown): string {\n const elem = el as {\n getAttribute(key: string): string; // tslint:disable-line:completed-docs\n tagName?: string;\n id?: string;\n className?: string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n const attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\nconst INITIAL_TIME = Date.now();\nlet prevNow = 0;\n\nconst performanceFallback: Pick = {\n now(): number {\n let now = Date.now() - INITIAL_TIME;\n if (now < prevNow) {\n now = prevNow;\n }\n prevNow = now;\n return now;\n },\n timeOrigin: INITIAL_TIME,\n};\n\nexport const crossPlatformPerformance: Pick = (() => {\n if (isNodeEnv()) {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: Performance };\n return perfHooks.performance;\n } catch (_) {\n return performanceFallback;\n }\n }\n\n if (getGlobalObject().performance) {\n // Polyfill for performance.timeOrigin.\n //\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // tslint:disable-next-line:strict-type-predicates\n if (performance.timeOrigin === undefined) {\n // For webworkers it could mean we don't have performance.timing then we fallback\n // tslint:disable-next-line:deprecation\n if (!performance.timing) {\n return performanceFallback;\n }\n // tslint:disable-next-line:deprecation\n if (!performance.timing.navigationStart) {\n return performanceFallback;\n }\n\n // @ts-ignore\n // tslint:disable-next-line:deprecation\n performance.timeOrigin = performance.timing.navigationStart;\n }\n }\n\n return getGlobalObject().performance || performanceFallback;\n})();\n\n/**\n * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock.\n */\nexport function timestampWithMs(): number {\n return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000;\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\nconst defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now: number, header?: string | number | null): number {\n if (!header) {\n return defaultRetryAfter;\n }\n\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return defaultRetryAfter;\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n const lineno = frame.lineno || 0;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n","import { consoleSandbox, getGlobalObject } from './misc';\n\n// TODO: Implement different loggers for different environments\nconst global = getGlobalObject();\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** JSDoc */\nclass Logger {\n /** JSDoc */\n private _enabled: boolean;\n\n /** JSDoc */\n public constructor() {\n this._enabled = false;\n }\n\n /** JSDoc */\n public disable(): void {\n this._enabled = false;\n }\n\n /** JSDoc */\n public enable(): void {\n this._enabled = true;\n }\n\n /** JSDoc */\n public log(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.log(`${PREFIX}[Log]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public warn(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public error(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.error(`${PREFIX}[Error]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nconst logger = (global.__SENTRY__.logger as Logger) || (global.__SENTRY__.logger = new Logger());\n\nexport { logger };\n","import { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n /** Pending */\n PENDING = 'PENDING',\n /** Resolved / OK */\n RESOLVED = 'RESOLVED',\n /** Rejected / Error */\n REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<{\n onfulfilled?: ((value: T) => T | PromiseLike) | null;\n onrejected?: ((reason: any) => any) | null;\n }> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public toString(): string {\n return '[object SyncPromise]';\n }\n\n /** JSDoc */\n public static resolve(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n }\n\n /** JSDoc */\n public static reject(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n }\n\n /** JSDoc */\n public static all(collection: Array>): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n if (!Array.isArray(collection)) {\n reject(new TypeError(`Promise.all requires an array as input.`));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n let counter = collection.length;\n const resolvedCollection: U[] = [];\n\n collection.forEach((item, index) => {\n SyncPromise.resolve(item)\n .then(value => {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._attachHandler({\n onfulfilled: result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: reason => {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n // tslint:disable-next-line:no-unsafe-any\n resolve(val);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n // TODO: FIXME\n /** JSDoc */\n private readonly _attachHandler = (handler: {\n /** JSDoc */\n onfulfilled?(value: T): any;\n /** JSDoc */\n onrejected?(reason: any): any;\n }) => {\n this._handlers = this._handlers.concat(handler);\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n if (this._state === States.REJECTED) {\n this._handlers.forEach(handler => {\n if (handler.onrejected) {\n handler.onrejected(this._value);\n }\n });\n } else {\n this._handlers.forEach(handler => {\n if (handler.onfulfilled) {\n // tslint:disable-next-line:no-unsafe-any\n handler.onfulfilled(this._value);\n }\n });\n }\n\n this._handlers = [];\n };\n}\n\nexport { SyncPromise };\n","// tslint:disable:no-unsafe-any\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n /** Determines if WeakSet is available */\n private readonly _hasWeakSet: boolean;\n /** Either WeakSet or Array */\n private readonly _inner: any;\n\n public constructor() {\n // tslint:disable-next-line\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n public memoize(obj: any): boolean {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < this._inner.length; i++) {\n const value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n }\n\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n public unmemoize(obj: any): void {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (let i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n }\n}\n","import { ExtendedError, WrappedFunction } from '@sentry/types';\n\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName, htmlTreeAsString } from './misc';\nimport { truncate } from './string';\n\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacement: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacement(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n // tslint:disable-next-line:strict-type-predicates\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`,\n )\n .join('&');\n}\n\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\nfunction getWalkSource(\n value: any,\n): {\n [key: string]: any;\n} {\n if (isError(value)) {\n const error = value as ExtendedError;\n const err: {\n stack: string | undefined;\n message: string;\n name: string;\n [key: string]: any;\n } = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n\n for (const i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n\n return err;\n }\n\n if (isEvent(value)) {\n /**\n * Event-like interface that's usable in browser and node\n */\n interface SimpleEvent {\n [key: string]: unknown;\n type: string;\n target?: unknown;\n currentTarget?: unknown;\n }\n\n const event = value as SimpleEvent;\n\n const source: {\n [key: string]: any;\n } = {};\n\n source.type = event.type;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n source.target = isElement(event.target)\n ? htmlTreeAsString(event.target)\n : Object.prototype.toString.call(event.target);\n } catch (_oO) {\n source.target = '';\n }\n\n try {\n source.currentTarget = isElement(event.currentTarget)\n ? htmlTreeAsString(event.currentTarget)\n : Object.prototype.toString.call(event.currentTarget);\n } catch (_oO) {\n source.currentTarget = '';\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event.detail;\n }\n\n for (const i in event) {\n if (Object.prototype.hasOwnProperty.call(event, i)) {\n source[i] = event;\n }\n }\n\n return source;\n }\n\n return value as {\n [key: string]: any;\n };\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // tslint:disable-next-line:no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n\n/** JSDoc */\nexport function normalizeToSize(\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const serialized = normalize(object, depth);\n\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return serialized as T;\n}\n\n/** Transforms any input value into a string form, either primitive value or a type of the input */\nfunction serializeValue(value: any): any {\n const type = Object.prototype.toString.call(value);\n\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n\n const normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction normalizeValue(value: T, key?: any): T | string {\n if (key === 'domain' && value && typeof value === 'object' && ((value as unknown) as { _events: any })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n if (typeof (global as any) !== 'undefined' && (value as unknown) === global) {\n return '[Global]';\n }\n\n if (typeof (window as any) !== 'undefined' && (value as unknown) === window) {\n return '[Window]';\n }\n\n if (typeof (document as any) !== 'undefined' && (value as unknown) === document) {\n return '[Document]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n // tslint:disable-next-line:no-tautology-expression\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n return value;\n}\n\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key: string, value: any, depth: number = +Infinity, memo: Memo = new Memo()): any {\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n\n // If value implements `toJSON` method, call it and return early\n // tslint:disable:no-unsafe-any\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // tslint:enable:no-unsafe-any\n\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n const normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n const source = getWalkSource(value);\n\n // Create an accumulator that will act as a parent for all future itterations of that branch\n const acc = Array.isArray(value) ? [] : {};\n\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n\n // Walk all keys of the source\n for (const innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n (acc as { [key: string]: any })[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n\n // Return accumulated values\n return acc;\n}\n\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\nexport function normalize(input: any, depth?: number): any {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return JSON.parse(JSON.stringify(input, (key: string, value: any) => walk(key, value, depth)));\n } catch (_oO) {\n return '**non-serializable**';\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: any, maxLength: number = 40): string {\n // tslint:disable:strict-type-predicates\n const keys = Object.keys(getWalkSource(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val: T): T {\n if (isPlainObject(val)) {\n const obj = val as { [key: string]: any };\n const rv: { [key: string]: any } = {};\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n return rv as T;\n }\n\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys) as any;\n }\n\n return val;\n}\n","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer {\n public constructor(protected _limit?: number) {}\n\n /** Internal set of queued Promises */\n private readonly _buffer: Array> = [];\n\n /**\n * Says if the buffer is ready to take more requests\n */\n public isReady(): boolean {\n return this._limit === undefined || this.length() < this._limit;\n }\n\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns The original promise.\n */\n public add(task: PromiseLike): PromiseLike {\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n task\n .then(() => this.remove(task))\n .then(null, () =>\n this.remove(task).then(null, () => {\n // We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n public remove(task: PromiseLike): PromiseLike {\n const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n }\n\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n public length(): number {\n return this._buffer.length;\n }\n\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n public drain(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(this._buffer)\n .then(() => {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, () => {\n resolve(true);\n });\n });\n }\n}\n","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // It really needs 1 argument, not 0.\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore\n // tslint:disable:no-unused-expression\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n // tslint:disable-next-line:no-unused-expression\n new Headers();\n // tslint:disable-next-line:no-unused-expression\n new Request('');\n // tslint:disable-next-line:no-unused-expression\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\nfunction isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // tslint:disable-next-line:no-unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n if (doc) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // tslint:disable-next-line:no-unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n // tslint:disable-next-line: no-unsafe-any\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n // tslint:disable:no-unused-expression\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n const chrome = (global as any).chrome;\n // tslint:disable-next-line:no-unsafe-any\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","/* tslint:disable:only-arrow-functions no-unsafe-any */\n\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getFunctionName, getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n type: InstrumentHandlerType;\n callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n // tslint:disable-next-line:strict-type-predicates\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n return function(...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function(originalFetch: () => void): () => void {\n return function(...args: any[]): void {\n const commonHandlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...commonHandlerData,\n });\n\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n error,\n });\n throw error;\n },\n );\n };\n });\n}\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const url = args[1];\n this.__sentry_xhr__ = {\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const commonHandlerData = {\n args,\n startTimestamp: Date.now(),\n xhr,\n };\n\n triggerHandlers('xhr', {\n ...commonHandlerData,\n });\n\n xhr.addEventListener('readystatechange', function(): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function(this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n\n // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n ['EventTarget', 'Node'].forEach((target: string) => {\n const proto = (global as any)[target] && (global as any)[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerOrEventListenerObject, capture?: boolean, secure?: boolean) => void {\n if (fn && (fn as EventListenerObject).handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n } else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = fn as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n });\n}\n\nconst debounceDuration: number = 1000;\nlet debounceTimer: number = 0;\nlet keypressTimeout: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name: string, handler: Function, debounce: boolean = false): (event: Event) => void {\n return (event: Event) => {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined;\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n lastCapturedEvent = event;\n\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n if (debounce) {\n debounceTimer = setTimeout(() => {\n handler({ event, name });\n });\n } else {\n handler({ event, name });\n }\n };\n}\n\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler: Function): (event: Event) => void {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return (event: Event) => {\n let target;\n\n try {\n target = event.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n\n const tagName = target && (target as HTMLElement).tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !(target as HTMLElement).isContentEditable)) {\n return;\n }\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n clearTimeout(keypressTimeout);\n\n keypressTimeout = (setTimeout(() => {\n keypressTimeout = undefined;\n }, debounceDuration) as any) as number;\n };\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function(e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w\\.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n /** Protocol used to connect to Sentry. */\n public protocol!: DsnProtocol;\n /** Public authorization key. */\n public user!: string;\n /** private _authorization key (deprecated, optional). */\n public pass!: string;\n /** Hostname of the Sentry instance. */\n public host!: string;\n /** Port of the Sentry instance. */\n public port!: string;\n /** Path */\n public path!: string;\n /** Project ID */\n public projectId!: string;\n\n /** Creates a new Dsn component */\n public constructor(from: DsnLike) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n public toString(withPassword: boolean = false): string {\n // tslint:disable-next-line:no-this-assignment\n const { host, path, pass, port, projectId, protocol, user } = this;\n return (\n `${protocol}://${user}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }\n\n /** Parses a string into this Dsn. */\n private _fromString(str: string): void {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, user });\n }\n\n /** Maps Dsn components into this instance. */\n private _fromComponents(components: DsnComponents): void {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n }\n\n /** Validates this Dsn and throws on error. */\n private _validate(): void {\n ['protocol', 'user', 'host', 'projectId'].forEach(component => {\n if (!this[component as keyof DsnComponents]) {\n throw new SentryError(ERROR_MESSAGE);\n }\n });\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE);\n }\n }\n}\n","import {\n Breadcrumb,\n Event,\n EventHint,\n EventProcessor,\n Scope as ScopeInterface,\n Severity,\n Span,\n User,\n} from '@sentry/types';\nimport { getGlobalObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifiying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: string } = {};\n\n /** Extra */\n protected _extra: { [key: string]: any } = {};\n\n /** Contexts */\n protected _context: { [key: string]: any } = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction */\n protected _transaction?: string;\n\n /** Span */\n protected _span?: Span;\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n setTimeout(() => {\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n });\n }\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n // tslint:disable-next-line:strict-type-predicates\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransaction(transaction?: string): this {\n this._transaction = transaction;\n if (this._span) {\n (this._span as any).transaction = transaction;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: { [key: string]: any } | null): this {\n this._context = { ...this._context, [key]: context };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Internal getter for Span, used in Hub.\n * @hidden\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._context = { ...scope._context };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._transaction = scope._transaction;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n }\n return newScope;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._context = {};\n this._level = undefined;\n this._transaction = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const mergedBreadcrumb = {\n timestamp: timestampWithMs(),\n ...breadcrumb,\n };\n\n this._breadcrumbs =\n maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n ? [...this._breadcrumbs, mergedBreadcrumb].slice(-maxBreadcrumbs)\n : [...this._breadcrumbs, mergedBreadcrumb];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._context && Object.keys(this._context).length) {\n event.contexts = { ...this._context, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transaction) {\n event.transaction = this._transaction;\n }\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n}\n\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n","import {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n Event,\n EventHint,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Severity,\n Span,\n SpanContext,\n User,\n} from '@sentry/types';\nimport {\n consoleSandbox,\n dynamicRequire,\n getGlobalObject,\n isNodeEnv,\n logger,\n timestampWithMs,\n uuid4,\n} from '@sentry/utils';\n\nimport { Carrier, Layer } from './interfaces';\nimport { Scope } from './scope';\n\ndeclare module 'domain' {\n export let active: Domain;\n /**\n * Extension for domain interface\n */\n export interface Domain {\n __SENTRY__?: Carrier;\n }\n}\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be incresed when the global interface\n * changes a and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 3;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this._stack.push({ client, scope });\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n private _invokeClient(method: M, ...args: any[]): void {\n const top = this.getStackTop();\n if (top && top.client && top.client[method]) {\n (top.client as any)[method](...args, top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const stack = this.getStack();\n const parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined;\n const scope = Scope.clone(parentScope);\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n return this.getStack().pop() !== undefined;\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const top = this.getStackTop();\n\n if (!top.scope || !top.client) {\n return;\n }\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (top.client.getOptions && top.client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) {\n return;\n }\n\n const timestamp = timestampWithMs();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) {\n return;\n }\n\n top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const top = this.getStackTop();\n if (top.scope && top.client) {\n callback(top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) {\n return null;\n }\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild: boolean = false): Span {\n return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/** Returns the global shim registry. */\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Try to read the hub from an active domain, fallback to the registry if one doesnt exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n const domain = dynamicRequire(module, 'domain');\n const activeDomain = domain.active;\n\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return carrier.__SENTRY__.hub;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) {\n return false;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n","import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport { Breadcrumb, Event, Severity, User } from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\nfunction callOnHub(method: string, ...args: any[]): T {\n const hub = getCurrentHub();\n if (hub && hub[method as keyof Hub]) {\n // tslint:disable-next-line:no-unsafe-any\n return (hub[method as keyof Hub] as any)(...args);\n }\n throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\nexport function captureException(exception: any): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException,\n });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, level?: Severity): string {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureMessage', message, level, {\n originalException: message,\n syntheticException,\n });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n callOnHub('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n callOnHub('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: { [key: string]: any }): void {\n callOnHub('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: string }): void {\n callOnHub('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n\nexport function setExtra(key: string, extra: any): void {\n callOnHub('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\nexport function setTag(key: string, value: string): void {\n callOnHub('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n callOnHub('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n callOnHub('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\nexport function _callOnClient(method: string, ...args: any[]): void {\n callOnHub('_invokeClient', method, ...args);\n}\n","import { DsnLike } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Helper class to provide urls to different Sentry endpoints. */\nexport class API {\n /** The internally used Dsn object. */\n private readonly _dsnObject: Dsn;\n /** Create a new instance of API */\n public constructor(public dsn: DsnLike) {\n this._dsnObject = new Dsn(dsn);\n }\n\n /** Returns the Dsn object. */\n public getDsn(): Dsn {\n return this._dsnObject;\n }\n\n /** Returns a string with auth headers in the url to the store endpoint. */\n public getStoreEndpoint(): string {\n return `${this._getBaseUrl()}${this.getStoreEndpointPath()}`;\n }\n\n /** Returns the store endpoint with auth added in url encoded. */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n const dsn = this._dsnObject;\n const auth = {\n sentry_key: dsn.user, // sentry_key is currently used in tracing integration to identify internal sentry requests\n sentry_version: SENTRY_API_VERSION,\n };\n // Auth is intentionally sent as part of query string (NOT as custom HTTP header)\n // to avoid preflight CORS requests\n return `${this.getStoreEndpoint()}?${urlEncode(auth)}`;\n }\n\n /** Returns the base path of the url including the port. */\n private _getBaseUrl(): string {\n const dsn = this._dsnObject;\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}`;\n }\n\n /** Returns only the path component for the store endpoint. */\n public getStoreEndpointPath(): string {\n const dsn = this._dsnObject;\n return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n }\n\n /** Returns an object that can be used in request headers. */\n public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n const dsn = this._dsnObject;\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.user}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n }\n\n /** Returns the url to the report dialog endpoint. */\n public getReportDialogEndpoint(\n dialogOptions: {\n [key: string]: any;\n user?: { name?: string; email?: string };\n } = {},\n ): string {\n const dsn = this._dsnObject;\n const endpoint = `${this._getBaseUrl()}${dsn.path ? `/${dsn.path}` : ''}/api/embed/error-page/`;\n\n const encodedOptions = [];\n encodedOptions.push(`dsn=${dsn.toString()}`);\n for (const key in dialogOptions) {\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n }\n } else {\n encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n }\n }\n if (encodedOptions.length) {\n return `${endpoint}?${encodedOptions.join('&')}`;\n }\n\n return endpoint;\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport interface IntegrationIndex {\n [key: string]: Integration;\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n let integrations: Integration[] = [];\n if (Array.isArray(userIntegrations)) {\n const userIntegrationsNames = userIntegrations.map(i => i.name);\n const pickedIntegrationsNames: string[] = [];\n\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(defaultIntegration => {\n if (\n userIntegrationsNames.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames.indexOf(defaultIntegration.name) === -1\n ) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames.push(defaultIntegration.name);\n }\n });\n\n // Don't add same user integration twice\n userIntegrations.forEach(userIntegration => {\n if (pickedIntegrationsNames.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames.push(userIntegration.name);\n }\n });\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n } else {\n integrations = [...defaultIntegrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}\n","import { Scope } from '@sentry/hub';\nimport { Client, Event, EventHint, Integration, IntegrationClass, Options, SdkInfo, Severity } from '@sentry/types';\nimport { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, truncate, uuid4 } from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the enviornment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: Dsn;\n\n /** Array of used integrations. */\n protected readonly _integrations: IntegrationIndex = {};\n\n /** Is the client still processing a call? */\n protected _processing: boolean = false;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n this._processing = true;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(`${message}`, level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n promisedEvent\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._processEvent(event, hint, scope)\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): Dsn | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientProcessing(timeout).then(status => {\n clearInterval(status.interval);\n return this._getBackend()\n .getTransport()\n .close(timeout)\n .then(transportFlushed => status.ready && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * @inheritDoc\n */\n public getIntegrations(): IntegrationIndex {\n return this._integrations || {};\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Waits for the client to be done with processing. */\n protected _isClientProcessing(timeout?: number): PromiseLike<{ ready: boolean; interval: number }> {\n return new SyncPromise<{ ready: boolean; interval: number }>(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n let interval = 0;\n clearInterval(interval);\n\n interval = (setInterval(() => {\n if (!this._processing) {\n resolve({\n interval,\n ready: true,\n });\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n resolve({\n interval,\n ready: false,\n });\n }\n }\n }, tick) as unknown) as number;\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { environment, release, dist, maxValueLength = 250, normalizeDepth = 3 } = this.getOptions();\n\n const prepared: Event = { ...event };\n if (prepared.environment === undefined && environment !== undefined) {\n prepared.environment = environment;\n }\n if (prepared.release === undefined && release !== undefined) {\n prepared.release = release;\n }\n\n if (prepared.dist === undefined && dist !== undefined) {\n prepared.dist = dist;\n }\n\n if (prepared.message) {\n prepared.message = truncate(prepared.message, maxValueLength);\n }\n\n const exception = prepared.exception && prepared.exception.values && prepared.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = prepared.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n\n if (prepared.event_id === undefined) {\n prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4();\n }\n\n this._addIntegrations(prepared.sdk);\n\n // We prepare the result here with a resolved Event.\n let result = SyncPromise.resolve(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (scope) {\n // In case we have a hub we reassign it.\n result = scope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n // tslint:disable:no-unsafe-any\n return {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n protected _addIntegrations(sdkInfo?: SdkInfo): void {\n const integrationsArray = Object.keys(this._integrations);\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n const { beforeSend, sampleRate } = this.getOptions();\n\n if (!this._isEnabled()) {\n return SyncPromise.reject('SDK not enabled, will not send event.');\n }\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n if (typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject('This event has been sampled, will not send event.');\n }\n\n return new SyncPromise((resolve, reject) => {\n this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n reject('An event processor returned null, will not send event.');\n return;\n }\n\n let finalEvent: Event | null = prepared;\n\n const isInternalException = hint && hint.data && (hint.data as { [key: string]: any }).__sentry__ === true;\n if (isInternalException || !beforeSend) {\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n return;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n // tslint:disable-next-line:strict-type-predicates\n if (typeof beforeSendResult === 'undefined') {\n logger.error('`beforeSend` method has to return `null` or a valid event.');\n } else if (isThenable(beforeSendResult)) {\n this._handleAsyncBeforeSend(beforeSendResult as PromiseLike, resolve, reject);\n } else {\n finalEvent = beforeSendResult as Event | null;\n\n if (finalEvent === null) {\n logger.log('`beforeSend` returned `null`, will not send event.');\n resolve(null);\n return;\n }\n\n // From here on we are really async\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n }\n })\n .then(null, reason => {\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n reject(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n });\n }\n\n /**\n * Resolves before send Promise and calls resolve/reject on parent SyncPromise.\n */\n private _handleAsyncBeforeSend(\n beforeSend: PromiseLike,\n resolve: (event: Event) => void,\n reject: (reason: string) => void,\n ): void {\n beforeSend\n .then(processedEvent => {\n if (processedEvent === null) {\n reject('`beforeSend` returned `null`, will not send event.');\n return;\n }\n // From here on we are really async\n this._getBackend().sendEvent(processedEvent);\n resolve(processedEvent);\n })\n .then(null, e => {\n reject(`beforeSend rejected with ${e}`);\n });\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n originalFunctionToString = Function.prototype.toString;\n\n Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n const context = this.__sentry_original__ || this;\n // tslint:disable-next-line:no-unsafe-any\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n","import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return SyncPromise.resolve({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: Status.Skipped,\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return SyncPromise.resolve(true);\n }\n}\n","import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instanciate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates a {@link Event} from an exception. */\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates a {@link Event} from a plain message. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instanciate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n this._transport.sendEvent(event).then(null, reason => {\n logger.error(`Error while sending event: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n blacklistUrls?: Array;\n ignoreErrors?: Array;\n ignoreInternal?: boolean;\n whitelistUrls?: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n public constructor(private readonly _options: InboundFiltersOptions = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n const options = self._mergeOptions(clientOptions);\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: InboundFiltersOptions): boolean {\n if (this._isSentryError(event, options)) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (this._isBlacklistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`blacklistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!this._isWhitelistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to not being matched by \\`whitelistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return (\n (event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false\n );\n } catch (_oO) {\n return false;\n }\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isBlacklistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.blacklistUrls || !options.blacklistUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.blacklistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isWhitelistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.whitelistUrls || !options.whitelistUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.whitelistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: InboundFiltersOptions = {}): InboundFiltersOptions {\n return {\n blacklistUrls: [...(this._options.blacklistUrls || []), ...(clientOptions.blacklistUrls || [])],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n whitelistUrls: [...(this._options.whitelistUrls || []), ...(clientOptions.whitelistUrls || [])],\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n const frames = event.stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n if (event.exception) {\n const frames =\n event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n return null;\n } catch (oO) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n }\n}\n","// tslint:disable:object-literal-sort-keys\n\n/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n args: string[];\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js))(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n/** JSDoc */\nexport function computeStackTrace(ex: any): StackTrace {\n // tslint:disable:no-unsafe-any\n\n let stack = null;\n const popSize: number = ex && ex.framesToPop;\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n // tslint:disable:no-conditional-assignment\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (let i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = (ex.columnNumber as number) + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n // tslint:disable:no-conditional-assignment\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .slice(0, STACKTRACE_LIMIT)\n .reverse();\n}\n","import { Event } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/** JSDoc */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n rejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n const domException = exception as DOMException;\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const objectException = exception as {};\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n// this._options.attachStacktrace\n/** JSDoc */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n","import { API } from '@sentry/core';\nimport { Event, Response, Transport, TransportOptions } from '@sentry/types';\nimport { PromiseBuffer, SentryError } from '@sentry/utils';\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @inheritDoc\n */\n public url: string;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n public constructor(public options: TransportOptions) {\n this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth();\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n}\n","import { Event, Response, Status } from '@sentry/types';\nimport { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\nconst global = getGlobalObject();\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n const defaultOptions: RequestInit = {\n body: JSON.stringify(event),\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n\n if (this.options.headers !== undefined) {\n defaultOptions.headers = this.options.headers;\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n global\n .fetch(this.url, defaultOptions)\n .then(response => {\n const status = Status.fromHttpCode(response.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(response);\n })\n .catch(reject);\n }),\n );\n }\n}\n","import { Event, Response, Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = () => {\n if (request.readyState !== 4) {\n return;\n }\n\n const status = Status.fromHttpCode(request.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(request);\n };\n\n request.open('POST', this.url);\n for (const header in this.options.headers) {\n if (this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(JSON.stringify(event));\n }),\n );\n }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils';\n\nimport { eventFromString, eventFromUnknownInput } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To whitelist certain errors instead, use {@link Options.whitelistUrls}.\n * By default, all errors will be sent.\n */\n blacklistUrls?: Array;\n\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.blacklistUrls}.\n * By default, all errors will be sent.\n */\n whitelistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n}\n","export const SDK_NAME = 'sentry.javascript.browser';\nexport const SDK_VERSION = '5.14.1';\n","import { API, BaseClient, Scope } from '@sentry/core';\nimport { DsnLike, Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n super(BrowserBackend, options);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n event.sdk = {\n ...event.sdk,\n name: SDK_NAME,\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client is disabled');\n return;\n }\n\n const dsn = options.dsn || this.getDsn();\n\n if (!options.eventId) {\n logger.error('Missing `eventId` option in showReportDialog call');\n return;\n }\n\n if (!dsn) {\n logger.error('Missing `Dsn` option in showReportDialog call');\n return;\n }\n\n const script = document.createElement('script');\n script.async = true;\n script.src = new API(dsn).getReportDialogEndpoint(options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n (document.head || document.body).appendChild(script);\n }\n}\n","import { captureException, withScope } from '@sentry/core';\nimport { Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils';\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n): any {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n const sentryWrapped: WrappedFunction = function(this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n // tslint:disable:no-unsafe-any\n try {\n // tslint:disable-next-line:strict-type-predicates\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n // tslint:enable:no-unsafe-any\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n const processedEvent = { ...event };\n\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n\n processedEvent.extra = {\n ...processedEvent.extra,\n arguments: args,\n };\n\n return processedEvent;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // tslint:disable-line:no-empty\n\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n } catch (_oO) {\n /*no-empty*/\n }\n\n return sentryWrapped;\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n onerror: boolean;\n onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /** JSDoc */\n private _onErrorHandlerInstalled: boolean = false;\n\n /** JSDoc */\n private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n }\n\n /** JSDoc */\n private _installGlobalOnErrorHandler(): void {\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const error = data.error;\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : this._enhanceEventWithInitialFrame(\n eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }),\n data.url,\n data.line,\n data.column,\n );\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n\n this._onErrorHandlerInstalled = true;\n }\n\n /** JSDoc */\n private _installGlobalOnUnhandledRejectionHandler(): void {\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (e: any) => {\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteRejection(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n\n event.level = Severity.Error;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n\n return;\n },\n type: 'unhandledrejection',\n });\n\n this._onUnhandledRejectionHandlerInstalled = true;\n }\n\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name;\n\n if (isString(message)) {\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n }\n\n /**\n * This function creates an Event from an TraceKitStackTrace that has part of it missing.\n */\n private _eventFromIncompleteRejection(error: any): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n value: `Non-Error promise rejection captured with value: ${error}`,\n },\n ],\n },\n };\n }\n\n /** JSDoc */\n private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /** JSDoc */\n private _ignoreOnError: number = 0;\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /** JSDoc */\n private _wrapTimeFunction(original: () => void): () => number {\n return function(this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n }\n\n /** JSDoc */\n private _wrapRAF(original: any): (callback: () => void) => any {\n return function(this: any, callback: () => void): () => void {\n return original(\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n }\n\n /** JSDoc */\n private _wrapEventTarget(target: string): void {\n const global = getGlobalObject() as { [key: string]: any };\n const proto = global[target] && global[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n // tslint:disable-next-line:no-unbound-method strict-type-predicates\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n wrap((fn as any) as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = (fn as any) as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n }\n\n /** JSDoc */\n private _wrapXHR(originalSend: () => void): () => void {\n return function(this: XMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function(original: WrappedFunction): Function {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n this._ignoreOnError = this._ignoreOnError;\n\n const global = getGlobalObject();\n\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n\n if ('XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n ].forEach(this._wrapEventTarget.bind(this));\n }\n}\n","import { API, getCurrentHub } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n} from '@sentry/utils';\n\nimport { BrowserClient } from '../client';\n\n/**\n * @hidden\n */\nexport interface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** JSDoc */\ninterface BreadcrumbIntegrations {\n console?: boolean;\n dom?: boolean;\n fetch?: boolean;\n history?: boolean;\n sentry?: boolean;\n xhr?: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /** JSDoc */\n private readonly _options: BreadcrumbIntegrations;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: BreadcrumbIntegrations) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Creates breadcrumbs from console API calls\n */\n private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }\n\n /**\n * Creates breadcrumbs from DOM API calls\n */\n private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node)\n : htmlTreeAsString((handlerData.event as unknown) as Node);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n },\n );\n }\n\n /**\n * Creates breadcrumbs from XHR API calls\n */\n private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: handlerData.xhr.__sentry_xhr__,\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n },\n );\n\n return;\n }\n\n // We only capture issued sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n addSentryBreadcrumb(handlerData.args[0]);\n }\n }\n\n /**\n * Creates breadcrumbs from fetch API calls\n */\n private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n const client = getCurrentHub().getClient();\n const dsn = client && client.getDsn();\n\n if (dsn) {\n const filterUrl = new API(dsn).getStoreEndpoint();\n // if Sentry key appears in URL, don't capture it as a request\n // but rather as our own 'sentry' type breadcrumb\n if (\n filterUrl &&\n handlerData.fetchData.url.indexOf(filterUrl) !== -1 &&\n handlerData.fetchData.method === 'POST' &&\n handlerData.args[1] &&\n handlerData.args[1].body\n ) {\n addSentryBreadcrumb(handlerData.args[1].body);\n return;\n }\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }\n\n /**\n * Creates breadcrumbs from history API calls\n */\n private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._consoleBreadcrumb(...args);\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._domBreadcrumb(...args);\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._xhrBreadcrumb(...args);\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._fetchBreadcrumb(...args);\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._historyBreadcrumb(...args);\n },\n type: 'history',\n });\n }\n }\n}\n\n/**\n * Create a breadcrumb of `sentry` from the events themselves\n */\nfunction addSentryBreadcrumb(serializedData: string): void {\n // There's always something that can go wrong with deserialization...\n try {\n const event = JSON.parse(serializedData);\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level || Severity.fromString('error'),\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n } catch (_oO) {\n logger.error('Error while adding sentry type breadcrumb');\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return self._handler(event, hint);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n }\n\n /**\n * @inheritDoc\n */\n private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, [exception, ...stack]);\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n if (!global.navigator || !global.location) {\n return event;\n }\n\n // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/\n const request = event.request || {};\n request.url = request.url || global.location.href;\n request.headers = request.headers || {};\n request.headers['User-Agent'] = global.navigator.userAgent;\n\n return {\n ...event,\n request,\n };\n }\n return event;\n });\n }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient, ReportDialogOptions } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n initAndBind(BrowserClient, options);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n const client = getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\nexport function wrap(fn: Function): any {\n return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any\n}\n","export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports };\n","import { getCurrentHub } from '@sentry/hub';\nimport { Client, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** A class object that can instanciate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instanciate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass: ClientClass, options: O): void {\n if (options.debug === true) {\n logger.enable();\n }\n getCurrentHub().bindClient(new clientClass(options));\n}\n"],"names":["LogLevel","Severity","SpanStatus","Status","level","Debug","Info","Warning","Error","Fatal","Critical","Log","httpStatus","Ok","Unauthenticated","PermissionDenied","NotFound","AlreadyExists","FailedPrecondition","ResourceExhausted","InvalidArgument","Unimplemented","Unavailable","DeadlineExceeded","InternalError","UnknownError","code","Success","RateLimit","Invalid","Failed","Unknown","setPrototypeOf","Object","__proto__","Array","obj","proto","prop","hasOwnProperty","message","_super","_this","name","_newTarget","prototype","constructor","tslib_1.__extends","isError","wat","toString","call","isInstanceOf","isErrorEvent","isDOMError","isString","isPrimitive","isPlainObject","isEvent","Event","isElement","Element","isThenable","Boolean","then","base","_e","truncate","str","max","length","substr","safeJoin","input","delimiter","isArray","output","i","value","push","String","e","join","isMatchingPattern","pattern","test","indexOf","dynamicRequire","mod","request","require","isNodeEnv","process","fallbackGlobalObject","getGlobalObject","global","window","self","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","replace","c","r","Math","random","parseUrl","url","match","query","fragment","host","path","protocol","relative","getEventDescription","event","exception","values","type","event_id","consoleSandbox","callback","originalConsole","console","wrappedLevels","forEach","__sentry_original__","result","keys","addExceptionTypeValue","addExceptionMechanism","mechanism","key","_oO","htmlTreeAsString","elem","currentElem","out","height","len","sepLength","nextStr","_htmlElementAsString","parentNode","reverse","el","className","classes","attr","tagName","toLowerCase","id","split","attrWhitelist","getAttribute","INITIAL_TIME","Date","now","prevNow","performanceFallback","timeOrigin","crossPlatformPerformance","module","performance","_","undefined","timing","navigationStart","timestampWithMs","defaultRetryAfter","parseRetryAfterHeader","header","headerDelay","parseInt","isNaN","headerDate","parse","defaultFunctionName","getFunctionName","fn","PREFIX","this","_enabled","Logger","_i","args","log","warn","error","__SENTRY__","States","logger","_hasWeakSet","WeakSet","_inner","Memo","has","add","delete","splice","fill","source","replacement","original","wrapped","defineProperties","enumerable","_Oo","getWalkSource","err","stack","event_1","target","currentTarget","CustomEvent","detail","jsonSize","encodeURI","utf8Length","JSON","stringify","normalizeToSize","object","depth","maxSize","serialized","normalize","normalizeValue","_events","document","walk","memo","Infinity","normalized","serializeValue","toJSON","acc","memoize","innerKey","unmemoize","extractExceptionKeysForMessage","maxLength","sort","includedKeys","slice","executor","PENDING","_setResult","RESOLVED","reason","REJECTED","state","_state","_resolve","_reject","_value","_executeHandlers","handler","_handlers","concat","onrejected","onfulfilled","SyncPromise","resolve","reject","collection","counter","resolvedCollection","item","index","TypeError","_attachHandler","val","onfinally","isRejected","_limit","PromiseBuffer","task","isReady","_buffer","remove","SentryError","timeout","capturedSetTimeout","setTimeout","all","clearTimeout","supportsFetch","Headers","Request","Response","isNativeFetch","func","supportsReferrerPolicy","referrerPolicy","lastHref","handlers","instrumented","instrument","originalConsoleLevel","triggerHandlers","Function","apply","instrumentConsole","addEventListener","domEventHandler","bind","keypressEventHandler","eventName","options","handleEvent","innerOriginal","__sentry_wrapped__","instrumentDOM","xhrproto","XMLHttpRequest","originalOpen","__sentry_xhr__","method","toUpperCase","__sentry_own_request__","originalSend","xhr","commonHandlerData","startTimestamp","readyState","status_code","status","endTimestamp","instrumentXHR","fetch","doc","sandbox","createElement","hidden","head","appendChild","contentWindow","removeChild","supportsNativeFetch","originalFetch","fetchData","getFetchMethod","getFetchUrl","response","instrumentFetch","chrome","isChromePackagedApp","app","runtime","hasHistoryApi","history","pushState","replaceState","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","from","to","location","href","instrumentHistory","_oldOnErrorHandler","onerror","msg","line","column","arguments","_oldOnUnhandledRejectionHandler","onunhandledrejection","addInstrumentationHandler","data","_b","tslib_1.__values","fetchArgs","keypressTimeout","lastCapturedEvent","debounceDuration","debounceTimer","debounce","isContentEditable","DSN_REGEX","_fromString","_fromComponents","_validate","Dsn","withPassword","_a","pass","port","projectId","exec","user","_c","pop","components","component","Scope","_scopeListeners","_eventProcessors","_notifyingListeners","processors","hint","processor","final","_notifyEventProcessors","_user","_notifyScopeListeners","tags","_tags","extras","_extra","extra","fingerprint","_fingerprint","_level","transaction","_transaction","_span","context","_context","span","scope","newScope","_breadcrumbs","breadcrumb","maxBreadcrumbs","mergedBreadcrumb","timestamp","tslib_1.__spread","contexts","trace","getTraceContext","_applyFingerprint","breadcrumbs","getGlobalEventProcessors","globalEventProcessors","addGlobalEventProcessor","API_VERSION","client","_version","_stack","Hub","top","getStackTop","version","getStack","parentScope","clone","getClient","pushScope","popScope","eventId","_lastEventId","finalHint","syntheticException","originalException","_invokeClient","beforeBreadcrumb","finalBreadcrumb","addBreadcrumb","min","setUser","setTags","setExtras","setTag","setExtra","setContext","oldHub","makeMain","integration","getIntegration","spanOrSpanContext","forceNoChild","_callExtensionMethod","sentry","getMainCarrier","extensions","carrier","hub","registry","getHubFromCarrier","setHubOnCarrier","getCurrentHub","hasHubOnCarrier","isOlderThan","domain","activeDomain","active","registryHubTopStack","getHubFromActiveDomain","callOnHub","captureException","withScope","dsn","_dsnObject","API","_getBaseUrl","getStoreEndpointPath","auth","sentry_key","sentry_version","getStoreEndpoint","map","encodeURIComponent","clientName","clientVersion","Content-Type","X-Sentry-Auth","dialogOptions","endpoint","encodedOptions","email","installedIntegrations","setupIntegrations","integrations","defaultIntegrations","userIntegrations","userIntegrationsNames_1","pickedIntegrationsNames_1","defaultIntegration","userIntegration","integrationsNames","getIntegrationsToSetup","setupOnce","setupIntegration","originalFunctionToString","backendClass","_backend","_options","_dsn","_isEnabled","_integrations","BaseClient","_processing","_getBackend","eventFromException","_processEvent","finalEvent","eventFromMessage","_isClientProcessing","clearInterval","interval","getTransport","close","transportFlushed","ready","flush","getOptions","enabled","ticked","setInterval","environment","release","dist","maxValueLength","normalizeDepth","prepared","_addIntegrations","sdk","applyToEvent","evt","_normalizeEvent","b","sdkInfo","integrationsArray","beforeSend","sampleRate","_prepareEvent","__sentry__","sendEvent","beforeSendResult","_handleAsyncBeforeSend","processedEvent","NoopTransport","Skipped","_transport","_setupTransport","BaseBackend","_exception","_hint","_message","FunctionToString","DEFAULT_IGNORE_ERRORS","InboundFilters","clientOptions","_mergeOptions","_shouldDropEvent","_isSentryError","_isIgnoredError","_isBlacklistedUrl","_getEventFilterUrl","_isWhitelistedUrl","ignoreInternal","ignoreErrors","_getPossibleEventMessages","some","blacklistUrls","whitelistUrls","oO","stacktrace","frames_1","frames","filename","frames_2","UNKNOWN_FUNCTION","gecko","winjs","geckoEval","chromeEval","computeStackTrace","ex","popSize","framesToPop","parts","opera10Regex","opera11Regex","lines","element","extractMessage","computeStackTraceFromStacktraceProp","popFrames","submatch","isNative","columnNumber","computeStackTraceFromStackProp","failed","STACKTRACE_LIMIT","exceptionFromStacktrace","prepareFramesForEvent","eventFromStacktrace","localStack","firstFrameFunction","lastFrameFunction","frame","colno","function","in_app","lineno","eventFromUnknownInput","domException","name_1","eventFromString","rejection","__serialized__","eventFromPlainObject","synthetic","attachStacktrace","getStoreEndpointWithUrlEncodedAuth","BaseTransport","drain","FetchTransport","_disabledUntil","Promise","defaultOptions","body","headers","fromHttpCode","get","catch","XHRTransport","onreadystatechange","getResponseHeader","open","setRequestHeader","send","BrowserBackend","transportOptions","transport","handled","SDK_NAME","BrowserClient","platform","packages","getDsn","script","async","src","getReportDialogEndpoint","onLoad","onload","ignoreOnError","shouldIgnoreOnError","wrap","before","sentryWrapped","wrappedArguments","arg","addEventProcessor","property","defineProperty","getOwnPropertyDescriptor","configurable","GlobalHandlers","stackTraceLimit","_installGlobalOnErrorHandler","_installGlobalOnUnhandledRejectionHandler","_onErrorHandlerInstalled","currentHub","hasIntegration","isFailedOwnDelivery","_eventFromIncompleteOnError","_enhanceEventWithInitialFrame","captureEvent","_onUnhandledRejectionHandlerInstalled","_eventFromIncompleteRejection","groups","getLocationHref","TryCatch","originalCallback","wrapOptions","_ignoreOnError","_wrapTimeFunction","_wrapRAF","_wrapXHR","_wrapEventTarget","Breadcrumbs","dom","handlerData","category","fromString","addSentryBreadcrumb","filterUrl","parsedLoc","parsedFrom","parsedTo","_consoleBreadcrumb","_domBreadcrumb","_xhrBreadcrumb","_fetchBreadcrumb","_historyBreadcrumb","serializedData","DEFAULT_KEY","DEFAULT_LIMIT","LinkedErrors","_key","limit","_handler","linkedErrors","_walkErrorTree","UserAgent","navigator","userAgent","CoreIntegrations.InboundFilters","CoreIntegrations.FunctionToString","windowIntegrations","_window","Sentry","Integrations","INTEGRATIONS","CoreIntegrations","BrowserIntegrations","window_1","SENTRY_RELEASE","clientClass","debug","enable","bindClient","initAndBind","lastEventId","showReportDialog","internalWrap"],"mappings":";8jCACYA,ECAAC,ECwFAC,ECxFAC,GHAZ,SAAYH,GAEVA,mBAEAA,qBAEAA,qBAEAA,yBARF,CAAYA,IAAAA,QCAAC,EAAAA,aAAAA,8BAIVA,gBAEAA,oBAEAA,YAEAA,cAEAA,gBAEAA,sBAIF,SAAiBA,GAOCA,aAAh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,GACxBiF,GAAgB,YAAajF,sBA0BRvR,EAAa7D,GAClCqa,GAAgB,SAAUxW,EAAK7D,uBApBTkV,GACtBmF,GAAgB,UAAWnF,uBA2BLhB,GACtBmG,GAAgB,UAAWnG,gCuB1CIpF,gBAAAA,MAC1BA,EAAQgJ,UACXhJ,EAAQgJ,QAAU+B,KAAgBoR,eAEpC,IAAMhU,EAAS4C,KAAgBlC,YAC3BV,GACFA,EAAOiU,iBAAiBpc,mCAgEPlI,GACnB,OAAOukB,GAAavkB,EAAbukB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/backend.d.ts b/node_modules/@sentry/browser/dist/backend.d.ts deleted file mode 100644 index 575b049..0000000 --- a/node_modules/@sentry/browser/dist/backend.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { BaseBackend } from '@sentry/core'; -import { Event, EventHint, Options, Severity, Transport } from '@sentry/types'; -/** - * Configuration options for the Sentry Browser SDK. - * @see BrowserClient for more information. - */ -export interface BrowserOptions extends Options { - /** - * A pattern for error URLs which should not be sent to Sentry. - * To whitelist certain errors instead, use {@link Options.whitelistUrls}. - * By default, all errors will be sent. - */ - blacklistUrls?: Array; - /** - * A pattern for error URLs which should exclusively be sent to Sentry. - * This is the opposite of {@link Options.blacklistUrls}. - * By default, all errors will be sent. - */ - whitelistUrls?: Array; -} -/** - * The Sentry Browser SDK Backend. - * @hidden - */ -export declare class BrowserBackend extends BaseBackend { - /** - * @inheritDoc - */ - protected _setupTransport(): Transport; - /** - * @inheritDoc - */ - eventFromException(exception: any, hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike; -} -//# sourceMappingURL=backend.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/backend.d.ts.map b/node_modules/@sentry/browser/dist/backend.d.ts.map deleted file mode 100644 index f978828..0000000 --- a/node_modules/@sentry/browser/dist/backend.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM/E;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,OAAO;IAC7C;;;;OAIG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEvC;;;;OAIG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,WAAW,CAAC,cAAc,CAAC;IAC7D;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,SAAS;IAoBtC;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAe/E;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,QAAwB,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;CAWhH"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/backend.js b/node_modules/@sentry/browser/dist/backend.js deleted file mode 100644 index ce222ef..0000000 --- a/node_modules/@sentry/browser/dist/backend.js +++ /dev/null @@ -1,70 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var eventbuilder_1 = require("./eventbuilder"); -var transports_1 = require("./transports"); -/** - * The Sentry Browser SDK Backend. - * @hidden - */ -var BrowserBackend = /** @class */ (function (_super) { - tslib_1.__extends(BrowserBackend, _super); - function BrowserBackend() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @inheritDoc - */ - BrowserBackend.prototype._setupTransport = function () { - if (!this._options.dsn) { - // We return the noop transport here in case there is no Dsn. - return _super.prototype._setupTransport.call(this); - } - var transportOptions = tslib_1.__assign({}, this._options.transportOptions, { dsn: this._options.dsn }); - if (this._options.transport) { - return new this._options.transport(transportOptions); - } - if (utils_1.supportsFetch()) { - return new transports_1.FetchTransport(transportOptions); - } - return new transports_1.XHRTransport(transportOptions); - }; - /** - * @inheritDoc - */ - BrowserBackend.prototype.eventFromException = function (exception, hint) { - var syntheticException = (hint && hint.syntheticException) || undefined; - var event = eventbuilder_1.eventFromUnknownInput(exception, syntheticException, { - attachStacktrace: this._options.attachStacktrace, - }); - utils_1.addExceptionMechanism(event, { - handled: true, - type: 'generic', - }); - event.level = types_1.Severity.Error; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return utils_1.SyncPromise.resolve(event); - }; - /** - * @inheritDoc - */ - BrowserBackend.prototype.eventFromMessage = function (message, level, hint) { - if (level === void 0) { level = types_1.Severity.Info; } - var syntheticException = (hint && hint.syntheticException) || undefined; - var event = eventbuilder_1.eventFromString(message, syntheticException, { - attachStacktrace: this._options.attachStacktrace, - }); - event.level = level; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return utils_1.SyncPromise.resolve(event); - }; - return BrowserBackend; -}(core_1.BaseBackend)); -exports.BrowserBackend = BrowserBackend; -//# sourceMappingURL=backend.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/backend.js.map b/node_modules/@sentry/browser/dist/backend.js.map deleted file mode 100644 index d4583ae..0000000 --- a/node_modules/@sentry/browser/dist/backend.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":";;AAAA,qCAA2C;AAC3C,uCAA+E;AAC/E,uCAAkF;AAElF,+CAAwE;AACxE,2CAA4D;AAsB5D;;;GAGG;AACH;IAAoC,0CAA2B;IAA/D;;IAwDA,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A+B,EAAE,IAAgB;QAAjD,sBAAA,EAAA,QAAkB,gBAAQ,CAAC,IAAI;QACtE,IAAM,kBAAkB,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAC;QAC1E,IAAM,KAAK,GAAG,8BAAe,CAAC,OAAO,EAAE,kBAAkB,EAAE;YACzD,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB;SACjD,CAAC,CAAC;QACH,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACpB,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;YACzB,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;SAChC;QACD,OAAO,mBAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IACH,qBAAC;AAAD,CAAC,AAxDD,CAAoC,kBAAW,GAwD9C;AAxDY,wCAAc","sourcesContent":["import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils';\n\nimport { eventFromString, eventFromUnknownInput } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To whitelist certain errors instead, use {@link Options.whitelistUrls}.\n * By default, all errors will be sent.\n */\n blacklistUrls?: Array;\n\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.blacklistUrls}.\n * By default, all errors will be sent.\n */\n whitelistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/client.d.ts b/node_modules/@sentry/browser/dist/client.d.ts deleted file mode 100644 index 9589833..0000000 --- a/node_modules/@sentry/browser/dist/client.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { BaseClient, Scope } from '@sentry/core'; -import { DsnLike, Event, EventHint } from '@sentry/types'; -import { BrowserBackend, BrowserOptions } from './backend'; -/** - * All properties the report dialog supports - */ -export interface ReportDialogOptions { - [key: string]: any; - eventId?: string; - dsn?: DsnLike; - user?: { - email?: string; - name?: string; - }; - lang?: string; - title?: string; - subtitle?: string; - subtitle2?: string; - labelName?: string; - labelEmail?: string; - labelComments?: string; - labelClose?: string; - labelSubmit?: string; - errorGeneric?: string; - errorFormEntry?: string; - successMessage?: string; - /** Callback after reportDialog showed up */ - onLoad?(): void; -} -/** - * The Sentry Browser SDK Client. - * - * @see BrowserOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -export declare class BrowserClient extends BaseClient { - /** - * Creates a new Browser SDK instance. - * - * @param options Configuration options for this SDK. - */ - constructor(options?: BrowserOptions); - /** - * @inheritDoc - */ - protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike; - /** - * Show a report dialog to the user to send feedback to a specific event. - * - * @param options Set individual options for the dialog - */ - showReportDialog(options?: ReportDialogOptions): void; -} -//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/client.d.ts.map b/node_modules/@sentry/browser/dist/client.d.ts.map deleted file mode 100644 index 4c0fea4..0000000 --- a/node_modules/@sentry/browser/dist/client.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,MAAM,CAAC,IAAI,IAAI,CAAC;CACjB;AAED;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC;IAC3E;;;;OAIG;gBACgB,OAAO,GAAE,cAAmB;IAI/C;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAkBjG;;;;OAIG;IACI,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI;CAkCjE"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/client.js b/node_modules/@sentry/browser/dist/client.js deleted file mode 100644 index c61d470..0000000 --- a/node_modules/@sentry/browser/dist/client.js +++ /dev/null @@ -1,73 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var backend_1 = require("./backend"); -var version_1 = require("./version"); -/** - * The Sentry Browser SDK Client. - * - * @see BrowserOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -var BrowserClient = /** @class */ (function (_super) { - tslib_1.__extends(BrowserClient, _super); - /** - * Creates a new Browser SDK instance. - * - * @param options Configuration options for this SDK. - */ - function BrowserClient(options) { - if (options === void 0) { options = {}; } - return _super.call(this, backend_1.BrowserBackend, options) || this; - } - /** - * @inheritDoc - */ - BrowserClient.prototype._prepareEvent = function (event, scope, hint) { - event.platform = event.platform || 'javascript'; - event.sdk = tslib_1.__assign({}, event.sdk, { name: version_1.SDK_NAME, packages: tslib_1.__spread(((event.sdk && event.sdk.packages) || []), [ - { - name: 'npm:@sentry/browser', - version: version_1.SDK_VERSION, - }, - ]), version: version_1.SDK_VERSION }); - return _super.prototype._prepareEvent.call(this, event, scope, hint); - }; - /** - * Show a report dialog to the user to send feedback to a specific event. - * - * @param options Set individual options for the dialog - */ - BrowserClient.prototype.showReportDialog = function (options) { - if (options === void 0) { options = {}; } - // doesn't work without a document (React Native) - var document = utils_1.getGlobalObject().document; - if (!document) { - return; - } - if (!this._isEnabled()) { - utils_1.logger.error('Trying to call showReportDialog with Sentry Client is disabled'); - return; - } - var dsn = options.dsn || this.getDsn(); - if (!options.eventId) { - utils_1.logger.error('Missing `eventId` option in showReportDialog call'); - return; - } - if (!dsn) { - utils_1.logger.error('Missing `Dsn` option in showReportDialog call'); - return; - } - var script = document.createElement('script'); - script.async = true; - script.src = new core_1.API(dsn).getReportDialogEndpoint(options); - if (options.onLoad) { - script.onload = options.onLoad; - } - (document.head || document.body).appendChild(script); - }; - return BrowserClient; -}(core_1.BaseClient)); -exports.BrowserClient = BrowserClient; -//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/client.js.map b/node_modules/@sentry/browser/dist/client.js.map deleted file mode 100644 index d4ef31a..0000000 --- a/node_modules/@sentry/browser/dist/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;AAAA,qCAAsD;AAEtD,uCAAwD;AAExD,qCAA2D;AAC3D,qCAAkD;AA6BlD;;;;;GAKG;AACH;IAAmC,yCAA0C;IAC3E;;;;OAIG;IACH,uBAAmB,OAA4B;QAA5B,wBAAA,EAAA,YAA4B;eAC7C,kBAAM,wBAAc,EAAE,OAAO,CAAC;IAChC,CAAC;IAED;;OAEG;IACO,qCAAa,GAAvB,UAAwB,KAAY,EAAE,KAAa,EAAE,IAAgB;QACnE,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAA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AM,EAAE;YAClB,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;SAChC;QAED,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IACH,oBAAC;AAAD,CAAC,AAtED,CAAmC,iBAAU,GAsE5C;AAtEY,sCAAa","sourcesContent":["import { API, BaseClient, Scope } from '@sentry/core';\nimport { DsnLike, Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n super(BrowserBackend, options);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n event.sdk = {\n ...event.sdk,\n name: SDK_NAME,\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client is disabled');\n return;\n }\n\n const dsn = options.dsn || this.getDsn();\n\n if (!options.eventId) {\n logger.error('Missing `eventId` option in showReportDialog call');\n return;\n }\n\n if (!dsn) {\n logger.error('Missing `Dsn` option in showReportDialog call');\n return;\n }\n\n const script = document.createElement('script');\n script.async = true;\n script.src = new API(dsn).getReportDialogEndpoint(options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n (document.head || document.body).appendChild(script);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/eventbuilder.d.ts b/node_modules/@sentry/browser/dist/eventbuilder.d.ts deleted file mode 100644 index a12a471..0000000 --- a/node_modules/@sentry/browser/dist/eventbuilder.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Event } from '@sentry/types'; -/** JSDoc */ -export declare function eventFromUnknownInput(exception: unknown, syntheticException?: Error, options?: { - rejection?: boolean; - attachStacktrace?: boolean; -}): Event; -/** JSDoc */ -export declare function eventFromString(input: string, syntheticException?: Error, options?: { - attachStacktrace?: boolean; -}): Event; -//# sourceMappingURL=eventbuilder.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/eventbuilder.d.ts.map b/node_modules/@sentry/browser/dist/eventbuilder.d.ts.map deleted file mode 100644 index 9bbd280..0000000 --- a/node_modules/@sentry/browser/dist/eventbuilder.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventbuilder.d.ts","sourceRoot":"","sources":["../src/eventbuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAetC,YAAY;AACZ,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,OAAO,EAClB,kBAAkB,CAAC,EAAE,KAAK,EAC1B,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvB,GACL,KAAK,CAwDP;AAGD,YAAY;AACZ,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,kBAAkB,CAAC,EAAE,KAAK,EAC1B,OAAO,GAAE;IACP,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvB,GACL,KAAK,CAcP"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/eventbuilder.js b/node_modules/@sentry/browser/dist/eventbuilder.js deleted file mode 100644 index 142be03..0000000 --- a/node_modules/@sentry/browser/dist/eventbuilder.js +++ /dev/null @@ -1,78 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = require("@sentry/utils"); -var parsers_1 = require("./parsers"); -var tracekit_1 = require("./tracekit"); -/** JSDoc */ -function eventFromUnknownInput(exception, syntheticException, options) { - if (options === void 0) { options = {}; } - var event; - if (utils_1.isErrorEvent(exception) && exception.error) { - // If it is an ErrorEvent with `error` property, extract it to get actual Error - var errorEvent = exception; - exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment - event = parsers_1.eventFromStacktrace(tracekit_1.computeStackTrace(exception)); - return event; - } - if (utils_1.isDOMError(exception) || utils_1.isDOMException(exception)) { - // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers) - // then we just extract the name and message, as they don't provide anything else - // https://developer.mozilla.org/en-US/docs/Web/API/DOMError - // https://developer.mozilla.org/en-US/docs/Web/API/DOMException - var domException = exception; - var name_1 = domException.name || (utils_1.isDOMError(domException) ? 'DOMError' : 'DOMException'); - var message = domException.message ? name_1 + ": " + domException.message : name_1; - event = eventFromString(message, syntheticException, options); - utils_1.addExceptionTypeValue(event, message); - return event; - } - if (utils_1.isError(exception)) { - // we have a real Error object, do nothing - event = parsers_1.eventFromStacktrace(tracekit_1.computeStackTrace(exception)); - return event; - } - if (utils_1.isPlainObject(exception) || utils_1.isEvent(exception)) { - // If it is plain Object or Event, serialize it manually and extract options - // This will allow us to group events based on top-level keys - // which is much better than creating new group when any key/value change - var objectException = exception; - event = parsers_1.eventFromPlainObject(objectException, syntheticException, options.rejection); - utils_1.addExceptionMechanism(event, { - synthetic: true, - }); - return event; - } - // If none of previous checks were valid, then it means that it's not: - // - an instance of DOMError - // - an instance of DOMException - // - an instance of Event - // - an instance of Error - // - a valid ErrorEvent (one with an error property) - // - a plain Object - // - // So bail out and capture it as a simple message: - event = eventFromString(exception, syntheticException, options); - utils_1.addExceptionTypeValue(event, "" + exception, undefined); - utils_1.addExceptionMechanism(event, { - synthetic: true, - }); - return event; -} -exports.eventFromUnknownInput = eventFromUnknownInput; -// this._options.attachStacktrace -/** JSDoc */ -function eventFromString(input, syntheticException, options) { - if (options === void 0) { options = {}; } - var event = { - message: input, - }; - if (options.attachStacktrace && syntheticException) { - var stacktrace = tracekit_1.computeStackTrace(syntheticException); - var frames_1 = parsers_1.prepareFramesForEvent(stacktrace.stack); - event.stacktrace = { - frames: frames_1, - }; - } - return event; -} -exports.eventFromString = eventFromString; -//# sourceMappingURL=eventbuilder.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/eventbuilder.js.map b/node_modules/@sentry/browser/dist/eventbuilder.js.map deleted file mode 100644 index d907c7e..0000000 --- a/node_modules/@sentry/browser/dist/eventbuilder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventbuilder.js","sourceRoot":"","sources":["../src/eventbuilder.ts"],"names":[],"mappings":";AACA,uCASuB;AAEvB,qCAA6F;AAC7F,uCAA+C;AAE/C,YAAY;AACZ,SAAgB,qBAAqB,CACnC,SAAkB,EAClB,kBAA0B,EAC1B,OAGM;IAHN,wBAAA,EAAA,YAGM;IAEN,IAAI,KAAY,CAAC;IAEjB,IAAI,oBAAY,CAAC,SAAuB,CAAC,IAAK,SAAwB,CAAC,KAAK,EAAE;QAC5E,+EAA+E;QAC/E,IAAM,UAAU,GAAG,SAAuB,CAAC;QAC3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AO,KAAK,CAAC;KACd;IAED,sEAAsE;IACtE,4BAA4B;IAC5B,gCAAgC;IAChC,yBAAyB;IACzB,yBAAyB;IACzB,oDAAoD;IACpD,mBAAmB;IACnB,EAAE;IACF,kDAAkD;IAClD,KAAK,GAAG,eAAe,CAAC,SAAmB,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC1E,6BAAqB,CAAC,KAAK,EAAE,KAAG,SAAW,EAAE,SAAS,CAAC,CAAC;IACxD,6BAAqB,CAAC,KAAK,EAAE;QAC3B,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf,CAAC;AA/DD,sDA+DC;AAED,iCAAiC;AACjC,YAAY;AACZ,SAAgB,eAAe,CAC7B,KAAa,EACb,kBAA0B,EAC1B,OAEM;IAFN,wBAAA,EAAA,YAEM;IAEN,IAAM,KAAK,GAAU;QACnB,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,IAAI,OAAO,CAAC,gBAAgB,IAAI,kBAAkB,EAAE;QAClD,IAAM,UAAU,GAAG,4BAAiB,CAAC,kBAAkB,CAAC,CAAC;QACzD,IAAM,QAAM,GAAG,+BAAqB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACvD,KAAK,CAAC,UAAU,GAAG;YACjB,MAAM,UAAA;SACP,CAAC;KACH;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AApBD,0CAoBC","sourcesContent":["import { Event } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/** JSDoc */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n rejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n const domException = exception as DOMException;\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const objectException = exception as {};\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n// this._options.attachStacktrace\n/** JSDoc */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/exports.d.ts b/node_modules/@sentry/browser/dist/exports.d.ts deleted file mode 100644 index c91b7e0..0000000 --- a/node_modules/@sentry/browser/dist/exports.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { Breadcrumb, Request, SdkInfo, Event, EventHint, Exception, Response, Severity, StackFrame, Stacktrace, Status, Thread, User, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/core'; -export { BrowserOptions } from './backend'; -export { BrowserClient, ReportDialogOptions } from './client'; -export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk'; -export { SDK_NAME, SDK_VERSION } from './version'; -//# sourceMappingURL=exports.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/exports.d.ts.map b/node_modules/@sentry/browser/dist/exports.d.ts.map deleted file mode 100644 index bd2c274..0000000 --- a/node_modules/@sentry/browser/dist/exports.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/exports.js b/node_modules/@sentry/browser/dist/exports.js deleted file mode 100644 index b4317fa..0000000 --- a/node_modules/@sentry/browser/dist/exports.js +++ /dev/null @@ -1,38 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var types_1 = require("@sentry/types"); -exports.Severity = types_1.Severity; -exports.Status = types_1.Status; -var core_1 = require("@sentry/core"); -exports.addGlobalEventProcessor = core_1.addGlobalEventProcessor; -exports.addBreadcrumb = core_1.addBreadcrumb; -exports.captureException = core_1.captureException; -exports.captureEvent = core_1.captureEvent; -exports.captureMessage = core_1.captureMessage; -exports.configureScope = core_1.configureScope; -exports.getHubFromCarrier = core_1.getHubFromCarrier; -exports.getCurrentHub = core_1.getCurrentHub; -exports.Hub = core_1.Hub; -exports.Scope = core_1.Scope; -exports.setContext = core_1.setContext; -exports.setExtra = core_1.setExtra; -exports.setExtras = core_1.setExtras; -exports.setTag = core_1.setTag; -exports.setTags = core_1.setTags; -exports.setUser = core_1.setUser; -exports.withScope = core_1.withScope; -var client_1 = require("./client"); -exports.BrowserClient = client_1.BrowserClient; -var sdk_1 = require("./sdk"); -exports.defaultIntegrations = sdk_1.defaultIntegrations; -exports.forceLoad = sdk_1.forceLoad; -exports.init = sdk_1.init; -exports.lastEventId = sdk_1.lastEventId; -exports.onLoad = sdk_1.onLoad; -exports.showReportDialog = sdk_1.showReportDialog; -exports.flush = sdk_1.flush; -exports.close = sdk_1.close; -exports.wrap = sdk_1.wrap; -var version_1 = require("./version"); -exports.SDK_NAME = version_1.SDK_NAME; -exports.SDK_VERSION = version_1.SDK_VERSION; -//# sourceMappingURL=exports.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/exports.js.map b/node_modules/@sentry/browser/dist/exports.js.map deleted file mode 100644 index 4ab4c4a..0000000 --- a/node_modules/@sentry/browser/dist/exports.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports.js","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":";AAAA,uCAcuB;AANrB,2BAAA,QAAQ,CAAA;AAGR,yBAAA,MAAM,CAAA;AAKR,qCAkBsB;AAjBpB,yCAAA,uBAAuB,CAAA;AACvB,+BAAA,aAAa,CAAA;AACb,kCAAA,gBAAgB,CAAA;AAChB,8BAAA,YAAY,CAAA;AACZ,gCAAA,cAAc,CAAA;AACd,gCAAA,cAAc,CAAA;AACd,mCAAA,iBAAiB,CAAA;AACjB,+BAAA,aAAa,CAAA;AACb,qBAAA,GAAG,CAAA;AACH,uBAAA,KAAK,CAAA;AACL,4BAAA,UAAU,CAAA;AACV,0BAAA,QAAQ,CAAA;AACR,2BAAA,SAAS,CAAA;AACT,wBAAA,MAAM,CAAA;AACN,yBAAA,OAAO,CAAA;AACP,yBAAA,OAAO,CAAA;AACP,2BAAA,SAAS,CAAA;AAIX,mCAA8D;AAArD,iCAAA,aAAa,CAAA;AACtB,6BAAwH;AAA/G,oCAAA,mBAAmB,CAAA;AAAE,0BAAA,SAAS,CAAA;AAAE,qBAAA,IAAI,CAAA;AAAE,4BAAA,WAAW,CAAA;AAAE,uBAAA,MAAM,CAAA;AAAE,iCAAA,gBAAgB,CAAA;AAAE,sBAAA,KAAK,CAAA;AAAE,sBAAA,KAAK,CAAA;AAAE,qBAAA,IAAI,CAAA;AACxG,qCAAkD;AAAzC,6BAAA,QAAQ,CAAA;AAAE,gCAAA,WAAW,CAAA","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n EventHint,\n Exception,\n Response,\n Severity,\n StackFrame,\n Stacktrace,\n Status,\n Thread,\n User,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from '@sentry/core';\n\nexport { BrowserOptions } from './backend';\nexport { BrowserClient, ReportDialogOptions } from './client';\nexport { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk';\nexport { SDK_NAME, SDK_VERSION } from './version';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/helpers.d.ts b/node_modules/@sentry/browser/dist/helpers.d.ts deleted file mode 100644 index 55821da..0000000 --- a/node_modules/@sentry/browser/dist/helpers.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Mechanism, WrappedFunction } from '@sentry/types'; -/** - * @hidden - */ -export declare function shouldIgnoreOnError(): boolean; -/** - * @hidden - */ -export declare function ignoreNextOnError(): void; -/** - * Instruments the given function and sends an event to Sentry every time the - * function throws an exception. - * - * @param fn A function to wrap. - * @returns The wrapped function. - * @hidden - */ -export declare function wrap(fn: WrappedFunction, options?: { - mechanism?: Mechanism; -}, before?: WrappedFunction): any; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/helpers.d.ts.map b/node_modules/@sentry/browser/dist/helpers.d.ts.map deleted file mode 100644 index a207203..0000000 --- a/node_modules/@sentry/browser/dist/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,SAAS,EAAS,eAAe,EAAE,MAAM,eAAe,CAAC;AAKxF;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAClB,EAAE,EAAE,eAAe,EACnB,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,SAAS,CAAC;CAClB,EACN,MAAM,CAAC,EAAE,eAAe,GACvB,GAAG,CAyHL"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/helpers.js b/node_modules/@sentry/browser/dist/helpers.js deleted file mode 100644 index 83bf1a1..0000000 --- a/node_modules/@sentry/browser/dist/helpers.js +++ /dev/null @@ -1,139 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var ignoreOnError = 0; -/** - * @hidden - */ -function shouldIgnoreOnError() { - return ignoreOnError > 0; -} -exports.shouldIgnoreOnError = shouldIgnoreOnError; -/** - * @hidden - */ -function ignoreNextOnError() { - // onerror should trigger before setTimeout - ignoreOnError += 1; - setTimeout(function () { - ignoreOnError -= 1; - }); -} -exports.ignoreNextOnError = ignoreNextOnError; -/** - * Instruments the given function and sends an event to Sentry every time the - * function throws an exception. - * - * @param fn A function to wrap. - * @returns The wrapped function. - * @hidden - */ -function wrap(fn, options, before) { - if (options === void 0) { options = {}; } - // tslint:disable-next-line:strict-type-predicates - if (typeof fn !== 'function') { - return fn; - } - try { - // We don't wanna wrap it twice - if (fn.__sentry__) { - return fn; - } - // If this has already been wrapped in the past, return that wrapped function - if (fn.__sentry_wrapped__) { - return fn.__sentry_wrapped__; - } - } - catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - // Bail on wrapping and return the function as-is (defers to window.onerror). - return fn; - } - var sentryWrapped = function () { - var args = Array.prototype.slice.call(arguments); - // tslint:disable:no-unsafe-any - try { - // tslint:disable-next-line:strict-type-predicates - if (before && typeof before === 'function') { - before.apply(this, arguments); - } - var wrappedArguments = args.map(function (arg) { return wrap(arg, options); }); - if (fn.handleEvent) { - // Attempt to invoke user-land function - // NOTE: If you are a Sentry user, and you are seeing this stack frame, it - // means the sentry.javascript SDK caught an error invoking your application code. This - // is expected behavior and NOT indicative of a bug with sentry.javascript. - return fn.handleEvent.apply(this, wrappedArguments); - } - // Attempt to invoke user-land function - // NOTE: If you are a Sentry user, and you are seeing this stack frame, it - // means the sentry.javascript SDK caught an error invoking your application code. This - // is expected behavior and NOT indicative of a bug with sentry.javascript. - return fn.apply(this, wrappedArguments); - // tslint:enable:no-unsafe-any - } - catch (ex) { - ignoreNextOnError(); - core_1.withScope(function (scope) { - scope.addEventProcessor(function (event) { - var processedEvent = tslib_1.__assign({}, event); - if (options.mechanism) { - utils_1.addExceptionTypeValue(processedEvent, undefined, undefined); - utils_1.addExceptionMechanism(processedEvent, options.mechanism); - } - processedEvent.extra = tslib_1.__assign({}, processedEvent.extra, { arguments: args }); - return processedEvent; - }); - core_1.captureException(ex); - }); - throw ex; - } - }; - // Accessing some objects may throw - // ref: https://github.com/getsentry/sentry-javascript/issues/1168 - try { - for (var property in fn) { - if (Object.prototype.hasOwnProperty.call(fn, property)) { - sentryWrapped[property] = fn[property]; - } - } - } - catch (_oO) { } // tslint:disable-line:no-empty - fn.prototype = fn.prototype || {}; - sentryWrapped.prototype = fn.prototype; - Object.defineProperty(fn, '__sentry_wrapped__', { - enumerable: false, - value: sentryWrapped, - }); - // Signal that this function has been wrapped/filled already - // for both debugging and to prevent it to being wrapped/filled twice - Object.defineProperties(sentryWrapped, { - __sentry__: { - enumerable: false, - value: true, - }, - __sentry_original__: { - enumerable: false, - value: fn, - }, - }); - // Restore original function name (not all browsers allow that) - try { - var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name'); - if (descriptor.configurable) { - Object.defineProperty(sentryWrapped, 'name', { - get: function () { - return fn.name; - }, - }); - } - } - catch (_oO) { - /*no-empty*/ - } - return sentryWrapped; -} -exports.wrap = wrap; -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/helpers.js.map b/node_modules/@sentry/browser/dist/helpers.js.map deleted file mode 100644 index c07b56c..0000000 --- a/node_modules/@sentry/browser/dist/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;AAAA,qCAA2D;AAE3D,uCAA6E;AAE7E,IAAI,aAAa,GAAW,CAAC,CAAC;AAE9B;;GAEG;AACH,SAAgB,mBAAmB;IACjC,OAAO,aAAa,GAAG,CAAC,CAAC;AAC3B,CAAC;AAFD,kDAEC;AAED;;GAEG;AACH,SAAgB,iBAAiB;IAC/B,2CAA2C;IAC3C,aAAa,IAAI,CAAC,CAAC;IACnB,UAAU,CAAC;QACT,aAAa,IAAI,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC;AAND,8CAMC;AAED;;;;;;;GAOG;AACH,SAAgB,IAAI,CAClB,EAAmB,EACnB,OAEM,EACN,MAAwB;IAHxB,wBAAA,EAAA,YAEM;IAGN,kDAAkD;IAClD,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE;QAC5B,OAAO,EAAE,CAAC;KACX;IAED,IAAI;QACF,+BAA+B;QAC/B,IAAI,EAAE,CAAC,UAAU,EAAE;YACjB,OAAO,EAAE,CAAC;SACX;QAED,6EAA6E;QAC7E,IAAI,EAAE,CAAC,kBAAkB,EAAE;YACzB,OAAO,EAAE,CAAC,kBAAkB,CAAC;SAC9B;KACF;IAAC,OAAO,CAAC,EAAE;QACV,4DAA4D;QAC5D,gEAAgE;QAChE,6EAA6E;QAC7E,OAAO,EAAE,CAAC;KACX;IAED,IAAM,aAAa,GAAoB;QACrC,IAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEnD,+BAA+B;QAC/B,IAAI;YACF,kDAAkD;YAClD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ACF,KAAK,IAAM,QAAQ,IAAI,EAAE,EAAE;YACzB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE;gBACtD,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;aACxC;SACF;KACF;IAAC,OAAO,GAAG,EAAE,GAAE,CAAC,+BAA+B;IAEhD,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,IAAI,EAAE,CAAC;IAClC,aAAa,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC;IAEvC,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,oBAAoB,EAAE;QAC9C,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,aAAa;KACrB,CAAC,CAAC;IAEH,4DAA4D;IAC5D,qEAAqE;IACrE,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE;QACrC,UAAU,EAAE;YACV,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,IAAI;SACZ;QACD,mBAAmB,EAAE;YACnB,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,EAAE;SACV;KACF,CAAC,CAAC;IAEH,+DAA+D;IAC/D,IAAI;QACF,IAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,aAAa,EAAE,MAAM,CAAuB,CAAC;QAChG,IAAI,UAAU,CAAC,YAAY,EAAE;YAC3B,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE;gBAC3C,GAAG,EAAH;oBACE,OAAO,EAAE,CAAC,IAAI,CAAC;gBACjB,CAAC;aACF,CAAC,CAAC;SACJ;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,YAAY;KACb;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AA/HD,oBA+HC","sourcesContent":["import { captureException, withScope } from '@sentry/core';\nimport { Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils';\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n): any {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n const sentryWrapped: WrappedFunction = function(this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n // tslint:disable:no-unsafe-any\n try {\n // tslint:disable-next-line:strict-type-predicates\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n // tslint:enable:no-unsafe-any\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n const processedEvent = { ...event };\n\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n\n processedEvent.extra = {\n ...processedEvent.extra,\n arguments: args,\n };\n\n return processedEvent;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // tslint:disable-line:no-empty\n\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n } catch (_oO) {\n /*no-empty*/\n }\n\n return sentryWrapped;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/index.d.ts b/node_modules/@sentry/browser/dist/index.d.ts deleted file mode 100644 index eaf06aa..0000000 --- a/node_modules/@sentry/browser/dist/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from './exports'; -import { Integrations as CoreIntegrations } from '@sentry/core'; -import * as BrowserIntegrations from './integrations'; -import * as Transports from './transports'; -declare const INTEGRATIONS: { - GlobalHandlers: typeof BrowserIntegrations.GlobalHandlers; - TryCatch: typeof BrowserIntegrations.TryCatch; - Breadcrumbs: typeof BrowserIntegrations.Breadcrumbs; - LinkedErrors: typeof BrowserIntegrations.LinkedErrors; - UserAgent: typeof BrowserIntegrations.UserAgent; - FunctionToString: typeof CoreIntegrations.FunctionToString; - InboundFilters: typeof CoreIntegrations.InboundFilters; -}; -export { INTEGRATIONS as Integrations, Transports }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/index.d.ts.map b/node_modules/@sentry/browser/dist/index.d.ts.map deleted file mode 100644 index 6f940d4..0000000 --- a/node_modules/@sentry/browser/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhE,OAAO,KAAK,mBAAmB,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAY3C,QAAA,MAAM,YAAY;;;;;;;;CAIjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/index.js b/node_modules/@sentry/browser/dist/index.js deleted file mode 100644 index b9c20b0..0000000 --- a/node_modules/@sentry/browser/dist/index.js +++ /dev/null @@ -1,19 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./exports"), exports); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var BrowserIntegrations = require("./integrations"); -var Transports = require("./transports"); -exports.Transports = Transports; -var windowIntegrations = {}; -// This block is needed to add compatibility with the integrations packages when used with a CDN -// tslint:disable: no-unsafe-any -var _window = utils_1.getGlobalObject(); -if (_window.Sentry && _window.Sentry.Integrations) { - windowIntegrations = _window.Sentry.Integrations; -} -// tslint:enable: no-unsafe-any -var INTEGRATIONS = tslib_1.__assign({}, windowIntegrations, core_1.Integrations, BrowserIntegrations); -exports.Integrations = INTEGRATIONS; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/index.js.map b/node_modules/@sentry/browser/dist/index.js.map deleted file mode 100644 index 8ba7077..0000000 --- a/node_modules/@sentry/browser/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,oDAA0B;AAE1B,qCAAgE;AAChE,uCAAgD;AAEhD,oDAAsD;AACtD,yCAA2C;AAkBJ,gCAAU;AAhBjD,IAAI,kBAAkB,GAAG,EAAE,CAAC;AAE5B,gGAAgG;AAChG,gCAAgC;AAChC,IAAM,OAAO,GAAG,uBAAe,EAAU,CAAC;AAC1C,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE;IACjD,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;CAClD;AACD,+BAA+B;AAE/B,IAAM,YAAY,wBACb,kBAAkB,EAClB,mBAAgB,EAChB,mBAAmB,CACvB,CAAC;AAEuB,oCAAY","sourcesContent":["export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports };\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/breadcrumbs.d.ts b/node_modules/@sentry/browser/dist/integrations/breadcrumbs.d.ts deleted file mode 100644 index 402d915..0000000 --- a/node_modules/@sentry/browser/dist/integrations/breadcrumbs.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Integration } from '@sentry/types'; -/** - * @hidden - */ -export interface SentryWrappedXMLHttpRequest extends XMLHttpRequest { - [key: string]: any; - __sentry_xhr__?: { - method?: string; - url?: string; - status_code?: number; - }; -} -/** JSDoc */ -interface BreadcrumbIntegrations { - console?: boolean; - dom?: boolean; - fetch?: boolean; - history?: boolean; - sentry?: boolean; - xhr?: boolean; -} -/** - * Default Breadcrumbs instrumentations - * TODO: Deprecated - with v6, this will be renamed to `Instrument` - */ -export declare class Breadcrumbs implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** JSDoc */ - private readonly _options; - /** - * @inheritDoc - */ - constructor(options?: BreadcrumbIntegrations); - /** - * Creates breadcrumbs from console API calls - */ - private _consoleBreadcrumb; - /** - * Creates breadcrumbs from DOM API calls - */ - private _domBreadcrumb; - /** - * Creates breadcrumbs from XHR API calls - */ - private _xhrBreadcrumb; - /** - * Creates breadcrumbs from fetch API calls - */ - private _fetchBreadcrumb; - /** - * Creates breadcrumbs from history API calls - */ - private _historyBreadcrumb; - /** - * Instrument browser built-ins w/ breadcrumb capturing - * - Console API - * - DOM API (click/typing) - * - XMLHttpRequest API - * - Fetch API - * - History API - */ - setupOnce(): void; -} -export {}; -//# sourceMappingURL=breadcrumbs.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/breadcrumbs.d.ts.map b/node_modules/@sentry/browser/dist/integrations/breadcrumbs.d.ts.map deleted file mode 100644 index ed94257..0000000 --- a/node_modules/@sentry/browser/dist/integrations/breadcrumbs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAY,MAAM,eAAe,CAAC;AAatD;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,cAAc;IACjE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED,YAAY;AACZ,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;GAGG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAkB;IAErC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAiB;IAEzC,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAElD;;OAEG;gBACgB,OAAO,CAAC,EAAE,sBAAsB;IAYnD;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA2B1B;;OAEG;IACH,OAAO,CAAC,cAAc;IA4BtB;;OAEG;IACH,OAAO,CAAC,cAAc;IA2BtB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA2DxB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAiC1B;;;;;;;OAOG;IACI,SAAS,IAAI,IAAI;CA0CzB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/breadcrumbs.js b/node_modules/@sentry/browser/dist/integrations/breadcrumbs.js deleted file mode 100644 index e05db93..0000000 --- a/node_modules/@sentry/browser/dist/integrations/breadcrumbs.js +++ /dev/null @@ -1,272 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -/** - * Default Breadcrumbs instrumentations - * TODO: Deprecated - with v6, this will be renamed to `Instrument` - */ -var Breadcrumbs = /** @class */ (function () { - /** - * @inheritDoc - */ - function Breadcrumbs(options) { - /** - * @inheritDoc - */ - this.name = Breadcrumbs.id; - this._options = tslib_1.__assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options); - } - /** - * Creates breadcrumbs from console API calls - */ - Breadcrumbs.prototype._consoleBreadcrumb = function (handlerData) { - var breadcrumb = { - category: 'console', - data: { - arguments: handlerData.args, - logger: 'console', - }, - level: types_1.Severity.fromString(handlerData.level), - message: utils_1.safeJoin(handlerData.args, ' '), - }; - if (handlerData.level === 'assert') { - if (handlerData.args[0] === false) { - breadcrumb.message = "Assertion failed: " + (utils_1.safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'); - breadcrumb.data.arguments = handlerData.args.slice(1); - } - else { - // Don't capture a breadcrumb for passed assertions - return; - } - } - core_1.getCurrentHub().addBreadcrumb(breadcrumb, { - input: handlerData.args, - level: handlerData.level, - }); - }; - /** - * Creates breadcrumbs from DOM API calls - */ - Breadcrumbs.prototype._domBreadcrumb = function (handlerData) { - var target; - // Accessing event.target can throw (see getsentry/raven-js#838, #768) - try { - target = handlerData.event.target - ? utils_1.htmlTreeAsString(handlerData.event.target) - : utils_1.htmlTreeAsString(handlerData.event); - } - catch (e) { - target = ''; - } - if (target.length === 0) { - return; - } - core_1.getCurrentHub().addBreadcrumb({ - category: "ui." + handlerData.name, - message: target, - }, { - event: handlerData.event, - name: handlerData.name, - }); - }; - /** - * Creates breadcrumbs from XHR API calls - */ - Breadcrumbs.prototype._xhrBreadcrumb = function (handlerData) { - if (handlerData.endTimestamp) { - // We only capture complete, non-sentry requests - if (handlerData.xhr.__sentry_own_request__) { - return; - } - core_1.getCurrentHub().addBreadcrumb({ - category: 'xhr', - data: handlerData.xhr.__sentry_xhr__, - type: 'http', - }, { - xhr: handlerData.xhr, - }); - return; - } - // We only capture issued sentry requests - if (handlerData.xhr.__sentry_own_request__) { - addSentryBreadcrumb(handlerData.args[0]); - } - }; - /** - * Creates breadcrumbs from fetch API calls - */ - Breadcrumbs.prototype._fetchBreadcrumb = function (handlerData) { - // We only capture complete fetch requests - if (!handlerData.endTimestamp) { - return; - } - var client = core_1.getCurrentHub().getClient(); - var dsn = client && client.getDsn(); - if (dsn) { - var filterUrl = new core_1.API(dsn).getStoreEndpoint(); - // if Sentry key appears in URL, don't capture it as a request - // but rather as our own 'sentry' type breadcrumb - if (filterUrl && - handlerData.fetchData.url.indexOf(filterUrl) !== -1 && - handlerData.fetchData.method === 'POST' && - handlerData.args[1] && - handlerData.args[1].body) { - addSentryBreadcrumb(handlerData.args[1].body); - return; - } - } - if (handlerData.error) { - core_1.getCurrentHub().addBreadcrumb({ - category: 'fetch', - data: tslib_1.__assign({}, handlerData.fetchData, { status_code: handlerData.response.status }), - level: types_1.Severity.Error, - type: 'http', - }, { - data: handlerData.error, - input: handlerData.args, - }); - } - else { - core_1.getCurrentHub().addBreadcrumb({ - category: 'fetch', - data: tslib_1.__assign({}, handlerData.fetchData, { status_code: handlerData.response.status }), - type: 'http', - }, { - input: handlerData.args, - response: handlerData.response, - }); - } - }; - /** - * Creates breadcrumbs from history API calls - */ - Breadcrumbs.prototype._historyBreadcrumb = function (handlerData) { - var global = utils_1.getGlobalObject(); - var from = handlerData.from; - var to = handlerData.to; - var parsedLoc = utils_1.parseUrl(global.location.href); - var parsedFrom = utils_1.parseUrl(from); - var parsedTo = utils_1.parseUrl(to); - // Initial pushState doesn't provide `from` information - if (!parsedFrom.path) { - parsedFrom = parsedLoc; - } - // Use only the path component of the URL if the URL matches the current - // document (almost all the time when using pushState) - if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) { - // tslint:disable-next-line:no-parameter-reassignment - to = parsedTo.relative; - } - if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) { - // tslint:disable-next-line:no-parameter-reassignment - from = parsedFrom.relative; - } - core_1.getCurrentHub().addBreadcrumb({ - category: 'navigation', - data: { - from: from, - to: to, - }, - }); - }; - /** - * Instrument browser built-ins w/ breadcrumb capturing - * - Console API - * - DOM API (click/typing) - * - XMLHttpRequest API - * - Fetch API - * - History API - */ - Breadcrumbs.prototype.setupOnce = function () { - var _this = this; - if (this._options.console) { - utils_1.addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._consoleBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'console', - }); - } - if (this._options.dom) { - utils_1.addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._domBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'dom', - }); - } - if (this._options.xhr) { - utils_1.addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._xhrBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'xhr', - }); - } - if (this._options.fetch) { - utils_1.addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._fetchBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'fetch', - }); - } - if (this._options.history) { - utils_1.addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._historyBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'history', - }); - } - }; - /** - * @inheritDoc - */ - Breadcrumbs.id = 'Breadcrumbs'; - return Breadcrumbs; -}()); -exports.Breadcrumbs = Breadcrumbs; -/** - * Create a breadcrumb of `sentry` from the events themselves - */ -function addSentryBreadcrumb(serializedData) { - // There's always something that can go wrong with deserialization... - try { - var event_1 = JSON.parse(serializedData); - core_1.getCurrentHub().addBreadcrumb({ - category: "sentry." + (event_1.type === 'transaction' ? 'transaction' : 'event'), - event_id: event_1.event_id, - level: event_1.level || types_1.Severity.fromString('error'), - message: utils_1.getEventDescription(event_1), - }, { - event: event_1, - }); - } - catch (_oO) { - utils_1.logger.error('Error while adding sentry type breadcrumb'); - } -} -//# sourceMappingURL=breadcrumbs.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/breadcrumbs.js.map b/node_modules/@sentry/browser/dist/integrations/breadcrumbs.js.map deleted file mode 100644 index 3673114..0000000 --- a/node_modules/@sentry/browser/dist/integrations/breadcrumbs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":";;AAAA,qCAAkD;AAClD,uCAAsD;AACtD,uCAQuB;AA0BvB;;;GAGG;AACH;IAcE;;OAEG;IACH,qBAAmB,OAAgC;QAhBnD;;WAEG;QACI,SAAI,GAAW,WAAW,CAAC,EAAE,CAAC;QAcnC,IAAI,CAAC,QAAQ,sBACX,OAAO,EAAE,IAAI,EACb,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,IAAI,EACb,MAAM,EAAE,IAAI,EACZ,GAAG,EAAE,IAAI,IACN,OAAO,CACX,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,wCAAkB,GAA1B,UAA2B,WAAmC;QAC5D,IAAM,UAAU,GAAG;YACjB,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE;gBACJ,SAAS,EAAE,WAAW,CAAC,IAAI;gBAC3B,MAAM,EAAE,SAAS;aAClB;YACD,KAAK,EAAE,gBAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,OAAO,EAAE,gBAAQ,CAAC,WAAW,CAAC,IAAI,E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K,CAAC;SACpC,EACD;YACE,KAAK,SAAA;SACN,CACF,CAAC;KACH;IAAC,OAAO,GAAG,EAAE;QACZ,cAAM,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAC3D;AACH,CAAC","sourcesContent":["import { API, getCurrentHub } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n} from '@sentry/utils';\n\nimport { BrowserClient } from '../client';\n\n/**\n * @hidden\n */\nexport interface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** JSDoc */\ninterface BreadcrumbIntegrations {\n console?: boolean;\n dom?: boolean;\n fetch?: boolean;\n history?: boolean;\n sentry?: boolean;\n xhr?: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /** JSDoc */\n private readonly _options: BreadcrumbIntegrations;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: BreadcrumbIntegrations) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Creates breadcrumbs from console API calls\n */\n private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }\n\n /**\n * Creates breadcrumbs from DOM API calls\n */\n private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node)\n : htmlTreeAsString((handlerData.event as unknown) as Node);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n },\n );\n }\n\n /**\n * Creates breadcrumbs from XHR API calls\n */\n private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: handlerData.xhr.__sentry_xhr__,\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n },\n );\n\n return;\n }\n\n // We only capture issued sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n addSentryBreadcrumb(handlerData.args[0]);\n }\n }\n\n /**\n * Creates breadcrumbs from fetch API calls\n */\n private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n const client = getCurrentHub().getClient();\n const dsn = client && client.getDsn();\n\n if (dsn) {\n const filterUrl = new API(dsn).getStoreEndpoint();\n // if Sentry key appears in URL, don't capture it as a request\n // but rather as our own 'sentry' type breadcrumb\n if (\n filterUrl &&\n handlerData.fetchData.url.indexOf(filterUrl) !== -1 &&\n handlerData.fetchData.method === 'POST' &&\n handlerData.args[1] &&\n handlerData.args[1].body\n ) {\n addSentryBreadcrumb(handlerData.args[1].body);\n return;\n }\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }\n\n /**\n * Creates breadcrumbs from history API calls\n */\n private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._consoleBreadcrumb(...args);\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._domBreadcrumb(...args);\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._xhrBreadcrumb(...args);\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._fetchBreadcrumb(...args);\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._historyBreadcrumb(...args);\n },\n type: 'history',\n });\n }\n }\n}\n\n/**\n * Create a breadcrumb of `sentry` from the events themselves\n */\nfunction addSentryBreadcrumb(serializedData: string): void {\n // There's always something that can go wrong with deserialization...\n try {\n const event = JSON.parse(serializedData);\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level || Severity.fromString('error'),\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n } catch (_oO) {\n logger.error('Error while adding sentry type breadcrumb');\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/globalhandlers.d.ts b/node_modules/@sentry/browser/dist/integrations/globalhandlers.d.ts deleted file mode 100644 index 9c377c9..0000000 --- a/node_modules/@sentry/browser/dist/integrations/globalhandlers.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Integration } from '@sentry/types'; -/** JSDoc */ -interface GlobalHandlersIntegrations { - onerror: boolean; - onunhandledrejection: boolean; -} -/** Global handlers */ -export declare class GlobalHandlers implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** JSDoc */ - private readonly _options; - /** JSDoc */ - private _onErrorHandlerInstalled; - /** JSDoc */ - private _onUnhandledRejectionHandlerInstalled; - /** JSDoc */ - constructor(options?: GlobalHandlersIntegrations); - /** - * @inheritDoc - */ - setupOnce(): void; - /** JSDoc */ - private _installGlobalOnErrorHandler; - /** JSDoc */ - private _installGlobalOnUnhandledRejectionHandler; - /** - * This function creates a stack from an old, error-less onerror handler. - */ - private _eventFromIncompleteOnError; - /** - * This function creates an Event from an TraceKitStackTrace that has part of it missing. - */ - private _eventFromIncompleteRejection; - /** JSDoc */ - private _enhanceEventWithInitialFrame; -} -export {}; -//# sourceMappingURL=globalhandlers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/globalhandlers.d.ts.map b/node_modules/@sentry/browser/dist/integrations/globalhandlers.d.ts.map deleted file mode 100644 index b9f3903..0000000 --- a/node_modules/@sentry/browser/dist/integrations/globalhandlers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalhandlers.d.ts","sourceRoot":"","sources":["../../src/integrations/globalhandlers.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAY,MAAM,eAAe,CAAC;AAc7D,YAAY;AACZ,UAAU,0BAA0B;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,sBAAsB;AACtB,qBAAa,cAAe,YAAW,WAAW;IAChD;;OAEG;IACI,IAAI,EAAE,MAAM,CAAqB;IAExC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAoB;IAE5C,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IAEtD,YAAY;IACZ,OAAO,CAAC,wBAAwB,CAAkB;IAElD,YAAY;IACZ,OAAO,CAAC,qCAAqC,CAAkB;IAE/D,YAAY;gBACO,OAAO,CAAC,EAAE,0BAA0B;IAOvD;;OAEG;IACI,SAAS,IAAI,IAAI;IAcxB,YAAY;IACZ,OAAO,CAAC,4BAA4B;IA4CpC,YAAY;IACZ,OAAO,CAAC,yCAAyC;IA+DjD;;OAEG;IACH,OAAO,CAAC,2BAA2B;IA6BnC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAarC,YAAY;IACZ,OAAO,CAAC,6BAA6B;CAuBtC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/globalhandlers.js b/node_modules/@sentry/browser/dist/integrations/globalhandlers.js deleted file mode 100644 index 9e2a3fe..0000000 --- a/node_modules/@sentry/browser/dist/integrations/globalhandlers.js +++ /dev/null @@ -1,195 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var eventbuilder_1 = require("../eventbuilder"); -var helpers_1 = require("../helpers"); -/** Global handlers */ -var GlobalHandlers = /** @class */ (function () { - /** JSDoc */ - function GlobalHandlers(options) { - /** - * @inheritDoc - */ - this.name = GlobalHandlers.id; - /** JSDoc */ - this._onErrorHandlerInstalled = false; - /** JSDoc */ - this._onUnhandledRejectionHandlerInstalled = false; - this._options = tslib_1.__assign({ onerror: true, onunhandledrejection: true }, options); - } - /** - * @inheritDoc - */ - GlobalHandlers.prototype.setupOnce = function () { - Error.stackTraceLimit = 50; - if (this._options.onerror) { - utils_1.logger.log('Global Handler attached: onerror'); - this._installGlobalOnErrorHandler(); - } - if (this._options.onunhandledrejection) { - utils_1.logger.log('Global Handler attached: onunhandledrejection'); - this._installGlobalOnUnhandledRejectionHandler(); - } - }; - /** JSDoc */ - GlobalHandlers.prototype._installGlobalOnErrorHandler = function () { - var _this = this; - if (this._onErrorHandlerInstalled) { - return; - } - utils_1.addInstrumentationHandler({ - callback: function (data) { - var error = data.error; - var currentHub = core_1.getCurrentHub(); - var hasIntegration = currentHub.getIntegration(GlobalHandlers); - var isFailedOwnDelivery = error && error.__sentry_own_request__ === true; - if (!hasIntegration || helpers_1.shouldIgnoreOnError() || isFailedOwnDelivery) { - return; - } - var client = currentHub.getClient(); - var event = utils_1.isPrimitive(error) - ? _this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column) - : _this._enhanceEventWithInitialFrame(eventbuilder_1.eventFromUnknownInput(error, undefined, { - attachStacktrace: client && client.getOptions().attachStacktrace, - rejection: false, - }), data.url, data.line, data.column); - utils_1.addExceptionMechanism(event, { - handled: false, - type: 'onerror', - }); - currentHub.captureEvent(event, { - originalException: error, - }); - }, - type: 'error', - }); - this._onErrorHandlerInstalled = true; - }; - /** JSDoc */ - GlobalHandlers.prototype._installGlobalOnUnhandledRejectionHandler = function () { - var _this = this; - if (this._onUnhandledRejectionHandlerInstalled) { - return; - } - utils_1.addInstrumentationHandler({ - callback: function (e) { - var error = e; - // dig the object of the rejection out of known event types - try { - // PromiseRejectionEvents store the object of the rejection under 'reason' - // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent - if ('reason' in e) { - error = e.reason; - } - // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents - // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into - // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec - // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and - // https://github.com/getsentry/sentry-javascript/issues/2380 - else if ('detail' in e && 'reason' in e.detail) { - error = e.detail.reason; - } - } - catch (_oO) { - // no-empty - } - var currentHub = core_1.getCurrentHub(); - var hasIntegration = currentHub.getIntegration(GlobalHandlers); - var isFailedOwnDelivery = error && error.__sentry_own_request__ === true; - if (!hasIntegration || helpers_1.shouldIgnoreOnError() || isFailedOwnDelivery) { - return true; - } - var client = currentHub.getClient(); - var event = utils_1.isPrimitive(error) - ? _this._eventFromIncompleteRejection(error) - : eventbuilder_1.eventFromUnknownInput(error, undefined, { - attachStacktrace: client && client.getOptions().attachStacktrace, - rejection: true, - }); - event.level = types_1.Severity.Error; - utils_1.addExceptionMechanism(event, { - handled: false, - type: 'onunhandledrejection', - }); - currentHub.captureEvent(event, { - originalException: error, - }); - return; - }, - type: 'unhandledrejection', - }); - this._onUnhandledRejectionHandlerInstalled = true; - }; - /** - * This function creates a stack from an old, error-less onerror handler. - */ - GlobalHandlers.prototype._eventFromIncompleteOnError = function (msg, url, line, column) { - var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; - // If 'message' is ErrorEvent, get real message from inside - var message = utils_1.isErrorEvent(msg) ? msg.message : msg; - var name; - if (utils_1.isString(message)) { - var groups = message.match(ERROR_TYPES_RE); - if (groups) { - name = groups[1]; - message = groups[2]; - } - } - var event = { - exception: { - values: [ - { - type: name || 'Error', - value: message, - }, - ], - }, - }; - return this._enhanceEventWithInitialFrame(event, url, line, column); - }; - /** - * This function creates an Event from an TraceKitStackTrace that has part of it missing. - */ - GlobalHandlers.prototype._eventFromIncompleteRejection = function (error) { - return { - exception: { - values: [ - { - type: 'UnhandledRejection', - value: "Non-Error promise rejection captured with value: " + error, - }, - ], - }, - }; - }; - /** JSDoc */ - GlobalHandlers.prototype._enhanceEventWithInitialFrame = function (event, url, line, column) { - event.exception = event.exception || {}; - event.exception.values = event.exception.values || []; - event.exception.values[0] = event.exception.values[0] || {}; - event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {}; - event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || []; - var colno = isNaN(parseInt(column, 10)) ? undefined : column; - var lineno = isNaN(parseInt(line, 10)) ? undefined : line; - var filename = utils_1.isString(url) && url.length > 0 ? url : utils_1.getLocationHref(); - if (event.exception.values[0].stacktrace.frames.length === 0) { - event.exception.values[0].stacktrace.frames.push({ - colno: colno, - filename: filename, - function: '?', - in_app: true, - lineno: lineno, - }); - } - return event; - }; - /** - * @inheritDoc - */ - GlobalHandlers.id = 'GlobalHandlers'; - return GlobalHandlers; -}()); -exports.GlobalHandlers = GlobalHandlers; -//# sourceMappingURL=globalhandlers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/globalhandlers.js.map b/node_modules/@sentry/browser/dist/integrations/globalhandlers.js.map deleted file mode 100644 index fa2b52c..0000000 --- a/node_modules/@sentry/browser/dist/integrations/globalhandlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalhandlers.js","sourceRoot":"","sources":["../../src/integrations/globalhandlers.ts"],"names":[],"mappings":";;AAAA,qCAA6C;AAC7C,uCAA6D;AAC7D,uCAQuB;AAEvB,gDAAwD;AACxD,sCAAiD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lOD,IAkOC;AAlOY,wCAAc","sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n onerror: boolean;\n onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /** JSDoc */\n private _onErrorHandlerInstalled: boolean = false;\n\n /** JSDoc */\n private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n }\n\n /** JSDoc */\n private _installGlobalOnErrorHandler(): void {\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const error = data.error;\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : this._enhanceEventWithInitialFrame(\n eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }),\n data.url,\n data.line,\n data.column,\n );\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n\n this._onErrorHandlerInstalled = true;\n }\n\n /** JSDoc */\n private _installGlobalOnUnhandledRejectionHandler(): void {\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (e: any) => {\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteRejection(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n\n event.level = Severity.Error;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n\n return;\n },\n type: 'unhandledrejection',\n });\n\n this._onUnhandledRejectionHandlerInstalled = true;\n }\n\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name;\n\n if (isString(message)) {\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n }\n\n /**\n * This function creates an Event from an TraceKitStackTrace that has part of it missing.\n */\n private _eventFromIncompleteRejection(error: any): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n value: `Non-Error promise rejection captured with value: ${error}`,\n },\n ],\n },\n };\n }\n\n /** JSDoc */\n private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/index.d.ts b/node_modules/@sentry/browser/dist/integrations/index.d.ts deleted file mode 100644 index d3ee58e..0000000 --- a/node_modules/@sentry/browser/dist/integrations/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { GlobalHandlers } from './globalhandlers'; -export { TryCatch } from './trycatch'; -export { Breadcrumbs } from './breadcrumbs'; -export { LinkedErrors } from './linkederrors'; -export { UserAgent } from './useragent'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/index.d.ts.map b/node_modules/@sentry/browser/dist/integrations/index.d.ts.map deleted file mode 100644 index 7d46044..0000000 --- a/node_modules/@sentry/browser/dist/integrations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/index.js b/node_modules/@sentry/browser/dist/integrations/index.js deleted file mode 100644 index 3e41fed..0000000 --- a/node_modules/@sentry/browser/dist/integrations/index.js +++ /dev/null @@ -1,12 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var globalhandlers_1 = require("./globalhandlers"); -exports.GlobalHandlers = globalhandlers_1.GlobalHandlers; -var trycatch_1 = require("./trycatch"); -exports.TryCatch = trycatch_1.TryCatch; -var breadcrumbs_1 = require("./breadcrumbs"); -exports.Breadcrumbs = breadcrumbs_1.Breadcrumbs; -var linkederrors_1 = require("./linkederrors"); -exports.LinkedErrors = linkederrors_1.LinkedErrors; -var useragent_1 = require("./useragent"); -exports.UserAgent = useragent_1.UserAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/index.js.map b/node_modules/@sentry/browser/dist/integrations/index.js.map deleted file mode 100644 index 58f582e..0000000 --- a/node_modules/@sentry/browser/dist/integrations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":";AAAA,mDAAkD;AAAzC,0CAAA,cAAc,CAAA;AACvB,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AACjB,6CAA4C;AAAnC,oCAAA,WAAW,CAAA;AACpB,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,yCAAwC;AAA/B,gCAAA,SAAS,CAAA","sourcesContent":["export { GlobalHandlers } from './globalhandlers';\nexport { TryCatch } from './trycatch';\nexport { Breadcrumbs } from './breadcrumbs';\nexport { LinkedErrors } from './linkederrors';\nexport { UserAgent } from './useragent';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/linkederrors.d.ts b/node_modules/@sentry/browser/dist/integrations/linkederrors.d.ts deleted file mode 100644 index fe71047..0000000 --- a/node_modules/@sentry/browser/dist/integrations/linkederrors.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Adds SDK info to an event. */ -export declare class LinkedErrors implements Integration { - /** - * @inheritDoc - */ - readonly name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - private readonly _key; - /** - * @inheritDoc - */ - private readonly _limit; - /** - * @inheritDoc - */ - constructor(options?: { - key?: string; - limit?: number; - }); - /** - * @inheritDoc - */ - setupOnce(): void; - /** - * @inheritDoc - */ - private _handler; - /** - * @inheritDoc - */ - private _walkErrorTree; -} -//# sourceMappingURL=linkederrors.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/linkederrors.d.ts.map b/node_modules/@sentry/browser/dist/integrations/linkederrors.d.ts.map deleted file mode 100644 index 0a558b2..0000000 --- a/node_modules/@sentry/browser/dist/integrations/linkederrors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linkederrors.d.ts","sourceRoot":"","sources":["../../src/integrations/linkederrors.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,WAAW,EAAE,MAAM,eAAe,CAAC;AASxF,iCAAiC;AACjC,qBAAa,YAAa,YAAW,WAAW;IAC9C;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAmB;IAE/C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAkB;IAE1C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAE9B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;OAEG;gBACgB,OAAO,GAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO;IAKjE;;OAEG;IACI,SAAS,IAAI,IAAI;IAUxB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAShB;;OAEG;IACH,OAAO,CAAC,cAAc;CAQvB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/linkederrors.js b/node_modules/@sentry/browser/dist/integrations/linkederrors.js deleted file mode 100644 index c36cdd3..0000000 --- a/node_modules/@sentry/browser/dist/integrations/linkederrors.js +++ /dev/null @@ -1,65 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var parsers_1 = require("../parsers"); -var tracekit_1 = require("../tracekit"); -var DEFAULT_KEY = 'cause'; -var DEFAULT_LIMIT = 5; -/** Adds SDK info to an event. */ -var LinkedErrors = /** @class */ (function () { - /** - * @inheritDoc - */ - function LinkedErrors(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = LinkedErrors.id; - this._key = options.key || DEFAULT_KEY; - this._limit = options.limit || DEFAULT_LIMIT; - } - /** - * @inheritDoc - */ - LinkedErrors.prototype.setupOnce = function () { - core_1.addGlobalEventProcessor(function (event, hint) { - var self = core_1.getCurrentHub().getIntegration(LinkedErrors); - if (self) { - return self._handler(event, hint); - } - return event; - }); - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype._handler = function (event, hint) { - if (!event.exception || !event.exception.values || !hint || !utils_1.isInstanceOf(hint.originalException, Error)) { - return event; - } - var linkedErrors = this._walkErrorTree(hint.originalException, this._key); - event.exception.values = tslib_1.__spread(linkedErrors, event.exception.values); - return event; - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype._walkErrorTree = function (error, key, stack) { - if (stack === void 0) { stack = []; } - if (!utils_1.isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) { - return stack; - } - var stacktrace = tracekit_1.computeStackTrace(error[key]); - var exception = parsers_1.exceptionFromStacktrace(stacktrace); - return this._walkErrorTree(error[key], key, tslib_1.__spread([exception], stack)); - }; - /** - * @inheritDoc - */ - LinkedErrors.id = 'LinkedErrors'; - return LinkedErrors; -}()); -exports.LinkedErrors = LinkedErrors; -//# sourceMappingURL=linkederrors.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/linkederrors.js.map b/node_modules/@sentry/browser/dist/integrations/linkederrors.js.map deleted file mode 100644 index 6e2d79d..0000000 --- a/node_modules/@sentry/browser/dist/integrations/linkederrors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linkederrors.js","sourceRoot":"","sources":["../../src/integrations/linkederrors.ts"],"names":[],"mappings":";;AAAA,qCAAsE;AAEtE,uCAA6C;AAE7C,sCAAqD;AACrD,wCAAgD;AAEhD,IAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,IAAM,aAAa,GAAG,CAAC,CAAC;AAExB,iCAAiC;AACjC;IAqBE;;OAEG;IACH,sBAAmB,OAA8C;QAA9C,wBAAA,EAAA,YAA8C;QAvBjE;;WAEG;QACa,SAAI,GAAW,YAAY,CAAC,EAAE,CAAC;QAqB7C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,IAAI,WAAW,CAAC;QACv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GAAG,iCAAuB,CAAC,UAAU,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,oBAAG,SAAS,GAAK,KAAK,EAAE,CAAC;IACrE,CAAC;IA1DD;;OAEG;IACW,eAAE,GAAW,cAAc,CAAC;IAwD5C,mBAAC;CAAA,AAjED,IAiEC;AAjEY,oCAAY","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return self._handler(event, hint);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n }\n\n /**\n * @inheritDoc\n */\n private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, [exception, ...stack]);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/trycatch.d.ts b/node_modules/@sentry/browser/dist/integrations/trycatch.d.ts deleted file mode 100644 index f28bbf1..0000000 --- a/node_modules/@sentry/browser/dist/integrations/trycatch.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Wrap timer functions and event targets to catch errors and provide better meta data */ -export declare class TryCatch implements Integration { - /** JSDoc */ - private _ignoreOnError; - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** JSDoc */ - private _wrapTimeFunction; - /** JSDoc */ - private _wrapRAF; - /** JSDoc */ - private _wrapEventTarget; - /** JSDoc */ - private _wrapXHR; - /** - * Wrap timer functions and event targets to catch errors - * and provide better metadata. - */ - setupOnce(): void; -} -//# sourceMappingURL=trycatch.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/trycatch.d.ts.map b/node_modules/@sentry/browser/dist/integrations/trycatch.d.ts.map deleted file mode 100644 index 06bc476..0000000 --- a/node_modules/@sentry/browser/dist/integrations/trycatch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trycatch.d.ts","sourceRoot":"","sources":["../../src/integrations/trycatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAO7D,0FAA0F;AAC1F,qBAAa,QAAS,YAAW,WAAW;IAC1C,YAAY;IACZ,OAAO,CAAC,cAAc,CAAa;IAEnC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAe;IAElC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAc;IAEtC,YAAY;IACZ,OAAO,CAAC,iBAAiB;IAczB,YAAY;IACZ,OAAO,CAAC,QAAQ;IAiBhB,YAAY;IACZ,OAAO,CAAC,gBAAgB;IA2ExB,YAAY;IACZ,OAAO,CAAC,QAAQ;IAkChB;;;OAGG;IACI,SAAS,IAAI,IAAI;CA6CzB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/trycatch.js b/node_modules/@sentry/browser/dist/integrations/trycatch.js deleted file mode 100644 index 5180905..0000000 --- a/node_modules/@sentry/browser/dist/integrations/trycatch.js +++ /dev/null @@ -1,187 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = require("@sentry/utils"); -var helpers_1 = require("../helpers"); -/** Wrap timer functions and event targets to catch errors and provide better meta data */ -var TryCatch = /** @class */ (function () { - function TryCatch() { - /** JSDoc */ - this._ignoreOnError = 0; - /** - * @inheritDoc - */ - this.name = TryCatch.id; - } - /** JSDoc */ - TryCatch.prototype._wrapTimeFunction = function (original) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var originalCallback = args[0]; - args[0] = helpers_1.wrap(originalCallback, { - mechanism: { - data: { function: utils_1.getFunctionName(original) }, - handled: true, - type: 'instrument', - }, - }); - return original.apply(this, args); - }; - }; - /** JSDoc */ - TryCatch.prototype._wrapRAF = function (original) { - return function (callback) { - return original(helpers_1.wrap(callback, { - mechanism: { - data: { - function: 'requestAnimationFrame', - handler: utils_1.getFunctionName(original), - }, - handled: true, - type: 'instrument', - }, - })); - }; - }; - /** JSDoc */ - TryCatch.prototype._wrapEventTarget = function (target) { - var global = utils_1.getGlobalObject(); - var proto = global[target] && global[target].prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - utils_1.fill(proto, 'addEventListener', function (original) { - return function (eventName, fn, options) { - try { - // tslint:disable-next-line:no-unbound-method strict-type-predicates - if (typeof fn.handleEvent === 'function') { - fn.handleEvent = helpers_1.wrap(fn.handleEvent.bind(fn), { - mechanism: { - data: { - function: 'handleEvent', - handler: utils_1.getFunctionName(fn), - target: target, - }, - handled: true, - type: 'instrument', - }, - }); - } - } - catch (err) { - // can sometimes get 'Permission denied to access property "handle Event' - } - return original.call(this, eventName, helpers_1.wrap(fn, { - mechanism: { - data: { - function: 'addEventListener', - handler: utils_1.getFunctionName(fn), - target: target, - }, - handled: true, - type: 'instrument', - }, - }), options); - }; - }); - utils_1.fill(proto, 'removeEventListener', function (original) { - return function (eventName, fn, options) { - var callback = fn; - try { - callback = callback && (callback.__sentry_wrapped__ || callback); - } - catch (e) { - // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments - } - return original.call(this, eventName, callback, options); - }; - }); - }; - /** JSDoc */ - TryCatch.prototype._wrapXHR = function (originalSend) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var xhr = this; // tslint:disable-line:no-this-assignment - var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange']; - xmlHttpRequestProps.forEach(function (prop) { - if (prop in xhr && typeof xhr[prop] === 'function') { - utils_1.fill(xhr, prop, function (original) { - var wrapOptions = { - mechanism: { - data: { - function: prop, - handler: utils_1.getFunctionName(original), - }, - handled: true, - type: 'instrument', - }, - }; - // If Instrument integration has been called before TryCatch, get the name of original function - if (original.__sentry_original__) { - wrapOptions.mechanism.data.handler = utils_1.getFunctionName(original.__sentry_original__); - } - // Otherwise wrap directly - return helpers_1.wrap(original, wrapOptions); - }); - } - }); - return originalSend.apply(this, args); - }; - }; - /** - * Wrap timer functions and event targets to catch errors - * and provide better metadata. - */ - TryCatch.prototype.setupOnce = function () { - this._ignoreOnError = this._ignoreOnError; - var global = utils_1.getGlobalObject(); - utils_1.fill(global, 'setTimeout', this._wrapTimeFunction.bind(this)); - utils_1.fill(global, 'setInterval', this._wrapTimeFunction.bind(this)); - utils_1.fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this)); - if ('XMLHttpRequest' in global) { - utils_1.fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this)); - } - [ - 'EventTarget', - 'Window', - 'Node', - 'ApplicationCache', - 'AudioTrackList', - 'ChannelMergerNode', - 'CryptoOperation', - 'EventSource', - 'FileReader', - 'HTMLUnknownElement', - 'IDBDatabase', - 'IDBRequest', - 'IDBTransaction', - 'KeyOperation', - 'MediaController', - 'MessagePort', - 'ModalWindow', - 'Notification', - 'SVGElementInstance', - 'Screen', - 'TextTrack', - 'TextTrackCue', - 'TextTrackList', - 'WebSocket', - 'WebSocketWorker', - 'Worker', - 'XMLHttpRequest', - 'XMLHttpRequestEventTarget', - 'XMLHttpRequestUpload', - ].forEach(this._wrapEventTarget.bind(this)); - }; - /** - * @inheritDoc - */ - TryCatch.id = 'TryCatch'; - return TryCatch; -}()); -exports.TryCatch = TryCatch; -//# sourceMappingURL=trycatch.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/trycatch.js.map b/node_modules/@sentry/browser/dist/integrations/trycatch.js.map deleted file mode 100644 index 89dbe10..0000000 --- a/node_modules/@sentry/browser/dist/integrations/trycatch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trycatch.js","sourceRoot":"","sources":["../../src/integrations/trycatch.ts"],"names":[],"mappings":";AACA,uCAAuE;AAEvE,sCAAkC;AAIlC,0FAA0F;AAC1F;IAAA;QACE,YAAY;QACJ,mBAAc,GAAW,CAAC,CAAC;QAEnC;;WAEG;QACI,SAAI,GAAW,QAAQ,CAAC,EAAE,CAAC;IAwMpC,CAAC;IAjMC,YAAY;IACJ,oCAAiB,GAAzB,UAA0B,QAAoB;QAC5C,OAAO;YAAoB,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YACvC,IAAM,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACjC,IAAI,CAAC,CAAC,CAAC,GAAG,cAAI,CAAC,gBAAgB,EAAE;gBAC/B,SAAS,EAAE;oBACT,IAAI,EAAE,EAAE,QAAQ,EAAE,uBA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Q,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAEhE,IAAI,gBAAgB,IAAI,MAAM,EAAE;YAC9B,YAAI,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SAClE;QAED;YACE,aAAa;YACb,QAAQ;YACR,MAAM;YACN,kBAAkB;YAClB,gBAAgB;YAChB,mBAAmB;YACnB,iBAAiB;YACjB,aAAa;YACb,YAAY;YACZ,oBAAoB;YACpB,aAAa;YACb,YAAY;YACZ,gBAAgB;YAChB,cAAc;YACd,iBAAiB;YACjB,aAAa;YACb,aAAa;YACb,cAAc;YACd,oBAAoB;YACpB,QAAQ;YACR,WAAW;YACX,cAAc;YACd,eAAe;YACf,WAAW;YACX,iBAAiB;YACjB,QAAQ;YACR,gBAAgB;YAChB,2BAA2B;YAC3B,sBAAsB;SACvB,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC;IArMD;;OAEG;IACW,WAAE,GAAW,UAAU,CAAC;IAmMxC,eAAC;CAAA,AA/MD,IA+MC;AA/MY,4BAAQ","sourcesContent":["import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /** JSDoc */\n private _ignoreOnError: number = 0;\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /** JSDoc */\n private _wrapTimeFunction(original: () => void): () => number {\n return function(this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n }\n\n /** JSDoc */\n private _wrapRAF(original: any): (callback: () => void) => any {\n return function(this: any, callback: () => void): () => void {\n return original(\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n }\n\n /** JSDoc */\n private _wrapEventTarget(target: string): void {\n const global = getGlobalObject() as { [key: string]: any };\n const proto = global[target] && global[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n // tslint:disable-next-line:no-unbound-method strict-type-predicates\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n wrap((fn as any) as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = (fn as any) as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n }\n\n /** JSDoc */\n private _wrapXHR(originalSend: () => void): () => void {\n return function(this: XMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function(original: WrappedFunction): Function {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n this._ignoreOnError = this._ignoreOnError;\n\n const global = getGlobalObject();\n\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n\n if ('XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n ].forEach(this._wrapEventTarget.bind(this));\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/useragent.d.ts b/node_modules/@sentry/browser/dist/integrations/useragent.d.ts deleted file mode 100644 index 8ea584d..0000000 --- a/node_modules/@sentry/browser/dist/integrations/useragent.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Integration } from '@sentry/types'; -/** UserAgent */ -export declare class UserAgent implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - setupOnce(): void; -} -//# sourceMappingURL=useragent.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/useragent.d.ts.map b/node_modules/@sentry/browser/dist/integrations/useragent.d.ts.map deleted file mode 100644 index 0bf2e62..0000000 --- a/node_modules/@sentry/browser/dist/integrations/useragent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useragent.d.ts","sourceRoot":"","sources":["../../src/integrations/useragent.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AAKnD,gBAAgB;AAChB,qBAAa,SAAU,YAAW,WAAW;IAC3C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAgB;IAEnC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAe;IAEvC;;OAEG;IACI,SAAS,IAAI,IAAI;CAqBzB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/useragent.js b/node_modules/@sentry/browser/dist/integrations/useragent.js deleted file mode 100644 index 734e6b1..0000000 --- a/node_modules/@sentry/browser/dist/integrations/useragent.js +++ /dev/null @@ -1,40 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var global = utils_1.getGlobalObject(); -/** UserAgent */ -var UserAgent = /** @class */ (function () { - function UserAgent() { - /** - * @inheritDoc - */ - this.name = UserAgent.id; - } - /** - * @inheritDoc - */ - UserAgent.prototype.setupOnce = function () { - core_1.addGlobalEventProcessor(function (event) { - if (core_1.getCurrentHub().getIntegration(UserAgent)) { - if (!global.navigator || !global.location) { - return event; - } - // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/ - var request = event.request || {}; - request.url = request.url || global.location.href; - request.headers = request.headers || {}; - request.headers['User-Agent'] = global.navigator.userAgent; - return tslib_1.__assign({}, event, { request: request }); - } - return event; - }); - }; - /** - * @inheritDoc - */ - UserAgent.id = 'UserAgent'; - return UserAgent; -}()); -exports.UserAgent = UserAgent; -//# sourceMappingURL=useragent.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/integrations/useragent.js.map b/node_modules/@sentry/browser/dist/integrations/useragent.js.map deleted file mode 100644 index 3258140..0000000 --- a/node_modules/@sentry/browser/dist/integrations/useragent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useragent.js","sourceRoot":"","sources":["../../src/integrations/useragent.ts"],"names":[],"mappings":";;AAAA,qCAAsE;AAEtE,uCAAgD;AAEhD,IAAM,MAAM,GAAG,uBAAe,EAAU,CAAC;AAEzC,gBAAgB;AAChB;IAAA;QACE;;WAEG;QACI,SAAI,GAAW,SAAS,CAAC,EAAE,CAAC;IA+BrC,CAAC;IAxBC;;OAEG;IACI,6BAAS,GAAhB;QACE,8BAAuB,CAAC,UAAC,KAAY;YACnC,IAAI,oBAAa,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE;gBAC7C,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;oBACzC,OAAO,KAAK,CAAC;iBACd;gBAED,wFAAwF;gBACxF,IAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;gBACpC,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAClD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;gBACxC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;gBAE3D,4BACK,KAAK,IACR,OAAO,SAAA,IACP;aACH;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IA5BD;;OAEG;IACW,YAAE,GAAW,WAAW,CAAC;IA0BzC,gBAAC;CAAA,AAnCD,IAmCC;AAnCY,8BAAS","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n if (!global.navigator || !global.location) {\n return event;\n }\n\n // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/\n const request = event.request || {};\n request.url = request.url || global.location.href;\n request.headers = request.headers || {};\n request.headers['User-Agent'] = global.navigator.userAgent;\n\n return {\n ...event,\n request,\n };\n }\n return event;\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/parsers.d.ts b/node_modules/@sentry/browser/dist/parsers.d.ts deleted file mode 100644 index 73d29b9..0000000 --- a/node_modules/@sentry/browser/dist/parsers.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Event, Exception, StackFrame } from '@sentry/types'; -import { StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit'; -/** - * This function creates an exception from an TraceKitStackTrace - * @param stacktrace TraceKitStackTrace that will be converted to an exception - * @hidden - */ -export declare function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception; -/** - * @hidden - */ -export declare function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event; -/** - * @hidden - */ -export declare function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event; -/** - * @hidden - */ -export declare function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[]; -//# sourceMappingURL=parsers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/parsers.d.ts.map b/node_modules/@sentry/browser/dist/parsers.d.ts.map deleted file mode 100644 index e6e9f2b..0000000 --- a/node_modules/@sentry/browser/dist/parsers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG7D,OAAO,EAAqB,UAAU,IAAI,kBAAkB,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAInH;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,kBAAkB,GAAG,SAAS,CAkBjF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,EAAE,EAAE,kBAAkB,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,CA0B1G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,kBAAkB,GAAG,KAAK,CAQzE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,UAAU,EAAE,CAiC/E"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/parsers.js b/node_modules/@sentry/browser/dist/parsers.js deleted file mode 100644 index 01dad0a..0000000 --- a/node_modules/@sentry/browser/dist/parsers.js +++ /dev/null @@ -1,96 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = require("@sentry/utils"); -var tracekit_1 = require("./tracekit"); -var STACKTRACE_LIMIT = 50; -/** - * This function creates an exception from an TraceKitStackTrace - * @param stacktrace TraceKitStackTrace that will be converted to an exception - * @hidden - */ -function exceptionFromStacktrace(stacktrace) { - var frames = prepareFramesForEvent(stacktrace.stack); - var exception = { - type: stacktrace.name, - value: stacktrace.message, - }; - if (frames && frames.length) { - exception.stacktrace = { frames: frames }; - } - // tslint:disable-next-line:strict-type-predicates - if (exception.type === undefined && exception.value === '') { - exception.value = 'Unrecoverable error caught'; - } - return exception; -} -exports.exceptionFromStacktrace = exceptionFromStacktrace; -/** - * @hidden - */ -function eventFromPlainObject(exception, syntheticException, rejection) { - var event = { - exception: { - values: [ - { - type: utils_1.isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error', - value: "Non-Error " + (rejection ? 'promise rejection' : 'exception') + " captured with keys: " + utils_1.extractExceptionKeysForMessage(exception), - }, - ], - }, - extra: { - __serialized__: utils_1.normalizeToSize(exception), - }, - }; - if (syntheticException) { - var stacktrace = tracekit_1.computeStackTrace(syntheticException); - var frames_1 = prepareFramesForEvent(stacktrace.stack); - event.stacktrace = { - frames: frames_1, - }; - } - return event; -} -exports.eventFromPlainObject = eventFromPlainObject; -/** - * @hidden - */ -function eventFromStacktrace(stacktrace) { - var exception = exceptionFromStacktrace(stacktrace); - return { - exception: { - values: [exception], - }, - }; -} -exports.eventFromStacktrace = eventFromStacktrace; -/** - * @hidden - */ -function prepareFramesForEvent(stack) { - if (!stack || !stack.length) { - return []; - } - var localStack = stack; - var firstFrameFunction = localStack[0].func || ''; - var lastFrameFunction = localStack[localStack.length - 1].func || ''; - // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call) - if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { - localStack = localStack.slice(1); - } - // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call) - if (lastFrameFunction.indexOf('sentryWrapped') !== -1) { - localStack = localStack.slice(0, -1); - } - // The frame where the crash happened, should be the last entry in the array - return localStack - .map(function (frame) { return ({ - colno: frame.column === null ? undefined : frame.column, - filename: frame.url || localStack[0].url, - function: frame.func || '?', - in_app: true, - lineno: frame.line === null ? undefined : frame.line, - }); }) - .slice(0, STACKTRACE_LIMIT) - .reverse(); -} -exports.prepareFramesForEvent = prepareFramesForEvent; -//# sourceMappingURL=parsers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/parsers.js.map b/node_modules/@sentry/browser/dist/parsers.js.map deleted file mode 100644 index c40ce37..0000000 --- a/node_modules/@sentry/browser/dist/parsers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":";AACA,uCAAyF;AAEzF,uCAAmH;AAEnH,IAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,UAA8B;IACpE,IAAM,MAAM,GAAG,qBAAqB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAEvD,IAAM,SAAS,GAAc;QAC3B,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,KAAK,EAAE,UAAU,CAAC,OAAO;KAC1B,CAAC;IAEF,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;QAC3B,SAAS,CAAC,UAAU,GAAG,EAAE,MAAM,QAAA,EAAE,CAAC;KACnC;IAED,kDAAkD;IAClD,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,KAAK,KAAK,EAAE,EAAE;QAC1D,SAAS,CAAC,KAAK,GAAG,4BAA4B,CAAC;KAChD;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAlBD,0DAkBC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CAAC,SAAa,EAAE,kBAA0B,EAAE,SAAmB;IACjG,IAAM,KAAK,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AAI,IAAI,EAAE,CAAC;IAEvE,mHAAmH;IACnH,IAAI,kBAAkB,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE;QAChH,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAClC;IAED,+HAA+H;IAC/H,IAAI,iBAAiB,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE;QACrD,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACtC;IAED,4EAA4E;IAC5E,OAAO,UAAU;SACd,GAAG,CACF,UAAC,KAAyB,IAAiB,OAAA,CAAC;QAC1C,KAAK,EAAE,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM;QACvD,QAAQ,EAAE,KAAK,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG;QACxC,QAAQ,EAAE,KAAK,CAAC,IAAI,IAAI,GAAG;QAC3B,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI;KACrD,CAAC,EANyC,CAMzC,CACH;SACA,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC;SAC1B,OAAO,EAAE,CAAC;AACf,CAAC;AAjCD,sDAiCC","sourcesContent":["import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .slice(0, STACKTRACE_LIMIT)\n .reverse();\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/sdk.d.ts b/node_modules/@sentry/browser/dist/sdk.d.ts deleted file mode 100644 index d3b6981..0000000 --- a/node_modules/@sentry/browser/dist/sdk.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Integrations as CoreIntegrations } from '@sentry/core'; -import { BrowserOptions } from './backend'; -import { ReportDialogOptions } from './client'; -import { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations'; -export declare const defaultIntegrations: (CoreIntegrations.FunctionToString | CoreIntegrations.InboundFilters | GlobalHandlers | TryCatch | Breadcrumbs | LinkedErrors | UserAgent)[]; -/** - * The Sentry Browser SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible when - * loading the web page. To set context information or send manual events, use - * the provided methods. - * - * @example - * - * ``` - * - * import { init } from '@sentry/browser'; - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * import { configureScope } from '@sentry/browser'; - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * import { addBreadcrumb } from '@sentry/browser'; - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * - * ``` - * - * import * as Sentry from '@sentry/browser'; - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link BrowserOptions} for documentation on configuration options. - */ -export declare function init(options?: BrowserOptions): void; -/** - * Present the user with a report dialog. - * - * @param options Everything is optional, we try to fetch all info need from the global scope. - */ -export declare function showReportDialog(options?: ReportDialogOptions): void; -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -export declare function lastEventId(): string | undefined; -/** - * This function is here to be API compatible with the loader. - * @hidden - */ -export declare function forceLoad(): void; -/** - * This function is here to be API compatible with the loader. - * @hidden - */ -export declare function onLoad(callback: () => void): void; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export declare function flush(timeout?: number): PromiseLike; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export declare function close(timeout?: number): PromiseLike; -/** - * Wrap code within a try/catch block so the SDK is able to capture errors. - * - * @param fn A function to wrap. - * - * @returns The result of wrapped function call. - */ -export declare function wrap(fn: Function): any; -//# sourceMappingURL=sdk.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/sdk.d.ts.map b/node_modules/@sentry/browser/dist/sdk.d.ts.map deleted file mode 100644 index b09eb2e..0000000 --- a/node_modules/@sentry/browser/dist/sdk.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5F,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhG,eAAO,MAAM,mBAAmB,8IAQ/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,cAAmB,GAAG,IAAI,CAYvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAQxE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAEjD;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAM5D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAM5D;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,QAAQ,GAAG,GAAG,CAEtC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/sdk.js b/node_modules/@sentry/browser/dist/sdk.js deleted file mode 100644 index 3524467..0000000 --- a/node_modules/@sentry/browser/dist/sdk.js +++ /dev/null @@ -1,168 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var client_1 = require("./client"); -var helpers_1 = require("./helpers"); -var integrations_1 = require("./integrations"); -exports.defaultIntegrations = [ - new core_1.Integrations.InboundFilters(), - new core_1.Integrations.FunctionToString(), - new integrations_1.TryCatch(), - new integrations_1.Breadcrumbs(), - new integrations_1.GlobalHandlers(), - new integrations_1.LinkedErrors(), - new integrations_1.UserAgent(), -]; -/** - * The Sentry Browser SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible when - * loading the web page. To set context information or send manual events, use - * the provided methods. - * - * @example - * - * ``` - * - * import { init } from '@sentry/browser'; - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * import { configureScope } from '@sentry/browser'; - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * import { addBreadcrumb } from '@sentry/browser'; - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * - * ``` - * - * import * as Sentry from '@sentry/browser'; - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link BrowserOptions} for documentation on configuration options. - */ -function init(options) { - if (options === void 0) { options = {}; } - if (options.defaultIntegrations === undefined) { - options.defaultIntegrations = exports.defaultIntegrations; - } - if (options.release === undefined) { - var window_1 = utils_1.getGlobalObject(); - // This supports the variable that sentry-webpack-plugin injects - if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) { - options.release = window_1.SENTRY_RELEASE.id; - } - } - core_1.initAndBind(client_1.BrowserClient, options); -} -exports.init = init; -/** - * Present the user with a report dialog. - * - * @param options Everything is optional, we try to fetch all info need from the global scope. - */ -function showReportDialog(options) { - if (options === void 0) { options = {}; } - if (!options.eventId) { - options.eventId = core_1.getCurrentHub().lastEventId(); - } - var client = core_1.getCurrentHub().getClient(); - if (client) { - client.showReportDialog(options); - } -} -exports.showReportDialog = showReportDialog; -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -function lastEventId() { - return core_1.getCurrentHub().lastEventId(); -} -exports.lastEventId = lastEventId; -/** - * This function is here to be API compatible with the loader. - * @hidden - */ -function forceLoad() { - // Noop -} -exports.forceLoad = forceLoad; -/** - * This function is here to be API compatible with the loader. - * @hidden - */ -function onLoad(callback) { - callback(); -} -exports.onLoad = onLoad; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -function flush(timeout) { - var client = core_1.getCurrentHub().getClient(); - if (client) { - return client.flush(timeout); - } - return utils_1.SyncPromise.reject(false); -} -exports.flush = flush; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -function close(timeout) { - var client = core_1.getCurrentHub().getClient(); - if (client) { - return client.close(timeout); - } - return utils_1.SyncPromise.reject(false); -} -exports.close = close; -/** - * Wrap code within a try/catch block so the SDK is able to capture errors. - * - * @param fn A function to wrap. - * - * @returns The result of wrapped function call. - */ -function wrap(fn) { - return helpers_1.wrap(fn)(); // tslint:disable-line:no-unsafe-any -} -exports.wrap = wrap; -//# sourceMappingURL=sdk.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/sdk.js.map b/node_modules/@sentry/browser/dist/sdk.js.map deleted file mode 100644 index 96a7e7b..0000000 --- a/node_modules/@sentry/browser/dist/sdk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";AAAA,qCAA4F;AAC5F,uCAA6D;AAG7D,mCAA8D;AAC9D,qCAAiD;AACjD,+CAAgG;AAEnF,QAAA,mBAAmB,GAAG;IACjC,IAAI,mBAAgB,CAAC,cAAc,EAAE;IACrC,IAAI,mBAAgB,CAAC,gBAAgB,EAAE;IACvC,IAAI,uBAAQ,EAAE;IACd,IAAI,0BAAW,EAAE;IACjB,IAAI,6BAAc,EAAE;IACpB,IAAI,2BAAY,EAAE;IAClB,IAAI,wBAAS,EAAE;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,SAAgB,IAAI,CAAC,OAA4B;IAA5B,wBAAA,EAAA,YAA4B;IAC/C,IAAI,OAAO,CAAC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ACD,OAAO,mBAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAND,sBAMC;AAED;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,OAAgB;IACpC,IAAM,MAAM,GAAG,oBAAa,EAAE,CAAC,SAAS,EAAiB,CAAC;IAC1D,IAAI,MAAM,EAAE;QACV,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAC9B;IACD,OAAO,mBAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAND,sBAMC;AAED;;;;;;GAMG;AACH,SAAgB,IAAI,CAAC,EAAY;IAC/B,OAAO,cAAY,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,oCAAoC;AACjE,CAAC;AAFD,oBAEC","sourcesContent":["import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient, ReportDialogOptions } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n initAndBind(BrowserClient, options);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n const client = getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\nexport function wrap(fn: Function): any {\n return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/tracekit.d.ts b/node_modules/@sentry/browser/dist/tracekit.d.ts deleted file mode 100644 index c11136f..0000000 --- a/node_modules/@sentry/browser/dist/tracekit.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This was originally forked from https://github.com/occ/TraceKit, but has since been - * largely modified and is now maintained as part of Sentry JS SDK. - */ -/** - * An object representing a single stack frame. - * {Object} StackFrame - * {string} url The JavaScript or HTML file URL. - * {string} func The function name, or empty for anonymous functions (if guessing did not work). - * {string[]?} args The arguments passed to the function, if known. - * {number=} line The line number, if known. - * {number=} column The column number, if known. - * {string[]} context An array of source code lines; the middle element corresponds to the correct line#. - */ -export interface StackFrame { - url: string; - func: string; - args: string[]; - line: number | null; - column: number | null; -} -/** - * An object representing a JavaScript stack trace. - * {Object} StackTrace - * {string} name The name of the thrown exception. - * {string} message The exception error message. - * {TraceKit.StackFrame[]} stack An array of stack frames. - */ -export interface StackTrace { - name: string; - message: string; - mechanism?: string; - stack: StackFrame[]; - failed?: boolean; -} -/** JSDoc */ -export declare function computeStackTrace(ex: any): StackTrace; -//# sourceMappingURL=tracekit.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/tracekit.d.ts.map b/node_modules/@sentry/browser/dist/tracekit.d.ts.map deleted file mode 100644 index def5358..0000000 --- a/node_modules/@sentry/browser/dist/tracekit.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracekit.d.ts","sourceRoot":"","sources":["../src/tracekit.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAeD,YAAY;AACZ,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,GAAG,GAAG,UAAU,CAiCrD"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/tracekit.js b/node_modules/@sentry/browser/dist/tracekit.js deleted file mode 100644 index 958faa4..0000000 --- a/node_modules/@sentry/browser/dist/tracekit.js +++ /dev/null @@ -1,207 +0,0 @@ -// tslint:disable:object-literal-sort-keys -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -// global reference to slice -var UNKNOWN_FUNCTION = '?'; -// Chromium based browsers: Chrome, Brave, new Opera, new Edge -var chrome = /^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; -// gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it -// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js -// We need this specific case for now because we want no other regex to match. -var gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i; -var winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; -var geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; -var chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/; -/** JSDoc */ -function computeStackTrace(ex) { - // tslint:disable:no-unsafe-any - var stack = null; - var popSize = ex && ex.framesToPop; - try { - // This must be tried first because Opera 10 *destroys* - // its stacktrace property if you try to access the stack - // property first!! - stack = computeStackTraceFromStacktraceProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } - catch (e) { - // no-empty - } - try { - stack = computeStackTraceFromStackProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } - catch (e) { - // no-empty - } - return { - message: extractMessage(ex), - name: ex && ex.name, - stack: [], - failed: true, - }; -} -exports.computeStackTrace = computeStackTrace; -/** JSDoc */ -// tslint:disable-next-line:cyclomatic-complexity -function computeStackTraceFromStackProp(ex) { - // tslint:disable:no-conditional-assignment - if (!ex || !ex.stack) { - return null; - } - var stack = []; - var lines = ex.stack.split('\n'); - var isEval; - var submatch; - var parts; - var element; - for (var i = 0; i < lines.length; ++i) { - if ((parts = chrome.exec(lines[i]))) { - var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line - isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line - if (isEval && (submatch = chromeEval.exec(parts[2]))) { - // throw out eval line/column and use top-most line/column number - parts[2] = submatch[1]; // url - parts[3] = submatch[2]; // line - parts[4] = submatch[3]; // column - } - element = { - // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at ` - // prefix here seems like the quickest solution for now. - url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - args: isNative ? [parts[2]] : [], - line: parts[3] ? +parts[3] : null, - column: parts[4] ? +parts[4] : null, - }; - } - else if ((parts = winjs.exec(lines[i]))) { - element = { - url: parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - args: [], - line: +parts[3], - column: parts[4] ? +parts[4] : null, - }; - } - else if ((parts = gecko.exec(lines[i]))) { - isEval = parts[3] && parts[3].indexOf(' > eval') > -1; - if (isEval && (submatch = geckoEval.exec(parts[3]))) { - // throw out eval line/column and use top-most line number - parts[1] = parts[1] || "eval"; - parts[3] = submatch[1]; - parts[4] = submatch[2]; - parts[5] = ''; // no column when eval - } - else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) { - // FireFox uses this awesome columnNumber property for its top frame - // Also note, Firefox's column number is 0-based and everything else expects 1-based, - // so adding 1 - // NOTE: this hack doesn't work if top-most frame is eval - stack[0].column = ex.columnNumber + 1; - } - element = { - url: parts[3], - func: parts[1] || UNKNOWN_FUNCTION, - args: parts[2] ? parts[2].split(',') : [], - line: parts[4] ? +parts[4] : null, - column: parts[5] ? +parts[5] : null, - }; - } - else { - continue; - } - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - if (!stack.length) { - return null; - } - return { - message: extractMessage(ex), - name: ex.name, - stack: stack, - }; -} -/** JSDoc */ -function computeStackTraceFromStacktraceProp(ex) { - if (!ex || !ex.stacktrace) { - return null; - } - // Access and store the stacktrace property before doing ANYTHING - // else to it because Opera is not very good at providing it - // reliably in other circumstances. - var stacktrace = ex.stacktrace; - var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; - var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i; - var lines = stacktrace.split('\n'); - var stack = []; - var parts; - for (var line = 0; line < lines.length; line += 2) { - // tslint:disable:no-conditional-assignment - var element = null; - if ((parts = opera10Regex.exec(lines[line]))) { - element = { - url: parts[2], - func: parts[3], - args: [], - line: +parts[1], - column: null, - }; - } - else if ((parts = opera11Regex.exec(lines[line]))) { - element = { - url: parts[6], - func: parts[3] || parts[4], - args: parts[5] ? parts[5].split(',') : [], - line: +parts[1], - column: +parts[2], - }; - } - if (element) { - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - } - if (!stack.length) { - return null; - } - return { - message: extractMessage(ex), - name: ex.name, - stack: stack, - }; -} -/** Remove N number of frames from the stack */ -function popFrames(stacktrace, popSize) { - try { - return tslib_1.__assign({}, stacktrace, { stack: stacktrace.stack.slice(popSize) }); - } - catch (e) { - return stacktrace; - } -} -/** - * There are cases where stacktrace.message is an Event object - * https://github.com/getsentry/sentry-javascript/issues/1949 - * In this specific case we try to extract stacktrace.message.error.message - */ -function extractMessage(ex) { - var message = ex && ex.message; - if (!message) { - return 'No error message'; - } - if (message.error && typeof message.error.message === 'string') { - return message.error.message; - } - return message; -} -//# sourceMappingURL=tracekit.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/tracekit.js.map b/node_modules/@sentry/browser/dist/tracekit.js.map deleted file mode 100644 index e7a8aa5..0000000 --- a/node_modules/@sentry/browser/dist/tracekit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracekit.js","sourceRoot":"","sources":["../src/tracekit.ts"],"names":[],"mappings":"AAAA,0CAA0C;;;AAwC1C,4BAA4B;AAC5B,IAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,8DAA8D;AAC9D,IAAM,MAAM,GAAG,4JAA4J,CAAC;AAC5K,8HAA8H;AAC9H,qGAAqG;AACrG,8EAA8E;AAC9E,IAAM,KAAK,GAAG,yKAAyK,CAAC;AACxL,IAAM,KAAK,GAAG,+GAA+G,CAAC;AAC9H,IAAM,SAAS,GAAG,+CAA+C,CAAC;AAClE,IAAM,UAAU,GAAG,+BAA+B,CAAC;AAEnD,YAAY;AACZ,SAAgB,iBAAiB,CAAC,EAAO;IACvC,+BAA+B;IAE/B,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,IAAM,OAAO,GAAW,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC;IAE7C,IAAI;QACF,uDAAuD;QACvD,yDAAyD;QACz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AAE;gBACjC,OAAO,CAAC,IAAI,GAAG,gBAAgB,CAAC;aACjC;YACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACrB;KACF;IAED,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACjB,OAAO,IAAI,CAAC;KACb;IAED,OAAO;QACL,OAAO,EAAE,cAAc,CAAC,EAAE,CAAC;QAC3B,IAAI,EAAE,EAAE,CAAC,IAAI;QACb,KAAK,OAAA;KACN,CAAC;AACJ,CAAC;AAED,+CAA+C;AAC/C,SAAS,SAAS,CAAC,UAAsB,EAAE,OAAe;IACxD,IAAI;QACF,4BACK,UAAU,IACb,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IACtC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,UAAU,CAAC;KACnB;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAAC,EAAO;IAC7B,IAAM,OAAO,GAAG,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC;IACjC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,kBAAkB,CAAC;KAC3B;IACD,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE;QAC9D,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;KAC9B;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["// tslint:disable:object-literal-sort-keys\n\n/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n args: string[];\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js))(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n/** JSDoc */\nexport function computeStackTrace(ex: any): StackTrace {\n // tslint:disable:no-unsafe-any\n\n let stack = null;\n const popSize: number = ex && ex.framesToPop;\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n // tslint:disable:no-conditional-assignment\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (let i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = (ex.columnNumber as number) + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n // tslint:disable:no-conditional-assignment\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/base.d.ts b/node_modules/@sentry/browser/dist/transports/base.d.ts deleted file mode 100644 index a385d80..0000000 --- a/node_modules/@sentry/browser/dist/transports/base.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Event, Response, Transport, TransportOptions } from '@sentry/types'; -import { PromiseBuffer } from '@sentry/utils'; -/** Base Transport class implementation */ -export declare abstract class BaseTransport implements Transport { - options: TransportOptions; - /** - * @inheritDoc - */ - url: string; - /** A simple buffer holding all requests. */ - protected readonly _buffer: PromiseBuffer; - constructor(options: TransportOptions); - /** - * @inheritDoc - */ - sendEvent(_: Event): PromiseLike; - /** - * @inheritDoc - */ - close(timeout?: number): PromiseLike; -} -//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/base.d.ts.map b/node_modules/@sentry/browser/dist/transports/base.d.ts.map deleted file mode 100644 index f0f71ac..0000000 --- a/node_modules/@sentry/browser/dist/transports/base.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/transports/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAe,MAAM,eAAe,CAAC;AAE3D,0CAA0C;AAC1C,8BAAsB,aAAc,YAAW,SAAS;IAS5B,OAAO,EAAE,gBAAgB;IARnD;;OAEG;IACI,GAAG,EAAE,MAAM,CAAC;IAEnB,4CAA4C;IAC5C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAyB;gBAElD,OAAO,EAAE,gBAAgB;IAInD;;OAEG;IACI,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;IAIjD;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;CAGrD"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/base.js b/node_modules/@sentry/browser/dist/transports/base.js deleted file mode 100644 index cb5940b..0000000 --- a/node_modules/@sentry/browser/dist/transports/base.js +++ /dev/null @@ -1,27 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -/** Base Transport class implementation */ -var BaseTransport = /** @class */ (function () { - function BaseTransport(options) { - this.options = options; - /** A simple buffer holding all requests. */ - this._buffer = new utils_1.PromiseBuffer(30); - this.url = new core_1.API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth(); - } - /** - * @inheritDoc - */ - BaseTransport.prototype.sendEvent = function (_) { - throw new utils_1.SentryError('Transport Class has to implement `sendEvent` method'); - }; - /** - * @inheritDoc - */ - BaseTransport.prototype.close = function (timeout) { - return this._buffer.drain(timeout); - }; - return BaseTransport; -}()); -exports.BaseTransport = BaseTransport; -//# sourceMappingURL=base.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/base.js.map b/node_modules/@sentry/browser/dist/transports/base.js.map deleted file mode 100644 index 87b1a3e..0000000 --- a/node_modules/@sentry/browser/dist/transports/base.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/transports/base.ts"],"names":[],"mappings":";AAAA,qCAAmC;AAEnC,uCAA2D;AAE3D,0CAA0C;AAC1C;IASE,uBAA0B,OAAyB;QAAzB,YAAO,GAAP,OAAO,CAAkB;QAHnD,4CAA4C;QACzB,YAAO,GAA4B,IAAI,qBAAa,CAAC,EAAE,CAAC,CAAC;QAG1E,IAAI,CAAC,GAAG,GAAG,IAAI,UAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,kCAAkC,EAAE,CAAC;IAC5E,CAAC;IAED;;OAEG;IACI,iCAAS,GAAhB,UAAiB,CAAQ;QACvB,MAAM,IAAI,mBAAW,CAAC,qDAAqD,CAAC,CAAC;IAC/E,CAAC;IAED;;OAEG;IACI,6BAAK,GAAZ,UAAa,OAAgB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IACH,oBAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BqB,sCAAa","sourcesContent":["import { API } from '@sentry/core';\nimport { Event, Response, Transport, TransportOptions } from '@sentry/types';\nimport { PromiseBuffer, SentryError } from '@sentry/utils';\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @inheritDoc\n */\n public url: string;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n public constructor(public options: TransportOptions) {\n this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth();\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/fetch.d.ts b/node_modules/@sentry/browser/dist/transports/fetch.d.ts deleted file mode 100644 index e642795..0000000 --- a/node_modules/@sentry/browser/dist/transports/fetch.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Event, Response } from '@sentry/types'; -import { BaseTransport } from './base'; -/** `fetch` based transport */ -export declare class FetchTransport extends BaseTransport { - /** Locks transport after receiving 429 response */ - private _disabledUntil; - /** - * @inheritDoc - */ - sendEvent(event: Event): PromiseLike; -} -//# sourceMappingURL=fetch.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/fetch.d.ts.map b/node_modules/@sentry/browser/dist/transports/fetch.d.ts.map deleted file mode 100644 index 39c9697..0000000 --- a/node_modules/@sentry/browser/dist/transports/fetch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/transports/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAU,MAAM,eAAe,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAIvC,8BAA8B;AAC9B,qBAAa,cAAe,SAAQ,aAAa;IAC/C,mDAAmD;IACnD,OAAO,CAAC,cAAc,CAA8B;IAEpD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;CA+CtD"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/fetch.js b/node_modules/@sentry/browser/dist/transports/fetch.js deleted file mode 100644 index 006f382..0000000 --- a/node_modules/@sentry/browser/dist/transports/fetch.js +++ /dev/null @@ -1,62 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var base_1 = require("./base"); -var global = utils_1.getGlobalObject(); -/** `fetch` based transport */ -var FetchTransport = /** @class */ (function (_super) { - tslib_1.__extends(FetchTransport, _super); - function FetchTransport() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** Locks transport after receiving 429 response */ - _this._disabledUntil = new Date(Date.now()); - return _this; - } - /** - * @inheritDoc - */ - FetchTransport.prototype.sendEvent = function (event) { - var _this = this; - if (new Date(Date.now()) < this._disabledUntil) { - return Promise.reject({ - event: event, - reason: "Transport locked till " + this._disabledUntil + " due to too many requests.", - status: 429, - }); - } - var defaultOptions = { - body: JSON.stringify(event), - method: 'POST', - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default - // https://caniuse.com/#feat=referrer-policy - // It doesn't. And it throw exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - referrerPolicy: (utils_1.supportsReferrerPolicy() ? 'origin' : ''), - }; - if (this.options.headers !== undefined) { - defaultOptions.headers = this.options.headers; - } - return this._buffer.add(new utils_1.SyncPromise(function (resolve, reject) { - global - .fetch(_this.url, defaultOptions) - .then(function (response) { - var status = types_1.Status.fromHttpCode(response.status); - if (status === types_1.Status.Success) { - resolve({ status: status }); - return; - } - if (status === types_1.Status.RateLimit) { - var now = Date.now(); - _this._disabledUntil = new Date(now + utils_1.parseRetryAfterHeader(now, response.headers.get('Retry-After'))); - utils_1.logger.warn("Too many requests, backing off till: " + _this._disabledUntil); - } - reject(response); - }) - .catch(reject); - })); - }; - return FetchTransport; -}(base_1.BaseTransport)); -exports.FetchTransport = FetchTransport; -//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/fetch.js.map b/node_modules/@sentry/browser/dist/transports/fetch.js.map deleted file mode 100644 index 8ad22eb..0000000 --- a/node_modules/@sentry/browser/dist/transports/fetch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/transports/fetch.ts"],"names":[],"mappings":";;AAAA,uCAAwD;AACxD,uCAAoH;AAEpH,+BAAuC;AAEvC,IAAM,MAAM,GAAG,uBAAe,EAAU,CAAC;AAEzC,8BAA8B;AAC9B;IAAoC,0CAAa;IAAjD;QAAA,qEAsDC;QArDC,mDAAmD;QAC3C,oBAAc,GAAS,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;;IAoDtD,CAAC;IAlDC;;OAEG;IACI,kCAAS,GAAhB,UAAiB,KAAY;QAA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AAqB,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;oBACtG,cAAM,CAAC,IAAI,CAAC,0CAAwC,KAAI,CAAC,cAAgB,CAAC,CAAC;iBAC5E;gBAED,MAAM,CAAC,QAAQ,CAAC,CAAC;YACnB,CAAC,CAAC;iBACD,KAAK,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IACH,qBAAC;AAAD,CAAC,AAtDD,CAAoC,oBAAa,GAsDhD;AAtDY,wCAAc","sourcesContent":["import { Event, Response, Status } from '@sentry/types';\nimport { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\nconst global = getGlobalObject();\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n const defaultOptions: RequestInit = {\n body: JSON.stringify(event),\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n\n if (this.options.headers !== undefined) {\n defaultOptions.headers = this.options.headers;\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n global\n .fetch(this.url, defaultOptions)\n .then(response => {\n const status = Status.fromHttpCode(response.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(response);\n })\n .catch(reject);\n }),\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/index.d.ts b/node_modules/@sentry/browser/dist/transports/index.d.ts deleted file mode 100644 index 800ca5c..0000000 --- a/node_modules/@sentry/browser/dist/transports/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { BaseTransport } from './base'; -export { FetchTransport } from './fetch'; -export { XHRTransport } from './xhr'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/index.d.ts.map b/node_modules/@sentry/browser/dist/transports/index.d.ts.map deleted file mode 100644 index 92bc49d..0000000 --- a/node_modules/@sentry/browser/dist/transports/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/index.js b/node_modules/@sentry/browser/dist/transports/index.js deleted file mode 100644 index 45ac57e..0000000 --- a/node_modules/@sentry/browser/dist/transports/index.js +++ /dev/null @@ -1,8 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var base_1 = require("./base"); -exports.BaseTransport = base_1.BaseTransport; -var fetch_1 = require("./fetch"); -exports.FetchTransport = fetch_1.FetchTransport; -var xhr_1 = require("./xhr"); -exports.XHRTransport = xhr_1.XHRTransport; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/index.js.map b/node_modules/@sentry/browser/dist/transports/index.js.map deleted file mode 100644 index d78637a..0000000 --- a/node_modules/@sentry/browser/dist/transports/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transports/index.ts"],"names":[],"mappings":";AAAA,+BAAuC;AAA9B,+BAAA,aAAa,CAAA;AACtB,iCAAyC;AAAhC,iCAAA,cAAc,CAAA;AACvB,6BAAqC;AAA5B,6BAAA,YAAY,CAAA","sourcesContent":["export { BaseTransport } from './base';\nexport { FetchTransport } from './fetch';\nexport { XHRTransport } from './xhr';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/xhr.d.ts b/node_modules/@sentry/browser/dist/transports/xhr.d.ts deleted file mode 100644 index 5844832..0000000 --- a/node_modules/@sentry/browser/dist/transports/xhr.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Event, Response } from '@sentry/types'; -import { BaseTransport } from './base'; -/** `XHR` based transport */ -export declare class XHRTransport extends BaseTransport { - /** Locks transport after receiving 429 response */ - private _disabledUntil; - /** - * @inheritDoc - */ - sendEvent(event: Event): PromiseLike; -} -//# sourceMappingURL=xhr.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/xhr.d.ts.map b/node_modules/@sentry/browser/dist/transports/xhr.d.ts.map deleted file mode 100644 index 649e015..0000000 --- a/node_modules/@sentry/browser/dist/transports/xhr.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../src/transports/xhr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAU,MAAM,eAAe,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,4BAA4B;AAC5B,qBAAa,YAAa,SAAQ,aAAa;IAC7C,mDAAmD;IACnD,OAAO,CAAC,cAAc,CAA8B;IAEpD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;CA4CtD"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/xhr.js b/node_modules/@sentry/browser/dist/transports/xhr.js deleted file mode 100644 index d01d34a..0000000 --- a/node_modules/@sentry/browser/dist/transports/xhr.js +++ /dev/null @@ -1,57 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var base_1 = require("./base"); -/** `XHR` based transport */ -var XHRTransport = /** @class */ (function (_super) { - tslib_1.__extends(XHRTransport, _super); - function XHRTransport() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** Locks transport after receiving 429 response */ - _this._disabledUntil = new Date(Date.now()); - return _this; - } - /** - * @inheritDoc - */ - XHRTransport.prototype.sendEvent = function (event) { - var _this = this; - if (new Date(Date.now()) < this._disabledUntil) { - return Promise.reject({ - event: event, - reason: "Transport locked till " + this._disabledUntil + " due to too many requests.", - status: 429, - }); - } - return this._buffer.add(new utils_1.SyncPromise(function (resolve, reject) { - var request = new XMLHttpRequest(); - request.onreadystatechange = function () { - if (request.readyState !== 4) { - return; - } - var status = types_1.Status.fromHttpCode(request.status); - if (status === types_1.Status.Success) { - resolve({ status: status }); - return; - } - if (status === types_1.Status.RateLimit) { - var now = Date.now(); - _this._disabledUntil = new Date(now + utils_1.parseRetryAfterHeader(now, request.getResponseHeader('Retry-After'))); - utils_1.logger.warn("Too many requests, backing off till: " + _this._disabledUntil); - } - reject(request); - }; - request.open('POST', _this.url); - for (var header in _this.options.headers) { - if (_this.options.headers.hasOwnProperty(header)) { - request.setRequestHeader(header, _this.options.headers[header]); - } - } - request.send(JSON.stringify(event)); - })); - }; - return XHRTransport; -}(base_1.BaseTransport)); -exports.XHRTransport = XHRTransport; -//# sourceMappingURL=xhr.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/transports/xhr.js.map b/node_modules/@sentry/browser/dist/transports/xhr.js.map deleted file mode 100644 index 024ba7a..0000000 --- a/node_modules/@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AI,CAAC,GAAG,GAAG,6BAAqB,CAAC,GAAG,EAAE,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;oBAC3G,cAAM,CAAC,IAAI,CAAC,0CAAwC,KAAI,CAAC,cAAgB,CAAC,CAAC;iBAC5E;gBAED,MAAM,CAAC,OAAO,CAAC,CAAC;YAClB,CAAC,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,KAAI,CAAC,GAAG,CAAC,CAAC;YAC/B,KAAK,IAAM,MAAM,IAAI,KAAI,CAAC,OAAO,CAAC,OAAO,EAAE;gBACzC,IAAI,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;oBAC/C,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;iBAChE;aACF;YACD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACtC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IACH,mBAAC;AAAD,CAAC,AAnDD,CAAkC,oBAAa,GAmD9C;AAnDY,oCAAY","sourcesContent":["import { Event, Response, Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = () => {\n if (request.readyState !== 4) {\n return;\n }\n\n const status = Status.fromHttpCode(request.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(request);\n };\n\n request.open('POST', this.url);\n for (const header in this.options.headers) {\n if (this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(JSON.stringify(event));\n }),\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/version.d.ts b/node_modules/@sentry/browser/dist/version.d.ts deleted file mode 100644 index 8418cd0..0000000 --- a/node_modules/@sentry/browser/dist/version.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const SDK_NAME = "sentry.javascript.browser"; -export declare const SDK_VERSION = "5.14.1"; -//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/version.d.ts.map b/node_modules/@sentry/browser/dist/version.d.ts.map deleted file mode 100644 index f0db4fd..0000000 --- a/node_modules/@sentry/browser/dist/version.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,8BAA8B,CAAC;AACpD,eAAO,MAAM,WAAW,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/version.js b/node_modules/@sentry/browser/dist/version.js deleted file mode 100644 index 95081fd..0000000 --- a/node_modules/@sentry/browser/dist/version.js +++ /dev/null @@ -1,4 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SDK_NAME = 'sentry.javascript.browser'; -exports.SDK_VERSION = '5.14.1'; -//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/dist/version.js.map b/node_modules/@sentry/browser/dist/version.js.map deleted file mode 100644 index 8244251..0000000 --- a/node_modules/@sentry/browser/dist/version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";AAAa,QAAA,QAAQ,GAAG,2BAA2B,CAAC;AACvC,QAAA,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_NAME = 'sentry.javascript.browser';\nexport const SDK_VERSION = '5.14.1';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/backend.d.ts b/node_modules/@sentry/browser/esm/backend.d.ts deleted file mode 100644 index 575b049..0000000 --- a/node_modules/@sentry/browser/esm/backend.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { BaseBackend } from '@sentry/core'; -import { Event, EventHint, Options, Severity, Transport } from '@sentry/types'; -/** - * Configuration options for the Sentry Browser SDK. - * @see BrowserClient for more information. - */ -export interface BrowserOptions extends Options { - /** - * A pattern for error URLs which should not be sent to Sentry. - * To whitelist certain errors instead, use {@link Options.whitelistUrls}. - * By default, all errors will be sent. - */ - blacklistUrls?: Array; - /** - * A pattern for error URLs which should exclusively be sent to Sentry. - * This is the opposite of {@link Options.blacklistUrls}. - * By default, all errors will be sent. - */ - whitelistUrls?: Array; -} -/** - * The Sentry Browser SDK Backend. - * @hidden - */ -export declare class BrowserBackend extends BaseBackend { - /** - * @inheritDoc - */ - protected _setupTransport(): Transport; - /** - * @inheritDoc - */ - eventFromException(exception: any, hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike; -} -//# sourceMappingURL=backend.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/backend.d.ts.map b/node_modules/@sentry/browser/esm/backend.d.ts.map deleted file mode 100644 index f978828..0000000 --- a/node_modules/@sentry/browser/esm/backend.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM/E;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,OAAO;IAC7C;;;;OAIG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEvC;;;;OAIG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,WAAW,CAAC,cAAc,CAAC;IAC7D;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,SAAS;IAoBtC;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAe/E;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,QAAwB,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;CAWhH"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/backend.js b/node_modules/@sentry/browser/esm/backend.js deleted file mode 100644 index bb7a12b..0000000 --- a/node_modules/@sentry/browser/esm/backend.js +++ /dev/null @@ -1,69 +0,0 @@ -import * as tslib_1 from "tslib"; -import { BaseBackend } from '@sentry/core'; -import { Severity } from '@sentry/types'; -import { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils'; -import { eventFromString, eventFromUnknownInput } from './eventbuilder'; -import { FetchTransport, XHRTransport } from './transports'; -/** - * The Sentry Browser SDK Backend. - * @hidden - */ -var BrowserBackend = /** @class */ (function (_super) { - tslib_1.__extends(BrowserBackend, _super); - function BrowserBackend() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @inheritDoc - */ - BrowserBackend.prototype._setupTransport = function () { - if (!this._options.dsn) { - // We return the noop transport here in case there is no Dsn. - return _super.prototype._setupTransport.call(this); - } - var transportOptions = tslib_1.__assign({}, this._options.transportOptions, { dsn: this._options.dsn }); - if (this._options.transport) { - return new this._options.transport(transportOptions); - } - if (supportsFetch()) { - return new FetchTransport(transportOptions); - } - return new XHRTransport(transportOptions); - }; - /** - * @inheritDoc - */ - BrowserBackend.prototype.eventFromException = function (exception, hint) { - var syntheticException = (hint && hint.syntheticException) || undefined; - var event = eventFromUnknownInput(exception, syntheticException, { - attachStacktrace: this._options.attachStacktrace, - }); - addExceptionMechanism(event, { - handled: true, - type: 'generic', - }); - event.level = Severity.Error; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return SyncPromise.resolve(event); - }; - /** - * @inheritDoc - */ - BrowserBackend.prototype.eventFromMessage = function (message, level, hint) { - if (level === void 0) { level = Severity.Info; } - var syntheticException = (hint && hint.syntheticException) || undefined; - var event = eventFromString(message, syntheticException, { - attachStacktrace: this._options.attachStacktrace, - }); - event.level = level; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return SyncPromise.resolve(event); - }; - return BrowserBackend; -}(BaseBackend)); -export { BrowserBackend }; -//# sourceMappingURL=backend.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/backend.js.map b/node_modules/@sentry/browser/esm/backend.js.map deleted file mode 100644 index b9b6d51..0000000 --- a/node_modules/@sentry/browser/esm/backend.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAA6B,QAAQ,EAAa,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,cAAc,EA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K,CAAC,CAAC;IACpC,CAAC;IACD;;OAEG;IACI,yCAAgB,GAAvB,UAAwB,OAAe,EAAE,KAA+B,EAAE,IAAgB;QAAjD,sBAAA,EAAA,QAAkB,QAAQ,CAAC,IAAI;QACtE,IAAM,kBAAkB,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAC;QAC1E,IAAM,KAAK,GAAG,eAAe,CAAC,OAAO,EAAE,kBAAkB,EAAE;YACzD,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB;SACjD,CAAC,CAAC;QACH,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACpB,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;YACzB,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;SAChC;QACD,OAAO,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IACH,qBAAC;AAAD,CAAC,AAxDD,CAAoC,WAAW,GAwD9C","sourcesContent":["import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils';\n\nimport { eventFromString, eventFromUnknownInput } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To whitelist certain errors instead, use {@link Options.whitelistUrls}.\n * By default, all errors will be sent.\n */\n blacklistUrls?: Array;\n\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.blacklistUrls}.\n * By default, all errors will be sent.\n */\n whitelistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/client.d.ts b/node_modules/@sentry/browser/esm/client.d.ts deleted file mode 100644 index 9589833..0000000 --- a/node_modules/@sentry/browser/esm/client.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { BaseClient, Scope } from '@sentry/core'; -import { DsnLike, Event, EventHint } from '@sentry/types'; -import { BrowserBackend, BrowserOptions } from './backend'; -/** - * All properties the report dialog supports - */ -export interface ReportDialogOptions { - [key: string]: any; - eventId?: string; - dsn?: DsnLike; - user?: { - email?: string; - name?: string; - }; - lang?: string; - title?: string; - subtitle?: string; - subtitle2?: string; - labelName?: string; - labelEmail?: string; - labelComments?: string; - labelClose?: string; - labelSubmit?: string; - errorGeneric?: string; - errorFormEntry?: string; - successMessage?: string; - /** Callback after reportDialog showed up */ - onLoad?(): void; -} -/** - * The Sentry Browser SDK Client. - * - * @see BrowserOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -export declare class BrowserClient extends BaseClient { - /** - * Creates a new Browser SDK instance. - * - * @param options Configuration options for this SDK. - */ - constructor(options?: BrowserOptions); - /** - * @inheritDoc - */ - protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike; - /** - * Show a report dialog to the user to send feedback to a specific event. - * - * @param options Set individual options for the dialog - */ - showReportDialog(options?: ReportDialogOptions): void; -} -//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/client.d.ts.map b/node_modules/@sentry/browser/esm/client.d.ts.map deleted file mode 100644 index 4c0fea4..0000000 --- a/node_modules/@sentry/browser/esm/client.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,MAAM,CAAC,IAAI,IAAI,CAAC;CACjB;AAED;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC;IAC3E;;;;OAIG;gBACgB,OAAO,GAAE,cAAmB;IAI/C;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAkBjG;;;;OAIG;IACI,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI;CAkCjE"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/client.js b/node_modules/@sentry/browser/esm/client.js deleted file mode 100644 index 59218c3..0000000 --- a/node_modules/@sentry/browser/esm/client.js +++ /dev/null @@ -1,72 +0,0 @@ -import * as tslib_1 from "tslib"; -import { API, BaseClient } from '@sentry/core'; -import { getGlobalObject, logger } from '@sentry/utils'; -import { BrowserBackend } from './backend'; -import { SDK_NAME, SDK_VERSION } from './version'; -/** - * The Sentry Browser SDK Client. - * - * @see BrowserOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -var BrowserClient = /** @class */ (function (_super) { - tslib_1.__extends(BrowserClient, _super); - /** - * Creates a new Browser SDK instance. - * - * @param options Configuration options for this SDK. - */ - function BrowserClient(options) { - if (options === void 0) { options = {}; } - return _super.call(this, BrowserBackend, options) || this; - } - /** - * @inheritDoc - */ - BrowserClient.prototype._prepareEvent = function (event, scope, hint) { - event.platform = event.platform || 'javascript'; - event.sdk = tslib_1.__assign({}, event.sdk, { name: SDK_NAME, packages: tslib_1.__spread(((event.sdk && event.sdk.packages) || []), [ - { - name: 'npm:@sentry/browser', - version: SDK_VERSION, - }, - ]), version: SDK_VERSION }); - return _super.prototype._prepareEvent.call(this, event, scope, hint); - }; - /** - * Show a report dialog to the user to send feedback to a specific event. - * - * @param options Set individual options for the dialog - */ - BrowserClient.prototype.showReportDialog = function (options) { - if (options === void 0) { options = {}; } - // doesn't work without a document (React Native) - var document = getGlobalObject().document; - if (!document) { - return; - } - if (!this._isEnabled()) { - logger.error('Trying to call showReportDialog with Sentry Client is disabled'); - return; - } - var dsn = options.dsn || this.getDsn(); - if (!options.eventId) { - logger.error('Missing `eventId` option in showReportDialog call'); - return; - } - if (!dsn) { - logger.error('Missing `Dsn` option in showReportDialog call'); - return; - } - var script = document.createElement('script'); - script.async = true; - script.src = new API(dsn).getReportDialogEndpoint(options); - if (options.onLoad) { - script.onload = options.onLoad; - } - (document.head || document.body).appendChild(script); - }; - return BrowserClient; -}(BaseClient)); -export { BrowserClient }; -//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/client.js.map b/node_modules/@sentry/browser/esm/client.js.map deleted file mode 100644 index de22a5b..0000000 --- a/node_modules/@sentry/browser/esm/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAS,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAE,cAAc,EAAkB,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AA6BlD;;;;;GAKG;AACH;IAAmC,yCAA0C;IAC3E;;;;OAIG;IACH,uBAAmB,OAA4B;QAA5B,wBAAA,EAAA,YAA4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D,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAE3D,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;SAChC;QAED,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IACH,oBAAC;AAAD,CAAC,AAtED,CAAmC,UAAU,GAsE5C","sourcesContent":["import { API, BaseClient, Scope } from '@sentry/core';\nimport { DsnLike, Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n super(BrowserBackend, options);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n event.sdk = {\n ...event.sdk,\n name: SDK_NAME,\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client is disabled');\n return;\n }\n\n const dsn = options.dsn || this.getDsn();\n\n if (!options.eventId) {\n logger.error('Missing `eventId` option in showReportDialog call');\n return;\n }\n\n if (!dsn) {\n logger.error('Missing `Dsn` option in showReportDialog call');\n return;\n }\n\n const script = document.createElement('script');\n script.async = true;\n script.src = new API(dsn).getReportDialogEndpoint(options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n (document.head || document.body).appendChild(script);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/eventbuilder.d.ts b/node_modules/@sentry/browser/esm/eventbuilder.d.ts deleted file mode 100644 index a12a471..0000000 --- a/node_modules/@sentry/browser/esm/eventbuilder.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Event } from '@sentry/types'; -/** JSDoc */ -export declare function eventFromUnknownInput(exception: unknown, syntheticException?: Error, options?: { - rejection?: boolean; - attachStacktrace?: boolean; -}): Event; -/** JSDoc */ -export declare function eventFromString(input: string, syntheticException?: Error, options?: { - attachStacktrace?: boolean; -}): Event; -//# sourceMappingURL=eventbuilder.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/eventbuilder.d.ts.map b/node_modules/@sentry/browser/esm/eventbuilder.d.ts.map deleted file mode 100644 index 9bbd280..0000000 --- a/node_modules/@sentry/browser/esm/eventbuilder.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventbuilder.d.ts","sourceRoot":"","sources":["../src/eventbuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAetC,YAAY;AACZ,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,OAAO,EAClB,kBAAkB,CAAC,EAAE,KAAK,EAC1B,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvB,GACL,KAAK,CAwDP;AAGD,YAAY;AACZ,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,kBAAkB,CAAC,EAAE,KAAK,EAC1B,OAAO,GAAE;IACP,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvB,GACL,KAAK,CAcP"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/eventbuilder.js b/node_modules/@sentry/browser/esm/eventbuilder.js deleted file mode 100644 index 5d73b9c..0000000 --- a/node_modules/@sentry/browser/esm/eventbuilder.js +++ /dev/null @@ -1,75 +0,0 @@ -import { addExceptionMechanism, addExceptionTypeValue, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, } from '@sentry/utils'; -import { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers'; -import { computeStackTrace } from './tracekit'; -/** JSDoc */ -export function eventFromUnknownInput(exception, syntheticException, options) { - if (options === void 0) { options = {}; } - var event; - if (isErrorEvent(exception) && exception.error) { - // If it is an ErrorEvent with `error` property, extract it to get actual Error - var errorEvent = exception; - exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment - event = eventFromStacktrace(computeStackTrace(exception)); - return event; - } - if (isDOMError(exception) || isDOMException(exception)) { - // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers) - // then we just extract the name and message, as they don't provide anything else - // https://developer.mozilla.org/en-US/docs/Web/API/DOMError - // https://developer.mozilla.org/en-US/docs/Web/API/DOMException - var domException = exception; - var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException'); - var message = domException.message ? name_1 + ": " + domException.message : name_1; - event = eventFromString(message, syntheticException, options); - addExceptionTypeValue(event, message); - return event; - } - if (isError(exception)) { - // we have a real Error object, do nothing - event = eventFromStacktrace(computeStackTrace(exception)); - return event; - } - if (isPlainObject(exception) || isEvent(exception)) { - // If it is plain Object or Event, serialize it manually and extract options - // This will allow us to group events based on top-level keys - // which is much better than creating new group when any key/value change - var objectException = exception; - event = eventFromPlainObject(objectException, syntheticException, options.rejection); - addExceptionMechanism(event, { - synthetic: true, - }); - return event; - } - // If none of previous checks were valid, then it means that it's not: - // - an instance of DOMError - // - an instance of DOMException - // - an instance of Event - // - an instance of Error - // - a valid ErrorEvent (one with an error property) - // - a plain Object - // - // So bail out and capture it as a simple message: - event = eventFromString(exception, syntheticException, options); - addExceptionTypeValue(event, "" + exception, undefined); - addExceptionMechanism(event, { - synthetic: true, - }); - return event; -} -// this._options.attachStacktrace -/** JSDoc */ -export function eventFromString(input, syntheticException, options) { - if (options === void 0) { options = {}; } - var event = { - message: input, - }; - if (options.attachStacktrace && syntheticException) { - var stacktrace = computeStackTrace(syntheticException); - var frames_1 = prepareFramesForEvent(stacktrace.stack); - event.stacktrace = { - frames: frames_1, - }; - } - return event; -} -//# sourceMappingURL=eventbuilder.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/eventbuilder.js.map b/node_modules/@sentry/browser/esm/eventbuilder.js.map deleted file mode 100644 index 36e0313..0000000 --- a/node_modules/@sentry/browser/esm/eventbuilder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventbuilder.js","sourceRoot":"","sources":["../src/eventbuilder.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,EACV,cAAc,EACd,OAAO,EACP,YAAY,EACZ,OAAO,EACP,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAA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C,EAAE;QAClD,4EAA4E;QAC5E,6DAA6D;QAC7D,yEAAyE;QACzE,IAAM,eAAe,GAAG,SAAe,CAAC;QACxC,KAAK,GAAG,oBAAoB,CAAC,eAAe,EAAE,kBAAkB,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QACrF,qBAAqB,CAAC,KAAK,EAAE;YAC3B,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;KACd;IAED,sEAAsE;IACtE,4BAA4B;IAC5B,gCAAgC;IAChC,yBAAyB;IACzB,yBAAyB;IACzB,oDAAoD;IACpD,mBAAmB;IACnB,EAAE;IACF,kDAAkD;IAClD,KAAK,GAAG,eAAe,CAAC,SAAmB,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC1E,qBAAqB,CAAC,KAAK,EAAE,KAAG,SAAW,EAAE,SAAS,CAAC,CAAC;IACxD,qBAAqB,CAAC,KAAK,EAAE;QAC3B,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf,CAAC;AAED,iCAAiC;AACjC,YAAY;AACZ,MAAM,UAAU,eAAe,CAC7B,KAAa,EACb,kBAA0B,EAC1B,OAEM;IAFN,wBAAA,EAAA,YAEM;IAEN,IAAM,KAAK,GAAU;QACnB,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,IAAI,OAAO,CAAC,gBAAgB,IAAI,kBAAkB,EAAE;QAClD,IAAM,UAAU,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;QACzD,IAAM,QAAM,GAAG,qBAAqB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACvD,KAAK,CAAC,UAAU,GAAG;YACjB,MAAM,UAAA;SACP,CAAC;KACH;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { Event } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/** JSDoc */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n rejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n const domException = exception as DOMException;\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const objectException = exception as {};\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n// this._options.attachStacktrace\n/** JSDoc */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/exports.d.ts b/node_modules/@sentry/browser/esm/exports.d.ts deleted file mode 100644 index c91b7e0..0000000 --- a/node_modules/@sentry/browser/esm/exports.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { Breadcrumb, Request, SdkInfo, Event, EventHint, Exception, Response, Severity, StackFrame, Stacktrace, Status, Thread, User, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/core'; -export { BrowserOptions } from './backend'; -export { BrowserClient, ReportDialogOptions } from './client'; -export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk'; -export { SDK_NAME, SDK_VERSION } from './version'; -//# sourceMappingURL=exports.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/exports.d.ts.map b/node_modules/@sentry/browser/esm/exports.d.ts.map deleted file mode 100644 index bd2c274..0000000 --- a/node_modules/@sentry/browser/esm/exports.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/exports.js b/node_modules/@sentry/browser/esm/exports.js deleted file mode 100644 index ca3e3b0..0000000 --- a/node_modules/@sentry/browser/esm/exports.js +++ /dev/null @@ -1,6 +0,0 @@ -export { Severity, Status, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/core'; -export { BrowserClient } from './client'; -export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk'; -export { SDK_NAME, SDK_VERSION } from './version'; -//# sourceMappingURL=exports.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/exports.js.map b/node_modules/@sentry/browser/esm/exports.js.map deleted file mode 100644 index 3c17309..0000000 --- a/node_modules/@sentry/browser/esm/exports.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exports.js","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EAGR,MAAM,GAGP,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAuB,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n EventHint,\n Exception,\n Response,\n Severity,\n StackFrame,\n Stacktrace,\n Status,\n Thread,\n User,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from '@sentry/core';\n\nexport { BrowserOptions } from './backend';\nexport { BrowserClient, ReportDialogOptions } from './client';\nexport { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk';\nexport { SDK_NAME, SDK_VERSION } from './version';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/helpers.d.ts b/node_modules/@sentry/browser/esm/helpers.d.ts deleted file mode 100644 index 55821da..0000000 --- a/node_modules/@sentry/browser/esm/helpers.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Mechanism, WrappedFunction } from '@sentry/types'; -/** - * @hidden - */ -export declare function shouldIgnoreOnError(): boolean; -/** - * @hidden - */ -export declare function ignoreNextOnError(): void; -/** - * Instruments the given function and sends an event to Sentry every time the - * function throws an exception. - * - * @param fn A function to wrap. - * @returns The wrapped function. - * @hidden - */ -export declare function wrap(fn: WrappedFunction, options?: { - mechanism?: Mechanism; -}, before?: WrappedFunction): any; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/helpers.d.ts.map b/node_modules/@sentry/browser/esm/helpers.d.ts.map deleted file mode 100644 index a207203..0000000 --- a/node_modules/@sentry/browser/esm/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,SAAS,EAAS,eAAe,EAAE,MAAM,eAAe,CAAC;AAKxF;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAClB,EAAE,EAAE,eAAe,EACnB,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,SAAS,CAAC;CAClB,EACN,MAAM,CAAC,EAAE,eAAe,GACvB,GAAG,CAyHL"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/helpers.js b/node_modules/@sentry/browser/esm/helpers.js deleted file mode 100644 index 43c6b9d..0000000 --- a/node_modules/@sentry/browser/esm/helpers.js +++ /dev/null @@ -1,135 +0,0 @@ -import * as tslib_1 from "tslib"; -import { captureException, withScope } from '@sentry/core'; -import { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils'; -var ignoreOnError = 0; -/** - * @hidden - */ -export function shouldIgnoreOnError() { - return ignoreOnError > 0; -} -/** - * @hidden - */ -export function ignoreNextOnError() { - // onerror should trigger before setTimeout - ignoreOnError += 1; - setTimeout(function () { - ignoreOnError -= 1; - }); -} -/** - * Instruments the given function and sends an event to Sentry every time the - * function throws an exception. - * - * @param fn A function to wrap. - * @returns The wrapped function. - * @hidden - */ -export function wrap(fn, options, before) { - if (options === void 0) { options = {}; } - // tslint:disable-next-line:strict-type-predicates - if (typeof fn !== 'function') { - return fn; - } - try { - // We don't wanna wrap it twice - if (fn.__sentry__) { - return fn; - } - // If this has already been wrapped in the past, return that wrapped function - if (fn.__sentry_wrapped__) { - return fn.__sentry_wrapped__; - } - } - catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - // Bail on wrapping and return the function as-is (defers to window.onerror). - return fn; - } - var sentryWrapped = function () { - var args = Array.prototype.slice.call(arguments); - // tslint:disable:no-unsafe-any - try { - // tslint:disable-next-line:strict-type-predicates - if (before && typeof before === 'function') { - before.apply(this, arguments); - } - var wrappedArguments = args.map(function (arg) { return wrap(arg, options); }); - if (fn.handleEvent) { - // Attempt to invoke user-land function - // NOTE: If you are a Sentry user, and you are seeing this stack frame, it - // means the sentry.javascript SDK caught an error invoking your application code. This - // is expected behavior and NOT indicative of a bug with sentry.javascript. - return fn.handleEvent.apply(this, wrappedArguments); - } - // Attempt to invoke user-land function - // NOTE: If you are a Sentry user, and you are seeing this stack frame, it - // means the sentry.javascript SDK caught an error invoking your application code. This - // is expected behavior and NOT indicative of a bug with sentry.javascript. - return fn.apply(this, wrappedArguments); - // tslint:enable:no-unsafe-any - } - catch (ex) { - ignoreNextOnError(); - withScope(function (scope) { - scope.addEventProcessor(function (event) { - var processedEvent = tslib_1.__assign({}, event); - if (options.mechanism) { - addExceptionTypeValue(processedEvent, undefined, undefined); - addExceptionMechanism(processedEvent, options.mechanism); - } - processedEvent.extra = tslib_1.__assign({}, processedEvent.extra, { arguments: args }); - return processedEvent; - }); - captureException(ex); - }); - throw ex; - } - }; - // Accessing some objects may throw - // ref: https://github.com/getsentry/sentry-javascript/issues/1168 - try { - for (var property in fn) { - if (Object.prototype.hasOwnProperty.call(fn, property)) { - sentryWrapped[property] = fn[property]; - } - } - } - catch (_oO) { } // tslint:disable-line:no-empty - fn.prototype = fn.prototype || {}; - sentryWrapped.prototype = fn.prototype; - Object.defineProperty(fn, '__sentry_wrapped__', { - enumerable: false, - value: sentryWrapped, - }); - // Signal that this function has been wrapped/filled already - // for both debugging and to prevent it to being wrapped/filled twice - Object.defineProperties(sentryWrapped, { - __sentry__: { - enumerable: false, - value: true, - }, - __sentry_original__: { - enumerable: false, - value: fn, - }, - }); - // Restore original function name (not all browsers allow that) - try { - var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name'); - if (descriptor.configurable) { - Object.defineProperty(sentryWrapped, 'name', { - get: function () { - return fn.name; - }, - }); - } - } - catch (_oO) { - /*no-empty*/ - } - return sentryWrapped; -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/helpers.js.map b/node_modules/@sentry/browser/esm/helpers.js.map deleted file mode 100644 index 653d9d0..0000000 --- a/node_modules/@sentry/browser/esm/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE7E,IAAI,aAAa,GAAW,CAAC,CAAC;AAE9B;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,aAAa,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,2CAA2C;IAC3C,aAAa,IAAI,CAAC,CAAC;IACnB,UAAU,CAAC;QACT,aAAa,IAAI,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,IAAI,CAClB,EAAmB,EACnB,OAEM,EACN,MAAwB;I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AAE;YACnB,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,EAAE;SACV;KACF,CAAC,CAAC;IAEH,+DAA+D;IAC/D,IAAI;QACF,IAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,aAAa,EAAE,MAAM,CAAuB,CAAC;QAChG,IAAI,UAAU,CAAC,YAAY,EAAE;YAC3B,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE;gBAC3C,GAAG,EAAH;oBACE,OAAO,EAAE,CAAC,IAAI,CAAC;gBACjB,CAAC;aACF,CAAC,CAAC;SACJ;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,YAAY;KACb;IAED,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["import { captureException, withScope } from '@sentry/core';\nimport { Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils';\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n): any {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n const sentryWrapped: WrappedFunction = function(this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n // tslint:disable:no-unsafe-any\n try {\n // tslint:disable-next-line:strict-type-predicates\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n // tslint:enable:no-unsafe-any\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n const processedEvent = { ...event };\n\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n\n processedEvent.extra = {\n ...processedEvent.extra,\n arguments: args,\n };\n\n return processedEvent;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // tslint:disable-line:no-empty\n\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n } catch (_oO) {\n /*no-empty*/\n }\n\n return sentryWrapped;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/index.d.ts b/node_modules/@sentry/browser/esm/index.d.ts deleted file mode 100644 index eaf06aa..0000000 --- a/node_modules/@sentry/browser/esm/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from './exports'; -import { Integrations as CoreIntegrations } from '@sentry/core'; -import * as BrowserIntegrations from './integrations'; -import * as Transports from './transports'; -declare const INTEGRATIONS: { - GlobalHandlers: typeof BrowserIntegrations.GlobalHandlers; - TryCatch: typeof BrowserIntegrations.TryCatch; - Breadcrumbs: typeof BrowserIntegrations.Breadcrumbs; - LinkedErrors: typeof BrowserIntegrations.LinkedErrors; - UserAgent: typeof BrowserIntegrations.UserAgent; - FunctionToString: typeof CoreIntegrations.FunctionToString; - InboundFilters: typeof CoreIntegrations.InboundFilters; -}; -export { INTEGRATIONS as Integrations, Transports }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/index.d.ts.map b/node_modules/@sentry/browser/esm/index.d.ts.map deleted file mode 100644 index 6f940d4..0000000 --- a/node_modules/@sentry/browser/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhE,OAAO,KAAK,mBAAmB,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAY3C,QAAA,MAAM,YAAY;;;;;;;;CAIjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/index.js b/node_modules/@sentry/browser/esm/index.js deleted file mode 100644 index 11e89de..0000000 --- a/node_modules/@sentry/browser/esm/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as tslib_1 from "tslib"; -export * from './exports'; -import { Integrations as CoreIntegrations } from '@sentry/core'; -import { getGlobalObject } from '@sentry/utils'; -import * as BrowserIntegrations from './integrations'; -import * as Transports from './transports'; -var windowIntegrations = {}; -// This block is needed to add compatibility with the integrations packages when used with a CDN -// tslint:disable: no-unsafe-any -var _window = getGlobalObject(); -if (_window.Sentry && _window.Sentry.Integrations) { - windowIntegrations = _window.Sentry.Integrations; -} -// tslint:enable: no-unsafe-any -var INTEGRATIONS = tslib_1.__assign({}, windowIntegrations, CoreIntegrations, BrowserIntegrations); -export { INTEGRATIONS as Integrations, Transports }; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/index.js.map b/node_modules/@sentry/browser/esm/index.js.map deleted file mode 100644 index 458346e..0000000 --- a/node_modules/@sentry/browser/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,mBAAmB,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,IAAI,kBAAkB,GAAG,EAAE,CAAC;AAE5B,gGAAgG;AAChG,gCAAgC;AAChC,IAAM,OAAO,GAAG,eAAe,EAAU,CAAC;AAC1C,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE;IACjD,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;CAClD;AACD,+BAA+B;AAE/B,IAAM,YAAY,wBACb,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,CACvB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,CAAC","sourcesContent":["export * from './exports';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\n\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nconst _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...CoreIntegrations,\n ...BrowserIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports };\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/breadcrumbs.d.ts b/node_modules/@sentry/browser/esm/integrations/breadcrumbs.d.ts deleted file mode 100644 index 402d915..0000000 --- a/node_modules/@sentry/browser/esm/integrations/breadcrumbs.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Integration } from '@sentry/types'; -/** - * @hidden - */ -export interface SentryWrappedXMLHttpRequest extends XMLHttpRequest { - [key: string]: any; - __sentry_xhr__?: { - method?: string; - url?: string; - status_code?: number; - }; -} -/** JSDoc */ -interface BreadcrumbIntegrations { - console?: boolean; - dom?: boolean; - fetch?: boolean; - history?: boolean; - sentry?: boolean; - xhr?: boolean; -} -/** - * Default Breadcrumbs instrumentations - * TODO: Deprecated - with v6, this will be renamed to `Instrument` - */ -export declare class Breadcrumbs implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** JSDoc */ - private readonly _options; - /** - * @inheritDoc - */ - constructor(options?: BreadcrumbIntegrations); - /** - * Creates breadcrumbs from console API calls - */ - private _consoleBreadcrumb; - /** - * Creates breadcrumbs from DOM API calls - */ - private _domBreadcrumb; - /** - * Creates breadcrumbs from XHR API calls - */ - private _xhrBreadcrumb; - /** - * Creates breadcrumbs from fetch API calls - */ - private _fetchBreadcrumb; - /** - * Creates breadcrumbs from history API calls - */ - private _historyBreadcrumb; - /** - * Instrument browser built-ins w/ breadcrumb capturing - * - Console API - * - DOM API (click/typing) - * - XMLHttpRequest API - * - Fetch API - * - History API - */ - setupOnce(): void; -} -export {}; -//# sourceMappingURL=breadcrumbs.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/breadcrumbs.d.ts.map b/node_modules/@sentry/browser/esm/integrations/breadcrumbs.d.ts.map deleted file mode 100644 index ed94257..0000000 --- a/node_modules/@sentry/browser/esm/integrations/breadcrumbs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAY,MAAM,eAAe,CAAC;AAatD;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,cAAc;IACjE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED,YAAY;AACZ,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;GAGG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAkB;IAErC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAiB;IAEzC,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAElD;;OAEG;gBACgB,OAAO,CAAC,EAAE,sBAAsB;IAYnD;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA2B1B;;OAEG;IACH,OAAO,CAAC,cAAc;IA4BtB;;OAEG;IACH,OAAO,CAAC,cAAc;IA2BtB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA2DxB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAiC1B;;;;;;;OAOG;IACI,SAAS,IAAI,IAAI;CA0CzB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/breadcrumbs.js b/node_modules/@sentry/browser/esm/integrations/breadcrumbs.js deleted file mode 100644 index 92092bd..0000000 --- a/node_modules/@sentry/browser/esm/integrations/breadcrumbs.js +++ /dev/null @@ -1,271 +0,0 @@ -import * as tslib_1 from "tslib"; -import { API, getCurrentHub } from '@sentry/core'; -import { Severity } from '@sentry/types'; -import { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, logger, parseUrl, safeJoin, } from '@sentry/utils'; -/** - * Default Breadcrumbs instrumentations - * TODO: Deprecated - with v6, this will be renamed to `Instrument` - */ -var Breadcrumbs = /** @class */ (function () { - /** - * @inheritDoc - */ - function Breadcrumbs(options) { - /** - * @inheritDoc - */ - this.name = Breadcrumbs.id; - this._options = tslib_1.__assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options); - } - /** - * Creates breadcrumbs from console API calls - */ - Breadcrumbs.prototype._consoleBreadcrumb = function (handlerData) { - var breadcrumb = { - category: 'console', - data: { - arguments: handlerData.args, - logger: 'console', - }, - level: Severity.fromString(handlerData.level), - message: safeJoin(handlerData.args, ' '), - }; - if (handlerData.level === 'assert') { - if (handlerData.args[0] === false) { - breadcrumb.message = "Assertion failed: " + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'); - breadcrumb.data.arguments = handlerData.args.slice(1); - } - else { - // Don't capture a breadcrumb for passed assertions - return; - } - } - getCurrentHub().addBreadcrumb(breadcrumb, { - input: handlerData.args, - level: handlerData.level, - }); - }; - /** - * Creates breadcrumbs from DOM API calls - */ - Breadcrumbs.prototype._domBreadcrumb = function (handlerData) { - var target; - // Accessing event.target can throw (see getsentry/raven-js#838, #768) - try { - target = handlerData.event.target - ? htmlTreeAsString(handlerData.event.target) - : htmlTreeAsString(handlerData.event); - } - catch (e) { - target = ''; - } - if (target.length === 0) { - return; - } - getCurrentHub().addBreadcrumb({ - category: "ui." + handlerData.name, - message: target, - }, { - event: handlerData.event, - name: handlerData.name, - }); - }; - /** - * Creates breadcrumbs from XHR API calls - */ - Breadcrumbs.prototype._xhrBreadcrumb = function (handlerData) { - if (handlerData.endTimestamp) { - // We only capture complete, non-sentry requests - if (handlerData.xhr.__sentry_own_request__) { - return; - } - getCurrentHub().addBreadcrumb({ - category: 'xhr', - data: handlerData.xhr.__sentry_xhr__, - type: 'http', - }, { - xhr: handlerData.xhr, - }); - return; - } - // We only capture issued sentry requests - if (handlerData.xhr.__sentry_own_request__) { - addSentryBreadcrumb(handlerData.args[0]); - } - }; - /** - * Creates breadcrumbs from fetch API calls - */ - Breadcrumbs.prototype._fetchBreadcrumb = function (handlerData) { - // We only capture complete fetch requests - if (!handlerData.endTimestamp) { - return; - } - var client = getCurrentHub().getClient(); - var dsn = client && client.getDsn(); - if (dsn) { - var filterUrl = new API(dsn).getStoreEndpoint(); - // if Sentry key appears in URL, don't capture it as a request - // but rather as our own 'sentry' type breadcrumb - if (filterUrl && - handlerData.fetchData.url.indexOf(filterUrl) !== -1 && - handlerData.fetchData.method === 'POST' && - handlerData.args[1] && - handlerData.args[1].body) { - addSentryBreadcrumb(handlerData.args[1].body); - return; - } - } - if (handlerData.error) { - getCurrentHub().addBreadcrumb({ - category: 'fetch', - data: tslib_1.__assign({}, handlerData.fetchData, { status_code: handlerData.response.status }), - level: Severity.Error, - type: 'http', - }, { - data: handlerData.error, - input: handlerData.args, - }); - } - else { - getCurrentHub().addBreadcrumb({ - category: 'fetch', - data: tslib_1.__assign({}, handlerData.fetchData, { status_code: handlerData.response.status }), - type: 'http', - }, { - input: handlerData.args, - response: handlerData.response, - }); - } - }; - /** - * Creates breadcrumbs from history API calls - */ - Breadcrumbs.prototype._historyBreadcrumb = function (handlerData) { - var global = getGlobalObject(); - var from = handlerData.from; - var to = handlerData.to; - var parsedLoc = parseUrl(global.location.href); - var parsedFrom = parseUrl(from); - var parsedTo = parseUrl(to); - // Initial pushState doesn't provide `from` information - if (!parsedFrom.path) { - parsedFrom = parsedLoc; - } - // Use only the path component of the URL if the URL matches the current - // document (almost all the time when using pushState) - if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) { - // tslint:disable-next-line:no-parameter-reassignment - to = parsedTo.relative; - } - if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) { - // tslint:disable-next-line:no-parameter-reassignment - from = parsedFrom.relative; - } - getCurrentHub().addBreadcrumb({ - category: 'navigation', - data: { - from: from, - to: to, - }, - }); - }; - /** - * Instrument browser built-ins w/ breadcrumb capturing - * - Console API - * - DOM API (click/typing) - * - XMLHttpRequest API - * - Fetch API - * - History API - */ - Breadcrumbs.prototype.setupOnce = function () { - var _this = this; - if (this._options.console) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._consoleBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'console', - }); - } - if (this._options.dom) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._domBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'dom', - }); - } - if (this._options.xhr) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._xhrBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'xhr', - }); - } - if (this._options.fetch) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._fetchBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'fetch', - }); - } - if (this._options.history) { - addInstrumentationHandler({ - callback: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - _this._historyBreadcrumb.apply(_this, tslib_1.__spread(args)); - }, - type: 'history', - }); - } - }; - /** - * @inheritDoc - */ - Breadcrumbs.id = 'Breadcrumbs'; - return Breadcrumbs; -}()); -export { Breadcrumbs }; -/** - * Create a breadcrumb of `sentry` from the events themselves - */ -function addSentryBreadcrumb(serializedData) { - // There's always something that can go wrong with deserialization... - try { - var event_1 = JSON.parse(serializedData); - getCurrentHub().addBreadcrumb({ - category: "sentry." + (event_1.type === 'transaction' ? 'transaction' : 'event'), - event_id: event_1.event_id, - level: event_1.level || Severity.fromString('error'), - message: getEventDescription(event_1), - }, { - event: event_1, - }); - } - catch (_oO) { - logger.error('Error while adding sentry type breadcrumb'); - } -} -//# sourceMappingURL=breadcrumbs.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/breadcrumbs.js.map b/node_modules/@sentry/browser/esm/integrations/breadcrumbs.js.map deleted file mode 100644 index e7511b7..0000000 --- a/node_modules/@sentry/browser/esm/integrations/breadcrumbs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAA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;yBAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;wBAAP,yBAAO;;oBAChB,KAAI,CAAC,kBAAkB,OAAvB,KAAI,mBAAuB,IAAI,GAAE;gBACnC,CAAC;gBACD,IAAI,EAAE,SAAS;aAChB,CAAC,CAAC;SACJ;IACH,CAAC;IArQD;;OAEG;IACW,cAAE,GAAW,aAAa,CAAC;IAmQ3C,kBAAC;CAAA,AA5QD,IA4QC;SA5QY,WAAW;AA8QxB;;GAEG;AACH,SAAS,mBAAmB,CAAC,cAAsB;IACjD,qEAAqE;IACrE,IAAI;QACF,IAAM,OAAK,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACzC,aAAa,EAAE,CAAC,aAAa,CAC3B;YACE,QAAQ,EAAE,aAAU,OAAK,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAE;YAC5E,QAAQ,EAAE,OAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,OAAK,CAAC,KAAK,IAAI,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;YAClD,OAAO,EAAE,mBAAmB,CAAC,OAAK,CAAC;SACpC,EACD;YACE,KAAK,SAAA;SACN,CACF,CAAC;KACH;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAC3D;AACH,CAAC","sourcesContent":["import { API, getCurrentHub } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n} from '@sentry/utils';\n\nimport { BrowserClient } from '../client';\n\n/**\n * @hidden\n */\nexport interface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** JSDoc */\ninterface BreadcrumbIntegrations {\n console?: boolean;\n dom?: boolean;\n fetch?: boolean;\n history?: boolean;\n sentry?: boolean;\n xhr?: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /** JSDoc */\n private readonly _options: BreadcrumbIntegrations;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: BreadcrumbIntegrations) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Creates breadcrumbs from console API calls\n */\n private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }\n\n /**\n * Creates breadcrumbs from DOM API calls\n */\n private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node)\n : htmlTreeAsString((handlerData.event as unknown) as Node);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n },\n );\n }\n\n /**\n * Creates breadcrumbs from XHR API calls\n */\n private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: handlerData.xhr.__sentry_xhr__,\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n },\n );\n\n return;\n }\n\n // We only capture issued sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n addSentryBreadcrumb(handlerData.args[0]);\n }\n }\n\n /**\n * Creates breadcrumbs from fetch API calls\n */\n private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n const client = getCurrentHub().getClient();\n const dsn = client && client.getDsn();\n\n if (dsn) {\n const filterUrl = new API(dsn).getStoreEndpoint();\n // if Sentry key appears in URL, don't capture it as a request\n // but rather as our own 'sentry' type breadcrumb\n if (\n filterUrl &&\n handlerData.fetchData.url.indexOf(filterUrl) !== -1 &&\n handlerData.fetchData.method === 'POST' &&\n handlerData.args[1] &&\n handlerData.args[1].body\n ) {\n addSentryBreadcrumb(handlerData.args[1].body);\n return;\n }\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }\n\n /**\n * Creates breadcrumbs from history API calls\n */\n private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._consoleBreadcrumb(...args);\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._domBreadcrumb(...args);\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._xhrBreadcrumb(...args);\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._fetchBreadcrumb(...args);\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._historyBreadcrumb(...args);\n },\n type: 'history',\n });\n }\n }\n}\n\n/**\n * Create a breadcrumb of `sentry` from the events themselves\n */\nfunction addSentryBreadcrumb(serializedData: string): void {\n // There's always something that can go wrong with deserialization...\n try {\n const event = JSON.parse(serializedData);\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level || Severity.fromString('error'),\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n } catch (_oO) {\n logger.error('Error while adding sentry type breadcrumb');\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/globalhandlers.d.ts b/node_modules/@sentry/browser/esm/integrations/globalhandlers.d.ts deleted file mode 100644 index 9c377c9..0000000 --- a/node_modules/@sentry/browser/esm/integrations/globalhandlers.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Integration } from '@sentry/types'; -/** JSDoc */ -interface GlobalHandlersIntegrations { - onerror: boolean; - onunhandledrejection: boolean; -} -/** Global handlers */ -export declare class GlobalHandlers implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** JSDoc */ - private readonly _options; - /** JSDoc */ - private _onErrorHandlerInstalled; - /** JSDoc */ - private _onUnhandledRejectionHandlerInstalled; - /** JSDoc */ - constructor(options?: GlobalHandlersIntegrations); - /** - * @inheritDoc - */ - setupOnce(): void; - /** JSDoc */ - private _installGlobalOnErrorHandler; - /** JSDoc */ - private _installGlobalOnUnhandledRejectionHandler; - /** - * This function creates a stack from an old, error-less onerror handler. - */ - private _eventFromIncompleteOnError; - /** - * This function creates an Event from an TraceKitStackTrace that has part of it missing. - */ - private _eventFromIncompleteRejection; - /** JSDoc */ - private _enhanceEventWithInitialFrame; -} -export {}; -//# sourceMappingURL=globalhandlers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/globalhandlers.d.ts.map b/node_modules/@sentry/browser/esm/integrations/globalhandlers.d.ts.map deleted file mode 100644 index b9f3903..0000000 --- a/node_modules/@sentry/browser/esm/integrations/globalhandlers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalhandlers.d.ts","sourceRoot":"","sources":["../../src/integrations/globalhandlers.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAY,MAAM,eAAe,CAAC;AAc7D,YAAY;AACZ,UAAU,0BAA0B;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,sBAAsB;AACtB,qBAAa,cAAe,YAAW,WAAW;IAChD;;OAEG;IACI,IAAI,EAAE,MAAM,CAAqB;IAExC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAoB;IAE5C,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IAEtD,YAAY;IACZ,OAAO,CAAC,wBAAwB,CAAkB;IAElD,YAAY;IACZ,OAAO,CAAC,qCAAqC,CAAkB;IAE/D,YAAY;gBACO,OAAO,CAAC,EAAE,0BAA0B;IAOvD;;OAEG;IACI,SAAS,IAAI,IAAI;IAcxB,YAAY;IACZ,OAAO,CAAC,4BAA4B;IA4CpC,YAAY;IACZ,OAAO,CAAC,yCAAyC;IA+DjD;;OAEG;IACH,OAAO,CAAC,2BAA2B;IA6BnC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAarC,YAAY;IACZ,OAAO,CAAC,6BAA6B;CAuBtC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/globalhandlers.js b/node_modules/@sentry/browser/esm/integrations/globalhandlers.js deleted file mode 100644 index 2cdc0c5..0000000 --- a/node_modules/@sentry/browser/esm/integrations/globalhandlers.js +++ /dev/null @@ -1,194 +0,0 @@ -import * as tslib_1 from "tslib"; -import { getCurrentHub } from '@sentry/core'; -import { Severity } from '@sentry/types'; -import { addExceptionMechanism, addInstrumentationHandler, getLocationHref, isErrorEvent, isPrimitive, isString, logger, } from '@sentry/utils'; -import { eventFromUnknownInput } from '../eventbuilder'; -import { shouldIgnoreOnError } from '../helpers'; -/** Global handlers */ -var GlobalHandlers = /** @class */ (function () { - /** JSDoc */ - function GlobalHandlers(options) { - /** - * @inheritDoc - */ - this.name = GlobalHandlers.id; - /** JSDoc */ - this._onErrorHandlerInstalled = false; - /** JSDoc */ - this._onUnhandledRejectionHandlerInstalled = false; - this._options = tslib_1.__assign({ onerror: true, onunhandledrejection: true }, options); - } - /** - * @inheritDoc - */ - GlobalHandlers.prototype.setupOnce = function () { - Error.stackTraceLimit = 50; - if (this._options.onerror) { - logger.log('Global Handler attached: onerror'); - this._installGlobalOnErrorHandler(); - } - if (this._options.onunhandledrejection) { - logger.log('Global Handler attached: onunhandledrejection'); - this._installGlobalOnUnhandledRejectionHandler(); - } - }; - /** JSDoc */ - GlobalHandlers.prototype._installGlobalOnErrorHandler = function () { - var _this = this; - if (this._onErrorHandlerInstalled) { - return; - } - addInstrumentationHandler({ - callback: function (data) { - var error = data.error; - var currentHub = getCurrentHub(); - var hasIntegration = currentHub.getIntegration(GlobalHandlers); - var isFailedOwnDelivery = error && error.__sentry_own_request__ === true; - if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) { - return; - } - var client = currentHub.getClient(); - var event = isPrimitive(error) - ? _this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column) - : _this._enhanceEventWithInitialFrame(eventFromUnknownInput(error, undefined, { - attachStacktrace: client && client.getOptions().attachStacktrace, - rejection: false, - }), data.url, data.line, data.column); - addExceptionMechanism(event, { - handled: false, - type: 'onerror', - }); - currentHub.captureEvent(event, { - originalException: error, - }); - }, - type: 'error', - }); - this._onErrorHandlerInstalled = true; - }; - /** JSDoc */ - GlobalHandlers.prototype._installGlobalOnUnhandledRejectionHandler = function () { - var _this = this; - if (this._onUnhandledRejectionHandlerInstalled) { - return; - } - addInstrumentationHandler({ - callback: function (e) { - var error = e; - // dig the object of the rejection out of known event types - try { - // PromiseRejectionEvents store the object of the rejection under 'reason' - // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent - if ('reason' in e) { - error = e.reason; - } - // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents - // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into - // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec - // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and - // https://github.com/getsentry/sentry-javascript/issues/2380 - else if ('detail' in e && 'reason' in e.detail) { - error = e.detail.reason; - } - } - catch (_oO) { - // no-empty - } - var currentHub = getCurrentHub(); - var hasIntegration = currentHub.getIntegration(GlobalHandlers); - var isFailedOwnDelivery = error && error.__sentry_own_request__ === true; - if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) { - return true; - } - var client = currentHub.getClient(); - var event = isPrimitive(error) - ? _this._eventFromIncompleteRejection(error) - : eventFromUnknownInput(error, undefined, { - attachStacktrace: client && client.getOptions().attachStacktrace, - rejection: true, - }); - event.level = Severity.Error; - addExceptionMechanism(event, { - handled: false, - type: 'onunhandledrejection', - }); - currentHub.captureEvent(event, { - originalException: error, - }); - return; - }, - type: 'unhandledrejection', - }); - this._onUnhandledRejectionHandlerInstalled = true; - }; - /** - * This function creates a stack from an old, error-less onerror handler. - */ - GlobalHandlers.prototype._eventFromIncompleteOnError = function (msg, url, line, column) { - var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; - // If 'message' is ErrorEvent, get real message from inside - var message = isErrorEvent(msg) ? msg.message : msg; - var name; - if (isString(message)) { - var groups = message.match(ERROR_TYPES_RE); - if (groups) { - name = groups[1]; - message = groups[2]; - } - } - var event = { - exception: { - values: [ - { - type: name || 'Error', - value: message, - }, - ], - }, - }; - return this._enhanceEventWithInitialFrame(event, url, line, column); - }; - /** - * This function creates an Event from an TraceKitStackTrace that has part of it missing. - */ - GlobalHandlers.prototype._eventFromIncompleteRejection = function (error) { - return { - exception: { - values: [ - { - type: 'UnhandledRejection', - value: "Non-Error promise rejection captured with value: " + error, - }, - ], - }, - }; - }; - /** JSDoc */ - GlobalHandlers.prototype._enhanceEventWithInitialFrame = function (event, url, line, column) { - event.exception = event.exception || {}; - event.exception.values = event.exception.values || []; - event.exception.values[0] = event.exception.values[0] || {}; - event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {}; - event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || []; - var colno = isNaN(parseInt(column, 10)) ? undefined : column; - var lineno = isNaN(parseInt(line, 10)) ? undefined : line; - var filename = isString(url) && url.length > 0 ? url : getLocationHref(); - if (event.exception.values[0].stacktrace.frames.length === 0) { - event.exception.values[0].stacktrace.frames.push({ - colno: colno, - filename: filename, - function: '?', - in_app: true, - lineno: lineno, - }); - } - return event; - }; - /** - * @inheritDoc - */ - GlobalHandlers.id = 'GlobalHandlers'; - return GlobalHandlers; -}()); -export { GlobalHandlers }; -//# sourceMappingURL=globalhandlers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/globalhandlers.js.map b/node_modules/@sentry/browser/esm/integrations/globalhandlers.js.map deleted file mode 100644 index 4313d7c..0000000 --- a/node_modules/@sentry/browser/esm/integrations/globalhandlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalhandlers.js","sourceRoot":"","sources":["../../src/integrations/globalhandlers.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAsB,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAQjD,sBAAsB;AACtB;IAoBE,YAAY;IACZ,wBAAmB,OAAoC;QApBvD;;WAEG;QACI,SAAI,GAAW,cAAc,CAAC,EAAE,CAAC;QAUxC,YAAY;QACJ,6BAAwB,GAAY,KAAK,CAAC;QAElD,YAAY;QACJ,0CAAqC,GAAY,KAAK,CAAC;QAI7D,IAAI,CAAC,QAAQ,sBACX,OAAO,EAAE,IAAI,EACb,oBAAoB,EAAE,IAAI,IACvB,OAAO,CACX,CAAC;IACJ,CAAC;IACD;;OAEG;IACI,kCAAS,GAAhB;QACE,KAAK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QAEhG,IAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;QAC/D,IAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;QAC5D,IAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;QAE3E,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5D,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;gBAC/C,KAAK,OAAA;gBACL,QAAQ,UAAA;gBACR,QAAQ,EAAE,GAAG;gBACb,MAAM,EAAE,IAAI;gBACZ,MAAM,QAAA;aACP,CAAC,CAAC;SACJ;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IA3ND;;OAEG;IACW,iBAAE,GAAW,gBAAgB,CAAC;IAyN9C,qBAAC;CAAA,AAlOD,IAkOC;SAlOY,cAAc","sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n onerror: boolean;\n onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /** JSDoc */\n private _onErrorHandlerInstalled: boolean = false;\n\n /** JSDoc */\n private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n }\n\n /** JSDoc */\n private _installGlobalOnErrorHandler(): void {\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const error = data.error;\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : this._enhanceEventWithInitialFrame(\n eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }),\n data.url,\n data.line,\n data.column,\n );\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n\n this._onErrorHandlerInstalled = true;\n }\n\n /** JSDoc */\n private _installGlobalOnUnhandledRejectionHandler(): void {\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n callback: (e: any) => {\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromIncompleteRejection(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n\n event.level = Severity.Error;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n\n return;\n },\n type: 'unhandledrejection',\n });\n\n this._onUnhandledRejectionHandlerInstalled = true;\n }\n\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name;\n\n if (isString(message)) {\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n }\n\n /**\n * This function creates an Event from an TraceKitStackTrace that has part of it missing.\n */\n private _eventFromIncompleteRejection(error: any): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n value: `Non-Error promise rejection captured with value: ${error}`,\n },\n ],\n },\n };\n }\n\n /** JSDoc */\n private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/index.d.ts b/node_modules/@sentry/browser/esm/integrations/index.d.ts deleted file mode 100644 index d3ee58e..0000000 --- a/node_modules/@sentry/browser/esm/integrations/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { GlobalHandlers } from './globalhandlers'; -export { TryCatch } from './trycatch'; -export { Breadcrumbs } from './breadcrumbs'; -export { LinkedErrors } from './linkederrors'; -export { UserAgent } from './useragent'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/index.d.ts.map b/node_modules/@sentry/browser/esm/integrations/index.d.ts.map deleted file mode 100644 index 7d46044..0000000 --- a/node_modules/@sentry/browser/esm/integrations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/index.js b/node_modules/@sentry/browser/esm/integrations/index.js deleted file mode 100644 index bfa5b0a..0000000 --- a/node_modules/@sentry/browser/esm/integrations/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export { GlobalHandlers } from './globalhandlers'; -export { TryCatch } from './trycatch'; -export { Breadcrumbs } from './breadcrumbs'; -export { LinkedErrors } from './linkederrors'; -export { UserAgent } from './useragent'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/index.js.map b/node_modules/@sentry/browser/esm/integrations/index.js.map deleted file mode 100644 index f453e76..0000000 --- a/node_modules/@sentry/browser/esm/integrations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { GlobalHandlers } from './globalhandlers';\nexport { TryCatch } from './trycatch';\nexport { Breadcrumbs } from './breadcrumbs';\nexport { LinkedErrors } from './linkederrors';\nexport { UserAgent } from './useragent';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/linkederrors.d.ts b/node_modules/@sentry/browser/esm/integrations/linkederrors.d.ts deleted file mode 100644 index fe71047..0000000 --- a/node_modules/@sentry/browser/esm/integrations/linkederrors.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Adds SDK info to an event. */ -export declare class LinkedErrors implements Integration { - /** - * @inheritDoc - */ - readonly name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - private readonly _key; - /** - * @inheritDoc - */ - private readonly _limit; - /** - * @inheritDoc - */ - constructor(options?: { - key?: string; - limit?: number; - }); - /** - * @inheritDoc - */ - setupOnce(): void; - /** - * @inheritDoc - */ - private _handler; - /** - * @inheritDoc - */ - private _walkErrorTree; -} -//# sourceMappingURL=linkederrors.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/linkederrors.d.ts.map b/node_modules/@sentry/browser/esm/integrations/linkederrors.d.ts.map deleted file mode 100644 index 0a558b2..0000000 --- a/node_modules/@sentry/browser/esm/integrations/linkederrors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linkederrors.d.ts","sourceRoot":"","sources":["../../src/integrations/linkederrors.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,WAAW,EAAE,MAAM,eAAe,CAAC;AASxF,iCAAiC;AACjC,qBAAa,YAAa,YAAW,WAAW;IAC9C;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAmB;IAE/C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAkB;IAE1C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAE9B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;OAEG;gBACgB,OAAO,GAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO;IAKjE;;OAEG;IACI,SAAS,IAAI,IAAI;IAUxB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAShB;;OAEG;IACH,OAAO,CAAC,cAAc;CAQvB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/linkederrors.js b/node_modules/@sentry/browser/esm/integrations/linkederrors.js deleted file mode 100644 index d6b899f..0000000 --- a/node_modules/@sentry/browser/esm/integrations/linkederrors.js +++ /dev/null @@ -1,64 +0,0 @@ -import * as tslib_1 from "tslib"; -import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core'; -import { isInstanceOf } from '@sentry/utils'; -import { exceptionFromStacktrace } from '../parsers'; -import { computeStackTrace } from '../tracekit'; -var DEFAULT_KEY = 'cause'; -var DEFAULT_LIMIT = 5; -/** Adds SDK info to an event. */ -var LinkedErrors = /** @class */ (function () { - /** - * @inheritDoc - */ - function LinkedErrors(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = LinkedErrors.id; - this._key = options.key || DEFAULT_KEY; - this._limit = options.limit || DEFAULT_LIMIT; - } - /** - * @inheritDoc - */ - LinkedErrors.prototype.setupOnce = function () { - addGlobalEventProcessor(function (event, hint) { - var self = getCurrentHub().getIntegration(LinkedErrors); - if (self) { - return self._handler(event, hint); - } - return event; - }); - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype._handler = function (event, hint) { - if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) { - return event; - } - var linkedErrors = this._walkErrorTree(hint.originalException, this._key); - event.exception.values = tslib_1.__spread(linkedErrors, event.exception.values); - return event; - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype._walkErrorTree = function (error, key, stack) { - if (stack === void 0) { stack = []; } - if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) { - return stack; - } - var stacktrace = computeStackTrace(error[key]); - var exception = exceptionFromStacktrace(stacktrace); - return this._walkErrorTree(error[key], key, tslib_1.__spread([exception], stack)); - }; - /** - * @inheritDoc - */ - LinkedErrors.id = 'LinkedErrors'; - return LinkedErrors; -}()); -export { LinkedErrors }; -//# sourceMappingURL=linkederrors.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/linkederrors.js.map b/node_modules/@sentry/browser/esm/integrations/linkederrors.js.map deleted file mode 100644 index 723cab6..0000000 --- a/node_modules/@sentry/browser/esm/integrations/linkederrors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linkederrors.js","sourceRoot":"","sources":["../../src/integrations/linkederrors.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,IAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,IAAM,aAAa,GAAG,CAAC,CAAC;AAExB,iCAAiC;AACjC;IAqBE;;OAEG;IACH,sBAAmB,OAA8C;QAA9C,wBAAA,EAAA,YAA8C;QAvBjE;;WAEG;QACa,SAAI,GAAW,YAAY,CAAC,EAAE,CAAC;QAqB7C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,IAAI,WAAW,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAAC;IAC/C,CAAC;IAED;;OAEG;IACI,gCAAS,GAAhB;QACE,uBAAuB,CAAC,UAAC,KAAY,EAAE,IAAgB;YACrD,IAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;YAC1D,IAAI,IAAI,EAAE;gBACR,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;aACnC;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,+BAAQ,GAAhB,UAAiB,KAAY,EAAE,IAAgB;QAC7C,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,EAAE;YACxG,OAAO,KAAK,CAAC;SACd;QACD,IAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAkC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7F,KAAK,CAAC,SAAS,CAAC,MAAM,oBAAO,YAAY,EAAK,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtE,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACK,qCAAc,GAAtB,UAAuB,KAAoB,EAAE,GAAW,EAAE,KAAuB;QAAvB,sBAAA,EAAA,UAAuB;QAC/E,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE;YACvE,OAAO,KAAK,CAAC;SACd;QACD,IAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,IAAM,SAAS,GAAG,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,oBAAG,SAAS,GAAK,KAAK,EAAE,CAAC;IACrE,CAAC;IA1DD;;OAEG;IACW,eAAE,GAAW,cAAc,CAAC;IAwD5C,mBAAC;CAAA,AAjED,IAiEC;SAjEY,YAAY","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return self._handler(event, hint);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n }\n\n /**\n * @inheritDoc\n */\n private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, [exception, ...stack]);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/trycatch.d.ts b/node_modules/@sentry/browser/esm/integrations/trycatch.d.ts deleted file mode 100644 index f28bbf1..0000000 --- a/node_modules/@sentry/browser/esm/integrations/trycatch.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Wrap timer functions and event targets to catch errors and provide better meta data */ -export declare class TryCatch implements Integration { - /** JSDoc */ - private _ignoreOnError; - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** JSDoc */ - private _wrapTimeFunction; - /** JSDoc */ - private _wrapRAF; - /** JSDoc */ - private _wrapEventTarget; - /** JSDoc */ - private _wrapXHR; - /** - * Wrap timer functions and event targets to catch errors - * and provide better metadata. - */ - setupOnce(): void; -} -//# sourceMappingURL=trycatch.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/trycatch.d.ts.map b/node_modules/@sentry/browser/esm/integrations/trycatch.d.ts.map deleted file mode 100644 index 06bc476..0000000 --- a/node_modules/@sentry/browser/esm/integrations/trycatch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trycatch.d.ts","sourceRoot":"","sources":["../../src/integrations/trycatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAO7D,0FAA0F;AAC1F,qBAAa,QAAS,YAAW,WAAW;IAC1C,YAAY;IACZ,OAAO,CAAC,cAAc,CAAa;IAEnC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAe;IAElC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAc;IAEtC,YAAY;IACZ,OAAO,CAAC,iBAAiB;IAczB,YAAY;IACZ,OAAO,CAAC,QAAQ;IAiBhB,YAAY;IACZ,OAAO,CAAC,gBAAgB;IA2ExB,YAAY;IACZ,OAAO,CAAC,QAAQ;IAkChB;;;OAGG;IACI,SAAS,IAAI,IAAI;CA6CzB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/trycatch.js b/node_modules/@sentry/browser/esm/integrations/trycatch.js deleted file mode 100644 index 4e3ef4b..0000000 --- a/node_modules/@sentry/browser/esm/integrations/trycatch.js +++ /dev/null @@ -1,186 +0,0 @@ -import { fill, getFunctionName, getGlobalObject } from '@sentry/utils'; -import { wrap } from '../helpers'; -/** Wrap timer functions and event targets to catch errors and provide better meta data */ -var TryCatch = /** @class */ (function () { - function TryCatch() { - /** JSDoc */ - this._ignoreOnError = 0; - /** - * @inheritDoc - */ - this.name = TryCatch.id; - } - /** JSDoc */ - TryCatch.prototype._wrapTimeFunction = function (original) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var originalCallback = args[0]; - args[0] = wrap(originalCallback, { - mechanism: { - data: { function: getFunctionName(original) }, - handled: true, - type: 'instrument', - }, - }); - return original.apply(this, args); - }; - }; - /** JSDoc */ - TryCatch.prototype._wrapRAF = function (original) { - return function (callback) { - return original(wrap(callback, { - mechanism: { - data: { - function: 'requestAnimationFrame', - handler: getFunctionName(original), - }, - handled: true, - type: 'instrument', - }, - })); - }; - }; - /** JSDoc */ - TryCatch.prototype._wrapEventTarget = function (target) { - var global = getGlobalObject(); - var proto = global[target] && global[target].prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - fill(proto, 'addEventListener', function (original) { - return function (eventName, fn, options) { - try { - // tslint:disable-next-line:no-unbound-method strict-type-predicates - if (typeof fn.handleEvent === 'function') { - fn.handleEvent = wrap(fn.handleEvent.bind(fn), { - mechanism: { - data: { - function: 'handleEvent', - handler: getFunctionName(fn), - target: target, - }, - handled: true, - type: 'instrument', - }, - }); - } - } - catch (err) { - // can sometimes get 'Permission denied to access property "handle Event' - } - return original.call(this, eventName, wrap(fn, { - mechanism: { - data: { - function: 'addEventListener', - handler: getFunctionName(fn), - target: target, - }, - handled: true, - type: 'instrument', - }, - }), options); - }; - }); - fill(proto, 'removeEventListener', function (original) { - return function (eventName, fn, options) { - var callback = fn; - try { - callback = callback && (callback.__sentry_wrapped__ || callback); - } - catch (e) { - // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments - } - return original.call(this, eventName, callback, options); - }; - }); - }; - /** JSDoc */ - TryCatch.prototype._wrapXHR = function (originalSend) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var xhr = this; // tslint:disable-line:no-this-assignment - var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange']; - xmlHttpRequestProps.forEach(function (prop) { - if (prop in xhr && typeof xhr[prop] === 'function') { - fill(xhr, prop, function (original) { - var wrapOptions = { - mechanism: { - data: { - function: prop, - handler: getFunctionName(original), - }, - handled: true, - type: 'instrument', - }, - }; - // If Instrument integration has been called before TryCatch, get the name of original function - if (original.__sentry_original__) { - wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__); - } - // Otherwise wrap directly - return wrap(original, wrapOptions); - }); - } - }); - return originalSend.apply(this, args); - }; - }; - /** - * Wrap timer functions and event targets to catch errors - * and provide better metadata. - */ - TryCatch.prototype.setupOnce = function () { - this._ignoreOnError = this._ignoreOnError; - var global = getGlobalObject(); - fill(global, 'setTimeout', this._wrapTimeFunction.bind(this)); - fill(global, 'setInterval', this._wrapTimeFunction.bind(this)); - fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this)); - if ('XMLHttpRequest' in global) { - fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this)); - } - [ - 'EventTarget', - 'Window', - 'Node', - 'ApplicationCache', - 'AudioTrackList', - 'ChannelMergerNode', - 'CryptoOperation', - 'EventSource', - 'FileReader', - 'HTMLUnknownElement', - 'IDBDatabase', - 'IDBRequest', - 'IDBTransaction', - 'KeyOperation', - 'MediaController', - 'MessagePort', - 'ModalWindow', - 'Notification', - 'SVGElementInstance', - 'Screen', - 'TextTrack', - 'TextTrackCue', - 'TextTrackList', - 'WebSocket', - 'WebSocketWorker', - 'Worker', - 'XMLHttpRequest', - 'XMLHttpRequestEventTarget', - 'XMLHttpRequestUpload', - ].forEach(this._wrapEventTarget.bind(this)); - }; - /** - * @inheritDoc - */ - TryCatch.id = 'TryCatch'; - return TryCatch; -}()); -export { TryCatch }; -//# sourceMappingURL=trycatch.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/trycatch.js.map b/node_modules/@sentry/browser/esm/integrations/trycatch.js.map deleted file mode 100644 index 0917a70..0000000 --- a/node_modules/@sentry/browser/esm/integrations/trycatch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trycatch.js","sourceRoot":"","sources":["../../src/integrations/trycatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,0FAA0F;AAC1F;IAAA;QACE,YAAY;QACJ,mBAAc,GAAW,CAAC,CAAC;QAEnC;;WAEG;QACI,SAAI,GAAW,QAAQ,CAAC,EAAE,CAAC;IAwMpC,CAAC;IAjMC,YAAY;IACJ,oCAAiB,GAAzB,UAA0B,QAAoB;QAC5C,OAAO;YAAoB,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YACvC,IAAM,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACjC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,gBAAgB,EAAE;gBAC/B,SAAS,EAAE;oBACT,IAAI,EAAE,EAAE,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAAC,EAAE;oBAC7C,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,YAAY;iBACnB;aACF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;IACJ,CAAC;IAED,YAAY;IACJ,2BAAQ,GAAhB,UAAiB,QAAa;QAC5B,OAAO,UAAoB,QAAoB;YAC7C,OAAO,QAAQ,CACb,IAAI,CAAC,QAAQ,EAAE;gBACb,SAAS,EAAE;oBACT,IAAI,EAAE;wBACJ,QAAQ,EAAE,uBAAuB;wBACjC,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC;qBACnC;oBACD,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE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eAAe;YACf,WAAW;YACX,iBAAiB;YACjB,QAAQ;YACR,gBAAgB;YAChB,2BAA2B;YAC3B,sBAAsB;SACvB,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC;IArMD;;OAEG;IACW,WAAE,GAAW,UAAU,CAAC;IAmMxC,eAAC;CAAA,AA/MD,IA+MC;SA/MY,QAAQ","sourcesContent":["import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /** JSDoc */\n private _ignoreOnError: number = 0;\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /** JSDoc */\n private _wrapTimeFunction(original: () => void): () => number {\n return function(this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n }\n\n /** JSDoc */\n private _wrapRAF(original: any): (callback: () => void) => any {\n return function(this: any, callback: () => void): () => void {\n return original(\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n }\n\n /** JSDoc */\n private _wrapEventTarget(target: string): void {\n const global = getGlobalObject() as { [key: string]: any };\n const proto = global[target] && global[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n // tslint:disable-next-line:no-unbound-method strict-type-predicates\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n wrap((fn as any) as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = (fn as any) as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n }\n\n /** JSDoc */\n private _wrapXHR(originalSend: () => void): () => void {\n return function(this: XMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function(original: WrappedFunction): Function {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n this._ignoreOnError = this._ignoreOnError;\n\n const global = getGlobalObject();\n\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n\n if ('XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n ].forEach(this._wrapEventTarget.bind(this));\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/useragent.d.ts b/node_modules/@sentry/browser/esm/integrations/useragent.d.ts deleted file mode 100644 index 8ea584d..0000000 --- a/node_modules/@sentry/browser/esm/integrations/useragent.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Integration } from '@sentry/types'; -/** UserAgent */ -export declare class UserAgent implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - setupOnce(): void; -} -//# sourceMappingURL=useragent.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/useragent.d.ts.map b/node_modules/@sentry/browser/esm/integrations/useragent.d.ts.map deleted file mode 100644 index 0bf2e62..0000000 --- a/node_modules/@sentry/browser/esm/integrations/useragent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useragent.d.ts","sourceRoot":"","sources":["../../src/integrations/useragent.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AAKnD,gBAAgB;AAChB,qBAAa,SAAU,YAAW,WAAW;IAC3C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAgB;IAEnC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAe;IAEvC;;OAEG;IACI,SAAS,IAAI,IAAI;CAqBzB"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/useragent.js b/node_modules/@sentry/browser/esm/integrations/useragent.js deleted file mode 100644 index ff17056..0000000 --- a/node_modules/@sentry/browser/esm/integrations/useragent.js +++ /dev/null @@ -1,39 +0,0 @@ -import * as tslib_1 from "tslib"; -import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core'; -import { getGlobalObject } from '@sentry/utils'; -var global = getGlobalObject(); -/** UserAgent */ -var UserAgent = /** @class */ (function () { - function UserAgent() { - /** - * @inheritDoc - */ - this.name = UserAgent.id; - } - /** - * @inheritDoc - */ - UserAgent.prototype.setupOnce = function () { - addGlobalEventProcessor(function (event) { - if (getCurrentHub().getIntegration(UserAgent)) { - if (!global.navigator || !global.location) { - return event; - } - // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/ - var request = event.request || {}; - request.url = request.url || global.location.href; - request.headers = request.headers || {}; - request.headers['User-Agent'] = global.navigator.userAgent; - return tslib_1.__assign({}, event, { request: request }); - } - return event; - }); - }; - /** - * @inheritDoc - */ - UserAgent.id = 'UserAgent'; - return UserAgent; -}()); -export { UserAgent }; -//# sourceMappingURL=useragent.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/integrations/useragent.js.map b/node_modules/@sentry/browser/esm/integrations/useragent.js.map deleted file mode 100644 index 3cdc632..0000000 --- a/node_modules/@sentry/browser/esm/integrations/useragent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useragent.js","sourceRoot":"","sources":["../../src/integrations/useragent.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,IAAM,MAAM,GAAG,eAAe,EAAU,CAAC;AAEzC,gBAAgB;AAChB;IAAA;QACE;;WAEG;QACI,SAAI,GAAW,SAAS,CAAC,EAAE,CAAC;IA+BrC,CAAC;IAxBC;;OAEG;IACI,6BAAS,GAAhB;QACE,uBAAuB,CAAC,UAAC,KAAY;YACnC,IAAI,aAAa,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE;gBAC7C,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;oBACzC,OAAO,KAAK,CAAC;iBACd;gBAED,wFAAwF;gBACxF,IAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;gBACpC,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAClD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;gBACxC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;gBAE3D,4BACK,KAAK,IACR,OAAO,SAAA,IACP;aACH;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IA5BD;;OAEG;IACW,YAAE,GAAW,WAAW,CAAC;IA0BzC,gBAAC;CAAA,AAnCD,IAmCC;SAnCY,SAAS","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n if (!global.navigator || !global.location) {\n return event;\n }\n\n // Request Interface: https://docs.sentry.io/development/sdk-dev/event-payloads/request/\n const request = event.request || {};\n request.url = request.url || global.location.href;\n request.headers = request.headers || {};\n request.headers['User-Agent'] = global.navigator.userAgent;\n\n return {\n ...event,\n request,\n };\n }\n return event;\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/parsers.d.ts b/node_modules/@sentry/browser/esm/parsers.d.ts deleted file mode 100644 index 73d29b9..0000000 --- a/node_modules/@sentry/browser/esm/parsers.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Event, Exception, StackFrame } from '@sentry/types'; -import { StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit'; -/** - * This function creates an exception from an TraceKitStackTrace - * @param stacktrace TraceKitStackTrace that will be converted to an exception - * @hidden - */ -export declare function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception; -/** - * @hidden - */ -export declare function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event; -/** - * @hidden - */ -export declare function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event; -/** - * @hidden - */ -export declare function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[]; -//# sourceMappingURL=parsers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/parsers.d.ts.map b/node_modules/@sentry/browser/esm/parsers.d.ts.map deleted file mode 100644 index e6e9f2b..0000000 --- a/node_modules/@sentry/browser/esm/parsers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG7D,OAAO,EAAqB,UAAU,IAAI,kBAAkB,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAInH;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,kBAAkB,GAAG,SAAS,CAkBjF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,EAAE,EAAE,kBAAkB,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,CA0B1G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,kBAAkB,GAAG,KAAK,CAQzE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,UAAU,EAAE,CAiC/E"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/parsers.js b/node_modules/@sentry/browser/esm/parsers.js deleted file mode 100644 index 7c5e5b8..0000000 --- a/node_modules/@sentry/browser/esm/parsers.js +++ /dev/null @@ -1,91 +0,0 @@ -import { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils'; -import { computeStackTrace } from './tracekit'; -var STACKTRACE_LIMIT = 50; -/** - * This function creates an exception from an TraceKitStackTrace - * @param stacktrace TraceKitStackTrace that will be converted to an exception - * @hidden - */ -export function exceptionFromStacktrace(stacktrace) { - var frames = prepareFramesForEvent(stacktrace.stack); - var exception = { - type: stacktrace.name, - value: stacktrace.message, - }; - if (frames && frames.length) { - exception.stacktrace = { frames: frames }; - } - // tslint:disable-next-line:strict-type-predicates - if (exception.type === undefined && exception.value === '') { - exception.value = 'Unrecoverable error caught'; - } - return exception; -} -/** - * @hidden - */ -export function eventFromPlainObject(exception, syntheticException, rejection) { - var event = { - exception: { - values: [ - { - type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error', - value: "Non-Error " + (rejection ? 'promise rejection' : 'exception') + " captured with keys: " + extractExceptionKeysForMessage(exception), - }, - ], - }, - extra: { - __serialized__: normalizeToSize(exception), - }, - }; - if (syntheticException) { - var stacktrace = computeStackTrace(syntheticException); - var frames_1 = prepareFramesForEvent(stacktrace.stack); - event.stacktrace = { - frames: frames_1, - }; - } - return event; -} -/** - * @hidden - */ -export function eventFromStacktrace(stacktrace) { - var exception = exceptionFromStacktrace(stacktrace); - return { - exception: { - values: [exception], - }, - }; -} -/** - * @hidden - */ -export function prepareFramesForEvent(stack) { - if (!stack || !stack.length) { - return []; - } - var localStack = stack; - var firstFrameFunction = localStack[0].func || ''; - var lastFrameFunction = localStack[localStack.length - 1].func || ''; - // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call) - if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { - localStack = localStack.slice(1); - } - // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call) - if (lastFrameFunction.indexOf('sentryWrapped') !== -1) { - localStack = localStack.slice(0, -1); - } - // The frame where the crash happened, should be the last entry in the array - return localStack - .map(function (frame) { return ({ - colno: frame.column === null ? undefined : frame.column, - filename: frame.url || localStack[0].url, - function: frame.func || '?', - in_app: true, - lineno: frame.line === null ? undefined : frame.line, - }); }) - .slice(0, STACKTRACE_LIMIT) - .reverse(); -} -//# sourceMappingURL=parsers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/parsers.js.map b/node_modules/@sentry/browser/esm/parsers.js.map deleted file mode 100644 index 904acd0..0000000 --- a/node_modules/@sentry/browser/esm/parsers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,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AE,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM;QACvD,QAAQ,EAAE,KAAK,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG;QACxC,QAAQ,EAAE,KAAK,CAAC,IAAI,IAAI,GAAG;QAC3B,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI;KACrD,CAAC,EANyC,CAMzC,CACH;SACA,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC;SAC1B,OAAO,EAAE,CAAC;AACf,CAAC","sourcesContent":["import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception: {}, syntheticException?: Error, rejection?: boolean): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .slice(0, STACKTRACE_LIMIT)\n .reverse();\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/sdk.d.ts b/node_modules/@sentry/browser/esm/sdk.d.ts deleted file mode 100644 index d3b6981..0000000 --- a/node_modules/@sentry/browser/esm/sdk.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Integrations as CoreIntegrations } from '@sentry/core'; -import { BrowserOptions } from './backend'; -import { ReportDialogOptions } from './client'; -import { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations'; -export declare const defaultIntegrations: (CoreIntegrations.FunctionToString | CoreIntegrations.InboundFilters | GlobalHandlers | TryCatch | Breadcrumbs | LinkedErrors | UserAgent)[]; -/** - * The Sentry Browser SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible when - * loading the web page. To set context information or send manual events, use - * the provided methods. - * - * @example - * - * ``` - * - * import { init } from '@sentry/browser'; - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * import { configureScope } from '@sentry/browser'; - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * import { addBreadcrumb } from '@sentry/browser'; - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * - * ``` - * - * import * as Sentry from '@sentry/browser'; - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link BrowserOptions} for documentation on configuration options. - */ -export declare function init(options?: BrowserOptions): void; -/** - * Present the user with a report dialog. - * - * @param options Everything is optional, we try to fetch all info need from the global scope. - */ -export declare function showReportDialog(options?: ReportDialogOptions): void; -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -export declare function lastEventId(): string | undefined; -/** - * This function is here to be API compatible with the loader. - * @hidden - */ -export declare function forceLoad(): void; -/** - * This function is here to be API compatible with the loader. - * @hidden - */ -export declare function onLoad(callback: () => void): void; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export declare function flush(timeout?: number): PromiseLike; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export declare function close(timeout?: number): PromiseLike; -/** - * Wrap code within a try/catch block so the SDK is able to capture errors. - * - * @param fn A function to wrap. - * - * @returns The result of wrapped function call. - */ -export declare function wrap(fn: Function): any; -//# sourceMappingURL=sdk.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/sdk.d.ts.map b/node_modules/@sentry/browser/esm/sdk.d.ts.map deleted file mode 100644 index b09eb2e..0000000 --- a/node_modules/@sentry/browser/esm/sdk.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5F,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhG,eAAO,MAAM,mBAAmB,8IAQ/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,cAAmB,GAAG,IAAI,CAYvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAQxE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAEjD;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAM5D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAM5D;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,QAAQ,GAAG,GAAG,CAEtC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/sdk.js b/node_modules/@sentry/browser/esm/sdk.js deleted file mode 100644 index b6c3f46..0000000 --- a/node_modules/@sentry/browser/esm/sdk.js +++ /dev/null @@ -1,159 +0,0 @@ -import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core'; -import { getGlobalObject, SyncPromise } from '@sentry/utils'; -import { BrowserClient } from './client'; -import { wrap as internalWrap } from './helpers'; -import { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations'; -export var defaultIntegrations = [ - new CoreIntegrations.InboundFilters(), - new CoreIntegrations.FunctionToString(), - new TryCatch(), - new Breadcrumbs(), - new GlobalHandlers(), - new LinkedErrors(), - new UserAgent(), -]; -/** - * The Sentry Browser SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible when - * loading the web page. To set context information or send manual events, use - * the provided methods. - * - * @example - * - * ``` - * - * import { init } from '@sentry/browser'; - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * import { configureScope } from '@sentry/browser'; - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * import { addBreadcrumb } from '@sentry/browser'; - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * - * ``` - * - * import * as Sentry from '@sentry/browser'; - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link BrowserOptions} for documentation on configuration options. - */ -export function init(options) { - if (options === void 0) { options = {}; } - if (options.defaultIntegrations === undefined) { - options.defaultIntegrations = defaultIntegrations; - } - if (options.release === undefined) { - var window_1 = getGlobalObject(); - // This supports the variable that sentry-webpack-plugin injects - if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) { - options.release = window_1.SENTRY_RELEASE.id; - } - } - initAndBind(BrowserClient, options); -} -/** - * Present the user with a report dialog. - * - * @param options Everything is optional, we try to fetch all info need from the global scope. - */ -export function showReportDialog(options) { - if (options === void 0) { options = {}; } - if (!options.eventId) { - options.eventId = getCurrentHub().lastEventId(); - } - var client = getCurrentHub().getClient(); - if (client) { - client.showReportDialog(options); - } -} -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -export function lastEventId() { - return getCurrentHub().lastEventId(); -} -/** - * This function is here to be API compatible with the loader. - * @hidden - */ -export function forceLoad() { - // Noop -} -/** - * This function is here to be API compatible with the loader. - * @hidden - */ -export function onLoad(callback) { - callback(); -} -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export function flush(timeout) { - var client = getCurrentHub().getClient(); - if (client) { - return client.flush(timeout); - } - return SyncPromise.reject(false); -} -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export function close(timeout) { - var client = getCurrentHub().getClient(); - if (client) { - return client.close(timeout); - } - return SyncPromise.reject(false); -} -/** - * Wrap code within a try/catch block so the SDK is able to capture errors. - * - * @param fn A function to wrap. - * - * @returns The result of wrapped function call. - */ -export function wrap(fn) { - return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any -} -//# sourceMappingURL=sdk.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/sdk.js.map b/node_modules/@sentry/browser/esm/sdk.js.map deleted file mode 100644 index 1559da2..0000000 --- a/node_modules/@sentry/browser/esm/sdk.js.map +++ /dev/null @@ -1 +0,0 @@ -{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AACjE,CAAC","sourcesContent":["import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient, ReportDialogOptions } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n initAndBind(BrowserClient, options);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n const client = getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return SyncPromise.reject(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\nexport function wrap(fn: Function): any {\n return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/tracekit.d.ts b/node_modules/@sentry/browser/esm/tracekit.d.ts deleted file mode 100644 index c11136f..0000000 --- a/node_modules/@sentry/browser/esm/tracekit.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This was originally forked from https://github.com/occ/TraceKit, but has since been - * largely modified and is now maintained as part of Sentry JS SDK. - */ -/** - * An object representing a single stack frame. - * {Object} StackFrame - * {string} url The JavaScript or HTML file URL. - * {string} func The function name, or empty for anonymous functions (if guessing did not work). - * {string[]?} args The arguments passed to the function, if known. - * {number=} line The line number, if known. - * {number=} column The column number, if known. - * {string[]} context An array of source code lines; the middle element corresponds to the correct line#. - */ -export interface StackFrame { - url: string; - func: string; - args: string[]; - line: number | null; - column: number | null; -} -/** - * An object representing a JavaScript stack trace. - * {Object} StackTrace - * {string} name The name of the thrown exception. - * {string} message The exception error message. - * {TraceKit.StackFrame[]} stack An array of stack frames. - */ -export interface StackTrace { - name: string; - message: string; - mechanism?: string; - stack: StackFrame[]; - failed?: boolean; -} -/** JSDoc */ -export declare function computeStackTrace(ex: any): StackTrace; -//# sourceMappingURL=tracekit.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/tracekit.d.ts.map b/node_modules/@sentry/browser/esm/tracekit.d.ts.map deleted file mode 100644 index def5358..0000000 --- a/node_modules/@sentry/browser/esm/tracekit.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracekit.d.ts","sourceRoot":"","sources":["../src/tracekit.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAeD,YAAY;AACZ,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,GAAG,GAAG,UAAU,CAiCrD"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/tracekit.js b/node_modules/@sentry/browser/esm/tracekit.js deleted file mode 100644 index 831f359..0000000 --- a/node_modules/@sentry/browser/esm/tracekit.js +++ /dev/null @@ -1,205 +0,0 @@ -// tslint:disable:object-literal-sort-keys -import * as tslib_1 from "tslib"; -// global reference to slice -var UNKNOWN_FUNCTION = '?'; -// Chromium based browsers: Chrome, Brave, new Opera, new Edge -var chrome = /^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; -// gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it -// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js -// We need this specific case for now because we want no other regex to match. -var gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i; -var winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; -var geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; -var chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/; -/** JSDoc */ -export function computeStackTrace(ex) { - // tslint:disable:no-unsafe-any - var stack = null; - var popSize = ex && ex.framesToPop; - try { - // This must be tried first because Opera 10 *destroys* - // its stacktrace property if you try to access the stack - // property first!! - stack = computeStackTraceFromStacktraceProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } - catch (e) { - // no-empty - } - try { - stack = computeStackTraceFromStackProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } - catch (e) { - // no-empty - } - return { - message: extractMessage(ex), - name: ex && ex.name, - stack: [], - failed: true, - }; -} -/** JSDoc */ -// tslint:disable-next-line:cyclomatic-complexity -function computeStackTraceFromStackProp(ex) { - // tslint:disable:no-conditional-assignment - if (!ex || !ex.stack) { - return null; - } - var stack = []; - var lines = ex.stack.split('\n'); - var isEval; - var submatch; - var parts; - var element; - for (var i = 0; i < lines.length; ++i) { - if ((parts = chrome.exec(lines[i]))) { - var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line - isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line - if (isEval && (submatch = chromeEval.exec(parts[2]))) { - // throw out eval line/column and use top-most line/column number - parts[2] = submatch[1]; // url - parts[3] = submatch[2]; // line - parts[4] = submatch[3]; // column - } - element = { - // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at ` - // prefix here seems like the quickest solution for now. - url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - args: isNative ? [parts[2]] : [], - line: parts[3] ? +parts[3] : null, - column: parts[4] ? +parts[4] : null, - }; - } - else if ((parts = winjs.exec(lines[i]))) { - element = { - url: parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - args: [], - line: +parts[3], - column: parts[4] ? +parts[4] : null, - }; - } - else if ((parts = gecko.exec(lines[i]))) { - isEval = parts[3] && parts[3].indexOf(' > eval') > -1; - if (isEval && (submatch = geckoEval.exec(parts[3]))) { - // throw out eval line/column and use top-most line number - parts[1] = parts[1] || "eval"; - parts[3] = submatch[1]; - parts[4] = submatch[2]; - parts[5] = ''; // no column when eval - } - else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) { - // FireFox uses this awesome columnNumber property for its top frame - // Also note, Firefox's column number is 0-based and everything else expects 1-based, - // so adding 1 - // NOTE: this hack doesn't work if top-most frame is eval - stack[0].column = ex.columnNumber + 1; - } - element = { - url: parts[3], - func: parts[1] || UNKNOWN_FUNCTION, - args: parts[2] ? parts[2].split(',') : [], - line: parts[4] ? +parts[4] : null, - column: parts[5] ? +parts[5] : null, - }; - } - else { - continue; - } - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - if (!stack.length) { - return null; - } - return { - message: extractMessage(ex), - name: ex.name, - stack: stack, - }; -} -/** JSDoc */ -function computeStackTraceFromStacktraceProp(ex) { - if (!ex || !ex.stacktrace) { - return null; - } - // Access and store the stacktrace property before doing ANYTHING - // else to it because Opera is not very good at providing it - // reliably in other circumstances. - var stacktrace = ex.stacktrace; - var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; - var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i; - var lines = stacktrace.split('\n'); - var stack = []; - var parts; - for (var line = 0; line < lines.length; line += 2) { - // tslint:disable:no-conditional-assignment - var element = null; - if ((parts = opera10Regex.exec(lines[line]))) { - element = { - url: parts[2], - func: parts[3], - args: [], - line: +parts[1], - column: null, - }; - } - else if ((parts = opera11Regex.exec(lines[line]))) { - element = { - url: parts[6], - func: parts[3] || parts[4], - args: parts[5] ? parts[5].split(',') : [], - line: +parts[1], - column: +parts[2], - }; - } - if (element) { - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - } - if (!stack.length) { - return null; - } - return { - message: extractMessage(ex), - name: ex.name, - stack: stack, - }; -} -/** Remove N number of frames from the stack */ -function popFrames(stacktrace, popSize) { - try { - return tslib_1.__assign({}, stacktrace, { stack: stacktrace.stack.slice(popSize) }); - } - catch (e) { - return stacktrace; - } -} -/** - * There are cases where stacktrace.message is an Event object - * https://github.com/getsentry/sentry-javascript/issues/1949 - * In this specific case we try to extract stacktrace.message.error.message - */ -function extractMessage(ex) { - var message = ex && ex.message; - if (!message) { - return 'No error message'; - } - if (message.error && typeof message.error.message === 'string') { - return message.error.message; - } - return message; -} -//# sourceMappingURL=tracekit.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/tracekit.js.map b/node_modules/@sentry/browser/esm/tracekit.js.map deleted file mode 100644 index f45a9c1..0000000 --- a/node_modules/@sentry/browser/esm/tracekit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracekit.js","sourceRoot":"","sources":["../src/tracekit.ts"],"names":[],"mappings":"AAAA,0CAA0C;;AAwC1C,4BAA4B;AAC5B,IAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,8DAA8D;AAC9D,IAAM,MAAM,GAAG,4JAA4J,CAAC;AAC5K,8HAA8H;AAC9H,qGAAqG;AACrG,8EAA8E;AAC9E,IAAM,KAAK,GAAG,yKAAyK,CAAC;AACxL,IAAM,KAAK,GAAG,+GAA+G,CAAC;AAC9H,IAAM,SAAS,GAAG,+CAA+C,CAAC;AAClE,IAAM,UAAU,GAAG,+BAA+B,CAAC;AAEnD,YAAY;AACZ,MAAM,UAAU,iBAAiB,CAAC,EAAO;IACvC,+BAA+B;IAE/B,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,IAAM,OAAO,GAAW,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC;IAE7C,IAAI;QACF,uDAAuD;QACvD,yDAAyD;QACzD,mBAAmB;QACnB,KAAK,GAAG,mCAAmC,CAAC,EAAE,CAAC,CAAC;QAChD,IAAI,KAAK,EAAE;YACT,OAAO,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;SAClC;KACF;IAAC,OAAO,CAAC,EAAE;QACV,WAAW;KACZ;IAED,IAAI;QACF,KAAK,GAAG,8BAA8B,CAAC,EAAE,CAAC,CAAC;QAC3C,IAAI,KAAK,EAAE;YACT,OAAO,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;SAClC;KACF;IAAC,OAAO,CAAC,EAAE;QACV,WAAW;KACZ;IAED,OAAO;QACL,OAAO,EAAE,cAAc,CAAC,EAAE,CAAC;QAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI;QACnB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,IA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AED;;;;GAIG;AACH,SAAS,cAAc,CAAC,EAAO;IAC7B,IAAM,OAAO,GAAG,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC;IACjC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,kBAAkB,CAAC;KAC3B;IACD,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE;QAC9D,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;KAC9B;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["// tslint:disable:object-literal-sort-keys\n\n/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n args: string[];\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js))(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n/** JSDoc */\nexport function computeStackTrace(ex: any): StackTrace {\n // tslint:disable:no-unsafe-any\n\n let stack = null;\n const popSize: number = ex && ex.framesToPop;\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n // tslint:disable:no-conditional-assignment\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (let i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = (ex.columnNumber as number) + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n // tslint:disable:no-conditional-assignment\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/base.d.ts b/node_modules/@sentry/browser/esm/transports/base.d.ts deleted file mode 100644 index a385d80..0000000 --- a/node_modules/@sentry/browser/esm/transports/base.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Event, Response, Transport, TransportOptions } from '@sentry/types'; -import { PromiseBuffer } from '@sentry/utils'; -/** Base Transport class implementation */ -export declare abstract class BaseTransport implements Transport { - options: TransportOptions; - /** - * @inheritDoc - */ - url: string; - /** A simple buffer holding all requests. */ - protected readonly _buffer: PromiseBuffer; - constructor(options: TransportOptions); - /** - * @inheritDoc - */ - sendEvent(_: Event): PromiseLike; - /** - * @inheritDoc - */ - close(timeout?: number): PromiseLike; -} -//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/base.d.ts.map b/node_modules/@sentry/browser/esm/transports/base.d.ts.map deleted file mode 100644 index f0f71ac..0000000 --- a/node_modules/@sentry/browser/esm/transports/base.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/transports/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAe,MAAM,eAAe,CAAC;AAE3D,0CAA0C;AAC1C,8BAAsB,aAAc,YAAW,SAAS;IAS5B,OAAO,EAAE,gBAAgB;IARnD;;OAEG;IACI,GAAG,EAAE,MAAM,CAAC;IAEnB,4CAA4C;IAC5C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAyB;gBAElD,OAAO,EAAE,gBAAgB;IAInD;;OAEG;IACI,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;IAIjD;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;CAGrD"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/base.js b/node_modules/@sentry/browser/esm/transports/base.js deleted file mode 100644 index 8cbcd5c..0000000 --- a/node_modules/@sentry/browser/esm/transports/base.js +++ /dev/null @@ -1,26 +0,0 @@ -import { API } from '@sentry/core'; -import { PromiseBuffer, SentryError } from '@sentry/utils'; -/** Base Transport class implementation */ -var BaseTransport = /** @class */ (function () { - function BaseTransport(options) { - this.options = options; - /** A simple buffer holding all requests. */ - this._buffer = new PromiseBuffer(30); - this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth(); - } - /** - * @inheritDoc - */ - BaseTransport.prototype.sendEvent = function (_) { - throw new SentryError('Transport Class has to implement `sendEvent` method'); - }; - /** - * @inheritDoc - */ - BaseTransport.prototype.close = function (timeout) { - return this._buffer.drain(timeout); - }; - return BaseTransport; -}()); -export { BaseTransport }; -//# sourceMappingURL=base.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/base.js.map b/node_modules/@sentry/browser/esm/transports/base.js.map deleted file mode 100644 index 8ce68a4..0000000 --- a/node_modules/@sentry/browser/esm/transports/base.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/transports/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE3D,0CAA0C;AAC1C;IASE,uBAA0B,OAAyB;QAAzB,YAAO,GAAP,OAAO,CAAkB;QAHnD,4CAA4C;QACzB,YAAO,GAA4B,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;QAG1E,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,kCAAkC,EAAE,CAAC;IAC5E,CAAC;IAED;;OAEG;IACI,iCAAS,GAAhB,UAAiB,CAAQ;QACvB,MAAM,IAAI,WAAW,CAAC,qDAAqD,CAAC,CAAC;IAC/E,CAAC;IAED;;OAEG;IACI,6BAAK,GAAZ,UAAa,OAAgB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IACH,oBAAC;AAAD,CAAC,AA1BD,IA0BC","sourcesContent":["import { API } from '@sentry/core';\nimport { Event, Response, Transport, TransportOptions } from '@sentry/types';\nimport { PromiseBuffer, SentryError } from '@sentry/utils';\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @inheritDoc\n */\n public url: string;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n public constructor(public options: TransportOptions) {\n this.url = new API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth();\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/fetch.d.ts b/node_modules/@sentry/browser/esm/transports/fetch.d.ts deleted file mode 100644 index e642795..0000000 --- a/node_modules/@sentry/browser/esm/transports/fetch.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Event, Response } from '@sentry/types'; -import { BaseTransport } from './base'; -/** `fetch` based transport */ -export declare class FetchTransport extends BaseTransport { - /** Locks transport after receiving 429 response */ - private _disabledUntil; - /** - * @inheritDoc - */ - sendEvent(event: Event): PromiseLike; -} -//# sourceMappingURL=fetch.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/fetch.d.ts.map b/node_modules/@sentry/browser/esm/transports/fetch.d.ts.map deleted file mode 100644 index 39c9697..0000000 --- a/node_modules/@sentry/browser/esm/transports/fetch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/transports/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAU,MAAM,eAAe,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAIvC,8BAA8B;AAC9B,qBAAa,cAAe,SAAQ,aAAa;IAC/C,mDAAmD;IACnD,OAAO,CAAC,cAAc,CAA8B;IAEpD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;CA+CtD"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/fetch.js b/node_modules/@sentry/browser/esm/transports/fetch.js deleted file mode 100644 index 1cd1233..0000000 --- a/node_modules/@sentry/browser/esm/transports/fetch.js +++ /dev/null @@ -1,61 +0,0 @@ -import * as tslib_1 from "tslib"; -import { Status } from '@sentry/types'; -import { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils'; -import { BaseTransport } from './base'; -var global = getGlobalObject(); -/** `fetch` based transport */ -var FetchTransport = /** @class */ (function (_super) { - tslib_1.__extends(FetchTransport, _super); - function FetchTransport() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** Locks transport after receiving 429 response */ - _this._disabledUntil = new Date(Date.now()); - return _this; - } - /** - * @inheritDoc - */ - FetchTransport.prototype.sendEvent = function (event) { - var _this = this; - if (new Date(Date.now()) < this._disabledUntil) { - return Promise.reject({ - event: event, - reason: "Transport locked till " + this._disabledUntil + " due to too many requests.", - status: 429, - }); - } - var defaultOptions = { - body: JSON.stringify(event), - method: 'POST', - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default - // https://caniuse.com/#feat=referrer-policy - // It doesn't. And it throw exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''), - }; - if (this.options.headers !== undefined) { - defaultOptions.headers = this.options.headers; - } - return this._buffer.add(new SyncPromise(function (resolve, reject) { - global - .fetch(_this.url, defaultOptions) - .then(function (response) { - var status = Status.fromHttpCode(response.status); - if (status === Status.Success) { - resolve({ status: status }); - return; - } - if (status === Status.RateLimit) { - var now = Date.now(); - _this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After'))); - logger.warn("Too many requests, backing off till: " + _this._disabledUntil); - } - reject(response); - }) - .catch(reject); - })); - }; - return FetchTransport; -}(BaseTransport)); -export { FetchTransport }; -//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/fetch.js.map b/node_modules/@sentry/browser/esm/transports/fetch.js.map deleted file mode 100644 index a9179c8..0000000 --- a/node_modules/@sentry/browser/esm/transports/fetch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/transports/fetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,MAAM,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEpH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,IAAM,MAAM,GAAG,eAAe,EAAU,CAAC;AAEzC,8BAA8B;AAC9B;IAAoC,0CAAa;IAAjD;QAAA,qEAsDC;QArDC,mDAAmD;QAC3C,oBAAc,GAAS,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;;IAoDtD,CAAC;IAlDC;;OAEG;IACI,kCAAS,GAAhB,UAAiB,KAAY;QAA7B,iBA8CC;QA7CC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE;YAC9C,OAAO,OAAO,CAAC,MAAM,CAAC;gBACpB,KAAK,OAAA;gBACL,MAAM,EAAE,2BAAyB,IAAI,CAAC,cAAc,+BAA4B;gBAChF,MAAM,EAAE,GAAG;aACZ,CAAC,CAAC;SACJ;QAED,IAAM,cAAc,GAAgB;YAClC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;YAC3B,MAAM,EAAE,MAAM;YACd,wHAAwH;YACxH,4CAA4C;YAC5C,2EAA2E;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seRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\nconst global = getGlobalObject();\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n const defaultOptions: RequestInit = {\n body: JSON.stringify(event),\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n\n if (this.options.headers !== undefined) {\n defaultOptions.headers = this.options.headers;\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n global\n .fetch(this.url, defaultOptions)\n .then(response => {\n const status = Status.fromHttpCode(response.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(response);\n })\n .catch(reject);\n }),\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/index.d.ts b/node_modules/@sentry/browser/esm/transports/index.d.ts deleted file mode 100644 index 800ca5c..0000000 --- a/node_modules/@sentry/browser/esm/transports/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { BaseTransport } from './base'; -export { FetchTransport } from './fetch'; -export { XHRTransport } from './xhr'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/index.d.ts.map b/node_modules/@sentry/browser/esm/transports/index.d.ts.map deleted file mode 100644 index 92bc49d..0000000 --- a/node_modules/@sentry/browser/esm/transports/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/index.js b/node_modules/@sentry/browser/esm/transports/index.js deleted file mode 100644 index e879daa..0000000 --- a/node_modules/@sentry/browser/esm/transports/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { BaseTransport } from './base'; -export { FetchTransport } from './fetch'; -export { XHRTransport } from './xhr'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/index.js.map b/node_modules/@sentry/browser/esm/transports/index.js.map deleted file mode 100644 index e29e7cf..0000000 --- a/node_modules/@sentry/browser/esm/transports/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC","sourcesContent":["export { BaseTransport } from './base';\nexport { FetchTransport } from './fetch';\nexport { XHRTransport } from './xhr';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/xhr.d.ts b/node_modules/@sentry/browser/esm/transports/xhr.d.ts deleted file mode 100644 index 5844832..0000000 --- a/node_modules/@sentry/browser/esm/transports/xhr.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Event, Response } from '@sentry/types'; -import { BaseTransport } from './base'; -/** `XHR` based transport */ -export declare class XHRTransport extends BaseTransport { - /** Locks transport after receiving 429 response */ - private _disabledUntil; - /** - * @inheritDoc - */ - sendEvent(event: Event): PromiseLike; -} -//# sourceMappingURL=xhr.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/xhr.d.ts.map b/node_modules/@sentry/browser/esm/transports/xhr.d.ts.map deleted file mode 100644 index 649e015..0000000 --- a/node_modules/@sentry/browser/esm/transports/xhr.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../src/transports/xhr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAU,MAAM,eAAe,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,4BAA4B;AAC5B,qBAAa,YAAa,SAAQ,aAAa;IAC7C,mDAAmD;IACnD,OAAO,CAAC,cAAc,CAA8B;IAEpD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;CA4CtD"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/xhr.js b/node_modules/@sentry/browser/esm/transports/xhr.js deleted file mode 100644 index 1af0880..0000000 --- a/node_modules/@sentry/browser/esm/transports/xhr.js +++ /dev/null @@ -1,56 +0,0 @@ -import * as tslib_1 from "tslib"; -import { Status } from '@sentry/types'; -import { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils'; -import { BaseTransport } from './base'; -/** `XHR` based transport */ -var XHRTransport = /** @class */ (function (_super) { - tslib_1.__extends(XHRTransport, _super); - function XHRTransport() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** Locks transport after receiving 429 response */ - _this._disabledUntil = new Date(Date.now()); - return _this; - } - /** - * @inheritDoc - */ - XHRTransport.prototype.sendEvent = function (event) { - var _this = this; - if (new Date(Date.now()) < this._disabledUntil) { - return Promise.reject({ - event: event, - reason: "Transport locked till " + this._disabledUntil + " due to too many requests.", - status: 429, - }); - } - return this._buffer.add(new SyncPromise(function (resolve, reject) { - var request = new XMLHttpRequest(); - request.onreadystatechange = function () { - if (request.readyState !== 4) { - return; - } - var status = Status.fromHttpCode(request.status); - if (status === Status.Success) { - resolve({ status: status }); - return; - } - if (status === Status.RateLimit) { - var now = Date.now(); - _this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After'))); - logger.warn("Too many requests, backing off till: " + _this._disabledUntil); - } - reject(request); - }; - request.open('POST', _this.url); - for (var header in _this.options.headers) { - if (_this.options.headers.hasOwnProperty(header)) { - request.setRequestHeader(header, _this.options.headers[header]); - } - } - request.send(JSON.stringify(event)); - })); - }; - return XHRTransport; -}(BaseTransport)); -export { XHRTransport }; -//# sourceMappingURL=xhr.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/transports/xhr.js.map b/node_modules/@sentry/browser/esm/transports/xhr.js.map deleted file mode 100644 index 0f60856..0000000 --- a/node_modules/@sentry/browser/esm/transports/xhr.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"xhr.js","sourceRoot":"","sources":["../../src/transports/xhr.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,MAAM,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,4BAA4B;AAC5B;IAAkC,wCAAa;IAA/C;QAAA,qEAmDC;QAlDC,mDAAmD;QAC3C,oBAAc,GAAS,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;;IAiDtD,CAAC;IA/CC;;OAEG;IACI,gCAAS,GAAhB,UAAiB,KAAY;QAA7B,iBA2CC;QA1CC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,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AAM,CAAC,EAAE;oBAC/C,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;iBAChE;aACF;YACD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACtC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IACH,mBAAC;AAAD,CAAC,AAnDD,CAAkC,aAAa,GAmD9C","sourcesContent":["import { Event, Response, Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event,\n reason: `Transport locked till ${this._disabledUntil} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer.add(\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = () => {\n if (request.readyState !== 4) {\n return;\n }\n\n const status = Status.fromHttpCode(request.status);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n if (status === Status.RateLimit) {\n const now = Date.now();\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After')));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n reject(request);\n };\n\n request.open('POST', this.url);\n for (const header in this.options.headers) {\n if (this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(JSON.stringify(event));\n }),\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/version.d.ts b/node_modules/@sentry/browser/esm/version.d.ts deleted file mode 100644 index 8418cd0..0000000 --- a/node_modules/@sentry/browser/esm/version.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const SDK_NAME = "sentry.javascript.browser"; -export declare const SDK_VERSION = "5.14.1"; -//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/version.d.ts.map b/node_modules/@sentry/browser/esm/version.d.ts.map deleted file mode 100644 index f0db4fd..0000000 --- a/node_modules/@sentry/browser/esm/version.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,8BAA8B,CAAC;AACpD,eAAO,MAAM,WAAW,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/version.js b/node_modules/@sentry/browser/esm/version.js deleted file mode 100644 index 76d4398..0000000 --- a/node_modules/@sentry/browser/esm/version.js +++ /dev/null @@ -1,3 +0,0 @@ -export var SDK_NAME = 'sentry.javascript.browser'; -export var SDK_VERSION = '5.14.1'; -//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/@sentry/browser/esm/version.js.map b/node_modules/@sentry/browser/esm/version.js.map deleted file mode 100644 index ddbcf26..0000000 --- a/node_modules/@sentry/browser/esm/version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,QAAQ,GAAG,2BAA2B,CAAC;AACpD,MAAM,CAAC,IAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_NAME = 'sentry.javascript.browser';\nexport const SDK_VERSION = '5.14.1';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/browser/package.json b/node_modules/@sentry/browser/package.json deleted file mode 100644 index 8c38dae..0000000 --- a/node_modules/@sentry/browser/package.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "_args": [ - [ - "@sentry/browser@5.14.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "@sentry/browser@5.14.1", - "_id": "@sentry/browser@5.14.1", - "_inBundle": false, - "_integrity": "sha1-zNgG13tO/xrmyh7DoIObm7td0kE=", - "_location": "/@sentry/browser", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@sentry/browser@5.14.1", - "name": "@sentry/browser", - "escapedName": "@sentry%2fbrowser", - "scope": "@sentry", - "rawSpec": "5.14.1", - "saveSpec": null, - "fetchSpec": "5.14.1" - }, - "_requiredBy": [ - "/@sentry/apm" - ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/browser/-/browser-5.14.1.tgz", - "_spec": "5.14.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", - "author": { - "name": "Sentry" - }, - "bugs": { - "url": "https://github.com/getsentry/sentry-javascript/issues" - }, - "dependencies": { - "@sentry/core": "5.14.1", - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "tslib": "^1.9.3" - }, - "description": "Official Sentry SDK for browsers", - "devDependencies": { - "@types/md5": "2.1.33", - "btoa": "^1.2.1", - "chai": "^4.1.2", - "chokidar": "^3.0.2", - "jest": "^24.7.1", - "jsdom": "^15.0.0", - "karma": "^4.1.0", - "karma-chai": "^0.1.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "karma-mocha-reporter": "^2.2.5", - "karma-rollup-preprocessor": "^7.0.0", - "karma-sinon": "^1.0.5", - "karma-typescript": "^4.0.0", - "karma-typescript-es6-transform": "^4.0.0", - "node-fetch": "^2.6.0", - "npm-run-all": "^4.1.2", - "prettier": "^1.17.0", - "prettier-check": "^2.0.0", - "rimraf": "^2.6.3", - "rollup": "^1.10.1", - "rollup-plugin-commonjs": "^9.3.4", - "rollup-plugin-license": "^0.8.1", - "rollup-plugin-node-resolve": "^4.2.3", - "rollup-plugin-terser": "^4.0.4", - "rollup-plugin-typescript2": "^0.21.0", - "sinon": "^7.3.2", - "tslint": "^5.16.0", - "typescript": "^3.4.5", - "webpack": "^4.30.0" - }, - "engines": { - "node": ">=6" - }, - "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser", - "license": "BSD-3-Clause", - "main": "dist/index.js", - "module": "esm/index.js", - "name": "@sentry/browser", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git://github.com/getsentry/sentry-javascript.git" - }, - "scripts": { - "build": "run-s build:dist build:esm build:bundle", - "build:bundle": "rollup --config", - "build:bundle:watch": "rollup --config --watch", - "build:dist": "tsc -p tsconfig.build.json", - "build:dist:watch": "tsc -p tsconfig.build.json -w --preserveWatchOutput", - "build:esm": "tsc -p tsconfig.esm.json", - "build:esm:watch": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", - "build:watch": "run-p build:dist:watch build:esm:watch build:bundle:watch", - "clean": "rimraf dist coverage .rpt2_cache build esm", - "fix": "run-s fix:tslint fix:prettier", - "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", - "fix:tslint": "tslint --fix -t stylish -p .", - "link:yarn": "yarn link", - "lint": "run-s lint:prettier lint:tslint", - "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", - "lint:tslint": "tslint -t stylish -p .", - "lint:tslint:json": "tslint --format json -p . | tee lint-results.json", - "size:check": "run-p size:check:es5 size:check:es6", - "size:check:es5": "cat build/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES5: \",$1,\"kB\";}'", - "size:check:es6": "cat build/bundle.es6.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES6: \",$1,\"kB\";}'", - "test": "run-s test:unit", - "test:integration": "test/integration/run.js", - "test:integration:checkbrowsers": "node scripts/checkbrowsers.js", - "test:integration:watch": "test/integration/run.js --watch", - "test:package": "node test/package/npm-build.js && rm test/package/tmp.js", - "test:unit": "karma start test/unit/karma.conf.js", - "test:unit:watch": "karma start test/unit/karma.conf.js --auto-watch --no-single-run", - "version": "node ../../scripts/versionbump.js src/version.ts" - }, - "sideEffects": false, - "types": "dist/index.d.ts", - "version": "5.14.1" -} diff --git a/node_modules/@sentry/core/LICENSE b/node_modules/@sentry/core/LICENSE index 8b42db8..535ef05 100644 --- a/node_modules/@sentry/core/LICENSE +++ b/node_modules/@sentry/core/LICENSE @@ -1,29 +1,14 @@ -BSD 3-Clause License +Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. -Copyright (c) 2019, Sentry -All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. -* 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. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@sentry/core/README.md b/node_modules/@sentry/core/README.md index b228fc6..3e44a1d 100644 --- a/node_modules/@sentry/core/README.md +++ b/node_modules/@sentry/core/README.md @@ -1,8 +1,7 @@ # Sentry JavaScript SDK Core @@ -10,7 +9,6 @@ [![npm version](https://img.shields.io/npm/v/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core) [![npm dm](https://img.shields.io/npm/dm/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core) [![npm dt](https://img.shields.io/npm/dt/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core) -[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/) ## Links diff --git a/node_modules/@sentry/core/dist/api.d.ts b/node_modules/@sentry/core/dist/api.d.ts deleted file mode 100644 index 86fcb42..0000000 --- a/node_modules/@sentry/core/dist/api.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { DsnLike } from '@sentry/types'; -import { Dsn } from '@sentry/utils'; -/** Helper class to provide urls to different Sentry endpoints. */ -export declare class API { - dsn: DsnLike; - /** The internally used Dsn object. */ - private readonly _dsnObject; - /** Create a new instance of API */ - constructor(dsn: DsnLike); - /** Returns the Dsn object. */ - getDsn(): Dsn; - /** Returns a string with auth headers in the url to the store endpoint. */ - getStoreEndpoint(): string; - /** Returns the store endpoint with auth added in url encoded. */ - getStoreEndpointWithUrlEncodedAuth(): string; - /** Returns the base path of the url including the port. */ - private _getBaseUrl; - /** Returns only the path component for the store endpoint. */ - getStoreEndpointPath(): string; - /** Returns an object that can be used in request headers. */ - getRequestHeaders(clientName: string, clientVersion: string): { - [key: string]: string; - }; - /** Returns the url to the report dialog endpoint. */ - getReportDialogEndpoint(dialogOptions?: { - [key: string]: any; - user?: { - name?: string; - email?: string; - }; - }): string; -} -//# sourceMappingURL=api.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/api.d.ts.map b/node_modules/@sentry/core/dist/api.d.ts.map deleted file mode 100644 index 47e9238..0000000 --- a/node_modules/@sentry/core/dist/api.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAa,MAAM,eAAe,CAAC;AAI/C,kEAAkE;AAClE,qBAAa,GAAG;IAIY,GAAG,EAAE,OAAO;IAHtC,sCAAsC;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAM;IACjC,mCAAmC;gBACT,GAAG,EAAE,OAAO;IAItC,8BAA8B;IACvB,MAAM,IAAI,GAAG;IAIpB,2EAA2E;IACpE,gBAAgB,IAAI,MAAM;IAIjC,iEAAiE;IAC1D,kCAAkC,IAAI,MAAM;IAWnD,2DAA2D;IAC3D,OAAO,CAAC,WAAW;IAOnB,8DAA8D;IACvD,oBAAoB,IAAI,MAAM;IAKrC,6DAA6D;IACtD,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAc9F,qDAAqD;IAC9C,uBAAuB,CAC5B,aAAa,GAAE;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;QACnB,IAAI,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACrC,GACL,MAAM;CA2BV"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/api.js b/node_modules/@sentry/core/dist/api.js deleted file mode 100644 index 9afebbd..0000000 --- a/node_modules/@sentry/core/dist/api.js +++ /dev/null @@ -1,87 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = require("@sentry/utils"); -var SENTRY_API_VERSION = '7'; -/** Helper class to provide urls to different Sentry endpoints. */ -var API = /** @class */ (function () { - /** Create a new instance of API */ - function API(dsn) { - this.dsn = dsn; - this._dsnObject = new utils_1.Dsn(dsn); - } - /** Returns the Dsn object. */ - API.prototype.getDsn = function () { - return this._dsnObject; - }; - /** Returns a string with auth headers in the url to the store endpoint. */ - API.prototype.getStoreEndpoint = function () { - return "" + this._getBaseUrl() + this.getStoreEndpointPath(); - }; - /** Returns the store endpoint with auth added in url encoded. */ - API.prototype.getStoreEndpointWithUrlEncodedAuth = function () { - var dsn = this._dsnObject; - var auth = { - sentry_key: dsn.user, - sentry_version: SENTRY_API_VERSION, - }; - // Auth is intentionally sent as part of query string (NOT as custom HTTP header) - // to avoid preflight CORS requests - return this.getStoreEndpoint() + "?" + utils_1.urlEncode(auth); - }; - /** Returns the base path of the url including the port. */ - API.prototype._getBaseUrl = function () { - var dsn = this._dsnObject; - var protocol = dsn.protocol ? dsn.protocol + ":" : ''; - var port = dsn.port ? ":" + dsn.port : ''; - return protocol + "//" + dsn.host + port; - }; - /** Returns only the path component for the store endpoint. */ - API.prototype.getStoreEndpointPath = function () { - var dsn = this._dsnObject; - return (dsn.path ? "/" + dsn.path : '') + "/api/" + dsn.projectId + "/store/"; - }; - /** Returns an object that can be used in request headers. */ - API.prototype.getRequestHeaders = function (clientName, clientVersion) { - var dsn = this._dsnObject; - var header = ["Sentry sentry_version=" + SENTRY_API_VERSION]; - header.push("sentry_client=" + clientName + "/" + clientVersion); - header.push("sentry_key=" + dsn.user); - if (dsn.pass) { - header.push("sentry_secret=" + dsn.pass); - } - return { - 'Content-Type': 'application/json', - 'X-Sentry-Auth': header.join(', '), - }; - }; - /** Returns the url to the report dialog endpoint. */ - API.prototype.getReportDialogEndpoint = function (dialogOptions) { - if (dialogOptions === void 0) { dialogOptions = {}; } - var dsn = this._dsnObject; - var endpoint = "" + this._getBaseUrl() + (dsn.path ? "/" + dsn.path : '') + "/api/embed/error-page/"; - var encodedOptions = []; - encodedOptions.push("dsn=" + dsn.toString()); - for (var key in dialogOptions) { - if (key === 'user') { - if (!dialogOptions.user) { - continue; - } - if (dialogOptions.user.name) { - encodedOptions.push("name=" + encodeURIComponent(dialogOptions.user.name)); - } - if (dialogOptions.user.email) { - encodedOptions.push("email=" + encodeURIComponent(dialogOptions.user.email)); - } - } - else { - encodedOptions.push(encodeURIComponent(key) + "=" + encodeURIComponent(dialogOptions[key])); - } - } - if (encodedOptions.length) { - return endpoint + "?" + encodedOptions.join('&'); - } - return endpoint; - }; - return API; -}()); -exports.API = API; -//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/api.js.map b/node_modules/@sentry/core/dist/api.js.map deleted file mode 100644 index 9384d00..0000000 --- a/node_modules/@sentry/core/dist/api.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";AACA,uCAA+C;AAE/C,IAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,kEAAkE;AAClE;IAGE,mCAAmC;IACnC,aAA0B,GAAY;QAAZ,QAAG,GAAH,GAAG,CAAS;QACpC,IAAI,CAAC,UAAU,GAAG,IAAI,WAAG,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,8BAA8B;IACvB,oBA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AAK,CAAG,CAAC,CAAC;iBAC9E;aACF;iBAAM;gBACL,cAAc,CAAC,IAAI,CAAI,kBAAkB,CAAC,GAAG,CAAC,SAAI,kBAAkB,CAAC,aAAa,CAAC,GAAG,CAAW,CAAG,CAAC,CAAC;aACvG;SACF;QACD,IAAI,cAAc,CAAC,MAAM,EAAE;YACzB,OAAU,QAAQ,SAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAG,CAAC;SAClD;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IACH,UAAC;AAAD,CAAC,AA5FD,IA4FC;AA5FY,kBAAG","sourcesContent":["import { DsnLike } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Helper class to provide urls to different Sentry endpoints. */\nexport class API {\n /** The internally used Dsn object. */\n private readonly _dsnObject: Dsn;\n /** Create a new instance of API */\n public constructor(public dsn: DsnLike) {\n this._dsnObject = new Dsn(dsn);\n }\n\n /** Returns the Dsn object. */\n public getDsn(): Dsn {\n return this._dsnObject;\n }\n\n /** Returns a string with auth headers in the url to the store endpoint. */\n public getStoreEndpoint(): string {\n return `${this._getBaseUrl()}${this.getStoreEndpointPath()}`;\n }\n\n /** Returns the store endpoint with auth added in url encoded. */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n const dsn = this._dsnObject;\n const auth = {\n sentry_key: dsn.user, // sentry_key is currently used in tracing integration to identify internal sentry requests\n sentry_version: SENTRY_API_VERSION,\n };\n // Auth is intentionally sent as part of query string (NOT as custom HTTP header)\n // to avoid preflight CORS requests\n return `${this.getStoreEndpoint()}?${urlEncode(auth)}`;\n }\n\n /** Returns the base path of the url including the port. */\n private _getBaseUrl(): string {\n const dsn = this._dsnObject;\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}`;\n }\n\n /** Returns only the path component for the store endpoint. */\n public getStoreEndpointPath(): string {\n const dsn = this._dsnObject;\n return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n }\n\n /** Returns an object that can be used in request headers. */\n public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n const dsn = this._dsnObject;\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.user}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n }\n\n /** Returns the url to the report dialog endpoint. */\n public getReportDialogEndpoint(\n dialogOptions: {\n [key: string]: any;\n user?: { name?: string; email?: string };\n } = {},\n ): string {\n const dsn = this._dsnObject;\n const endpoint = `${this._getBaseUrl()}${dsn.path ? `/${dsn.path}` : ''}/api/embed/error-page/`;\n\n const encodedOptions = [];\n encodedOptions.push(`dsn=${dsn.toString()}`);\n for (const key in dialogOptions) {\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n }\n } else {\n encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n }\n }\n if (encodedOptions.length) {\n return `${endpoint}?${encodedOptions.join('&')}`;\n }\n\n return endpoint;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/basebackend.d.ts b/node_modules/@sentry/core/dist/basebackend.d.ts deleted file mode 100644 index b828827..0000000 --- a/node_modules/@sentry/core/dist/basebackend.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Event, EventHint, Options, Severity, Transport } from '@sentry/types'; -/** - * Internal platform-dependent Sentry SDK Backend. - * - * While {@link Client} contains business logic specific to an SDK, the - * Backend offers platform specific implementations for low-level operations. - * These are persisting and loading information, sending events, and hooking - * into the environment. - * - * Backends receive a handle to the Client in their constructor. When a - * Backend automatically generates events, it must pass them to - * the Client for validation and processing first. - * - * Usually, the Client will be of corresponding type, e.g. NodeBackend - * receives NodeClient. However, higher-level SDKs can choose to instanciate - * multiple Backends and delegate tasks between them. In this case, an event - * generated by one backend might very well be sent by another one. - * - * The client also provides access to options via {@link Client.getOptions}. - * @hidden - */ -export interface Backend { - /** Creates a {@link Event} from an exception. */ - eventFromException(exception: any, hint?: EventHint): PromiseLike; - /** Creates a {@link Event} from a plain message. */ - eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike; - /** Submits the event to Sentry */ - sendEvent(event: Event): void; - /** - * Returns the transport that is used by the backend. - * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent. - * - * @returns The transport. - */ - getTransport(): Transport; -} -/** - * A class object that can instanciate Backend objects. - * @hidden - */ -export declare type BackendClass = new (options: O) => B; -/** - * This is the base implemention of a Backend. - * @hidden - */ -export declare abstract class BaseBackend implements Backend { - /** Options passed to the SDK. */ - protected readonly _options: O; - /** Cached transport used internally. */ - protected _transport: Transport; - /** Creates a new backend instance. */ - constructor(options: O); - /** - * Sets up the transport so it can be used later to send requests. - */ - protected _setupTransport(): Transport; - /** - * @inheritDoc - */ - eventFromException(_exception: any, _hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - sendEvent(event: Event): void; - /** - * @inheritDoc - */ - getTransport(): Transport; -} -//# sourceMappingURL=basebackend.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/basebackend.d.ts.map b/node_modules/@sentry/core/dist/basebackend.d.ts.map deleted file mode 100644 index 14f4db8..0000000 --- a/node_modules/@sentry/core/dist/basebackend.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"basebackend.d.ts","sourceRoot":"","sources":["../src/basebackend.ts"],"names":[],"mappings":"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AInG;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAMpC;;OAEG;IACI,YAAY,IAAI,SAAS;CAGjC"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/basebackend.js b/node_modules/@sentry/core/dist/basebackend.js deleted file mode 100644 index dbfb1b6..0000000 --- a/node_modules/@sentry/core/dist/basebackend.js +++ /dev/null @@ -1,52 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = require("@sentry/utils"); -var noop_1 = require("./transports/noop"); -/** - * This is the base implemention of a Backend. - * @hidden - */ -var BaseBackend = /** @class */ (function () { - /** Creates a new backend instance. */ - function BaseBackend(options) { - this._options = options; - if (!this._options.dsn) { - utils_1.logger.warn('No DSN provided, backend will not do anything.'); - } - this._transport = this._setupTransport(); - } - /** - * Sets up the transport so it can be used later to send requests. - */ - BaseBackend.prototype._setupTransport = function () { - return new noop_1.NoopTransport(); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.eventFromException = function (_exception, _hint) { - throw new utils_1.SentryError('Backend has to implement `eventFromException` method'); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) { - throw new utils_1.SentryError('Backend has to implement `eventFromMessage` method'); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.sendEvent = function (event) { - this._transport.sendEvent(event).then(null, function (reason) { - utils_1.logger.error("Error while sending event: " + reason); - }); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.getTransport = function () { - return this._transport; - }; - return BaseBackend; -}()); -exports.BaseBackend = BaseBackend; -//# sourceMappingURL=basebackend.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/basebackend.js.map b/node_modules/@sentry/core/dist/basebackend.js.map deleted file mode 100644 index 476d5b4..0000000 --- a/node_modules/@sentry/core/dist/basebackend.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"basebackend.js","sourceRoot":"","sources":["../src/basebackend.ts"],"names":[],"mappings":";AACA,uCAAoD;AAEpD,0CAAkD;AA+ClD;;;GAGG;AACH;IAOE,sCAAsC;IACtC,qBAAmB,OAAU;QAC3B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACtB,cAAM,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;SAC/D;QACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3C,CAAC;IAED;;OAEG;IACO,qCAAe,GAAzB;QACE,OAAO,IAAI,oBAAa,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACI,wCAAkB,GAAzB,UAA0B,UAAe,EAAE,KAAiB;QAC1D,MAAM,IAAI,mBAAW,CAAC,sDAAsD,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACI,sCAAgB,GAAvB,UAAwB,QAAgB,EAAE,MAAiB,EAAE,KAAiB;QAC5E,MAAM,IAAI,mBAAW,CAAC,oDAAoD,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACI,+BAAS,GAAhB,UAAiB,KAAY;QAC3B,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,UAAA,MAAM;YAChD,cAAM,CAAC,KAAK,CAAC,gCAA8B,MAAQ,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,kCAAY,GAAnB;QACE,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACH,kBAAC;AAAD,CAAC,AApDD,IAoDC;AApDqB,kCAAW","sourcesContent":["import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instanciate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates a {@link Event} from an exception. */\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates a {@link Event} from a plain message. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instanciate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n this._transport.sendEvent(event).then(null, reason => {\n logger.error(`Error while sending event: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/baseclient.d.ts b/node_modules/@sentry/core/dist/baseclient.d.ts deleted file mode 100644 index 8bfcf46..0000000 --- a/node_modules/@sentry/core/dist/baseclient.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { Scope } from '@sentry/hub'; -import { Client, Event, EventHint, Integration, IntegrationClass, Options, SdkInfo, Severity } from '@sentry/types'; -import { Dsn } from '@sentry/utils'; -import { Backend, BackendClass } from './basebackend'; -import { IntegrationIndex } from './integration'; -/** - * Base implementation for all JavaScript SDK clients. - * - * Call the constructor with the corresponding backend constructor and options - * specific to the client subclass. To access these options later, use - * {@link Client.getOptions}. Also, the Backend instance is available via - * {@link Client.getBackend}. - * - * If a Dsn is specified in the options, it will be parsed and stored. Use - * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is - * invalid, the constructor will throw a {@link SentryException}. Note that - * without a valid Dsn, the SDK will not send any events to Sentry. - * - * Before sending an event via the backend, it is passed through - * {@link BaseClient.prepareEvent} to add SDK information and scope data - * (breadcrumbs and context). To add more custom information, override this - * method and extend the resulting prepared event. - * - * To issue automatically created events (e.g. via instrumentation), use - * {@link Client.captureEvent}. It will prepare the event and pass it through - * the callback lifecycle. To issue auto-breadcrumbs, use - * {@link Client.addBreadcrumb}. - * - * @example - * class NodeClient extends BaseClient { - * public constructor(options: NodeOptions) { - * super(NodeBackend, options); - * } - * - * // ... - * } - */ -export declare abstract class BaseClient implements Client { - /** - * The backend used to physically interact in the enviornment. Usually, this - * will correspond to the client. When composing SDKs, however, the Backend - * from the root SDK will be used. - */ - protected readonly _backend: B; - /** Options passed to the SDK. */ - protected readonly _options: O; - /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ - protected readonly _dsn?: Dsn; - /** Array of used integrations. */ - protected readonly _integrations: IntegrationIndex; - /** Is the client still processing a call? */ - protected _processing: boolean; - /** - * Initializes this client instance. - * - * @param backendClass A constructor function to create the backend. - * @param options Options for the client. - */ - protected constructor(backendClass: BackendClass, options: O); - /** - * @inheritDoc - */ - captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined; - /** - * @inheritDoc - */ - captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined; - /** - * @inheritDoc - */ - captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined; - /** - * @inheritDoc - */ - getDsn(): Dsn | undefined; - /** - * @inheritDoc - */ - getOptions(): O; - /** - * @inheritDoc - */ - flush(timeout?: number): PromiseLike; - /** - * @inheritDoc - */ - close(timeout?: number): PromiseLike; - /** - * @inheritDoc - */ - getIntegrations(): IntegrationIndex; - /** - * @inheritDoc - */ - getIntegration(integration: IntegrationClass): T | null; - /** Waits for the client to be done with processing. */ - protected _isClientProcessing(timeout?: number): PromiseLike<{ - ready: boolean; - interval: number; - }>; - /** Returns the current backend. */ - protected _getBackend(): B; - /** Determines whether this SDK is enabled and a valid Dsn is present. */ - protected _isEnabled(): boolean; - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - */ - protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike; - /** - * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization. - * Normalized keys: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * @param event Event - * @returns Normalized event - */ - protected _normalizeEvent(event: Event | null, depth: number): Event | null; - /** - * This function adds all used integrations to the SDK info in the event. - * @param sdkInfo The sdkInfo of the event that will be filled with all integrations. - */ - protected _addIntegrations(sdkInfo?: SdkInfo): void; - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike; - /** - * Resolves before send Promise and calls resolve/reject on parent SyncPromise. - */ - private _handleAsyncBeforeSend; -} -//# sourceMappingURL=baseclient.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/baseclient.d.ts.map b/node_modules/@sentry/core/dist/baseclient.d.ts.map deleted file mode 100644 index ce1ff3f..0000000 --- a/node_modules/@sentry/core/dist/baseclient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"baseclient.d.ts","sourceRoot":"","sources":["../src/baseclient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,GAAG,EAA4E,MAAM,eAAe,CAAC;AAE9G,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAqB,MAAM,eAAe,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,8BAAsB,UAAU,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,OAAO,CAAE,YAAW,MAAM,CAAC,CAAC,CAAC;IACzF;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE/B,iCAAiC;IACjC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE/B,2FAA2F;IAC3F,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG,CAA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AM,CAAA;KAAE,CAAC;IA2BlG,mCAAmC;IACnC,SAAS,CAAC,WAAW,IAAI,CAAC;IAI1B,yEAAyE;IACzE,SAAS,CAAC,UAAU,IAAI,OAAO;IAI/B;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAsDjG;;;;;;;;;OASG;IACH,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI;IA4B3E;;;OAGG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAOnD;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IAgE1F;;OAEG;IACH,OAAO,CAAC,sBAAsB;CAmB/B"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/baseclient.js b/node_modules/@sentry/core/dist/baseclient.js deleted file mode 100644 index dca9c07..0000000 --- a/node_modules/@sentry/core/dist/baseclient.js +++ /dev/null @@ -1,395 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var utils_1 = require("@sentry/utils"); -var integration_1 = require("./integration"); -/** - * Base implementation for all JavaScript SDK clients. - * - * Call the constructor with the corresponding backend constructor and options - * specific to the client subclass. To access these options later, use - * {@link Client.getOptions}. Also, the Backend instance is available via - * {@link Client.getBackend}. - * - * If a Dsn is specified in the options, it will be parsed and stored. Use - * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is - * invalid, the constructor will throw a {@link SentryException}. Note that - * without a valid Dsn, the SDK will not send any events to Sentry. - * - * Before sending an event via the backend, it is passed through - * {@link BaseClient.prepareEvent} to add SDK information and scope data - * (breadcrumbs and context). To add more custom information, override this - * method and extend the resulting prepared event. - * - * To issue automatically created events (e.g. via instrumentation), use - * {@link Client.captureEvent}. It will prepare the event and pass it through - * the callback lifecycle. To issue auto-breadcrumbs, use - * {@link Client.addBreadcrumb}. - * - * @example - * class NodeClient extends BaseClient { - * public constructor(options: NodeOptions) { - * super(NodeBackend, options); - * } - * - * // ... - * } - */ -var BaseClient = /** @class */ (function () { - /** - * Initializes this client instance. - * - * @param backendClass A constructor function to create the backend. - * @param options Options for the client. - */ - function BaseClient(backendClass, options) { - /** Array of used integrations. */ - this._integrations = {}; - /** Is the client still processing a call? */ - this._processing = false; - this._backend = new backendClass(options); - this._options = options; - if (options.dsn) { - this._dsn = new utils_1.Dsn(options.dsn); - } - if (this._isEnabled()) { - this._integrations = integration_1.setupIntegrations(this._options); - } - } - /** - * @inheritDoc - */ - BaseClient.prototype.captureException = function (exception, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - this._getBackend() - .eventFromException(exception, hint) - .then(function (event) { return _this._processEvent(event, hint, scope); }) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - utils_1.logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.captureMessage = function (message, level, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - var promisedEvent = utils_1.isPrimitive(message) - ? this._getBackend().eventFromMessage("" + message, level, hint) - : this._getBackend().eventFromException(message, hint); - promisedEvent - .then(function (event) { return _this._processEvent(event, hint, scope); }) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - utils_1.logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.captureEvent = function (event, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - this._processEvent(event, hint, scope) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - utils_1.logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getDsn = function () { - return this._dsn; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getOptions = function () { - return this._options; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.flush = function (timeout) { - var _this = this; - return this._isClientProcessing(timeout).then(function (status) { - clearInterval(status.interval); - return _this._getBackend() - .getTransport() - .close(timeout) - .then(function (transportFlushed) { return status.ready && transportFlushed; }); - }); - }; - /** - * @inheritDoc - */ - BaseClient.prototype.close = function (timeout) { - var _this = this; - return this.flush(timeout).then(function (result) { - _this.getOptions().enabled = false; - return result; - }); - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getIntegrations = function () { - return this._integrations || {}; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getIntegration = function (integration) { - try { - return this._integrations[integration.id] || null; - } - catch (_oO) { - utils_1.logger.warn("Cannot retrieve integration " + integration.id + " from the current Client"); - return null; - } - }; - /** Waits for the client to be done with processing. */ - BaseClient.prototype._isClientProcessing = function (timeout) { - var _this = this; - return new utils_1.SyncPromise(function (resolve) { - var ticked = 0; - var tick = 1; - var interval = 0; - clearInterval(interval); - interval = setInterval(function () { - if (!_this._processing) { - resolve({ - interval: interval, - ready: true, - }); - } - else { - ticked += tick; - if (timeout && ticked >= timeout) { - resolve({ - interval: interval, - ready: false, - }); - } - } - }, tick); - }); - }; - /** Returns the current backend. */ - BaseClient.prototype._getBackend = function () { - return this._backend; - }; - /** Determines whether this SDK is enabled and a valid Dsn is present. */ - BaseClient.prototype._isEnabled = function () { - return this.getOptions().enabled !== false && this._dsn !== undefined; - }; - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - */ - BaseClient.prototype._prepareEvent = function (event, scope, hint) { - var _this = this; - var _a = this.getOptions(), environment = _a.environment, release = _a.release, dist = _a.dist, _b = _a.maxValueLength, maxValueLength = _b === void 0 ? 250 : _b, _c = _a.normalizeDepth, normalizeDepth = _c === void 0 ? 3 : _c; - var prepared = tslib_1.__assign({}, event); - if (prepared.environment === undefined && environment !== undefined) { - prepared.environment = environment; - } - if (prepared.release === undefined && release !== undefined) { - prepared.release = release; - } - if (prepared.dist === undefined && dist !== undefined) { - prepared.dist = dist; - } - if (prepared.message) { - prepared.message = utils_1.truncate(prepared.message, maxValueLength); - } - var exception = prepared.exception && prepared.exception.values && prepared.exception.values[0]; - if (exception && exception.value) { - exception.value = utils_1.truncate(exception.value, maxValueLength); - } - var request = prepared.request; - if (request && request.url) { - request.url = utils_1.truncate(request.url, maxValueLength); - } - if (prepared.event_id === undefined) { - prepared.event_id = hint && hint.event_id ? hint.event_id : utils_1.uuid4(); - } - this._addIntegrations(prepared.sdk); - // We prepare the result here with a resolved Event. - var result = utils_1.SyncPromise.resolve(prepared); - // This should be the last thing called, since we want that - // {@link Hub.addEventProcessor} gets the finished prepared event. - if (scope) { - // In case we have a hub we reassign it. - result = scope.applyToEvent(prepared, hint); - } - return result.then(function (evt) { - // tslint:disable-next-line:strict-type-predicates - if (typeof normalizeDepth === 'number' && normalizeDepth > 0) { - return _this._normalizeEvent(evt, normalizeDepth); - } - return evt; - }); - }; - /** - * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization. - * Normalized keys: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * @param event Event - * @returns Normalized event - */ - BaseClient.prototype._normalizeEvent = function (event, depth) { - if (!event) { - return null; - } - // tslint:disable:no-unsafe-any - return tslib_1.__assign({}, event, (event.breadcrumbs && { - breadcrumbs: event.breadcrumbs.map(function (b) { return (tslib_1.__assign({}, b, (b.data && { - data: utils_1.normalize(b.data, depth), - }))); }), - }), (event.user && { - user: utils_1.normalize(event.user, depth), - }), (event.contexts && { - contexts: utils_1.normalize(event.contexts, depth), - }), (event.extra && { - extra: utils_1.normalize(event.extra, depth), - })); - }; - /** - * This function adds all used integrations to the SDK info in the event. - * @param sdkInfo The sdkInfo of the event that will be filled with all integrations. - */ - BaseClient.prototype._addIntegrations = function (sdkInfo) { - var integrationsArray = Object.keys(this._integrations); - if (sdkInfo && integrationsArray.length > 0) { - sdkInfo.integrations = integrationsArray; - } - }; - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - BaseClient.prototype._processEvent = function (event, hint, scope) { - var _this = this; - var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate; - if (!this._isEnabled()) { - return utils_1.SyncPromise.reject('SDK not enabled, will not send event.'); - } - // 1.0 === 100% events are sent - // 0.0 === 0% events are sent - if (typeof sampleRate === 'number' && Math.random() > sampleRate) { - return utils_1.SyncPromise.reject('This event has been sampled, will not send event.'); - } - return new utils_1.SyncPromise(function (resolve, reject) { - _this._prepareEvent(event, scope, hint) - .then(function (prepared) { - if (prepared === null) { - reject('An event processor returned null, will not send event.'); - return; - } - var finalEvent = prepared; - var isInternalException = hint && hint.data && hint.data.__sentry__ === true; - if (isInternalException || !beforeSend) { - _this._getBackend().sendEvent(finalEvent); - resolve(finalEvent); - return; - } - var beforeSendResult = beforeSend(prepared, hint); - // tslint:disable-next-line:strict-type-predicates - if (typeof beforeSendResult === 'undefined') { - utils_1.logger.error('`beforeSend` method has to return `null` or a valid event.'); - } - else if (utils_1.isThenable(beforeSendResult)) { - _this._handleAsyncBeforeSend(beforeSendResult, resolve, reject); - } - else { - finalEvent = beforeSendResult; - if (finalEvent === null) { - utils_1.logger.log('`beforeSend` returned `null`, will not send event.'); - resolve(null); - return; - } - // From here on we are really async - _this._getBackend().sendEvent(finalEvent); - resolve(finalEvent); - } - }) - .then(null, function (reason) { - _this.captureException(reason, { - data: { - __sentry__: true, - }, - originalException: reason, - }); - reject("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: " + reason); - }); - }); - }; - /** - * Resolves before send Promise and calls resolve/reject on parent SyncPromise. - */ - BaseClient.prototype._handleAsyncBeforeSend = function (beforeSend, resolve, reject) { - var _this = this; - beforeSend - .then(function (processedEvent) { - if (processedEvent === null) { - reject('`beforeSend` returned `null`, will not send event.'); - return; - } - // From here on we are really async - _this._getBackend().sendEvent(processedEvent); - resolve(processedEvent); - }) - .then(null, function (e) { - reject("beforeSend rejected with " + e); - }); - }; - return BaseClient; -}()); -exports.BaseClient = BaseClient; -//# sourceMappingURL=baseclient.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/baseclient.js.map b/node_modules/@sentry/core/dist/baseclient.js.map deleted file mode 100644 index 2d98cf5..0000000 --- a/node_modules/@sentry/core/dist/baseclient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"baseclient.js","sourceRoot":"","sources":["../src/baseclient.ts"],"names":[],"mappings":";;AAEA,uCAA8G;AAG9G,6CAAoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IAoBE;;;;;OAKG;IACH,oBAAsB,YAAgC,EAAE,OAAU;QAZlE,kCAAkC;QACf,kBAAa,GAAqB,EAAE,CAAC;QAExD,6CAA6C;QACnC,gBAAW,GAAY,KAAK,CAAC;QASrC,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,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B,MAAM,CAAC,oDAAoD,CAAC,CAAC;gBAC7D,OAAO;aACR;YACD,mCAAmC;YACnC,KAAI,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;YAC7C,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,EAAE,UAAA,CAAC;YACX,MAAM,CAAC,8BAA4B,CAAG,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACP,CAAC;IACH,iBAAC;AAAD,CAAC,AApaD,IAoaC;AApaqB,gCAAU","sourcesContent":["import { Scope } from '@sentry/hub';\nimport { Client, Event, EventHint, Integration, IntegrationClass, Options, SdkInfo, Severity } from '@sentry/types';\nimport { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, truncate, uuid4 } from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the enviornment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: Dsn;\n\n /** Array of used integrations. */\n protected readonly _integrations: IntegrationIndex = {};\n\n /** Is the client still processing a call? */\n protected _processing: boolean = false;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n this._processing = true;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(`${message}`, level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n promisedEvent\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._processEvent(event, hint, scope)\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): Dsn | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientProcessing(timeout).then(status => {\n clearInterval(status.interval);\n return this._getBackend()\n .getTransport()\n .close(timeout)\n .then(transportFlushed => status.ready && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * @inheritDoc\n */\n public getIntegrations(): IntegrationIndex {\n return this._integrations || {};\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Waits for the client to be done with processing. */\n protected _isClientProcessing(timeout?: number): PromiseLike<{ ready: boolean; interval: number }> {\n return new SyncPromise<{ ready: boolean; interval: number }>(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n let interval = 0;\n clearInterval(interval);\n\n interval = (setInterval(() => {\n if (!this._processing) {\n resolve({\n interval,\n ready: true,\n });\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n resolve({\n interval,\n ready: false,\n });\n }\n }\n }, tick) as unknown) as number;\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { environment, release, dist, maxValueLength = 250, normalizeDepth = 3 } = this.getOptions();\n\n const prepared: Event = { ...event };\n if (prepared.environment === undefined && environment !== undefined) {\n prepared.environment = environment;\n }\n if (prepared.release === undefined && release !== undefined) {\n prepared.release = release;\n }\n\n if (prepared.dist === undefined && dist !== undefined) {\n prepared.dist = dist;\n }\n\n if (prepared.message) {\n prepared.message = truncate(prepared.message, maxValueLength);\n }\n\n const exception = prepared.exception && prepared.exception.values && prepared.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = prepared.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n\n if (prepared.event_id === undefined) {\n prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4();\n }\n\n this._addIntegrations(prepared.sdk);\n\n // We prepare the result here with a resolved Event.\n let result = SyncPromise.resolve(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (scope) {\n // In case we have a hub we reassign it.\n result = scope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n // tslint:disable:no-unsafe-any\n return {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n protected _addIntegrations(sdkInfo?: SdkInfo): void {\n const integrationsArray = Object.keys(this._integrations);\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n const { beforeSend, sampleRate } = this.getOptions();\n\n if (!this._isEnabled()) {\n return SyncPromise.reject('SDK not enabled, will not send event.');\n }\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n if (typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject('This event has been sampled, will not send event.');\n }\n\n return new SyncPromise((resolve, reject) => {\n this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n reject('An event processor returned null, will not send event.');\n return;\n }\n\n let finalEvent: Event | null = prepared;\n\n const isInternalException = hint && hint.data && (hint.data as { [key: string]: any }).__sentry__ === true;\n if (isInternalException || !beforeSend) {\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n return;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n // tslint:disable-next-line:strict-type-predicates\n if (typeof beforeSendResult === 'undefined') {\n logger.error('`beforeSend` method has to return `null` or a valid event.');\n } else if (isThenable(beforeSendResult)) {\n this._handleAsyncBeforeSend(beforeSendResult as PromiseLike, resolve, reject);\n } else {\n finalEvent = beforeSendResult as Event | null;\n\n if (finalEvent === null) {\n logger.log('`beforeSend` returned `null`, will not send event.');\n resolve(null);\n return;\n }\n\n // From here on we are really async\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n }\n })\n .then(null, reason => {\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n reject(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n });\n }\n\n /**\n * Resolves before send Promise and calls resolve/reject on parent SyncPromise.\n */\n private _handleAsyncBeforeSend(\n beforeSend: PromiseLike,\n resolve: (event: Event) => void,\n reject: (reason: string) => void,\n ): void {\n beforeSend\n .then(processedEvent => {\n if (processedEvent === null) {\n reject('`beforeSend` returned `null`, will not send event.');\n return;\n }\n // From here on we are really async\n this._getBackend().sendEvent(processedEvent);\n resolve(processedEvent);\n })\n .then(null, e => {\n reject(`beforeSend rejected with ${e}`);\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/index.d.ts b/node_modules/@sentry/core/dist/index.d.ts deleted file mode 100644 index 5411ab3..0000000 --- a/node_modules/@sentry/core/dist/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/minimal'; -export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub'; -export { API } from './api'; -export { BaseClient } from './baseclient'; -export { BackendClass, BaseBackend } from './basebackend'; -export { initAndBind, ClientClass } from './sdk'; -export { NoopTransport } from './transports/noop'; -import * as Integrations from './integrations'; -export { Integrations }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/index.d.ts.map b/node_modules/@sentry/core/dist/index.d.ts.map deleted file mode 100644 index 22b48e9..0000000 --- a/node_modules/@sentry/core/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/index.js b/node_modules/@sentry/core/dist/index.js deleted file mode 100644 index 2b36f03..0000000 --- a/node_modules/@sentry/core/dist/index.js +++ /dev/null @@ -1,33 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var minimal_1 = require("@sentry/minimal"); -exports.addBreadcrumb = minimal_1.addBreadcrumb; -exports.captureException = minimal_1.captureException; -exports.captureEvent = minimal_1.captureEvent; -exports.captureMessage = minimal_1.captureMessage; -exports.configureScope = minimal_1.configureScope; -exports.setContext = minimal_1.setContext; -exports.setExtra = minimal_1.setExtra; -exports.setExtras = minimal_1.setExtras; -exports.setTag = minimal_1.setTag; -exports.setTags = minimal_1.setTags; -exports.setUser = minimal_1.setUser; -exports.withScope = minimal_1.withScope; -var hub_1 = require("@sentry/hub"); -exports.addGlobalEventProcessor = hub_1.addGlobalEventProcessor; -exports.getCurrentHub = hub_1.getCurrentHub; -exports.getHubFromCarrier = hub_1.getHubFromCarrier; -exports.Hub = hub_1.Hub; -exports.Scope = hub_1.Scope; -var api_1 = require("./api"); -exports.API = api_1.API; -var baseclient_1 = require("./baseclient"); -exports.BaseClient = baseclient_1.BaseClient; -var basebackend_1 = require("./basebackend"); -exports.BaseBackend = basebackend_1.BaseBackend; -var sdk_1 = require("./sdk"); -exports.initAndBind = sdk_1.initAndBind; -var noop_1 = require("./transports/noop"); -exports.NoopTransport = noop_1.NoopTransport; -var Integrations = require("./integrations"); -exports.Integrations = Integrations; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/index.js.map b/node_modules/@sentry/core/dist/index.js.map deleted file mode 100644 index b96fcb7..0000000 --- a/node_modules/@sentry/core/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,2CAayB;AAZvB,kCAAA,aAAa,CAAA;AACb,qCAAA,gBAAgB,CAAA;AAChB,iCAAA,YAAY,CAAA;AACZ,mCAAA,cAAc,CAAA;AACd,mCAAA,cAAc,CAAA;AACd,+BAAA,UAAU,CAAA;AACV,6BAAA,QAAQ,CAAA;AACR,8BAAA,SAAS,CAAA;AACT,2BAAA,MAAM,CAAA;AACN,4BAAA,OAAO,CAAA;AACP,4BAAA,OAAO,CAAA;AACP,8BAAA,SAAS,CAAA;AAEX,mCAAoG;AAA3F,wCAAA,uBAAuB,CAAA;AAAE,8BAAA,aAAa,CAAA;AAAE,kCAAA,iBAAiB,CAAA;AAAE,oBAAA,GAAG,CAAA;AAAE,sBAAA,KAAK,CAAA;AAC9E,6BAA4B;AAAnB,oBAAA,GAAG,CAAA;AACZ,2CAA0C;AAAjC,kCAAA,UAAU,CAAA;AACnB,6CAA0D;AAAnC,oCAAA,WAAW,CAAA;AAClC,6BAAiD;AAAxC,4BAAA,WAAW,CAAA;AACpB,0CAAkD;AAAzC,+BAAA,aAAa,CAAA;AAEtB,6CAA+C;AAEtC,oCAAY","sourcesContent":["export {\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from '@sentry/minimal';\nexport { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub';\nexport { API } from './api';\nexport { BaseClient } from './baseclient';\nexport { BackendClass, BaseBackend } from './basebackend';\nexport { initAndBind, ClientClass } from './sdk';\nexport { NoopTransport } from './transports/noop';\n\nimport * as Integrations from './integrations';\n\nexport { Integrations };\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integration.d.ts b/node_modules/@sentry/core/dist/integration.d.ts deleted file mode 100644 index 16a0f8e..0000000 --- a/node_modules/@sentry/core/dist/integration.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Integration, Options } from '@sentry/types'; -export declare const installedIntegrations: string[]; -/** Map of integrations assigned to a client */ -export interface IntegrationIndex { - [key: string]: Integration; -} -/** Gets integration to install */ -export declare function getIntegrationsToSetup(options: Options): Integration[]; -/** Setup given integration */ -export declare function setupIntegration(integration: Integration): void; -/** - * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default - * integrations are added unless they were already provided before. - * @param integrations array of integration instances - * @param withDefault should enable default integrations - */ -export declare function setupIntegrations(options: O): IntegrationIndex; -//# sourceMappingURL=integration.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integration.d.ts.map b/node_modules/@sentry/core/dist/integration.d.ts.map deleted file mode 100644 index 4ece78d..0000000 --- a/node_modules/@sentry/core/dist/integration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGrD,eAAO,MAAM,qBAAqB,EAAE,MAAM,EAAO,CAAC;AAElD,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B;AAED,kCAAkC;AAClC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAyCtE;AAED,8BAA8B;AAC9B,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAO/D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAOjF"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integration.js b/node_modules/@sentry/core/dist/integration.js deleted file mode 100644 index d652707..0000000 --- a/node_modules/@sentry/core/dist/integration.js +++ /dev/null @@ -1,71 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var hub_1 = require("@sentry/hub"); -var utils_1 = require("@sentry/utils"); -exports.installedIntegrations = []; -/** Gets integration to install */ -function getIntegrationsToSetup(options) { - var defaultIntegrations = (options.defaultIntegrations && tslib_1.__spread(options.defaultIntegrations)) || []; - var userIntegrations = options.integrations; - var integrations = []; - if (Array.isArray(userIntegrations)) { - var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; }); - var pickedIntegrationsNames_1 = []; - // Leave only unique default integrations, that were not overridden with provided user integrations - defaultIntegrations.forEach(function (defaultIntegration) { - if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 && - pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) { - integrations.push(defaultIntegration); - pickedIntegrationsNames_1.push(defaultIntegration.name); - } - }); - // Don't add same user integration twice - userIntegrations.forEach(function (userIntegration) { - if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) { - integrations.push(userIntegration); - pickedIntegrationsNames_1.push(userIntegration.name); - } - }); - } - else if (typeof userIntegrations === 'function') { - integrations = userIntegrations(defaultIntegrations); - integrations = Array.isArray(integrations) ? integrations : [integrations]; - } - else { - integrations = tslib_1.__spread(defaultIntegrations); - } - // Make sure that if present, `Debug` integration will always run last - var integrationsNames = integrations.map(function (i) { return i.name; }); - var alwaysLastToRun = 'Debug'; - if (integrationsNames.indexOf(alwaysLastToRun) !== -1) { - integrations.push.apply(integrations, tslib_1.__spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1))); - } - return integrations; -} -exports.getIntegrationsToSetup = getIntegrationsToSetup; -/** Setup given integration */ -function setupIntegration(integration) { - if (exports.installedIntegrations.indexOf(integration.name) !== -1) { - return; - } - integration.setupOnce(hub_1.addGlobalEventProcessor, hub_1.getCurrentHub); - exports.installedIntegrations.push(integration.name); - utils_1.logger.log("Integration installed: " + integration.name); -} -exports.setupIntegration = setupIntegration; -/** - * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default - * integrations are added unless they were already provided before. - * @param integrations array of integration instances - * @param withDefault should enable default integrations - */ -function setupIntegrations(options) { - var integrations = {}; - getIntegrationsToSetup(options).forEach(function (integration) { - integrations[integration.name] = integration; - setupIntegration(integration); - }); - return integrations; -} -exports.setupIntegrations = setupIntegrations; -//# sourceMappingURL=integration.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integration.js.map b/node_modules/@sentry/core/dist/integration.js.map deleted file mode 100644 index 93452a2..0000000 --- a/node_modules/@sentry/core/dist/integration.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":";;AAAA,mCAAqE;AAErE,uCAAuC;AAE1B,QAAA,qBAAqB,GAAa,EAAE,CAAC;AAOlD,kCAAkC;AAClC,SA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CAAC;IACH,OAAO,YAAY,CAAC;AACtB,CAAC;AAPD,8CAOC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport interface IntegrationIndex {\n [key: string]: Integration;\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n let integrations: Integration[] = [];\n if (Array.isArray(userIntegrations)) {\n const userIntegrationsNames = userIntegrations.map(i => i.name);\n const pickedIntegrationsNames: string[] = [];\n\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(defaultIntegration => {\n if (\n userIntegrationsNames.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames.indexOf(defaultIntegration.name) === -1\n ) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames.push(defaultIntegration.name);\n }\n });\n\n // Don't add same user integration twice\n userIntegrations.forEach(userIntegration => {\n if (pickedIntegrationsNames.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames.push(userIntegration.name);\n }\n });\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n } else {\n integrations = [...defaultIntegrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/functiontostring.d.ts b/node_modules/@sentry/core/dist/integrations/functiontostring.d.ts deleted file mode 100644 index 71193dd..0000000 --- a/node_modules/@sentry/core/dist/integrations/functiontostring.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Patch toString calls to return proper name for wrapped functions */ -export declare class FunctionToString implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - setupOnce(): void; -} -//# sourceMappingURL=functiontostring.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/functiontostring.d.ts.map b/node_modules/@sentry/core/dist/integrations/functiontostring.d.ts.map deleted file mode 100644 index 467e122..0000000 --- a/node_modules/@sentry/core/dist/integrations/functiontostring.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"functiontostring.d.ts","sourceRoot":"","sources":["../../src/integrations/functiontostring.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAI7D,uEAAuE;AACvE,qBAAa,gBAAiB,YAAW,WAAW;IAClD;;OAEG;IACI,IAAI,EAAE,MAAM,CAAuB;IAE1C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAsB;IAE9C;;OAEG;IACI,SAAS,IAAI,IAAI;CASzB"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/functiontostring.js b/node_modules/@sentry/core/dist/integrations/functiontostring.js deleted file mode 100644 index d411c9f..0000000 --- a/node_modules/@sentry/core/dist/integrations/functiontostring.js +++ /dev/null @@ -1,33 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var originalFunctionToString; -/** Patch toString calls to return proper name for wrapped functions */ -var FunctionToString = /** @class */ (function () { - function FunctionToString() { - /** - * @inheritDoc - */ - this.name = FunctionToString.id; - } - /** - * @inheritDoc - */ - FunctionToString.prototype.setupOnce = function () { - originalFunctionToString = Function.prototype.toString; - Function.prototype.toString = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var context = this.__sentry_original__ || this; - // tslint:disable-next-line:no-unsafe-any - return originalFunctionToString.apply(context, args); - }; - }; - /** - * @inheritDoc - */ - FunctionToString.id = 'FunctionToString'; - return FunctionToString; -}()); -exports.FunctionToString = FunctionToString; -//# sourceMappingURL=functiontostring.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/functiontostring.js.map b/node_modules/@sentry/core/dist/integrations/functiontostring.js.map deleted file mode 100644 index bf63af0..0000000 --- a/node_modules/@sentry/core/dist/integrations/functiontostring.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"functiontostring.js","sourceRoot":"","sources":["../../src/integrations/functiontostring.ts"],"names":[],"mappings":";AAEA,IAAI,wBAAoC,CAAC;AAEzC,uEAAuE;AACvE;IAAA;QACE;;WAEG;QACI,SAAI,GAAW,gBAAgB,CAAC,EAAE,CAAC;IAmB5C,CAAC;IAZC;;OAEG;IACI,oCAAS,GAAhB;QACE,wBAAwB,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC;QAEvD,QAAQ,CAAC,SAAS,CAAC,QAAQ,GAAG;YAAgC,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAC1E,IAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,IAAI,IAAI,CAAC;YACjD,yCAAyC;YACzC,OAAO,wBAAwB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACvD,CAAC,CAAC;IACJ,CAAC;IAhBD;;OAEG;IACW,mBAAE,GAAW,kBAAkB,CAAC;IAchD,uBAAC;CAAA,AAvBD,IAuBC;AAvBY,4CAAgB","sourcesContent":["import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n originalFunctionToString = Function.prototype.toString;\n\n Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n const context = this.__sentry_original__ || this;\n // tslint:disable-next-line:no-unsafe-any\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/inboundfilters.d.ts b/node_modules/@sentry/core/dist/integrations/inboundfilters.d.ts deleted file mode 100644 index 60c4339..0000000 --- a/node_modules/@sentry/core/dist/integrations/inboundfilters.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Integration } from '@sentry/types'; -/** JSDoc */ -interface InboundFiltersOptions { - blacklistUrls?: Array; - ignoreErrors?: Array; - ignoreInternal?: boolean; - whitelistUrls?: Array; -} -/** Inbound filters configurable by the user */ -export declare class InboundFilters implements Integration { - private readonly _options; - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - constructor(_options?: InboundFiltersOptions); - /** - * @inheritDoc - */ - setupOnce(): void; - /** JSDoc */ - private _shouldDropEvent; - /** JSDoc */ - private _isSentryError; - /** JSDoc */ - private _isIgnoredError; - /** JSDoc */ - private _isBlacklistedUrl; - /** JSDoc */ - private _isWhitelistedUrl; - /** JSDoc */ - private _mergeOptions; - /** JSDoc */ - private _getPossibleEventMessages; - /** JSDoc */ - private _getEventFilterUrl; -} -export {}; -//# sourceMappingURL=inboundfilters.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/inboundfilters.d.ts.map b/node_modules/@sentry/core/dist/integrations/inboundfilters.d.ts.map deleted file mode 100644 index a808817..0000000 --- a/node_modules/@sentry/core/dist/integrations/inboundfilters.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inboundfilters.d.ts","sourceRoot":"","sources":["../../src/integrations/inboundfilters.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AAOnD,YAAY;AACZ,UAAU,qBAAqB;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACxC;AAED,+CAA+C;AAC/C,qBAAa,cAAe,YAAW,WAAW;IAU7B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAT5C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAqB;IACxC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAoB;gBAER,QAAQ,GAAE,qBAA0B;IAExE;;OAEG;IACI,SAAS,IAAI,IAAI;IAmBxB,YAAY;IACZ,OAAO,CAAC,gBAAgB;IA8BxB,YAAY;IACZ,OAAO,CAAC,cAAc;IAmBtB,YAAY;IACZ,OAAO,CAAC,eAAe;IAWvB,YAAY;IACZ,OAAO,CAAC,iBAAiB;IASzB,YAAY;IACZ,OAAO,CAAC,iBAAiB;IASzB,YAAY;IACZ,OAAO,CAAC,aAAa;IAarB,YAAY;IACZ,OAAO,CAAC,yBAAyB;IAgBjC,YAAY;IACZ,OAAO,CAAC,kBAAkB;CAiB3B"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/inboundfilters.js b/node_modules/@sentry/core/dist/integrations/inboundfilters.js deleted file mode 100644 index 538457b..0000000 --- a/node_modules/@sentry/core/dist/integrations/inboundfilters.js +++ /dev/null @@ -1,160 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var hub_1 = require("@sentry/hub"); -var utils_1 = require("@sentry/utils"); -// "Script error." is hard coded into browsers for errors that it can't read. -// this is the result of a script being pulled in from an external domain and CORS. -var DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/]; -/** Inbound filters configurable by the user */ -var InboundFilters = /** @class */ (function () { - function InboundFilters(_options) { - if (_options === void 0) { _options = {}; } - this._options = _options; - /** - * @inheritDoc - */ - this.name = InboundFilters.id; - } - /** - * @inheritDoc - */ - InboundFilters.prototype.setupOnce = function () { - hub_1.addGlobalEventProcessor(function (event) { - var hub = hub_1.getCurrentHub(); - if (!hub) { - return event; - } - var self = hub.getIntegration(InboundFilters); - if (self) { - var client = hub.getClient(); - var clientOptions = client ? client.getOptions() : {}; - var options = self._mergeOptions(clientOptions); - if (self._shouldDropEvent(event, options)) { - return null; - } - } - return event; - }); - }; - /** JSDoc */ - InboundFilters.prototype._shouldDropEvent = function (event, options) { - if (this._isSentryError(event, options)) { - utils_1.logger.warn("Event dropped due to being internal Sentry Error.\nEvent: " + utils_1.getEventDescription(event)); - return true; - } - if (this._isIgnoredError(event, options)) { - utils_1.logger.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: " + utils_1.getEventDescription(event)); - return true; - } - if (this._isBlacklistedUrl(event, options)) { - utils_1.logger.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: " + utils_1.getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); - return true; - } - if (!this._isWhitelistedUrl(event, options)) { - utils_1.logger.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: " + utils_1.getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); - return true; - } - return false; - }; - /** JSDoc */ - InboundFilters.prototype._isSentryError = function (event, options) { - if (options === void 0) { options = {}; } - if (!options.ignoreInternal) { - return false; - } - try { - return ((event && - event.exception && - event.exception.values && - event.exception.values[0] && - event.exception.values[0].type === 'SentryError') || - false); - } - catch (_oO) { - return false; - } - }; - /** JSDoc */ - InboundFilters.prototype._isIgnoredError = function (event, options) { - if (options === void 0) { options = {}; } - if (!options.ignoreErrors || !options.ignoreErrors.length) { - return false; - } - return this._getPossibleEventMessages(event).some(function (message) { - // Not sure why TypeScript complains here... - return options.ignoreErrors.some(function (pattern) { return utils_1.isMatchingPattern(message, pattern); }); - }); - }; - /** JSDoc */ - InboundFilters.prototype._isBlacklistedUrl = function (event, options) { - if (options === void 0) { options = {}; } - // TODO: Use Glob instead? - if (!options.blacklistUrls || !options.blacklistUrls.length) { - return false; - } - var url = this._getEventFilterUrl(event); - return !url ? false : options.blacklistUrls.some(function (pattern) { return utils_1.isMatchingPattern(url, pattern); }); - }; - /** JSDoc */ - InboundFilters.prototype._isWhitelistedUrl = function (event, options) { - if (options === void 0) { options = {}; } - // TODO: Use Glob instead? - if (!options.whitelistUrls || !options.whitelistUrls.length) { - return true; - } - var url = this._getEventFilterUrl(event); - return !url ? true : options.whitelistUrls.some(function (pattern) { return utils_1.isMatchingPattern(url, pattern); }); - }; - /** JSDoc */ - InboundFilters.prototype._mergeOptions = function (clientOptions) { - if (clientOptions === void 0) { clientOptions = {}; } - return { - blacklistUrls: tslib_1.__spread((this._options.blacklistUrls || []), (clientOptions.blacklistUrls || [])), - ignoreErrors: tslib_1.__spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS), - ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true, - whitelistUrls: tslib_1.__spread((this._options.whitelistUrls || []), (clientOptions.whitelistUrls || [])), - }; - }; - /** JSDoc */ - InboundFilters.prototype._getPossibleEventMessages = function (event) { - if (event.message) { - return [event.message]; - } - if (event.exception) { - try { - var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c; - return ["" + value, type + ": " + value]; - } - catch (oO) { - utils_1.logger.error("Cannot extract message for event " + utils_1.getEventDescription(event)); - return []; - } - } - return []; - }; - /** JSDoc */ - InboundFilters.prototype._getEventFilterUrl = function (event) { - try { - if (event.stacktrace) { - var frames_1 = event.stacktrace.frames; - return (frames_1 && frames_1[frames_1.length - 1].filename) || null; - } - if (event.exception) { - var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames; - return (frames_2 && frames_2[frames_2.length - 1].filename) || null; - } - return null; - } - catch (oO) { - utils_1.logger.error("Cannot extract url for event " + utils_1.getEventDescription(event)); - return null; - } - }; - /** - * @inheritDoc - */ - InboundFilters.id = 'InboundFilters'; - return InboundFilters; -}()); -exports.InboundFilters = InboundFilters; -//# sourceMappingURL=inboundfilters.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/inboundfilters.js.map b/node_modules/@sentry/core/dist/integrations/inboundfilters.js.map deleted file mode 100644 index 8b40e14..0000000 --- a/node_modules/@sentry/core/dist/integrations/inboundfilters.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inboundfilters.js","sourceRoot":"","sources":["../../src/integrations/inboundfilters.ts"],"names":[],"mappings":";;AAAA,mCAAqE;AAErE,uCAA+E;AAE/E,6EAA6E;AAC7E,mFAAmF;AACnF,IAAM,qBAAqB,GAAG,CAAC,mBAAmB,EAAE,+CAA+C,CAAC,CAAC;AAUrG,+CAA+C;AAC/C;IAUE,wBAAoC,QAAoC;QAApC,yBAAA,EAAA,aAAoC;QAApC,aAAQ,GAAR,QAAQ,CAA4B;QATxE;;WAEG;QACI,SAAI,GAAW,cAAc,CAAC,EAAE,CAAC;IAMmC,CAAC;IAE5E;;OAEG;IACI,kCAAS,GAAhB;QACE,6BAAuB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C,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;gBAChH,OAAO,CAAC,QAAM,IAAI,QAAM,CAAC,QAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;aAC/D;YACD,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,EAAE,EAAE;YACX,cAAM,CAAC,KAAK,CAAC,kCAAgC,2BAAmB,CAAC,KAAK,CAAG,CAAC,CAAC;YAC3E,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IAhKD;;OAEG;IACW,iBAAE,GAAW,gBAAgB,CAAC;IA8J9C,qBAAC;CAAA,AAtKD,IAsKC;AAtKY,wCAAc","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n blacklistUrls?: Array;\n ignoreErrors?: Array;\n ignoreInternal?: boolean;\n whitelistUrls?: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n public constructor(private readonly _options: InboundFiltersOptions = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n const options = self._mergeOptions(clientOptions);\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: InboundFiltersOptions): boolean {\n if (this._isSentryError(event, options)) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (this._isBlacklistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`blacklistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!this._isWhitelistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to not being matched by \\`whitelistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return (\n (event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false\n );\n } catch (_oO) {\n return false;\n }\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isBlacklistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.blacklistUrls || !options.blacklistUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.blacklistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isWhitelistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.whitelistUrls || !options.whitelistUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.whitelistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: InboundFiltersOptions = {}): InboundFiltersOptions {\n return {\n blacklistUrls: [...(this._options.blacklistUrls || []), ...(clientOptions.blacklistUrls || [])],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n whitelistUrls: [...(this._options.whitelistUrls || []), ...(clientOptions.whitelistUrls || [])],\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n const frames = event.stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n if (event.exception) {\n const frames =\n event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n return null;\n } catch (oO) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/index.d.ts b/node_modules/@sentry/core/dist/integrations/index.d.ts deleted file mode 100644 index c1812e3..0000000 --- a/node_modules/@sentry/core/dist/integrations/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { FunctionToString } from './functiontostring'; -export { InboundFilters } from './inboundfilters'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/index.d.ts.map b/node_modules/@sentry/core/dist/integrations/index.d.ts.map deleted file mode 100644 index c3c2b3f..0000000 --- a/node_modules/@sentry/core/dist/integrations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/index.js b/node_modules/@sentry/core/dist/integrations/index.js deleted file mode 100644 index a0e94e1..0000000 --- a/node_modules/@sentry/core/dist/integrations/index.js +++ /dev/null @@ -1,6 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var functiontostring_1 = require("./functiontostring"); -exports.FunctionToString = functiontostring_1.FunctionToString; -var inboundfilters_1 = require("./inboundfilters"); -exports.InboundFilters = inboundfilters_1.InboundFilters; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/integrations/index.js.map b/node_modules/@sentry/core/dist/integrations/index.js.map deleted file mode 100644 index d17243c..0000000 --- a/node_modules/@sentry/core/dist/integrations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":";AAAA,uDAAsD;AAA7C,8CAAA,gBAAgB,CAAA;AACzB,mDAAkD;AAAzC,0CAAA,cAAc,CAAA","sourcesContent":["export { FunctionToString } from './functiontostring';\nexport { InboundFilters } from './inboundfilters';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/sdk.d.ts b/node_modules/@sentry/core/dist/sdk.d.ts deleted file mode 100644 index 26be93b..0000000 --- a/node_modules/@sentry/core/dist/sdk.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Client, Options } from '@sentry/types'; -/** A class object that can instanciate Client objects. */ -export declare type ClientClass = new (options: O) => F; -/** - * Internal function to create a new SDK client instance. The client is - * installed and then bound to the current scope. - * - * @param clientClass The client class to instanciate. - * @param options Options to pass to the client. - */ -export declare function initAndBind(clientClass: ClientClass, options: O): void; -//# sourceMappingURL=sdk.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/sdk.d.ts.map b/node_modules/@sentry/core/dist/sdk.d.ts.map deleted file mode 100644 index fa6ecf2..0000000 --- a/node_modules/@sentry/core/dist/sdk.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGhD,0DAA0D;AAC1D,oBAAY,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,IAAI,KAAK,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;AAErF;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAKjH"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/sdk.js b/node_modules/@sentry/core/dist/sdk.js deleted file mode 100644 index b6b72b2..0000000 --- a/node_modules/@sentry/core/dist/sdk.js +++ /dev/null @@ -1,18 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var hub_1 = require("@sentry/hub"); -var utils_1 = require("@sentry/utils"); -/** - * Internal function to create a new SDK client instance. The client is - * installed and then bound to the current scope. - * - * @param clientClass The client class to instanciate. - * @param options Options to pass to the client. - */ -function initAndBind(clientClass, options) { - if (options.debug === true) { - utils_1.logger.enable(); - } - hub_1.getCurrentHub().bindClient(new clientClass(options)); -} -exports.initAndBind = initAndBind; -//# sourceMappingURL=sdk.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/sdk.js.map b/node_modules/@sentry/core/dist/sdk.js.map deleted file mode 100644 index 73a69c3..0000000 --- a/node_modules/@sentry/core/dist/sdk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";AAAA,mCAA4C;AAE5C,uCAAuC;AAKvC;;;;;;GAMG;AACH,SAAgB,WAAW,CAAsC,WAA8B,EAAE,OAAU;IACzG,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE;QAC1B,cAAM,CAAC,MAAM,EAAE,CAAC;KACjB;IACD,mBAAa,EAAE,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;AACvD,CAAC;AALD,kCAKC","sourcesContent":["import { getCurrentHub } from '@sentry/hub';\nimport { Client, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** A class object that can instanciate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instanciate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass: ClientClass, options: O): void {\n if (options.debug === true) {\n logger.enable();\n }\n getCurrentHub().bindClient(new clientClass(options));\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/transports/noop.d.ts b/node_modules/@sentry/core/dist/transports/noop.d.ts deleted file mode 100644 index 7b51768..0000000 --- a/node_modules/@sentry/core/dist/transports/noop.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Event, Response, Transport } from '@sentry/types'; -/** Noop transport */ -export declare class NoopTransport implements Transport { - /** - * @inheritDoc - */ - sendEvent(_: Event): PromiseLike; - /** - * @inheritDoc - */ - close(_?: number): PromiseLike; -} -//# sourceMappingURL=noop.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/transports/noop.d.ts.map b/node_modules/@sentry/core/dist/transports/noop.d.ts.map deleted file mode 100644 index 89df87c..0000000 --- a/node_modules/@sentry/core/dist/transports/noop.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../src/transports/noop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AAGnE,qBAAqB;AACrB,qBAAa,aAAc,YAAW,SAAS;IAC7C;;OAEG;IACI,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;IAOjD;;OAEG;IACI,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;CAG/C"} \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/transports/noop.js b/node_modules/@sentry/core/dist/transports/noop.js deleted file mode 100644 index 13a3981..0000000 --- a/node_modules/@sentry/core/dist/transports/noop.js +++ /dev/null @@ -1,26 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -/** Noop transport */ -var NoopTransport = /** @class */ (function () { - function NoopTransport() { - } - /** - * @inheritDoc - */ - NoopTransport.prototype.sendEvent = function (_) { - return utils_1.SyncPromise.resolve({ - reason: "NoopTransport: Event has been skipped because no Dsn is configured.", - status: types_1.Status.Skipped, - }); - }; - /** - * @inheritDoc - */ - NoopTransport.prototype.close = function (_) { - return utils_1.SyncPromise.resolve(true); - }; - return NoopTransport; -}()); -exports.NoopTransport = NoopTransport; -//# sourceMappingURL=noop.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/dist/transports/noop.js.map b/node_modules/@sentry/core/dist/transports/noop.js.map deleted file mode 100644 index 78a4032..0000000 --- a/node_modules/@sentry/core/dist/transports/noop.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.js","sourceRoot":"","sources":["../../src/transports/noop.ts"],"names":[],"mappings":";AAAA,uCAAmE;AACnE,uCAA4C;AAE5C,qBAAqB;AACrB;IAAA;IAiBA,CAAC;IAhBC;;OAEG;IACI,iCAAS,GAAhB,UAAiB,CAAQ;QACvB,OAAO,mBAAW,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,qEAAqE;YAC7E,MAAM,EAAE,cAAM,CAAC,OAAO;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,6BAAK,GAAZ,UAAa,CAAU;QACrB,OAAO,mBAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACH,oBAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,sCAAa","sourcesContent":["import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return SyncPromise.resolve({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: Status.Skipped,\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return SyncPromise.resolve(true);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/api.d.ts b/node_modules/@sentry/core/esm/api.d.ts deleted file mode 100644 index 86fcb42..0000000 --- a/node_modules/@sentry/core/esm/api.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { DsnLike } from '@sentry/types'; -import { Dsn } from '@sentry/utils'; -/** Helper class to provide urls to different Sentry endpoints. */ -export declare class API { - dsn: DsnLike; - /** The internally used Dsn object. */ - private readonly _dsnObject; - /** Create a new instance of API */ - constructor(dsn: DsnLike); - /** Returns the Dsn object. */ - getDsn(): Dsn; - /** Returns a string with auth headers in the url to the store endpoint. */ - getStoreEndpoint(): string; - /** Returns the store endpoint with auth added in url encoded. */ - getStoreEndpointWithUrlEncodedAuth(): string; - /** Returns the base path of the url including the port. */ - private _getBaseUrl; - /** Returns only the path component for the store endpoint. */ - getStoreEndpointPath(): string; - /** Returns an object that can be used in request headers. */ - getRequestHeaders(clientName: string, clientVersion: string): { - [key: string]: string; - }; - /** Returns the url to the report dialog endpoint. */ - getReportDialogEndpoint(dialogOptions?: { - [key: string]: any; - user?: { - name?: string; - email?: string; - }; - }): string; -} -//# sourceMappingURL=api.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/api.d.ts.map b/node_modules/@sentry/core/esm/api.d.ts.map deleted file mode 100644 index 47e9238..0000000 --- a/node_modules/@sentry/core/esm/api.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAa,MAAM,eAAe,CAAC;AAI/C,kEAAkE;AAClE,qBAAa,GAAG;IAIY,GAAG,EAAE,OAAO;IAHtC,sCAAsC;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAM;IACjC,mCAAmC;gBACT,GAAG,EAAE,OAAO;IAItC,8BAA8B;IACvB,MAAM,IAAI,GAAG;IAIpB,2EAA2E;IACpE,gBAAgB,IAAI,MAAM;IAIjC,iEAAiE;IAC1D,kCAAkC,IAAI,MAAM;IAWnD,2DAA2D;IAC3D,OAAO,CAAC,WAAW;IAOnB,8DAA8D;IACvD,oBAAoB,IAAI,MAAM;IAKrC,6DAA6D;IACtD,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAc9F,qDAAqD;IAC9C,uBAAuB,CAC5B,aAAa,GAAE;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;QACnB,IAAI,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACrC,GACL,MAAM;CA2BV"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/api.js b/node_modules/@sentry/core/esm/api.js index 29eb33a..001a9c1 100644 --- a/node_modules/@sentry/core/esm/api.js +++ b/node_modules/@sentry/core/esm/api.js @@ -1,86 +1,86 @@ -import { Dsn, urlEncode } from '@sentry/utils'; -var SENTRY_API_VERSION = '7'; -/** Helper class to provide urls to different Sentry endpoints. */ -var API = /** @class */ (function () { - /** Create a new instance of API */ - function API(dsn) { - this.dsn = dsn; - this._dsnObject = new Dsn(dsn); +import { urlEncode, makeDsn, dsnToString } from '@sentry/utils'; + +const SENTRY_API_VERSION = '7'; + +/** Returns the prefix to construct Sentry ingestion API endpoints. */ +function getBaseApiEndpoint(dsn) { + const protocol = dsn.protocol ? `${dsn.protocol}:` : ''; + const port = dsn.port ? `:${dsn.port}` : ''; + return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`; +} + +/** Returns the ingest API endpoint for target. */ +function _getIngestEndpoint(dsn) { + return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; +} + +/** Returns a URL-encoded string with auth config suitable for a query string. */ +function _encodedAuth(dsn, sdkInfo) { + return urlEncode({ + // We send only the minimum set of required information. See + // https://github.com/getsentry/sentry-javascript/issues/2572. + sentry_key: dsn.publicKey, + sentry_version: SENTRY_API_VERSION, + ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }), + }); +} + +/** + * Returns the envelope endpoint URL with auth in the query string. + * + * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests. + */ +function getEnvelopeEndpointWithUrlEncodedAuth( + dsn, + // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below + // options: ClientOptions = {} as ClientOptions, + tunnelOrOptions = {} , +) { + // TODO (v8): Use this code instead + // const { tunnel, _metadata = {} } = options; + // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`; + + const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel; + const sdkInfo = + typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk; + + return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; +} + +/** Returns the url to the report dialog endpoint. */ +function getReportDialogEndpoint( + dsnLike, + dialogOptions + +, +) { + const dsn = makeDsn(dsnLike); + const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`; + + let encodedOptions = `dsn=${dsnToString(dsn)}`; + for (const key in dialogOptions) { + if (key === 'dsn') { + continue; } - /** Returns the Dsn object. */ - API.prototype.getDsn = function () { - return this._dsnObject; - }; - /** Returns a string with auth headers in the url to the store endpoint. */ - API.prototype.getStoreEndpoint = function () { - return "" + this._getBaseUrl() + this.getStoreEndpointPath(); - }; - /** Returns the store endpoint with auth added in url encoded. */ - API.prototype.getStoreEndpointWithUrlEncodedAuth = function () { - var dsn = this._dsnObject; - var auth = { - sentry_key: dsn.user, - sentry_version: SENTRY_API_VERSION, - }; - // Auth is intentionally sent as part of query string (NOT as custom HTTP header) - // to avoid preflight CORS requests - return this.getStoreEndpoint() + "?" + urlEncode(auth); - }; - /** Returns the base path of the url including the port. */ - API.prototype._getBaseUrl = function () { - var dsn = this._dsnObject; - var protocol = dsn.protocol ? dsn.protocol + ":" : ''; - var port = dsn.port ? ":" + dsn.port : ''; - return protocol + "//" + dsn.host + port; - }; - /** Returns only the path component for the store endpoint. */ - API.prototype.getStoreEndpointPath = function () { - var dsn = this._dsnObject; - return (dsn.path ? "/" + dsn.path : '') + "/api/" + dsn.projectId + "/store/"; - }; - /** Returns an object that can be used in request headers. */ - API.prototype.getRequestHeaders = function (clientName, clientVersion) { - var dsn = this._dsnObject; - var header = ["Sentry sentry_version=" + SENTRY_API_VERSION]; - header.push("sentry_client=" + clientName + "/" + clientVersion); - header.push("sentry_key=" + dsn.user); - if (dsn.pass) { - header.push("sentry_secret=" + dsn.pass); - } - return { - 'Content-Type': 'application/json', - 'X-Sentry-Auth': header.join(', '), - }; - }; - /** Returns the url to the report dialog endpoint. */ - API.prototype.getReportDialogEndpoint = function (dialogOptions) { - if (dialogOptions === void 0) { dialogOptions = {}; } - var dsn = this._dsnObject; - var endpoint = "" + this._getBaseUrl() + (dsn.path ? "/" + dsn.path : '') + "/api/embed/error-page/"; - var encodedOptions = []; - encodedOptions.push("dsn=" + dsn.toString()); - for (var key in dialogOptions) { - if (key === 'user') { - if (!dialogOptions.user) { - continue; - } - if (dialogOptions.user.name) { - encodedOptions.push("name=" + encodeURIComponent(dialogOptions.user.name)); - } - if (dialogOptions.user.email) { - encodedOptions.push("email=" + encodeURIComponent(dialogOptions.user.email)); - } - } - else { - encodedOptions.push(encodeURIComponent(key) + "=" + encodeURIComponent(dialogOptions[key])); - } - } - if (encodedOptions.length) { - return endpoint + "?" + encodedOptions.join('&'); - } - return endpoint; - }; - return API; -}()); -export { API }; -//# sourceMappingURL=api.js.map \ No newline at end of file + + if (key === 'user') { + const user = dialogOptions.user; + if (!user) { + continue; + } + if (user.name) { + encodedOptions += `&name=${encodeURIComponent(user.name)}`; + } + if (user.email) { + encodedOptions += `&email=${encodeURIComponent(user.email)}`; + } + } else { + encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`; + } + } + + return `${endpoint}?${encodedOptions}`; +} + +export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint }; +//# sourceMappingURL=api.js.map diff --git a/node_modules/@sentry/core/esm/api.js.map b/node_modules/@sentry/core/esm/api.js.map index 4c6ad19..d1e7d52 100644 --- a/node_modules/@sentry/core/esm/api.js.map +++ b/node_modules/@sentry/core/esm/api.js.map @@ -1 +1 @@ -{"version":3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,CAAC,aAAa,CAAC,IAAI,EAAE;oBACvB,SAAS;iBACV;gBACD,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE;oBAC3B,cAAc,CAAC,IAAI,CAAC,UAAQ,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAG,CAAC,CAAC;iBAC5E;gBACD,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE;oBAC5B,cAAc,CAAC,IAAI,CAAC,WAAS,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAG,CAAC,CAAC;iBAC9E;aACF;iBAAM;gBACL,cAAc,CAAC,IAAI,CAAI,kBAAkB,CAAC,GAAG,CAAC,SAAI,kBAAkB,CAAC,aAAa,CAAC,GAAG,CAAW,CAAG,CAAC,CAAC;aACvG;SACF;QACD,IAAI,cAAc,CAAC,MAAM,EAAE;YACzB,OAAU,QAAQ,SAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAG,CAAC;SAClD;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IACH,UAAC;AAAD,CAAC,AA5FD,IA4FC","sourcesContent":["import { DsnLike } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Helper class to provide urls to different Sentry endpoints. */\nexport class API {\n /** The internally used Dsn object. */\n private readonly _dsnObject: Dsn;\n /** Create a new instance of API */\n public constructor(public dsn: DsnLike) {\n this._dsnObject = new Dsn(dsn);\n }\n\n /** Returns the Dsn object. */\n public getDsn(): Dsn {\n return this._dsnObject;\n }\n\n /** Returns a string with auth headers in the url to the store endpoint. */\n public getStoreEndpoint(): string {\n return `${this._getBaseUrl()}${this.getStoreEndpointPath()}`;\n }\n\n /** Returns the store endpoint with auth added in url encoded. */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n const dsn = this._dsnObject;\n const auth = {\n sentry_key: dsn.user, // sentry_key is currently used in tracing integration to identify internal sentry requests\n sentry_version: SENTRY_API_VERSION,\n };\n // Auth is intentionally sent as part of query string (NOT as custom HTTP header)\n // to avoid preflight CORS requests\n return `${this.getStoreEndpoint()}?${urlEncode(auth)}`;\n }\n\n /** Returns the base path of the url including the port. */\n private _getBaseUrl(): string {\n const dsn = this._dsnObject;\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}`;\n }\n\n /** Returns only the path component for the store endpoint. */\n public getStoreEndpointPath(): string {\n const dsn = this._dsnObject;\n return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n }\n\n /** Returns an object that can be used in request headers. */\n public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n const dsn = this._dsnObject;\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.user}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n }\n\n /** Returns the url to the report dialog endpoint. */\n public getReportDialogEndpoint(\n dialogOptions: {\n [key: string]: any;\n user?: { name?: string; email?: string };\n } = {},\n ): string {\n const dsn = this._dsnObject;\n const endpoint = `${this._getBaseUrl()}${dsn.path ? `/${dsn.path}` : ''}/api/embed/error-page/`;\n\n const encodedOptions = [];\n encodedOptions.push(`dsn=${dsn.toString()}`);\n for (const key in dialogOptions) {\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n }\n } else {\n encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n }\n }\n if (encodedOptions.length) {\n return `${endpoint}?${encodedOptions.join('&')}`;\n }\n\n return endpoint;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"api.js","sources":["../../src/api.ts"],"sourcesContent":["import type { ClientOptions, DsnComponents, DsnLike, SdkInfo } from '@sentry/types';\nimport { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents): string {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents, sdkInfo: SdkInfo | undefined): string {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(\n dsn: DsnComponents,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions: string | ClientOptions = {} as ClientOptions,\n): string {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(\n dsnLike: DsnLike,\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n },\n): string {\n const dsn = makeDsn(dsnLike);\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n"],"names":[],"mappings":";;AAGA,MAAA,kBAAA,GAAA,GAAA,CAAA;AACA;AACA;AACA,SAAA,kBAAA,CAAA,GAAA,EAAA;AACA,EAAA,MAAA,QAAA,GAAA,GAAA,CAAA,QAAA,GAAA,CAAA,EAAA,GAAA,CAAA,QAAA,CAAA,CAAA,CAAA,GAAA,EAAA,CAAA;AACA,EAAA,MAAA,IAAA,GAAA,GAAA,CAAA,IAAA,GAAA,CAAA,CAAA,EAAA,GAAA,CAAA,IAAA,CAAA,CAAA,GAAA,EAAA,CAAA;AACA,EAAA,OAAA,CAAA,EAAA,QAAA,CAAA,EAAA,EAAA,GAAA,CAAA,IAAA,CAAA,EAAA,IAAA,CAAA,EAAA,GAAA,CAAA,IAAA,GAAA,CAAA,CAAA,EAAA,GAAA,CAAA,IAAA,CAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA,C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kBAAA,CAAA,GAAA,CAAA,CAAA,iBAAA,CAAA,CAAA;AACA;AACA,EAAA,IAAA,cAAA,GAAA,CAAA,IAAA,EAAA,WAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AACA,EAAA,KAAA,MAAA,GAAA,IAAA,aAAA,EAAA;AACA,IAAA,IAAA,GAAA,KAAA,KAAA,EAAA;AACA,MAAA,SAAA;AACA,KAAA;AACA;AACA,IAAA,IAAA,GAAA,KAAA,MAAA,EAAA;AACA,MAAA,MAAA,IAAA,GAAA,aAAA,CAAA,IAAA,CAAA;AACA,MAAA,IAAA,CAAA,IAAA,EAAA;AACA,QAAA,SAAA;AACA,OAAA;AACA,MAAA,IAAA,IAAA,CAAA,IAAA,EAAA;AACA,QAAA,cAAA,IAAA,CAAA,MAAA,EAAA,kBAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACA,OAAA;AACA,MAAA,IAAA,IAAA,CAAA,KAAA,EAAA;AACA,QAAA,cAAA,IAAA,CAAA,OAAA,EAAA,kBAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,OAAA;AACA,KAAA,MAAA;AACA,MAAA,cAAA,IAAA,CAAA,CAAA,EAAA,kBAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,kBAAA,CAAA,aAAA,CAAA,GAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,cAAA,CAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/basebackend.d.ts b/node_modules/@sentry/core/esm/basebackend.d.ts deleted file mode 100644 index b828827..0000000 --- a/node_modules/@sentry/core/esm/basebackend.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Event, EventHint, Options, Severity, Transport } from '@sentry/types'; -/** - * Internal platform-dependent Sentry SDK Backend. - * - * While {@link Client} contains business logic specific to an SDK, the - * Backend offers platform specific implementations for low-level operations. - * These are persisting and loading information, sending events, and hooking - * into the environment. - * - * Backends receive a handle to the Client in their constructor. When a - * Backend automatically generates events, it must pass them to - * the Client for validation and processing first. - * - * Usually, the Client will be of corresponding type, e.g. NodeBackend - * receives NodeClient. However, higher-level SDKs can choose to instanciate - * multiple Backends and delegate tasks between them. In this case, an event - * generated by one backend might very well be sent by another one. - * - * The client also provides access to options via {@link Client.getOptions}. - * @hidden - */ -export interface Backend { - /** Creates a {@link Event} from an exception. */ - eventFromException(exception: any, hint?: EventHint): PromiseLike; - /** Creates a {@link Event} from a plain message. */ - eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike; - /** Submits the event to Sentry */ - sendEvent(event: Event): void; - /** - * Returns the transport that is used by the backend. - * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent. - * - * @returns The transport. - */ - getTransport(): Transport; -} -/** - * A class object that can instanciate Backend objects. - * @hidden - */ -export declare type BackendClass = new (options: O) => B; -/** - * This is the base implemention of a Backend. - * @hidden - */ -export declare abstract class BaseBackend implements Backend { - /** Options passed to the SDK. */ - protected readonly _options: O; - /** Cached transport used internally. */ - protected _transport: Transport; - /** Creates a new backend instance. */ - constructor(options: O); - /** - * Sets up the transport so it can be used later to send requests. - */ - protected _setupTransport(): Transport; - /** - * @inheritDoc - */ - eventFromException(_exception: any, _hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - sendEvent(event: Event): void; - /** - * @inheritDoc - */ - getTransport(): Transport; -} -//# sourceMappingURL=basebackend.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/basebackend.d.ts.map b/node_modules/@sentry/core/esm/basebackend.d.ts.map deleted file mode 100644 index 14f4db8..0000000 --- a/node_modules/@sentry/core/esm/basebackend.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"baseb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AK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAInG;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAMpC;;OAEG;IACI,YAAY,IAAI,SAAS;CAGjC"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/basebackend.js b/node_modules/@sentry/core/esm/basebackend.js deleted file mode 100644 index e6fbe9a..0000000 --- a/node_modules/@sentry/core/esm/basebackend.js +++ /dev/null @@ -1,51 +0,0 @@ -import { logger, SentryError } from '@sentry/utils'; -import { NoopTransport } from './transports/noop'; -/** - * This is the base implemention of a Backend. - * @hidden - */ -var BaseBackend = /** @class */ (function () { - /** Creates a new backend instance. */ - function BaseBackend(options) { - this._options = options; - if (!this._options.dsn) { - logger.warn('No DSN provided, backend will not do anything.'); - } - this._transport = this._setupTransport(); - } - /** - * Sets up the transport so it can be used later to send requests. - */ - BaseBackend.prototype._setupTransport = function () { - return new NoopTransport(); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.eventFromException = function (_exception, _hint) { - throw new SentryError('Backend has to implement `eventFromException` method'); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) { - throw new SentryError('Backend has to implement `eventFromMessage` method'); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.sendEvent = function (event) { - this._transport.sendEvent(event).then(null, function (reason) { - logger.error("Error while sending event: " + reason); - }); - }; - /** - * @inheritDoc - */ - BaseBackend.prototype.getTransport = function () { - return this._transport; - }; - return BaseBackend; -}()); -export { BaseBackend }; -//# sourceMappingURL=basebackend.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/basebackend.js.map b/node_modules/@sentry/core/esm/basebackend.js.map deleted file mode 100644 index 2e6b27e..0000000 --- a/node_modules/@sentry/core/esm/basebackend.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"basebackend.js","sourceRoot":"","sources":["../src/basebackend.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA+ClD;;;GAGG;AACH;IAOE,sCAAsC;IACtC,qBAAmB,OAAU;QAC3B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACtB,MAAM,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;SAC/D;QACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3C,CAAC;IAED;;OAEG;IACO,qCAAe,GAAzB;QACE,OAAO,IAAI,aAAa,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACI,wCAAkB,GAAzB,UAA0B,UAAe,EAAE,KAAiB;QAC1D,MAAM,IAAI,WAAW,CAAC,sDAAsD,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACI,sCAAgB,GAAvB,UAAwB,QAAgB,EAAE,MAAiB,EAAE,KAAiB;QAC5E,MAAM,IAAI,WAAW,CAAC,oDAAoD,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACI,+BAAS,GAAhB,UAAiB,KAAY;QAC3B,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,UAAA,MAAM;YAChD,MAAM,CAAC,KAAK,CAAC,gCAA8B,MAAQ,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,kCAAY,GAAnB;QACE,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACH,kBAAC;AAAD,CAAC,AApDD,IAoDC","sourcesContent":["import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instanciate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates a {@link Event} from an exception. */\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates a {@link Event} from a plain message. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instanciate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n this._transport.sendEvent(event).then(null, reason => {\n logger.error(`Error while sending event: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/baseclient.d.ts b/node_modules/@sentry/core/esm/baseclient.d.ts deleted file mode 100644 index 8bfcf46..0000000 --- a/node_modules/@sentry/core/esm/baseclient.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { Scope } from '@sentry/hub'; -import { Client, Event, EventHint, Integration, IntegrationClass, Options, SdkInfo, Severity } from '@sentry/types'; -import { Dsn } from '@sentry/utils'; -import { Backend, BackendClass } from './basebackend'; -import { IntegrationIndex } from './integration'; -/** - * Base implementation for all JavaScript SDK clients. - * - * Call the constructor with the corresponding backend constructor and options - * specific to the client subclass. To access these options later, use - * {@link Client.getOptions}. Also, the Backend instance is available via - * {@link Client.getBackend}. - * - * If a Dsn is specified in the options, it will be parsed and stored. Use - * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is - * invalid, the constructor will throw a {@link SentryException}. Note that - * without a valid Dsn, the SDK will not send any events to Sentry. - * - * Before sending an event via the backend, it is passed through - * {@link BaseClient.prepareEvent} to add SDK information and scope data - * (breadcrumbs and context). To add more custom information, override this - * method and extend the resulting prepared event. - * - * To issue automatically created events (e.g. via instrumentation), use - * {@link Client.captureEvent}. It will prepare the event and pass it through - * the callback lifecycle. To issue auto-breadcrumbs, use - * {@link Client.addBreadcrumb}. - * - * @example - * class NodeClient extends BaseClient { - * public constructor(options: NodeOptions) { - * super(NodeBackend, options); - * } - * - * // ... - * } - */ -export declare abstract class BaseClient implements Client { - /** - * The backend used to physically interact in the enviornment. Usually, this - * will correspond to the client. When composing SDKs, however, the Backend - * from the root SDK will be used. - */ - protected readonly _backend: B; - /** Options passed to the SDK. */ - protected readonly _options: O; - /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ - protected readonly _dsn?: Dsn; - /** Array of used integrations. */ - protected readonly _integrations: IntegrationIndex; - /** Is the client still processing a call? */ - protected _processing: boolean; - /** - * Initializes this client instance. - * - * @param backendClass A constructor function to create the backend. - * @param options Options for the client. - */ - protected constructor(backendClass: BackendClass, options: O); - /** - * @inheritDoc - */ - captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined; - /** - * @inheritDoc - */ - captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined; - /** - * @inheritDoc - */ - captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined; - /** - * @inheritDoc - */ - getDsn(): Dsn | undefined; - /** - * @inheritDoc - */ - getOptions(): O; - /** - * @inheritDoc - */ - flush(timeout?: number): PromiseLike; - /** - * @inheritDoc - */ - close(timeout?: number): PromiseLike; - /** - * @inheritDoc - */ - getIntegrations(): IntegrationIndex; - /** - * @inheritDoc - */ - getIntegration(integration: IntegrationClass): T | null; - /** Waits for the client to be done with processing. */ - protected _isClientProcessing(timeout?: number): PromiseLike<{ - ready: boolean; - interval: number; - }>; - /** Returns the current backend. */ - protected _getBackend(): B; - /** Determines whether this SDK is enabled and a valid Dsn is present. */ - protected _isEnabled(): boolean; - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - */ - protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike; - /** - * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization. - * Normalized keys: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * @param event Event - * @returns Normalized event - */ - protected _normalizeEvent(event: Event | null, depth: number): Event | null; - /** - * This function adds all used integrations to the SDK info in the event. - * @param sdkInfo The sdkInfo of the event that will be filled with all integrations. - */ - protected _addIntegrations(sdkInfo?: SdkInfo): void; - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike; - /** - * Resolves before send Promise and calls resolve/reject on parent SyncPromise. - */ - private _handleAsyncBeforeSend; -} -//# sourceMappingURL=baseclient.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/baseclient.d.ts.map b/node_modules/@sentry/core/esm/baseclient.d.ts.map deleted file mode 100644 index ce1ff3f..0000000 --- a/node_modules/@sentry/core/esm/baseclient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"baseclient.d.ts","sourceRoot":"","sources":["../src/baseclient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,GAAG,EAA4E,MAAM,eAAe,CAAC;AAE9G,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAqB,MAAM,eAAe,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,8BAAsB,UAAU,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,OAAO,CAAE,YAAW,MAAM,CAAC,CAAC,CAAC;IACzF;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE/B,iCAAiC;IACjC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE/B,2FAA2F;IAC3F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C;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IA2BlG,mCAAmC;IACnC,SAAS,CAAC,WAAW,IAAI,CAAC;IAI1B,yEAAyE;IACzE,SAAS,CAAC,UAAU,IAAI,OAAO;IAI/B;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAsDjG;;;;;;;;;OASG;IACH,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI;IA4B3E;;;OAGG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAOnD;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IAgE1F;;OAEG;IACH,OAAO,CAAC,sBAAsB;CAmB/B"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/baseclient.js b/node_modules/@sentry/core/esm/baseclient.js index 131bc2e..a99a605 100644 --- a/node_modules/@sentry/core/esm/baseclient.js +++ b/node_modules/@sentry/core/esm/baseclient.js @@ -1,21 +1,26 @@ -import * as tslib_1 from "tslib"; -import { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, truncate, uuid4 } from '@sentry/utils'; -import { setupIntegrations } from './integration'; +import { makeDsn, logger, checkOrSetAlreadyCaught, isPrimitive, resolvedSyncPromise, addItemToEnvelope, createAttachmentEnvelopeItem, SyncPromise, rejectedSyncPromise, SentryError, isThenable, isPlainObject } from '@sentry/utils'; +import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js'; +import { createEventEnvelope, createSessionEnvelope } from './envelope.js'; +import { setupIntegrations, setupIntegration } from './integration.js'; +import { updateSession } from './session.js'; +import { prepareEvent } from './utils/prepareEvent.js'; + +const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured."; + /** * Base implementation for all JavaScript SDK clients. * - * Call the constructor with the corresponding backend constructor and options + * Call the constructor with the corresponding options * specific to the client subclass. To access these options later, use - * {@link Client.getOptions}. Also, the Backend instance is available via - * {@link Client.getBackend}. + * {@link Client.getOptions}. * * If a Dsn is specified in the options, it will be parsed and stored. Use * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is * invalid, the constructor will throw a {@link SentryException}. Note that * without a valid Dsn, the SDK will not send any events to Sentry. * - * Before sending an event via the backend, it is passed through - * {@link BaseClient.prepareEvent} to add SDK information and scope data + * Before sending an event, it is passed through + * {@link BaseClient._prepareEvent} to add SDK information and scope data * (breadcrumbs and context). To add more custom information, override this * method and extend the resulting prepared event. * @@ -25,370 +30,612 @@ import { setupIntegrations } from './integration'; * {@link Client.addBreadcrumb}. * * @example - * class NodeClient extends BaseClient { + * class NodeClient extends BaseClient { * public constructor(options: NodeOptions) { - * super(NodeBackend, options); + * super(options); * } * * // ... * } */ -var BaseClient = /** @class */ (function () { - /** - * Initializes this client instance. - * - * @param backendClass A constructor function to create the backend. - * @param options Options for the client. - */ - function BaseClient(backendClass, options) { - /** Array of used integrations. */ - this._integrations = {}; - /** Is the client still processing a call? */ - this._processing = false; - this._backend = new backendClass(options); - this._options = options; - if (options.dsn) { - this._dsn = new Dsn(options.dsn); - } - if (this._isEnabled()) { - this._integrations = setupIntegrations(this._options); - } +class BaseClient { + /** Options passed to the SDK. */ + + /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ + + /** Array of set up integrations. */ + __init() {this._integrations = {};} + + /** Indicates whether this client's integrations have been set up. */ + __init2() {this._integrationsInitialized = false;} + + /** Number of calls being processed */ + __init3() {this._numProcessing = 0;} + + /** Holds flushable */ + __init4() {this._outcomes = {};} + + /** + * Initializes this client instance. + * + * @param options Options for the client. + */ + constructor(options) {;BaseClient.prototype.__init.call(this);BaseClient.prototype.__init2.call(this);BaseClient.prototype.__init3.call(this);BaseClient.prototype.__init4.call(this); + this._options = options; + if (options.dsn) { + this._dsn = makeDsn(options.dsn); + const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options); + this._transport = options.transport({ + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...options.transportOptions, + url, + }); + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not do anything.'); } - /** - * @inheritDoc - */ - BaseClient.prototype.captureException = function (exception, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - this._getBackend() - .eventFromException(exception, hint) - .then(function (event) { return _this._processEvent(event, hint, scope); }) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.captureMessage = function (message, level, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - var promisedEvent = isPrimitive(message) - ? this._getBackend().eventFromMessage("" + message, level, hint) - : this._getBackend().eventFromException(message, hint); - promisedEvent - .then(function (event) { return _this._processEvent(event, hint, scope); }) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.captureEvent = function (event, hint, scope) { - var _this = this; - var eventId = hint && hint.event_id; - this._processing = true; - this._processEvent(event, hint, scope) - .then(function (finalEvent) { - // We need to check for finalEvent in case beforeSend returned null - eventId = finalEvent && finalEvent.event_id; - _this._processing = false; - }) - .then(null, function (reason) { - logger.error(reason); - _this._processing = false; - }); - return eventId; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getDsn = function () { - return this._dsn; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getOptions = function () { - return this._options; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.flush = function (timeout) { - var _this = this; - return this._isClientProcessing(timeout).then(function (status) { - clearInterval(status.interval); - return _this._getBackend() - .getTransport() - .close(timeout) - .then(function (transportFlushed) { return status.ready && transportFlushed; }); - }); - }; - /** - * @inheritDoc - */ - BaseClient.prototype.close = function (timeout) { - var _this = this; - return this.flush(timeout).then(function (result) { - _this.getOptions().enabled = false; - return result; - }); - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getIntegrations = function () { - return this._integrations || {}; - }; - /** - * @inheritDoc - */ - BaseClient.prototype.getIntegration = function (integration) { - try { - return this._integrations[integration.id] || null; - } - catch (_oO) { - logger.warn("Cannot retrieve integration " + integration.id + " from the current Client"); - return null; + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + captureException(exception, hint, scope) { + // ensure we haven't captured this very object before + if (checkOrSetAlreadyCaught(exception)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR); + return; + } + + let eventId = hint && hint.event_id; + + this._process( + this.eventFromException(exception, hint) + .then(event => this._captureEvent(event, hint, scope)) + .then(result => { + eventId = result; + }), + ); + + return eventId; + } + + /** + * @inheritDoc + */ + captureMessage( + message, + // eslint-disable-next-line deprecation/deprecation + level, + hint, + scope, + ) { + let eventId = hint && hint.event_id; + + const promisedEvent = isPrimitive(message) + ? this.eventFromMessage(String(message), level, hint) + : this.eventFromException(message, hint); + + this._process( + promisedEvent + .then(event => this._captureEvent(event, hint, scope)) + .then(result => { + eventId = result; + }), + ); + + return eventId; + } + + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + // ensure we haven't captured this very object before + if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR); + return; + } + + let eventId = hint && hint.event_id; + + this._process( + this._captureEvent(event, hint, scope).then(result => { + eventId = result; + }), + ); + + return eventId; + } + + /** + * @inheritDoc + */ + captureSession(session) { + if (!this._isEnabled()) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('SDK not enabled, will not capture session.'); + return; + } + + if (!(typeof session.release === 'string')) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Discarded session because of missing or non-string release'); + } else { + this.sendSession(session); + // After sending, we set init false to indicate it's not the first occurrence + updateSession(session, { init: false }); + } + } + + /** + * @inheritDoc + */ + getDsn() { + return this._dsn; + } + + /** + * @inheritDoc + */ + getOptions() { + return this._options; + } + + /** + * @see SdkMetadata in @sentry/types + * + * @return The metadata of the SDK + */ + getSdkMetadata() { + return this._options._metadata; + } + + /** + * @inheritDoc + */ + getTransport() { + return this._transport; + } + + /** + * @inheritDoc + */ + flush(timeout) { + const transport = this._transport; + if (transport) { + return this._isClientDoneProcessing(timeout).then(clientFinished => { + return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed); + }); + } else { + return resolvedSyncPromise(true); + } + } + + /** + * @inheritDoc + */ + close(timeout) { + return this.flush(timeout).then(result => { + this.getOptions().enabled = false; + return result; + }); + } + + /** + * Sets up the integrations + */ + setupIntegrations() { + if (this._isEnabled() && !this._integrationsInitialized) { + this._integrations = setupIntegrations(this._options.integrations); + this._integrationsInitialized = true; + } + } + + /** + * Gets an installed integration by its `id`. + * + * @returns The installed integration or `undefined` if no integration with that `id` was installed. + */ + getIntegrationById(integrationId) { + return this._integrations[integrationId]; + } + + /** + * @inheritDoc + */ + getIntegration(integration) { + try { + return (this._integrations[integration.id] ) || null; + } catch (_oO) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`); + return null; + } + } + + /** + * @inheritDoc + */ + addIntegration(integration) { + setupIntegration(integration, this._integrations); + } + + /** + * @inheritDoc + */ + sendEvent(event, hint = {}) { + if (this._dsn) { + let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); + + for (const attachment of hint.attachments || []) { + env = addItemToEnvelope( + env, + createAttachmentEnvelopeItem( + attachment, + this._options.transportOptions && this._options.transportOptions.textEncoder, + ), + ); + } + + this._sendEnvelope(env); + } + } + + /** + * @inheritDoc + */ + sendSession(session) { + if (this._dsn) { + const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel); + this._sendEnvelope(env); + } + } + + /** + * @inheritDoc + */ + recordDroppedEvent(reason, category, _event) { + // Note: we use `event` in replay, where we overwrite this hook. + + if (this._options.sendClientReports) { + // We want to track each category (error, transaction, session, replay_event) separately + // but still keep the distinction between different type of outcomes. + // We could use nested maps, but it's much easier to read and type this way. + // A correct type for map-based implementation if we want to go that route + // would be `Partial>>>` + // With typescript 4.1 we could even use template literal types + const key = `${reason}:${category}`; + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Adding outcome: "${key}"`); + + // The following works because undefined + 1 === NaN and NaN is falsy + this._outcomes[key] = this._outcomes[key] + 1 || 1; + } + } + + /** Updates existing session based on the provided event */ + _updateSessionFromEvent(session, event) { + let crashed = false; + let errored = false; + const exceptions = event.exception && event.exception.values; + + if (exceptions) { + errored = true; + + for (const ex of exceptions) { + const mechanism = ex.mechanism; + if (mechanism && mechanism.handled === false) { + crashed = true; + break; } - }; - /** Waits for the client to be done with processing. */ - BaseClient.prototype._isClientProcessing = function (timeout) { - var _this = this; - return new SyncPromise(function (resolve) { - var ticked = 0; - var tick = 1; - var interval = 0; + } + } + + // A session is updated and that session update is sent in only one of the two following scenarios: + // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update + // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update + const sessionNonTerminal = session.status === 'ok'; + const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed); + + if (shouldUpdateAndSend) { + updateSession(session, { + ...(crashed && { status: 'crashed' }), + errors: session.errors || Number(errored || crashed), + }); + this.captureSession(session); + } + } + + /** + * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying + * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not + * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to + * `true`. + * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and + * `false` otherwise + */ + _isClientDoneProcessing(timeout) { + return new SyncPromise(resolve => { + let ticked = 0; + const tick = 1; + + const interval = setInterval(() => { + if (this._numProcessing == 0) { + clearInterval(interval); + resolve(true); + } else { + ticked += tick; + if (timeout && ticked >= timeout) { clearInterval(interval); - interval = setInterval(function () { - if (!_this._processing) { - resolve({ - interval: interval, - ready: true, - }); - } - else { - ticked += tick; - if (timeout && ticked >= timeout) { - resolve({ - interval: interval, - ready: false, - }); - } - } - }, tick); - }); - }; - /** Returns the current backend. */ - BaseClient.prototype._getBackend = function () { - return this._backend; - }; - /** Determines whether this SDK is enabled and a valid Dsn is present. */ - BaseClient.prototype._isEnabled = function () { - return this.getOptions().enabled !== false && this._dsn !== undefined; - }; - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - */ - BaseClient.prototype._prepareEvent = function (event, scope, hint) { - var _this = this; - var _a = this.getOptions(), environment = _a.environment, release = _a.release, dist = _a.dist, _b = _a.maxValueLength, maxValueLength = _b === void 0 ? 250 : _b, _c = _a.normalizeDepth, normalizeDepth = _c === void 0 ? 3 : _c; - var prepared = tslib_1.__assign({}, event); - if (prepared.environment === undefined && environment !== undefined) { - prepared.environment = environment; + resolve(false); + } } - if (prepared.release === undefined && release !== undefined) { - prepared.release = release; + }, tick); + }); + } + + /** Determines whether this SDK is enabled and a valid Dsn is present. */ + _isEnabled() { + return this.getOptions().enabled !== false && this._dsn !== undefined; + } + + /** + * Adds common information to events. + * + * The information includes release and environment from `options`, + * breadcrumbs and context (extra, tags and user) from the scope. + * + * Information that is already present in the event is never overwritten. For + * nested objects, such as the context, keys are merged. + * + * @param event The original event. + * @param hint May contain additional information about the original exception. + * @param scope A scope containing event metadata. + * @returns A new event with more information. + */ + _prepareEvent(event, hint, scope) { + const options = this.getOptions(); + return prepareEvent(options, event, hint, scope); + } + + /** + * Processes the event and logs an error in case of rejection + * @param event + * @param hint + * @param scope + */ + _captureEvent(event, hint = {}, scope) { + return this._processEvent(event, hint, scope).then( + finalEvent => { + return finalEvent.event_id; + }, + reason => { + if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for + // control flow, log just the message (no stack) as a log-level log. + const sentryError = reason ; + if (sentryError.logLevel === 'log') { + logger.log(sentryError.message); + } else { + logger.warn(sentryError); + } } - if (prepared.dist === undefined && dist !== undefined) { - prepared.dist = dist; + return undefined; + }, + ); + } + + /** + * Processes an event (either error or message) and sends it to Sentry. + * + * This also adds breadcrumbs and context information to the event. However, + * platform specific meta data (such as the User's IP address) must be added + * by the SDK implementor. + * + * + * @param event The event to send to Sentry. + * @param hint May contain additional information about the original exception. + * @param scope A scope containing event metadata. + * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. + */ + _processEvent(event, hint, scope) { + const options = this.getOptions(); + const { sampleRate } = options; + + if (!this._isEnabled()) { + return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log')); + } + + const isTransaction = isTransactionEvent(event); + const isError = isErrorEvent(event); + const eventType = event.type || 'error'; + const beforeSendLabel = `before send for type \`${eventType}\``; + + // 1.0 === 100% events are sent + // 0.0 === 0% events are sent + // Sampling for transaction happens somewhere else + if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) { + this.recordDroppedEvent('sample_rate', 'error', event); + return rejectedSyncPromise( + new SentryError( + `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, + 'log', + ), + ); + } + + return this._prepareEvent(event, hint, scope) + .then(prepared => { + if (prepared === null) { + this.recordDroppedEvent('event_processor', eventType, event); + throw new SentryError('An event processor returned `null`, will not send event.', 'log'); } - if (prepared.message) { - prepared.message = truncate(prepared.message, maxValueLength); + + const isInternalException = hint.data && (hint.data ).__sentry__ === true; + if (isInternalException) { + return prepared; } - var exception = prepared.exception && prepared.exception.values && prepared.exception.values[0]; - if (exception && exception.value) { - exception.value = truncate(exception.value, maxValueLength); + + const result = processBeforeSend(options, prepared, hint); + return _validateBeforeSendResult(result, beforeSendLabel); + }) + .then(processedEvent => { + if (processedEvent === null) { + this.recordDroppedEvent('before_send', event.type || 'error', event); + throw new SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, 'log'); } - var request = prepared.request; - if (request && request.url) { - request.url = truncate(request.url, maxValueLength); + + const session = scope && scope.getSession(); + if (!isTransaction && session) { + this._updateSessionFromEvent(session, processedEvent); } - if (prepared.event_id === undefined) { - prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4(); + + // None of the Sentry built event processor will update transaction name, + // so if the transaction name has been changed by an event processor, we know + // it has to come from custom event processor added by a user + const transactionInfo = processedEvent.transaction_info; + if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { + const source = 'custom'; + processedEvent.transaction_info = { + ...transactionInfo, + source, + changes: [ + ...transactionInfo.changes, + { + source, + // use the same timestamp as the processed event. + timestamp: processedEvent.timestamp , + propagations: transactionInfo.propagations, + }, + ], + }; } - this._addIntegrations(prepared.sdk); - // We prepare the result here with a resolved Event. - var result = SyncPromise.resolve(prepared); - // This should be the last thing called, since we want that - // {@link Hub.addEventProcessor} gets the finished prepared event. - if (scope) { - // In case we have a hub we reassign it. - result = scope.applyToEvent(prepared, hint); + + this.sendEvent(processedEvent, hint); + return processedEvent; + }) + .then(null, reason => { + if (reason instanceof SentryError) { + throw reason; } - return result.then(function (evt) { - // tslint:disable-next-line:strict-type-predicates - if (typeof normalizeDepth === 'number' && normalizeDepth > 0) { - return _this._normalizeEvent(evt, normalizeDepth); - } - return evt; + + this.captureException(reason, { + data: { + __sentry__: true, + }, + originalException: reason , }); - }; - /** - * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization. - * Normalized keys: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * @param event Event - * @returns Normalized event - */ - BaseClient.prototype._normalizeEvent = function (event, depth) { - if (!event) { - return null; - } - // tslint:disable:no-unsafe-any - return tslib_1.__assign({}, event, (event.breadcrumbs && { - breadcrumbs: event.breadcrumbs.map(function (b) { return (tslib_1.__assign({}, b, (b.data && { - data: normalize(b.data, depth), - }))); }), - }), (event.user && { - user: normalize(event.user, depth), - }), (event.contexts && { - contexts: normalize(event.contexts, depth), - }), (event.extra && { - extra: normalize(event.extra, depth), - })); - }; - /** - * This function adds all used integrations to the SDK info in the event. - * @param sdkInfo The sdkInfo of the event that will be filled with all integrations. - */ - BaseClient.prototype._addIntegrations = function (sdkInfo) { - var integrationsArray = Object.keys(this._integrations); - if (sdkInfo && integrationsArray.length > 0) { - sdkInfo.integrations = integrationsArray; - } - }; - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional informartion about the original exception. - * @param scope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - BaseClient.prototype._processEvent = function (event, hint, scope) { - var _this = this; - var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate; - if (!this._isEnabled()) { - return SyncPromise.reject('SDK not enabled, will not send event.'); - } - // 1.0 === 100% events are sent - // 0.0 === 0% events are sent - if (typeof sampleRate === 'number' && Math.random() > sampleRate) { - return SyncPromise.reject('This event has been sampled, will not send event.'); + throw new SentryError( + `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`, + ); + }); + } + + /** + * Occupies the client with processing and event + */ + _process(promise) { + this._numProcessing++; + void promise.then( + value => { + this._numProcessing--; + return value; + }, + reason => { + this._numProcessing--; + return reason; + }, + ); + } + + /** + * @inheritdoc + */ + _sendEnvelope(envelope) { + if (this._transport && this._dsn) { + this._transport.send(envelope).then(null, reason => { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Error while sending event:', reason); + }); + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Transport disabled'); + } + } + + /** + * Clears outcomes on this client and returns them. + */ + _clearOutcomes() { + const outcomes = this._outcomes; + this._outcomes = {}; + return Object.keys(outcomes).map(key => { + const [reason, category] = key.split(':') ; + return { + reason, + category, + quantity: outcomes[key], + }; + }); + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + +} + +/** + * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so. + */ +function _validateBeforeSendResult( + beforeSendResult, + beforeSendLabel, +) { + const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; + if (isThenable(beforeSendResult)) { + return beforeSendResult.then( + event => { + if (!isPlainObject(event) && event !== null) { + throw new SentryError(invalidValueError); } - return new SyncPromise(function (resolve, reject) { - _this._prepareEvent(event, scope, hint) - .then(function (prepared) { - if (prepared === null) { - reject('An event processor returned null, will not send event.'); - return; - } - var finalEvent = prepared; - var isInternalException = hint && hint.data && hint.data.__sentry__ === true; - if (isInternalException || !beforeSend) { - _this._getBackend().sendEvent(finalEvent); - resolve(finalEvent); - return; - } - var beforeSendResult = beforeSend(prepared, hint); - // tslint:disable-next-line:strict-type-predicates - if (typeof beforeSendResult === 'undefined') { - logger.error('`beforeSend` method has to return `null` or a valid event.'); - } - else if (isThenable(beforeSendResult)) { - _this._handleAsyncBeforeSend(beforeSendResult, resolve, reject); - } - else { - finalEvent = beforeSendResult; - if (finalEvent === null) { - logger.log('`beforeSend` returned `null`, will not send event.'); - resolve(null); - return; - } - // From here on we are really async - _this._getBackend().sendEvent(finalEvent); - resolve(finalEvent); - } - }) - .then(null, function (reason) { - _this.captureException(reason, { - data: { - __sentry__: true, - }, - originalException: reason, - }); - reject("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: " + reason); - }); - }); - }; - /** - * Resolves before send Promise and calls resolve/reject on parent SyncPromise. - */ - BaseClient.prototype._handleAsyncBeforeSend = function (beforeSend, resolve, reject) { - var _this = this; - beforeSend - .then(function (processedEvent) { - if (processedEvent === null) { - reject('`beforeSend` returned `null`, will not send event.'); - return; - } - // From here on we are really async - _this._getBackend().sendEvent(processedEvent); - resolve(processedEvent); - }) - .then(null, function (e) { - reject("beforeSend rejected with " + e); - }); - }; - return BaseClient; -}()); + return event; + }, + e => { + throw new SentryError(`${beforeSendLabel} rejected with ${e}`); + }, + ); + } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) { + throw new SentryError(invalidValueError); + } + return beforeSendResult; +} + +/** + * Process the matching `beforeSendXXX` callback. + */ +function processBeforeSend( + options, + event, + hint, +) { + const { beforeSend, beforeSendTransaction } = options; + + if (isErrorEvent(event) && beforeSend) { + return beforeSend(event, hint); + } + + if (isTransactionEvent(event) && beforeSendTransaction) { + return beforeSendTransaction(event, hint); + } + + return event; +} + +function isErrorEvent(event) { + return event.type === undefined; +} + +function isTransactionEvent(event) { + return event.type === 'transaction'; +} + export { BaseClient }; -//# sourceMappingURL=baseclient.js.map \ No newline at end of file +//# sourceMappingURL=baseclient.js.map diff --git a/node_modules/@sentry/core/esm/baseclient.js.map b/node_modules/@sentry/core/esm/baseclient.js.map index e1ab638..3d6d649 100644 --- a/node_modules/@sentry/core/esm/baseclient.js.map +++ b/node_modules/@sentry/core/esm/baseclient.js.map @@ -1 +1 @@ -{"version":3,"file":"baseclient.js","sourceRoot":"","sources":["../src/baseclient.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG9G,OAAO,EAAoB,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IAoBE;;;;;OAKG;IACH,oBAAsB,YAAgC,EAAE,OAAU;QAZlE,kCAAkC;QACf,kBAAa,GAAqB,EAAE,CAAC;QAExD,6CAA6C;QACnC,gBAAW,GAAY,KAAK,CAAC;QASrC,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAExB,IAAI,OAAO,CAAC,GAAG,EAAE;YACf,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;SAClC;QAED,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;YACrB,IAAI,CAAC,aAAa,GAAG,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACvD;IACH,CAAC;IAED;;OAEG;IACI,qCAAgB,GAAvB,UAAwB,SAAc,EAAE,IAAgB,EAAE,KAAa;QAAvE,iBAkBC;QAjBC,IAAI,OAAO,GAAuB,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC;QACxD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,IAAI,CAAC,WAAW,EAAE;aACf,kBAAkB,CAAC,SAAS,EAAE,IAAI,C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AAC,CAAC;wBACjE,OAAO,CAAC,IAAI,CAAC,CAAC;wBACd,OAAO;qBACR;oBAED,mCAAmC;oBACnC,KAAI,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;oBACzC,OAAO,CAAC,UAAU,CAAC,CAAC;iBACrB;YACH,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,EAAE,UAAA,MAAM;gBAChB,KAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE;oBAC5B,IAAI,EAAE;wBACJ,UAAU,EAAE,IAAI;qBACjB;oBACD,iBAAiB,EAAE,MAAe;iBACnC,CAAC,CAAC;gBACH,MAAM,CACJ,gIAA8H,MAAQ,CACvI,CAAC;YACJ,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,2CAAsB,GAA9B,UACE,UAAqC,EACrC,OAA+B,EAC/B,MAAgC;QAHlC,iBAkBC;QAbC,UAAU;aACP,IAAI,CAAC,UAAA,cAAc;YAClB,IAAI,cAAc,KAAK,IAAI,EAAE;gBAC3B,MAAM,CAAC,oDAAoD,CAAC,CAAC;gBAC7D,OAAO;aACR;YACD,mCAAmC;YACnC,KAAI,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;YAC7C,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,EAAE,UAAA,CAAC;YACX,MAAM,CAAC,8BAA4B,CAAG,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACP,CAAC;IACH,iBAAC;AAAD,CAAC,AApaD,IAoaC","sourcesContent":["import { Scope } from '@sentry/hub';\nimport { Client, Event, EventHint, Integration, IntegrationClass, Options, SdkInfo, Severity } from '@sentry/types';\nimport { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, truncate, uuid4 } from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the enviornment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: Dsn;\n\n /** Array of used integrations. */\n protected readonly _integrations: IntegrationIndex = {};\n\n /** Is the client still processing a call? */\n protected _processing: boolean = false;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n this._processing = true;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(`${message}`, level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n promisedEvent\n .then(event => this._processEvent(event, hint, scope))\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n this._processing = true;\n\n this._processEvent(event, hint, scope)\n .then(finalEvent => {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n this._processing = false;\n })\n .then(null, reason => {\n logger.error(reason);\n this._processing = false;\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): Dsn | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientProcessing(timeout).then(status => {\n clearInterval(status.interval);\n return this._getBackend()\n .getTransport()\n .close(timeout)\n .then(transportFlushed => status.ready && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * @inheritDoc\n */\n public getIntegrations(): IntegrationIndex {\n return this._integrations || {};\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Waits for the client to be done with processing. */\n protected _isClientProcessing(timeout?: number): PromiseLike<{ ready: boolean; interval: number }> {\n return new SyncPromise<{ ready: boolean; interval: number }>(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n let interval = 0;\n clearInterval(interval);\n\n interval = (setInterval(() => {\n if (!this._processing) {\n resolve({\n interval,\n ready: true,\n });\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n resolve({\n interval,\n ready: false,\n });\n }\n }\n }, tick) as unknown) as number;\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { environment, release, dist, maxValueLength = 250, normalizeDepth = 3 } = this.getOptions();\n\n const prepared: Event = { ...event };\n if (prepared.environment === undefined && environment !== undefined) {\n prepared.environment = environment;\n }\n if (prepared.release === undefined && release !== undefined) {\n prepared.release = release;\n }\n\n if (prepared.dist === undefined && dist !== undefined) {\n prepared.dist = dist;\n }\n\n if (prepared.message) {\n prepared.message = truncate(prepared.message, maxValueLength);\n }\n\n const exception = prepared.exception && prepared.exception.values && prepared.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = prepared.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n\n if (prepared.event_id === undefined) {\n prepared.event_id = hint && hint.event_id ? hint.event_id : uuid4();\n }\n\n this._addIntegrations(prepared.sdk);\n\n // We prepare the result here with a resolved Event.\n let result = SyncPromise.resolve(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (scope) {\n // In case we have a hub we reassign it.\n result = scope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n // tslint:disable:no-unsafe-any\n return {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n protected _addIntegrations(sdkInfo?: SdkInfo): void {\n const integrationsArray = Object.keys(this._integrations);\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional informartion about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n const { beforeSend, sampleRate } = this.getOptions();\n\n if (!this._isEnabled()) {\n return SyncPromise.reject('SDK not enabled, will not send event.');\n }\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n if (typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject('This event has been sampled, will not send event.');\n }\n\n return new SyncPromise((resolve, reject) => {\n this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n reject('An event processor returned null, will not send event.');\n return;\n }\n\n let finalEvent: Event | null = prepared;\n\n const isInternalException = hint && hint.data && (hint.data as { [key: string]: any }).__sentry__ === true;\n if (isInternalException || !beforeSend) {\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n return;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n // tslint:disable-next-line:strict-type-predicates\n if (typeof beforeSendResult === 'undefined') {\n logger.error('`beforeSend` method has to return `null` or a valid event.');\n } else if (isThenable(beforeSendResult)) {\n this._handleAsyncBeforeSend(beforeSendResult as PromiseLike, resolve, reject);\n } else {\n finalEvent = beforeSendResult as Event | null;\n\n if (finalEvent === null) {\n logger.log('`beforeSend` returned `null`, will not send event.');\n resolve(null);\n return;\n }\n\n // From here on we are really async\n this._getBackend().sendEvent(finalEvent);\n resolve(finalEvent);\n }\n })\n .then(null, reason => {\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n reject(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n });\n }\n\n /**\n * Resolves before send Promise and calls resolve/reject on parent SyncPromise.\n */\n private _handleAsyncBeforeSend(\n beforeSend: PromiseLike,\n resolve: (event: Event) => void,\n reject: (reason: string) => void,\n ): void {\n beforeSend\n .then(processedEvent => {\n if (processedEvent === null) {\n reject('`beforeSend` returned `null`, will not send event.');\n return;\n }\n // From here on we are really async\n this._getBackend().sendEvent(processedEvent);\n resolve(processedEvent);\n })\n .then(null, e => {\n reject(`beforeSend rejected with ${e}`);\n });\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"baseclient.js","sources":["../../src/baseclient.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport type {\n Client,\n ClientOptions,\n DataCategory,\n DsnComponents,\n Envelope,\n ErrorEvent,\n Event,\n EventDropReason,\n EventHint,\n Integration,\n IntegrationClass,\n Outcome,\n SdkMetadata,\n Session,\n SessionAggregates,\n Severity,\n SeverityLevel,\n TransactionEvent,\n Transport,\n} from '@sentry/types';\nimport {\n addItemToEnvelope,\n checkOrSetAlreadyCaught,\n createAttachmentEnvelopeItem,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n makeDsn,\n rejectedSyncPromise,\n resolvedSyncPromise,\n SentryError,\n SyncPromise,\n} from '@sentry/utils';\n\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope';\nimport type { IntegrationIndex } from './integration';\nimport { setupIntegration, setupIntegrations } from './integration';\nimport type { Scope } from './scope';\nimport { updateSession } from './session';\nimport { prepareEvent } from './utils/prepareEvent';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: DsnComponents;\n\n protected readonly _transport?: Transport;\n\n /** Array of set up integrations. */\n protected _integrations: IntegrationIndex = {};\n\n /** Indicates whether this client's integrations have been set up. */\n protected _integrationsInitialized: boolean = false;\n\n /** Number of calls being processed */\n protected _numProcessing: number = 0;\n\n /** Holds flushable */\n private _outcomes: { [key: string]: number } = {};\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n protected constructor(options: O) {\n this._options = options;\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n } else {\n __DEBUG_BUILD__ && logger.warn('No DSN provided, client will not do anything.');\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n __DEBUG_BUILD__ && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level?: Severity | SeverityLevel,\n hint?: EventHint,\n scope?: Scope,\n ): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(String(message), level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n __DEBUG_BUILD__ && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!this._isEnabled()) {\n __DEBUG_BUILD__ && logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n\n if (!(typeof session.release === 'string')) {\n __DEBUG_BUILD__ && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): DsnComponents | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n public getSdkMetadata(): SdkMetadata | undefined {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport | undefined {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n const transport = this._transport;\n if (transport) {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n if (this._isEnabled() && !this._integrationsInitialized) {\n this._integrations = setupIntegrations(this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */\n public getIntegrationById(integrationId: string): Integration | undefined {\n return this._integrations[integrationId];\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n __DEBUG_BUILD__ && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public addIntegration(integration: Integration): void {\n setupIntegration(integration, this._integrations);\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event, hint: EventHint = {}): void {\n if (this._dsn) {\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(\n env,\n createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n this._sendEnvelope(env);\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session | SessionAggregates): void {\n if (this._dsn) {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n this._sendEnvelope(env);\n }\n }\n\n /**\n * @inheritDoc\n */\n public recordDroppedEvent(reason: EventDropReason, category: DataCategory, _event?: Event): void {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n __DEBUG_BUILD__ && logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n const options = this.getOptions();\n return prepareEvent(options, event, hint, scope);\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint: EventHint = {}, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (__DEBUG_BUILD__) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason as SentryError;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', eventType, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', event.type || 'error', event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n changes: [\n ...transactionInfo.changes,\n {\n source,\n // use the same timestamp as the processed event.\n timestamp: processedEvent.timestamp as number,\n propagations: transactionInfo.propagations,\n },\n ],\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): void {\n if (this._transport && this._dsn) {\n this._transport.send(envelope).then(null, reason => {\n __DEBUG_BUILD__ && logger.error('Error while sending event:', reason);\n });\n } else {\n __DEBUG_BUILD__ && logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n protected _clearOutcomes(): Outcome[] {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') as [EventDropReason, DataCategory];\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public abstract eventFromException(_exception: any, _hint?: EventHint): PromiseLike;\n\n /**\n * @inheritDoc\n */\n public abstract eventFromMessage(\n _message: string,\n // eslint-disable-next-line deprecation/deprecation\n _level?: Severity | SeverityLevel,\n _hint?: EventHint,\n ): PromiseLike;\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult: PromiseLike | Event | null,\n beforeSendLabel: string,\n): PromiseLike | Event | null {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n): PromiseLike | Event | null {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n return event.type === 'transaction';\n}\n"],"names":[],"mappings":";;;;;;;AA6CA,MAAA,kBAAA,GAAA,6DAAA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA,UAAA,CAAA;AACA;;AAGA;;AAKA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,aAAA,GAAA,GAAA,CAAA;AACA;AACA;AACA,GAAA,OAAA,GAAA,CAAA,IAAA,CAAA,wBAAA,GAAA,MAAA,CAAA;AACA;AACA;AACA,GAAA,OAAA,GAAA,CAAA,IAAA,CAAA,cAAA,GAAA,EAAA,CAAA;AACA;AACA;AACA,GAAA,OAAA,GAAA,CAAA,IAAA,CAAA,SAAA,GAAA,GAAA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAA,WAAA,CAAA,OAAA,EAAA,CAAA,CAAA,UAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,UAAA,CAAA,SAAA,CAAA,OAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,UAAA,CAAA,SAAA,CAAA,OAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,UAAA,CAAA,SAAA,CAAA,OAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA,OAAA,CAAA;AACA,IAAA,IAAA,OAAA,CAAA,GAAA,EAAA;AACA,MAAA,IAAA,CAAA,IAAA,GAAA,OA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AAA;AACA,GAAA;AACA,EAAA,OAAA,gBAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA,SAAA,iBAAA;AACA,EAAA,OAAA;AACA,EAAA,KAAA;AACA,EAAA,IAAA;AACA,EAAA;AACA,EAAA,MAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,GAAA,OAAA,CAAA;AACA;AACA,EAAA,IAAA,YAAA,CAAA,KAAA,CAAA,IAAA,UAAA,EAAA;AACA,IAAA,OAAA,UAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA,kBAAA,CAAA,KAAA,CAAA,IAAA,qBAAA,EAAA;AACA,IAAA,OAAA,qBAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,KAAA,CAAA;AACA,CAAA;AACA;AACA,SAAA,YAAA,CAAA,KAAA,EAAA;AACA,EAAA,OAAA,KAAA,CAAA,IAAA,KAAA,SAAA,CAAA;AACA,CAAA;AACA;AACA,SAAA,kBAAA,CAAA,KAAA,EAAA;AACA,EAAA,OAAA,KAAA,CAAA,IAAA,KAAA,aAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/index.d.ts b/node_modules/@sentry/core/esm/index.d.ts deleted file mode 100644 index 5411ab3..0000000 --- a/node_modules/@sentry/core/esm/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/minimal'; -export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub'; -export { API } from './api'; -export { BaseClient } from './baseclient'; -export { BackendClass, BaseBackend } from './basebackend'; -export { initAndBind, ClientClass } from './sdk'; -export { NoopTransport } from './transports/noop'; -import * as Integrations from './integrations'; -export { Integrations }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/index.d.ts.map b/node_modules/@sentry/core/esm/index.d.ts.map deleted file mode 100644 index 22b48e9..0000000 --- a/node_modules/@sentry/core/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/index.js b/node_modules/@sentry/core/esm/index.js index 102ac71..c064478 100644 --- a/node_modules/@sentry/core/esm/index.js +++ b/node_modules/@sentry/core/esm/index.js @@ -1,10 +1,20 @@ -export { addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/minimal'; -export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub'; -export { API } from './api'; -export { BaseClient } from './baseclient'; -export { BaseBackend } from './basebackend'; -export { initAndBind } from './sdk'; -export { NoopTransport } from './transports/noop'; -import * as Integrations from './integrations'; -export { Integrations }; -//# sourceMappingURL=index.js.map \ No newline at end of file +export { addBreadcrumb, captureEvent, captureException, captureMessage, configureScope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope } from './exports.js'; +export { Hub, getCurrentHub, getHubFromCarrier, getMainCarrier, makeMain, setHubOnCarrier } from './hub.js'; +export { closeSession, makeSession, updateSession } from './session.js'; +export { SessionFlusher } from './sessionflusher.js'; +export { Scope, addGlobalEventProcessor } from './scope.js'; +export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api.js'; +export { BaseClient } from './baseclient.js'; +export { initAndBind } from './sdk.js'; +export { createTransport } from './transports/base.js'; +export { SDK_VERSION } from './version.js'; +export { getIntegrationsToSetup } from './integration.js'; +import * as index from './integrations/index.js'; +export { index as Integrations }; +export { prepareEvent } from './utils/prepareEvent.js'; +export { FunctionToString } from './integrations/functiontostring.js'; +export { InboundFilters } from './integrations/inboundfilters.js'; + +; +; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/core/esm/index.js.map b/node_modules/@sentry/core/esm/index.js.map index 111ed9f..b7046aa 100644 --- a/node_modules/@sentry/core/esm/index.js.map +++ b/node_modules/@sentry/core/esm/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAe,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["export {\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from '@sentry/minimal';\nexport { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub';\nexport { API } from './api';\nexport { BaseClient } from './baseclient';\nexport { BackendClass, BaseBackend } from './basebackend';\nexport { initAndBind, ClientClass } from './sdk';\nexport { NoopTransport } from './transports/noop';\n\nimport * as Integrations from './integrations';\n\nexport { Integrations };\n"]} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["export type { ClientClass } from './sdk';\nexport type { Carrier, Layer } from './hub';\n\nexport {\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n startTransaction,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from './exports';\nexport { getCurrentHub, getHubFromCarrier, Hub, makeMain, getMainCarrier, setHubOnCarrier } from './hub';\nexport { makeSession, closeSession, updateSession } from './session';\nexport { SessionFlusher } from './sessionflusher';\nexport { addGlobalEventProcessor, Scope } from './scope';\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api';\nexport { BaseClient } from './baseclient';\nexport { initAndBind } from './sdk';\nexport { createTransport } from './transports/base';\nexport { SDK_VERSION } from './version';\nexport { getIntegrationsToSetup } from './integration';\nexport { FunctionToString, InboundFilters } from './integrations';\nexport { prepareEvent } from './utils/prepareEvent';\n\nimport * as Integrations from './integrations';\n\nexport { Integrations };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,CAAA;AACA"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integration.d.ts b/node_modules/@sentry/core/esm/integration.d.ts deleted file mode 100644 index 16a0f8e..0000000 --- a/node_modules/@sentry/core/esm/integration.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Integration, Options } from '@sentry/types'; -export declare const installedIntegrations: string[]; -/** Map of integrations assigned to a client */ -export interface IntegrationIndex { - [key: string]: Integration; -} -/** Gets integration to install */ -export declare function getIntegrationsToSetup(options: Options): Integration[]; -/** Setup given integration */ -export declare function setupIntegration(integration: Integration): void; -/** - * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default - * integrations are added unless they were already provided before. - * @param integrations array of integration instances - * @param withDefault should enable default integrations - */ -export declare function setupIntegrations(options: O): IntegrationIndex; -//# sourceMappingURL=integration.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integration.d.ts.map b/node_modules/@sentry/core/esm/integration.d.ts.map deleted file mode 100644 index 4ece78d..0000000 --- a/node_modules/@sentry/core/esm/integration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGrD,eAAO,MAAM,qBAAqB,EAAE,MAAM,EAAO,CAAC;AAElD,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B;AAED,kCAAkC;AAClC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAyCtE;AAED,8BAA8B;AAC9B,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAO/D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAOjF"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integration.js b/node_modules/@sentry/core/esm/integration.js index bad8bd0..fe0bcd0 100644 --- a/node_modules/@sentry/core/esm/integration.js +++ b/node_modules/@sentry/core/esm/integration.js @@ -1,67 +1,98 @@ -import * as tslib_1 from "tslib"; -import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub'; -import { logger } from '@sentry/utils'; -export var installedIntegrations = []; -/** Gets integration to install */ -export function getIntegrationsToSetup(options) { - var defaultIntegrations = (options.defaultIntegrations && tslib_1.__spread(options.defaultIntegrations)) || []; - var userIntegrations = options.integrations; - var integrations = []; - if (Array.isArray(userIntegrations)) { - var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; }); - var pickedIntegrationsNames_1 = []; - // Leave only unique default integrations, that were not overridden with provided user integrations - defaultIntegrations.forEach(function (defaultIntegration) { - if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 && - pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) { - integrations.push(defaultIntegration); - pickedIntegrationsNames_1.push(defaultIntegration.name); - } - }); - // Don't add same user integration twice - userIntegrations.forEach(function (userIntegration) { - if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) { - integrations.push(userIntegration); - pickedIntegrationsNames_1.push(userIntegration.name); - } - }); - } - else if (typeof userIntegrations === 'function') { - integrations = userIntegrations(defaultIntegrations); - integrations = Array.isArray(integrations) ? integrations : [integrations]; - } - else { - integrations = tslib_1.__spread(defaultIntegrations); - } - // Make sure that if present, `Debug` integration will always run last - var integrationsNames = integrations.map(function (i) { return i.name; }); - var alwaysLastToRun = 'Debug'; - if (integrationsNames.indexOf(alwaysLastToRun) !== -1) { - integrations.push.apply(integrations, tslib_1.__spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1))); +import { arrayify, logger } from '@sentry/utils'; +import { getCurrentHub } from './hub.js'; +import { addGlobalEventProcessor } from './scope.js'; + +const installedIntegrations = []; + +/** Map of integrations assigned to a client */ + +/** + * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to + * preseve the order of integrations in the array. + * + * @private + */ +function filterDuplicates(integrations) { + const integrationsByName = {}; + + integrations.forEach(currentInstance => { + const { name } = currentInstance; + + const existingInstance = integrationsByName[name]; + + // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a + // default instance to overwrite an existing user instance + if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) { + return; } - return integrations; + + integrationsByName[name] = currentInstance; + }); + + return Object.values(integrationsByName); } -/** Setup given integration */ -export function setupIntegration(integration) { - if (installedIntegrations.indexOf(integration.name) !== -1) { - return; - } - integration.setupOnce(addGlobalEventProcessor, getCurrentHub); - installedIntegrations.push(integration.name); - logger.log("Integration installed: " + integration.name); + +/** Gets integrations to install */ +function getIntegrationsToSetup(options) { + const defaultIntegrations = options.defaultIntegrations || []; + const userIntegrations = options.integrations; + + // We flag default instances, so that later we can tell them apart from any user-created instances of the same class + defaultIntegrations.forEach(integration => { + integration.isDefaultInstance = true; + }); + + let integrations; + + if (Array.isArray(userIntegrations)) { + integrations = [...defaultIntegrations, ...userIntegrations]; + } else if (typeof userIntegrations === 'function') { + integrations = arrayify(userIntegrations(defaultIntegrations)); + } else { + integrations = defaultIntegrations; + } + + const finalIntegrations = filterDuplicates(integrations); + + // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or + // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event + // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore + // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array. + const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug'); + if (debugIndex !== -1) { + const [debugInstance] = finalIntegrations.splice(debugIndex, 1); + finalIntegrations.push(debugInstance); + } + + return finalIntegrations; } + /** * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default * integrations are added unless they were already provided before. * @param integrations array of integration instances * @param withDefault should enable default integrations */ -export function setupIntegrations(options) { - var integrations = {}; - getIntegrationsToSetup(options).forEach(function (integration) { - integrations[integration.name] = integration; - setupIntegration(integration); - }); - return integrations; +function setupIntegrations(integrations) { + const integrationIndex = {}; + + integrations.forEach(integration => { + setupIntegration(integration, integrationIndex); + }); + + return integrationIndex; +} + +/** Setup a single integration. */ +function setupIntegration(integration, integrationIndex) { + integrationIndex[integration.name] = integration; + + if (installedIntegrations.indexOf(integration.name) === -1) { + integration.setupOnce(addGlobalEventProcessor, getCurrentHub); + installedIntegrations.push(integration.name); + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`); + } } -//# sourceMappingURL=integration.js.map \ No newline at end of file + +export { getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations }; +//# sourceMappingURL=integration.js.map diff --git a/node_modules/@sentry/core/esm/integration.js.map b/node_modules/@sentry/core/esm/integration.js.map index 991678a..70301bc 100644 --- a/node_modules/@sentry/core/esm/integration.js.map +++ b/node_modules/@sentry/core/esm/integration.js.map @@ -1 +1 @@ -{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,CAAC,IAAM,qBAAqB,GAAa,EAAE,CAAC;AAOlD,kCAAkC;AAClC,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,IAAM,mBAAmB,GAAG,CAAC,OAAO,CAAC,mBAAmB,qBAAQ,OAAO,CAAC,mBAAmB,CAAC,CAAC,IAAI,EAAE,CAAC;IACpG,IAAM,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAC9C,IAAI,YAAY,GAAkB,EAAE,CAAC;IACrC,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;QACnC,IAAM,uBA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AAe,GAAG,OAAO,CAAC;IAChC,IAAI,iBAAiB,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE;QACrD,YAAY,CAAC,IAAI,OAAjB,YAAY,mBAAS,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,GAAE;KAC1F;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,8BAA8B;AAC9B,MAAM,UAAU,gBAAgB,CAAC,WAAwB;IACvD,IAAI,qBAAqB,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;QAC1D,OAAO;KACR;IACD,WAAW,CAAC,SAAS,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC;IAC9D,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,GAAG,CAAC,4BAA0B,WAAW,CAAC,IAAM,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAoB,OAAU;IAC7D,IAAM,YAAY,GAAqB,EAAE,CAAC;IAC1C,sBAAsB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAA,WAAW;QACjD,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC;QAC7C,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IACH,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport interface IntegrationIndex {\n [key: string]: Integration;\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n let integrations: Integration[] = [];\n if (Array.isArray(userIntegrations)) {\n const userIntegrationsNames = userIntegrations.map(i => i.name);\n const pickedIntegrationsNames: string[] = [];\n\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(defaultIntegration => {\n if (\n userIntegrationsNames.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames.indexOf(defaultIntegration.name) === -1\n ) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames.push(defaultIntegration.name);\n }\n });\n\n // Don't add same user integration twice\n userIntegrations.forEach(userIntegration => {\n if (pickedIntegrationsNames.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames.push(userIntegration.name);\n }\n });\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n } else {\n integrations = [...defaultIntegrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}\n"]} \ No newline at end of file +{"version":3,"file":"integration.js","sources":["../../src/integration.ts"],"sourcesContent":["import type { Integration, Options } from '@sentry/types';\nimport { arrayify, logger } from '@sentry/utils';\n\nimport { getCurrentHub } from './hub';\nimport { addGlobalEventProcessor } from './scope';\n\ndeclare module '@sentry/types' {\n interface Integration {\n isDefaultInstance?: boolean;\n }\n}\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n};\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n const integrationsByName: { [key: string]: Integration } = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations: Integration[];\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(integrations: Integration[]): IntegrationIndex {\n const integrationIndex: IntegrationIndex = {};\n\n integrations.forEach(integration => {\n setupIntegration(integration, integrationIndex);\n });\n\n return integrationIndex;\n}\n\n/** Setup a single integration. */\nexport function setupIntegration(integration: Integration, integrationIndex: IntegrationIndex): void {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n __DEBUG_BUILD__ && logger.log(`Integration installed: ${integration.name}`);\n }\n}\n"],"names":[],"mappings":";;;;AAYA,MAAA,qBAAA,GAAA,GAAA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,gBAAA,CAAA,YAAA,EAAA;AACA,EAAA,MAAA,kBAAA,GAAA,EAAA,CAAA;AACA;AACA,EAAA,YAAA,CAAA,OAAA,CAAA,eAAA,IAAA;AACA,IAAA,MAAA,EAAA,IAAA,EAAA,GAAA,eAAA,CAAA;AACA;AACA,IAAA,MAAA,gBAAA,GAAA,kBAAA,CAAA,IAAA,CAAA,CAAA;AACA;AACA;AACA;AACA,IAAA,IAAA,gBAAA,IAAA,CAAA,gBAAA,CAAA,iBAAA,IAAA,eAAA,CAAA,iBAAA,EAAA;AACA,MAAA,OAAA;AACA,KAAA;AACA;AACA,IAAA,kBAAA,CAAA,IAAA,CAAA,GAAA,eAAA,CAAA;AACA,GAAA,CAAA,CAAA;AACA;AACA,EAAA,OAAA,MAAA,CAAA,MAAA,CAAA,kBAAA,CAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,sBAAA,C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A,WAAA,IAAA;AACA,IAAA,gBAAA,CAAA,WAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,CAAA,CAAA;AACA;AACA,EAAA,OAAA,gBAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,gBAAA,CAAA,WAAA,EAAA,gBAAA,EAAA;AACA,EAAA,gBAAA,CAAA,WAAA,CAAA,IAAA,CAAA,GAAA,WAAA,CAAA;AACA;AACA,EAAA,IAAA,qBAAA,CAAA,OAAA,CAAA,WAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,EAAA;AACA,IAAA,WAAA,CAAA,SAAA,CAAA,uBAAA,EAAA,aAAA,CAAA,CAAA;AACA,IAAA,qBAAA,CAAA,IAAA,CAAA,WAAA,CAAA,IAAA,CAAA,CAAA;AACA,IAAA,CAAA,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA,KAAA,MAAA,CAAA,GAAA,CAAA,CAAA,uBAAA,EAAA,WAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACA,GAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/functiontostring.d.ts b/node_modules/@sentry/core/esm/integrations/functiontostring.d.ts deleted file mode 100644 index 71193dd..0000000 --- a/node_modules/@sentry/core/esm/integrations/functiontostring.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Patch toString calls to return proper name for wrapped functions */ -export declare class FunctionToString implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - setupOnce(): void; -} -//# sourceMappingURL=functiontostring.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/functiontostring.d.ts.map b/node_modules/@sentry/core/esm/integrations/functiontostring.d.ts.map deleted file mode 100644 index 467e122..0000000 --- a/node_modules/@sentry/core/esm/integrations/functiontostring.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"functiontostring.d.ts","sourceRoot":"","sources":["../../src/integrations/functiontostring.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAI7D,uEAAuE;AACvE,qBAAa,gBAAiB,YAAW,WAAW;IAClD;;OAEG;IACI,IAAI,EAAE,MAAM,CAAuB;IAE1C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAsB;IAE9C;;OAEG;IACI,SAAS,IAAI,IAAI;CASzB"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/functiontostring.js b/node_modules/@sentry/core/esm/integrations/functiontostring.js index 36ef0be..ef0ca57 100644 --- a/node_modules/@sentry/core/esm/integrations/functiontostring.js +++ b/node_modules/@sentry/core/esm/integrations/functiontostring.js @@ -1,32 +1,33 @@ -var originalFunctionToString; +import { getOriginalFunction } from '@sentry/utils'; + +let originalFunctionToString; + /** Patch toString calls to return proper name for wrapped functions */ -var FunctionToString = /** @class */ (function () { - function FunctionToString() { - /** - * @inheritDoc - */ - this.name = FunctionToString.id; - } - /** - * @inheritDoc - */ - FunctionToString.prototype.setupOnce = function () { - originalFunctionToString = Function.prototype.toString; - Function.prototype.toString = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var context = this.__sentry_original__ || this; - // tslint:disable-next-line:no-unsafe-any - return originalFunctionToString.apply(context, args); - }; +class FunctionToString {constructor() { FunctionToString.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'FunctionToString';} + + /** + * @inheritDoc + */ + __init() {this.name = FunctionToString.id;} + + /** + * @inheritDoc + */ + setupOnce() { + // eslint-disable-next-line @typescript-eslint/unbound-method + originalFunctionToString = Function.prototype.toString; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Function.prototype.toString = function ( ...args) { + const context = getOriginalFunction(this) || this; + return originalFunctionToString.apply(context, args); }; - /** - * @inheritDoc - */ - FunctionToString.id = 'FunctionToString'; - return FunctionToString; -}()); + } +} FunctionToString.__initStatic(); + export { FunctionToString }; -//# sourceMappingURL=functiontostring.js.map \ No newline at end of file +//# sourceMappingURL=functiontostring.js.map diff --git a/node_modules/@sentry/core/esm/integrations/functiontostring.js.map b/node_modules/@sentry/core/esm/integrations/functiontostring.js.map index 1572451..7123afd 100644 --- a/node_modules/@sentry/core/esm/integrations/functiontostring.js.map +++ b/node_modules/@sentry/core/esm/integrations/functiontostring.js.map @@ -1 +1 @@ -{"version":3,"file":"functiontostring.js","sourceRoot":"","sources":["../../src/integrations/functiontostring.ts"],"names":[],"mappings":"AAEA,IAAI,wBAAoC,CAAC;AAEzC,uEAAuE;AACvE;IAAA;QACE;;WAEG;QACI,SAAI,GAAW,gBAAgB,CAAC,EAAE,CAAC;IAmB5C,CAAC;IAZC;;OAEG;IACI,oCAAS,GAAhB;QACE,wBAAwB,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC;QAEvD,QAAQ,CAAC,SAAS,CAAC,QAAQ,GAAG;YAAgC,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAC1E,IAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,IAAI,IAAI,CAAC;YACjD,yCAAyC;YACzC,OAAO,wBAAwB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACvD,CAAC,CAAC;IACJ,CAAC;IAhBD;;OAEG;IACW,mBAAE,GAAW,kBAAkB,CAAC;IAchD,uBAAC;CAAA,AAvBD,IAuBC;SAvBY,gBAAgB","sourcesContent":["import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n originalFunctionToString = Function.prototype.toString;\n\n Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n const context = this.__sentry_original__ || this;\n // tslint:disable-next-line:no-unsafe-any\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"functiontostring.js","sources":["../../../src/integrations/functiontostring.ts"],"sourcesContent":["import type { Integration, WrappedFunction } from '@sentry/types';\nimport { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function (this: WrappedFunction, ...args: any[]): string {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n"],"names":[],"mappings":";;AAGA,IAAA,wBAAA,CAAA;AACA;AACA;AACA,MAAA,gBAAA,EAAA,CAAA,WAAA,GAAA,EAAA,gBAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,mBAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,gBAAA,CAAA,GAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,SAAA,GAAA;AACA;AACA,IAAA,wBAAA,GAAA,QAAA,CAAA,SAAA,CAAA,QAAA,CAAA;AACA;AACA;AACA,IAAA,QAAA,CAAA,SAAA,CAAA,QAAA,GAAA,WAAA,GAAA,IAAA,EAAA;AACA,MAAA,MAAA,OAAA,GAAA,mBAAA,CAAA,IAAA,CAAA,IAAA,IAAA,CAAA;AACA,MAAA,OAAA,wBAAA,CAAA,KAAA,CAAA,OAAA,EAAA,IAAA,CAAA,CAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA,CAAA,CAAA,gBAAA,CAAA,YAAA,EAAA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/inboundfilters.d.ts b/node_modules/@sentry/core/esm/integrations/inboundfilters.d.ts deleted file mode 100644 index 60c4339..0000000 --- a/node_modules/@sentry/core/esm/integrations/inboundfilters.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Integration } from '@sentry/types'; -/** JSDoc */ -interface InboundFiltersOptions { - blacklistUrls?: Array; - ignoreErrors?: Array; - ignoreInternal?: boolean; - whitelistUrls?: Array; -} -/** Inbound filters configurable by the user */ -export declare class InboundFilters implements Integration { - private readonly _options; - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - constructor(_options?: InboundFiltersOptions); - /** - * @inheritDoc - */ - setupOnce(): void; - /** JSDoc */ - private _shouldDropEvent; - /** JSDoc */ - private _isSentryError; - /** JSDoc */ - private _isIgnoredError; - /** JSDoc */ - private _isBlacklistedUrl; - /** JSDoc */ - private _isWhitelistedUrl; - /** JSDoc */ - private _mergeOptions; - /** JSDoc */ - private _getPossibleEventMessages; - /** JSDoc */ - private _getEventFilterUrl; -} -export {}; -//# sourceMappingURL=inboundfilters.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/inboundfilters.d.ts.map b/node_modules/@sentry/core/esm/integrations/inboundfilters.d.ts.map deleted file mode 100644 index a808817..0000000 --- a/node_modules/@sentry/core/esm/integrations/inboundfilters.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inboundfilters.d.ts","sourceRoot":"","sources":["../../src/integrations/inboundfilters.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AAOnD,YAAY;AACZ,UAAU,qBAAqB;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACxC;AAED,+CAA+C;AAC/C,qBAAa,cAAe,YAAW,WAAW;IAU7B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAT5C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAqB;IACxC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAoB;gBAER,QAAQ,GAAE,qBAA0B;IAExE;;OAEG;IACI,SAAS,IAAI,IAAI;IAmBxB,YAAY;IACZ,OAAO,CAAC,gBAAgB;IA8BxB,YAAY;IACZ,OAAO,CAAC,cAAc;IAmBtB,YAAY;IACZ,OAAO,CAAC,eAAe;IAWvB,YAAY;IACZ,OAAO,CAAC,iBAAiB;IASzB,YAAY;IACZ,OAAO,CAAC,iBAAiB;IASzB,YAAY;IACZ,OAAO,CAAC,aAAa;IAarB,YAAY;IACZ,OAAO,CAAC,yBAAyB;IAgBjC,YAAY;IACZ,OAAO,CAAC,kBAAkB;CAiB3B"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/inboundfilters.js b/node_modules/@sentry/core/esm/integrations/inboundfilters.js index 9a16c1c..6d10fc3 100644 --- a/node_modules/@sentry/core/esm/integrations/inboundfilters.js +++ b/node_modules/@sentry/core/esm/integrations/inboundfilters.js @@ -1,159 +1,180 @@ -import * as tslib_1 from "tslib"; -import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub'; -import { getEventDescription, isMatchingPattern, logger } from '@sentry/utils'; +import { logger, getEventDescription, stringMatchesSomePattern } from '@sentry/utils'; + // "Script error." is hard coded into browsers for errors that it can't read. // this is the result of a script being pulled in from an external domain and CORS. -var DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/]; +const DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/]; + +/** Options for the InboundFilters integration */ + /** Inbound filters configurable by the user */ -var InboundFilters = /** @class */ (function () { - function InboundFilters(_options) { - if (_options === void 0) { _options = {}; } - this._options = _options; - /** - * @inheritDoc - */ - this.name = InboundFilters.id; - } - /** - * @inheritDoc - */ - InboundFilters.prototype.setupOnce = function () { - addGlobalEventProcessor(function (event) { - var hub = getCurrentHub(); - if (!hub) { - return event; - } - var self = hub.getIntegration(InboundFilters); - if (self) { - var client = hub.getClient(); - var clientOptions = client ? client.getOptions() : {}; - var options = self._mergeOptions(clientOptions); - if (self._shouldDropEvent(event, options)) { - return null; - } - } - return event; - }); - }; - /** JSDoc */ - InboundFilters.prototype._shouldDropEvent = function (event, options) { - if (this._isSentryError(event, options)) { - logger.warn("Event dropped due to being internal Sentry Error.\nEvent: " + getEventDescription(event)); - return true; - } - if (this._isIgnoredError(event, options)) { - logger.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: " + getEventDescription(event)); - return true; - } - if (this._isBlacklistedUrl(event, options)) { - logger.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: " + getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); - return true; - } - if (!this._isWhitelistedUrl(event, options)) { - logger.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: " + getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); - return true; - } - return false; - }; - /** JSDoc */ - InboundFilters.prototype._isSentryError = function (event, options) { - if (options === void 0) { options = {}; } - if (!options.ignoreInternal) { - return false; - } - try { - return ((event && - event.exception && - event.exception.values && - event.exception.values[0] && - event.exception.values[0].type === 'SentryError') || - false); - } - catch (_oO) { - return false; - } - }; - /** JSDoc */ - InboundFilters.prototype._isIgnoredError = function (event, options) { - if (options === void 0) { options = {}; } - if (!options.ignoreErrors || !options.ignoreErrors.length) { - return false; - } - return this._getPossibleEventMessages(event).some(function (message) { - // Not sure why TypeScript complains here... - return options.ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); }); - }); - }; - /** JSDoc */ - InboundFilters.prototype._isBlacklistedUrl = function (event, options) { - if (options === void 0) { options = {}; } - // TODO: Use Glob instead? - if (!options.blacklistUrls || !options.blacklistUrls.length) { - return false; +class InboundFilters { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'InboundFilters';} + + /** + * @inheritDoc + */ + __init() {this.name = InboundFilters.id;} + + constructor( _options = {}) {;this._options = _options;InboundFilters.prototype.__init.call(this);} + + /** + * @inheritDoc + */ + setupOnce(addGlobalEventProcessor, getCurrentHub) { + const eventProcess = (event) => { + const hub = getCurrentHub(); + if (hub) { + const self = hub.getIntegration(InboundFilters); + if (self) { + const client = hub.getClient(); + const clientOptions = client ? client.getOptions() : {}; + const options = _mergeOptions(self._options, clientOptions); + return _shouldDropEvent(event, options) ? null : event; } - var url = this._getEventFilterUrl(event); - return !url ? false : options.blacklistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); + } + return event; }; - /** JSDoc */ - InboundFilters.prototype._isWhitelistedUrl = function (event, options) { - if (options === void 0) { options = {}; } - // TODO: Use Glob instead? - if (!options.whitelistUrls || !options.whitelistUrls.length) { - return true; - } - var url = this._getEventFilterUrl(event); - return !url ? true : options.whitelistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); - }; - /** JSDoc */ - InboundFilters.prototype._mergeOptions = function (clientOptions) { - if (clientOptions === void 0) { clientOptions = {}; } - return { - blacklistUrls: tslib_1.__spread((this._options.blacklistUrls || []), (clientOptions.blacklistUrls || [])), - ignoreErrors: tslib_1.__spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS), - ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true, - whitelistUrls: tslib_1.__spread((this._options.whitelistUrls || []), (clientOptions.whitelistUrls || [])), - }; - }; - /** JSDoc */ - InboundFilters.prototype._getPossibleEventMessages = function (event) { - if (event.message) { - return [event.message]; - } - if (event.exception) { - try { - var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c; - return ["" + value, type + ": " + value]; - } - catch (oO) { - logger.error("Cannot extract message for event " + getEventDescription(event)); - return []; - } - } - return []; - }; - /** JSDoc */ - InboundFilters.prototype._getEventFilterUrl = function (event) { - try { - if (event.stacktrace) { - var frames_1 = event.stacktrace.frames; - return (frames_1 && frames_1[frames_1.length - 1].filename) || null; - } - if (event.exception) { - var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames; - return (frames_2 && frames_2[frames_2.length - 1].filename) || null; - } - return null; - } - catch (oO) { - logger.error("Cannot extract url for event " + getEventDescription(event)); - return null; - } - }; - /** - * @inheritDoc - */ - InboundFilters.id = 'InboundFilters'; - return InboundFilters; -}()); -export { InboundFilters }; -//# sourceMappingURL=inboundfilters.js.map \ No newline at end of file + + eventProcess.id = this.name; + addGlobalEventProcessor(eventProcess); + } +} InboundFilters.__initStatic(); + +/** JSDoc */ +function _mergeOptions( + internalOptions = {}, + clientOptions = {}, +) { + return { + allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])], + denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])], + ignoreErrors: [ + ...(internalOptions.ignoreErrors || []), + ...(clientOptions.ignoreErrors || []), + ...DEFAULT_IGNORE_ERRORS, + ], + ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true, + }; +} + +/** JSDoc */ +function _shouldDropEvent(event, options) { + if (options.ignoreInternal && _isSentryError(event)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${getEventDescription(event)}`); + return true; + } + if (_isIgnoredError(event, options.ignoreErrors)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.warn( + `Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${getEventDescription(event)}`, + ); + return true; + } + if (_isDeniedUrl(event, options.denyUrls)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.warn( + `Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${getEventDescription( + event, + )}.\nUrl: ${_getEventFilterUrl(event)}`, + ); + return true; + } + if (!_isAllowedUrl(event, options.allowUrls)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.warn( + `Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${getEventDescription( + event, + )}.\nUrl: ${_getEventFilterUrl(event)}`, + ); + return true; + } + return false; +} + +function _isIgnoredError(event, ignoreErrors) { + if (!ignoreErrors || !ignoreErrors.length) { + return false; + } + + return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors)); +} + +function _isDeniedUrl(event, denyUrls) { + // TODO: Use Glob instead? + if (!denyUrls || !denyUrls.length) { + return false; + } + const url = _getEventFilterUrl(event); + return !url ? false : stringMatchesSomePattern(url, denyUrls); +} + +function _isAllowedUrl(event, allowUrls) { + // TODO: Use Glob instead? + if (!allowUrls || !allowUrls.length) { + return true; + } + const url = _getEventFilterUrl(event); + return !url ? true : stringMatchesSomePattern(url, allowUrls); +} + +function _getPossibleEventMessages(event) { + if (event.message) { + return [event.message]; + } + if (event.exception) { + try { + const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {}; + return [`${value}`, `${type}: ${value}`]; + } catch (oO) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(`Cannot extract message for event ${getEventDescription(event)}`); + return []; + } + } + return []; +} + +function _isSentryError(event) { + try { + // @ts-ignore can't be a sentry error if undefined + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return event.exception.values[0].type === 'SentryError'; + } catch (e) { + // ignore + } + return false; +} + +function _getLastValidUrl(frames = []) { + for (let i = frames.length - 1; i >= 0; i--) { + const frame = frames[i]; + + if (frame && frame.filename !== '' && frame.filename !== '[native code]') { + return frame.filename || null; + } + } + + return null; +} + +function _getEventFilterUrl(event) { + try { + let frames; + try { + // @ts-ignore we only care about frames if the whole thing here is defined + frames = event.exception.values[0].stacktrace.frames; + } catch (e) { + // ignore + } + return frames ? _getLastValidUrl(frames) : null; + } catch (oO) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(`Cannot extract url for event ${getEventDescription(event)}`); + return null; + } +} + +export { InboundFilters, _mergeOptions, _shouldDropEvent }; +//# sourceMappingURL=inboundfilters.js.map diff --git a/node_modules/@sentry/core/esm/integrations/inboundfilters.js.map b/node_modules/@sentry/core/esm/integrations/inboundfilters.js.map index 5a3c1fb..e45f4b8 100644 --- a/node_modules/@sentry/core/esm/integrations/inboundfilters.js.map +++ b/node_modules/@sentry/core/esm/integrations/inboundfilters.js.map @@ -1 +1 @@ -{"version":3,"file":"inboundfilters.js","sourceRoot":"","sources":["../../src/integrations/inboundfilters.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/E,6EAA6E;AAC7E,mFAAmF;AACnF,IAAM,qBAAqB,GAAG,CAAC,mBAAmB,EAAE,+CAA+C,CAAC,CAAC;AAUrG,+CAA+C;AAC/C;IAUE,wBAAoC,QAAoC;QAApC,yBAAA,EAAA,aAAoC;QAApC,aAAQ,GAAR,QAAQ,CAA4B;QATxE;;WAEG;QACI,SAAI,GAAW,cAAc,CAAC,EAAE,CAAC;IAMmC,CAAC;IAE5E;;OAEG;IACI,kCAAS,GAAhB;QACE,uBAAuB,CAAC,UAAC,KAAY;YACnC,IAAM,GAAG,GAAG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,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;gBAChH,OAAO,CAAC,QAAM,IAAI,QAAM,CAAC,QAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;aAC/D;YACD,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,EAAE,EAAE;YACX,MAAM,CAAC,KAAK,CAAC,kCAAgC,mBAAmB,CAAC,KAAK,CAAG,CAAC,CAAC;YAC3E,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IAhKD;;OAEG;IACW,iBAAE,GAAW,gBAAgB,CAAC;IA8J9C,qBAAC;CAAA,AAtKD,IAsKC;SAtKY,cAAc","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n blacklistUrls?: Array;\n ignoreErrors?: Array;\n ignoreInternal?: boolean;\n whitelistUrls?: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n public constructor(private readonly _options: InboundFiltersOptions = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n const options = self._mergeOptions(clientOptions);\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: InboundFiltersOptions): boolean {\n if (this._isSentryError(event, options)) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (this._isBlacklistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`blacklistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!this._isWhitelistedUrl(event, options)) {\n logger.warn(\n `Event dropped due to not being matched by \\`whitelistUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return (\n (event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false\n );\n } catch (_oO) {\n return false;\n }\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: InboundFiltersOptions = {}): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isBlacklistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.blacklistUrls || !options.blacklistUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.blacklistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isWhitelistedUrl(event: Event, options: InboundFiltersOptions = {}): boolean {\n // TODO: Use Glob instead?\n if (!options.whitelistUrls || !options.whitelistUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.whitelistUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: InboundFiltersOptions = {}): InboundFiltersOptions {\n return {\n blacklistUrls: [...(this._options.blacklistUrls || []), ...(clientOptions.blacklistUrls || [])],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n whitelistUrls: [...(this._options.whitelistUrls || []), ...(clientOptions.whitelistUrls || [])],\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n const frames = event.stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n if (event.exception) {\n const frames =\n event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return (frames && frames[frames.length - 1].filename) || null;\n }\n return null;\n } catch (oO) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"inboundfilters.js","sources":["../../../src/integrations/inboundfilters.ts"],"sourcesContent":["import type { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types';\nimport { getEventDescription, logger, stringMatchesSomePattern } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** Options for the InboundFilters integration */\nexport interface InboundFiltersOptions {\n allowUrls: Array;\n denyUrls: Array;\n ignoreErrors: Array;\n ignoreInternal: boolean;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n\n public constructor(private readonly _options: Partial = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (processor: EventProcessor) => void, getCurrentHub: () => Hub): void {\n const eventProcess: EventProcessor = (event: Event) => {\n const hub = getCurrentHub();\n if (hub) {\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n const options = _mergeOptions(self._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n }\n return event;\n };\n\n eventProcess.id = this.name;\n addGlobalEventProcessor(eventProcess);\n }\n}\n\n/** JSDoc */\nexport function _mergeOptions(\n internalOptions: Partial = {},\n clientOptions: Partial = {},\n): Partial {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\n/** JSDoc */\nexport function _shouldDropEvent(event: Event, options: Partial): boolean {\n if (options.ignoreInternal && _isSentryError(event)) {\n __DEBUG_BUILD__ &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event: Event, ignoreErrors?: Array): boolean {\n if (!ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isDeniedUrl(event: Event, denyUrls?: Array): boolean {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event: Event, allowUrls?: Array): boolean {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n __DEBUG_BUILD__ && logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n}\n\nfunction _isSentryError(event: Event): boolean {\n try {\n // @ts-ignore can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event: Event): string | null {\n try {\n let frames;\n try {\n // @ts-ignore we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n __DEBUG_BUILD__ && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n"],"names":[],"mappings":";;AAGA;AACA;AACA,MAAA,qBAAA,GAAA,CAAA,mBAAA,EAAA,+CAAA,CAAA,CAAA;AACA;AACA;;AAQA;AACA,MAAA,cAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,iBAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,cAAA,CAAA,GAAA,CAAA;AACA;AACA,GAAA,WAAA,GAAA,QAAA,GAAA,EAAA,EAAA,CAAA,CAAA,IAAA,CAAA,QAAA,GAAA,QAAA,CAAA,cAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,SAAA,CAAA,uBAAA,EAAA,aAAA,EAAA;AACA,IAAA,MAAA,YAAA,GAAA,CAAA,KAAA,KAAA;AACA,MAAA,MAAA,GAAA,GAAA,aAAA,EAAA,CAAA;AACA,MAAA,IAAA,GAAA,EAAA;AACA,QAAA,MAAA,IAAA,GAAA,GAAA,CAAA,cAAA,CAAA,cAAA,CAAA,CAAA;AACA,QAAA,IAAA,IAAA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AACA,CAAA;AACA;AACA,SAAA,kBAAA,CAAA,KAAA,EAAA;AACA,EAAA,IAAA;AACA,IAAA,IAAA,MAAA,CAAA;AACA,IAAA,IAAA;AACA;AACA,MAAA,MAAA,GAAA,KAAA,CAAA,SAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,MAAA,CAAA;AACA,KAAA,CAAA,OAAA,CAAA,EAAA;AACA;AACA,KAAA;AACA,IAAA,OAAA,MAAA,GAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,EAAA,EAAA;AACA,IAAA,CAAA,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA,KAAA,MAAA,CAAA,KAAA,CAAA,CAAA,6BAAA,EAAA,mBAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/index.d.ts b/node_modules/@sentry/core/esm/integrations/index.d.ts deleted file mode 100644 index c1812e3..0000000 --- a/node_modules/@sentry/core/esm/integrations/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { FunctionToString } from './functiontostring'; -export { InboundFilters } from './inboundfilters'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/index.d.ts.map b/node_modules/@sentry/core/esm/integrations/index.d.ts.map deleted file mode 100644 index c3c2b3f..0000000 --- a/node_modules/@sentry/core/esm/integrations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/index.js b/node_modules/@sentry/core/esm/integrations/index.js index f0fb965..44113a0 100644 --- a/node_modules/@sentry/core/esm/integrations/index.js +++ b/node_modules/@sentry/core/esm/integrations/index.js @@ -1,3 +1,3 @@ -export { FunctionToString } from './functiontostring'; -export { InboundFilters } from './inboundfilters'; -//# sourceMappingURL=index.js.map \ No newline at end of file +export { FunctionToString } from './functiontostring.js'; +export { InboundFilters } from './inboundfilters.js'; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/core/esm/integrations/index.js.map b/node_modules/@sentry/core/esm/integrations/index.js.map index fa0c0bc..594ae09 100644 --- a/node_modules/@sentry/core/esm/integrations/index.js.map +++ b/node_modules/@sentry/core/esm/integrations/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { FunctionToString } from './functiontostring';\nexport { InboundFilters } from './inboundfilters';\n"]} \ No newline at end of file +{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/sdk.d.ts b/node_modules/@sentry/core/esm/sdk.d.ts deleted file mode 100644 index 26be93b..0000000 --- a/node_modules/@sentry/core/esm/sdk.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Client, Options } from '@sentry/types'; -/** A class object that can instanciate Client objects. */ -export declare type ClientClass = new (options: O) => F; -/** - * Internal function to create a new SDK client instance. The client is - * installed and then bound to the current scope. - * - * @param clientClass The client class to instanciate. - * @param options Options to pass to the client. - */ -export declare function initAndBind(clientClass: ClientClass, options: O): void; -//# sourceMappingURL=sdk.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/sdk.d.ts.map b/node_modules/@sentry/core/esm/sdk.d.ts.map deleted file mode 100644 index fa6ecf2..0000000 --- a/node_modules/@sentry/core/esm/sdk.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGhD,0DAA0D;AAC1D,oBAAY,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,IAAI,KAAK,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;AAErF;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAKjH"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/sdk.js b/node_modules/@sentry/core/esm/sdk.js index 5e871df..ba29053 100644 --- a/node_modules/@sentry/core/esm/sdk.js +++ b/node_modules/@sentry/core/esm/sdk.js @@ -1,16 +1,37 @@ -import { getCurrentHub } from '@sentry/hub'; import { logger } from '@sentry/utils'; +import { getCurrentHub } from './hub.js'; + +/** A class object that can instantiate Client objects. */ + /** * Internal function to create a new SDK client instance. The client is * installed and then bound to the current scope. * - * @param clientClass The client class to instanciate. + * @param clientClass The client class to instantiate. * @param options Options to pass to the client. */ -export function initAndBind(clientClass, options) { - if (options.debug === true) { - logger.enable(); +function initAndBind( + clientClass, + options, +) { + if (options.debug === true) { + if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + logger.enable(); + } else { + // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped + // eslint-disable-next-line no-console + console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.'); } - getCurrentHub().bindClient(new clientClass(options)); + } + const hub = getCurrentHub(); + const scope = hub.getScope(); + if (scope) { + scope.update(options.initialScope); + } + + const client = new clientClass(options); + hub.bindClient(client); } -//# sourceMappingURL=sdk.js.map \ No newline at end of file + +export { initAndBind }; +//# sourceMappingURL=sdk.js.map diff --git a/node_modules/@sentry/core/esm/sdk.js.map b/node_modules/@sentry/core/esm/sdk.js.map index d4cdf5a..d677706 100644 --- a/node_modules/@sentry/core/esm/sdk.js.map +++ b/node_modules/@sentry/core/esm/sdk.js.map @@ -1 +1 @@ -{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAsC,WAA8B,EAAE,OAAU;IACzG,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE;QAC1B,MAAM,CAAC,MAAM,EAAE,CAAC;KACjB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import { getCurrentHub } from '@sentry/hub';\nimport { Client, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** A class object that can instanciate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instanciate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass: ClientClass, options: O): void {\n if (options.debug === true) {\n logger.enable();\n }\n getCurrentHub().bindClient(new clientClass(options));\n}\n"]} \ No newline at end of file +{"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Client, ClientOptions } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { getCurrentHub } from './hub';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(\n clientClass: ClientClass,\n options: O,\n): void {\n if (options.debug === true) {\n if (__DEBUG_BUILD__) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n const hub = getCurrentHub();\n const scope = hub.getScope();\n if (scope) {\n scope.update(options.initialScope);\n }\n\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n"],"names":[],"mappings":";;;AAKA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,WAAA;AACA,EAAA,WAAA;AACA,EAAA,OAAA;AACA,EAAA;AACA,EAAA,IAAA,OAAA,CAAA,KAAA,KAAA,IAAA,EAAA;AACA,IAAA,KAAA,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA,GAAA;AACA,MAAA,MAAA,CAAA,MAAA,EAAA,CAAA;AACA,KAAA,MAAA;AACA;AACA;AACA,MAAA,OAAA,CAAA,IAAA,CAAA,8EAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA,EAAA,MAAA,GAAA,GAAA,aAAA,EAAA,CAAA;AACA,EAAA,MAAA,KAAA,GAAA,GAAA,CAAA,QAAA,EAAA,CAAA;AACA,EAAA,IAAA,KAAA,EAAA;AACA,IAAA,KAAA,CAAA,MAAA,CAAA,OAAA,CAAA,YAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,MAAA,MAAA,GAAA,IAAA,WAAA,CAAA,OAAA,CAAA,CAAA;AACA,EAAA,GAAA,CAAA,UAAA,CAAA,MAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/transports/noop.d.ts b/node_modules/@sentry/core/esm/transports/noop.d.ts deleted file mode 100644 index 7b51768..0000000 --- a/node_modules/@sentry/core/esm/transports/noop.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Event, Response, Transport } from '@sentry/types'; -/** Noop transport */ -export declare class NoopTransport implements Transport { - /** - * @inheritDoc - */ - sendEvent(_: Event): PromiseLike; - /** - * @inheritDoc - */ - close(_?: number): PromiseLike; -} -//# sourceMappingURL=noop.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/transports/noop.d.ts.map b/node_modules/@sentry/core/esm/transports/noop.d.ts.map deleted file mode 100644 index 89df87c..0000000 --- a/node_modules/@sentry/core/esm/transports/noop.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../src/transports/noop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AAGnE,qBAAqB;AACrB,qBAAa,aAAc,YAAW,SAAS;IAC7C;;OAEG;IACI,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;IAOjD;;OAEG;IACI,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;CAG/C"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/transports/noop.js b/node_modules/@sentry/core/esm/transports/noop.js deleted file mode 100644 index 6ba5fa8..0000000 --- a/node_modules/@sentry/core/esm/transports/noop.js +++ /dev/null @@ -1,25 +0,0 @@ -import { Status } from '@sentry/types'; -import { SyncPromise } from '@sentry/utils'; -/** Noop transport */ -var NoopTransport = /** @class */ (function () { - function NoopTransport() { - } - /** - * @inheritDoc - */ - NoopTransport.prototype.sendEvent = function (_) { - return SyncPromise.resolve({ - reason: "NoopTransport: Event has been skipped because no Dsn is configured.", - status: Status.Skipped, - }); - }; - /** - * @inheritDoc - */ - NoopTransport.prototype.close = function (_) { - return SyncPromise.resolve(true); - }; - return NoopTransport; -}()); -export { NoopTransport }; -//# sourceMappingURL=noop.js.map \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/transports/noop.js.map b/node_modules/@sentry/core/esm/transports/noop.js.map deleted file mode 100644 index 3716e17..0000000 --- a/node_modules/@sentry/core/esm/transports/noop.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.js","sourceRoot":"","sources":["../../src/transports/noop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,EAAa,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAqB;AACrB;IAAA;IAiBA,CAAC;IAhBC;;OAEG;IACI,iCAAS,GAAhB,UAAiB,CAAQ;QACvB,OAAO,WAAW,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,qEAAqE;YAC7E,MAAM,EAAE,MAAM,CAAC,OAAO;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,6BAAK,GAAZ,UAAa,CAAU;QACrB,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACH,oBAAC;AAAD,CAAC,AAjBD,IAiBC","sourcesContent":["import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return SyncPromise.resolve({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: Status.Skipped,\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return SyncPromise.resolve(true);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/core/package.json b/node_modules/@sentry/core/package.json index 561bdd3..b977afb 100644 --- a/node_modules/@sentry/core/package.json +++ b/node_modules/@sentry/core/package.json @@ -1,83 +1,48 @@ { - "_args": [ - [ - "@sentry/core@5.14.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "@sentry/core@5.14.1", - "_id": "@sentry/core@5.14.1", + "_from": "@sentry/core@7.31.1", + "_id": "@sentry/core@7.31.1", "_inBundle": false, - "_integrity": "sha1-IafBTKCLDyKAI/nG85nbHjXNZDg=", + "_integrity": "sha512-quaNU6z8jabmatBTDi28Wpff2yzfWIp/IU4bbi2QOtEiCNT+TQJXqlRTRMu9xLrX7YzyKCL5X2gbit/85lyWUg==", "_location": "/@sentry/core", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "@sentry/core@5.14.1", + "raw": "@sentry/core@7.31.1", "name": "@sentry/core", "escapedName": "@sentry%2fcore", "scope": "@sentry", - "rawSpec": "5.14.1", + "rawSpec": "7.31.1", "saveSpec": null, - "fetchSpec": "5.14.1" + "fetchSpec": "7.31.1" }, "_requiredBy": [ - "/@sentry/browser", "/@sentry/node" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/core/-/core-5.14.1.tgz", - "_spec": "5.14.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.31.1.tgz", + "_shasum": "8c48e9c6a24b612eb7f757fdf246ed6b22c26b3b", + "_spec": "@sentry/core@7.31.1", + "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", "author": { "name": "Sentry" }, "bugs": { "url": "https://github.com/getsentry/sentry-javascript/issues" }, + "bundleDependencies": false, "dependencies": { - "@sentry/hub": "5.14.1", - "@sentry/minimal": "5.14.1", - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", + "@sentry/types": "7.31.1", + "@sentry/utils": "7.31.1", "tslib": "^1.9.3" }, + "deprecated": false, "description": "Base implementation for all Sentry JavaScript SDKs", - "devDependencies": { - "jest": "^24.7.1", - "npm-run-all": "^4.1.2", - "prettier": "^1.17.0", - "prettier-check": "^2.0.0", - "rimraf": "^2.6.3", - "tslint": "^5.16.0", - "typescript": "^3.4.5" - }, "engines": { - "node": ">=6" + "node": ">=8" }, "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core", - "jest": { - "collectCoverage": true, - "transform": { - "^.+\\.ts$": "ts-jest" - }, - "moduleFileExtensions": [ - "js", - "ts" - ], - "testEnvironment": "node", - "testMatch": [ - "**/*.test.ts" - ], - "globals": { - "ts-jest": { - "tsConfig": "./tsconfig.json", - "diagnostics": false - } - } - }, - "license": "BSD-3-Clause", - "main": "dist/index.js", + "license": "MIT", + "main": "cjs/index.js", "module": "esm/index.js", "name": "@sentry/core", "publishConfig": { @@ -87,26 +52,7 @@ "type": "git", "url": "git://github.com/getsentry/sentry-javascript.git" }, - "scripts": { - "build": "run-p build:es5 build:esm", - "build:es5": "tsc -p tsconfig.build.json", - "build:esm": "tsc -p tsconfig.esm.json", - "build:watch": "run-p build:watch:es5 build:watch:esm", - "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", - "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", - "clean": "rimraf dist coverage", - "fix": "run-s fix:tslint fix:prettier", - "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", - "fix:tslint": "tslint --fix -t stylish -p .", - "link:yarn": "yarn link", - "lint": "run-s lint:prettier lint:tslint", - "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", - "lint:tslint": "tslint -t stylish -p .", - "lint:tslint:json": "tslint --format json -p . | tee lint-results.json", - "test": "jest", - "test:watch": "jest --watch" - }, "sideEffects": false, - "types": "dist/index.d.ts", - "version": "5.14.1" + "types": "types/index.d.ts", + "version": "7.31.1" } diff --git a/node_modules/@sentry/hub/LICENSE b/node_modules/@sentry/hub/LICENSE deleted file mode 100644 index 8b42db8..0000000 --- a/node_modules/@sentry/hub/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -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. diff --git a/node_modules/@sentry/hub/README.md b/node_modules/@sentry/hub/README.md deleted file mode 100644 index 7a4da63..0000000 --- a/node_modules/@sentry/hub/README.md +++ /dev/null @@ -1,22 +0,0 @@ -

- - - -
-

- -# 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. diff --git a/node_modules/@sentry/hub/dist/hub.d.ts b/node_modules/@sentry/hub/dist/hub.d.ts deleted file mode 100644 index bfe8cce..0000000 --- a/node_modules/@sentry/hub/dist/hub.d.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { Breadcrumb, BreadcrumbHint, Client, Event, EventHint, Hub as HubInterface, Integration, IntegrationClass, Severity, Span, SpanContext, User } from '@sentry/types'; -import { Carrier, Layer } from './interfaces'; -import { Scope } from './scope'; -declare module 'domain' { - let active: Domain; - /** - * Extension for domain interface - */ - interface Domain { - __SENTRY__?: Carrier; - } -} -/** - * API compatibility version of this hub. - * - * WARNING: This number should only be incresed when the global interface - * changes a and new methods are introduced. - * - * @hidden - */ -export declare const API_VERSION = 3; -/** - * @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); - /** - * 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; - /** - * @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 | 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]: string; - }): void; - /** - * @inheritDoc - */ - setExtras(extras: { - [key: string]: any; - }): void; - /** - * @inheritDoc - */ - setTag(key: string, value: string): void; - /** - * @inheritDoc - */ - setExtra(key: string, extra: any): 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(integration: IntegrationClass): T | null; - /** - * @inheritDoc - */ - startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild?: boolean): Span; - /** - * @inheritDoc - */ - traceHeaders(): { - [key: string]: string; - }; - /** - * Calls global extension method and binding current instance to the function call - */ - private _callExtensionMethod; -} -/** Returns the global shim registry. */ -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; -/** - * 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 - */ -export declare function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean; -//# sourceMappingURL=hub.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/hub.d.ts.map b/node_modules/@sentry/hub/dist/hub.d.ts.map deleted file mode 100644 index c5c21ba..0000000 --- a/node_modules/@sentry/hub/dist/hub.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,KAAK,EACL,SAAS,EACT,GAAG,IAAI,YAAY,EACnB,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,IAAI,EACL,MAAM,eAAe,CAAC;AAWvB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,QAAQ,QAAQ,CAAC;IACf,IAAI,MAAM,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,UAAiB,MAAM;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;CACF;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,IAAI,CAAC;AAc7B;;GAEG;AACH,qBAAa,GAAI,YAAW,YAAY;IAe0B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAdzF,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC,uDAAuD;IACvD,OAAO,CAAC,YAAY,CAAC,CAAS;IAE9B;;;;;;;OAOG;gBACgB,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,GAAE,KAAmB,EAAmB,QAAQ,GAAE,MAAoB;IAI/G;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAOrB;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAI5C;;OAEG;IACI,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAKxC;;OAEG;IACI,SAAS,IAAI,KAAK;IAYzB;;OAEG;IACI,QAAQ,IAAI,OAAO;IAI1B;;OAEG;IACI,SAAS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AI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,IAAI;IAQ7E;;OAEG;IACI,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI;IAO7D;;OAEG;IACI,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI;IAS9C;;OAEG;IACI,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI;IAaxF;;OAEG;IACI,SAAS,CAAC,iBAAiB,CAAC,EAAE,IAAI,GAAG,WAAW,EAAE,YAAY,GAAE,OAAe,GAAG,IAAI;IAI7F;;OAEG;IACI,YAAY,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAIhD;;OAEG;IAEH,OAAO,CAAC,oBAAoB;CAS7B;AAED,wCAAwC;AACxC,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;AA4CD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,CAOvD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAOnE"} \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/hub.js b/node_modules/@sentry/hub/dist/hub.js deleted file mode 100644 index 9480558..0000000 --- a/node_modules/@sentry/hub/dist/hub.js +++ /dev/null @@ -1,453 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var utils_1 = require("@sentry/utils"); -var scope_1 = require("./scope"); -/** - * API compatibility version of this hub. - * - * WARNING: This number should only be incresed when the global interface - * changes a and new methods are introduced. - * - * @hidden - */ -exports.API_VERSION = 3; -/** - * Default maximum number of breadcrumbs added to an event. Can be overwritten - * with {@link Options.maxBreadcrumbs}. - */ -var DEFAULT_BREADCRUMBS = 100; -/** - * Absolute maximum number of breadcrumbs added to an event. The - * `maxBreadcrumbs` option cannot be higher than this value. - */ -var MAX_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._stack.push({ client: client, scope: scope }); - } - /** - * 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. - */ - Hub.prototype._invokeClient = function (method) { - var _a; - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var top = this.getStackTop(); - if (top && top.client && top.client[method]) { - (_a = top.client)[method].apply(_a, tslib_1.__spread(args, [top.scope])); - } - }; - /** - * @inheritDoc - */ - Hub.prototype.isOlderThan = function (version) { - return this._version < version; - }; - /** - * @inheritDoc - */ - Hub.prototype.bindClient = function (client) { - var top = this.getStackTop(); - top.client = client; - }; - /** - * @inheritDoc - */ - Hub.prototype.pushScope = function () { - // We want to clone the content of prev scope - var stack = this.getStack(); - var parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined; - var scope = scope_1.Scope.clone(parentScope); - this.getStack().push({ - client: this.getClient(), - scope: scope, - }); - return scope; - }; - /** - * @inheritDoc - */ - Hub.prototype.popScope = function () { - return this.getStack().pop() !== undefined; - }; - /** - * @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 - */ - Hub.prototype.captureException = function (exception, hint) { - var eventId = (this._lastEventId = utils_1.uuid4()); - var finalHint = hint; - // If there's no explicit hint provided, mimick 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({}, finalHint, { event_id: eventId })); - return eventId; - }; - /** - * @inheritDoc - */ - Hub.prototype.captureMessage = function (message, level, hint) { - var eventId = (this._lastEventId = utils_1.uuid4()); - var finalHint = hint; - // If there's no explicit hint provided, mimick 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({}, finalHint, { event_id: eventId })); - return eventId; - }; - /** - * @inheritDoc - */ - Hub.prototype.captureEvent = function (event, hint) { - var eventId = (this._lastEventId = utils_1.uuid4()); - this._invokeClient('captureEvent', event, 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 top = this.getStackTop(); - if (!top.scope || !top.client) { - return; - } - var _a = (top.client.getOptions && top.client.getOptions()) || {}, _b = _a.beforeBreadcrumb, beforeBreadcrumb = _b === void 0 ? null : _b, _c = _a.maxBreadcrumbs, maxBreadcrumbs = _c === void 0 ? DEFAULT_BREADCRUMBS : _c; - if (maxBreadcrumbs <= 0) { - return; - } - var timestamp = utils_1.timestampWithMs(); - var mergedBreadcrumb = tslib_1.__assign({ timestamp: timestamp }, breadcrumb); - var finalBreadcrumb = beforeBreadcrumb - ? utils_1.consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); }) - : mergedBreadcrumb; - if (finalBreadcrumb === null) { - return; - } - top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS)); - }; - /** - * @inheritDoc - */ - Hub.prototype.setUser = function (user) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setUser(user); - }; - /** - * @inheritDoc - */ - Hub.prototype.setTags = function (tags) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setTags(tags); - }; - /** - * @inheritDoc - */ - Hub.prototype.setExtras = function (extras) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setExtras(extras); - }; - /** - * @inheritDoc - */ - Hub.prototype.setTag = function (key, value) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setTag(key, value); - }; - /** - * @inheritDoc - */ - Hub.prototype.setExtra = function (key, extra) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setExtra(key, extra); - }; - /** - * @inheritDoc - */ - Hub.prototype.setContext = function (name, context) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setContext(name, context); - }; - /** - * @inheritDoc - */ - Hub.prototype.configureScope = function (callback) { - var top = this.getStackTop(); - if (top.scope && top.client) { - callback(top.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) { - utils_1.logger.warn("Cannot retrieve integration " + integration.id + " from the current Hub"); - return null; - } - }; - /** - * @inheritDoc - */ - Hub.prototype.startSpan = function (spanOrSpanContext, forceNoChild) { - if (forceNoChild === void 0) { forceNoChild = false; } - return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild); - }; - /** - * @inheritDoc - */ - Hub.prototype.traceHeaders = function () { - return this._callExtensionMethod('traceHeaders'); - }; - /** - * Calls global extension method and binding current instance to the function call - */ - // @ts-ignore - 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__; - // tslint:disable-next-line: strict-type-predicates - if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') { - return sentry.extensions[method].apply(this, args); - } - utils_1.logger.warn("Extension method " + method + " couldn't be found, doing nothing."); - }; - return Hub; -}()); -exports.Hub = Hub; -/** Returns the global shim registry. */ -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; -/** - * Try to read the hub from an active domain, fallback to the registry if one doesnt exist - * @returns discovered hub - */ -function getHubFromActiveDomain(registry) { - try { - // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack. - // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser - // for example so we do not have to shim it and use `getCurrentHub` universally. - var domain = utils_1.dynamicRequire(module, 'domain'); - var activeDomain = domain.active; - // If there no active domain, just return global hub - if (!activeDomain) { - return getHubFromCarrier(registry); - } - // If there's no hub on current domain, or its 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) { - if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) { - return true; - } - return false; -} -/** - * This will create a new {@link Hub} and add to the passed object on - * __SENTRY__.hub. - * @param carrier object - * @hidden - */ -function getHubFromCarrier(carrier) { - if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) { - return carrier.__SENTRY__.hub; - } - carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - carrier.__SENTRY__.hub = new Hub(); - return carrier.__SENTRY__.hub; -} -exports.getHubFromCarrier = getHubFromCarrier; -/** - * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute - * @param carrier object - * @param hub Hub - */ -function setHubOnCarrier(carrier, hub) { - if (!carrier) { - return false; - } - carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - carrier.__SENTRY__.hub = hub; - return true; -} -exports.setHubOnCarrier = setHubOnCarrier; -//# sourceMappingURL=hub.js.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/hub.js.map b/node_modules/@sentry/hub/dist/hub.js.map deleted file mode 100644 index 319c1f3..0000000 --- a/node_modules/@sentry/hub/dist/hub.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":";;AAcA,uCAQuB;AAGvB,iCAAgC;AAYhC;;;;;;;GAOG;AACU,QAAA,WAAW,GAAG,CAAC,CAAC;AAE7B;;;GAGG;AACH,IAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;GAGG;AACH,IAAM,eAAe,GAAG,GAAG,CAAC;AAE5B;;GAEG;AACH;IAOE;;;;;;;OAOG;IACH,aAAmB,MAAe,EAAE,KAA0B,EAAmB,QAA8B;QAA3E,sBAAA,EAAA,YAAmB,aAAK,EAAE;QAAmB,yBAAA,EAAA,WAAmB,mBAAW;QAA9B,aAAQ,GAAR,QAAQ,CAAsB;QAd/G,2DAA2D;QAC1C,WAAM,GAAY,EAAE,CAAC;QAcpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,QAAA,EAAE,KAAK,OAAA,EAAE,CAAC,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACK,2BAAa,GAArB,UAA8C,MAAS;;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QACrE,IAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EA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AC;AAPD,0CAOC","sourcesContent":["import {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n Event,\n EventHint,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Severity,\n Span,\n SpanContext,\n User,\n} from '@sentry/types';\nimport {\n consoleSandbox,\n dynamicRequire,\n getGlobalObject,\n isNodeEnv,\n logger,\n timestampWithMs,\n uuid4,\n} from '@sentry/utils';\n\nimport { Carrier, Layer } from './interfaces';\nimport { Scope } from './scope';\n\ndeclare module 'domain' {\n export let active: Domain;\n /**\n * Extension for domain interface\n */\n export interface Domain {\n __SENTRY__?: Carrier;\n }\n}\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be incresed when the global interface\n * changes a and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 3;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this._stack.push({ client, scope });\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n private _invokeClient(method: M, ...args: any[]): void {\n const top = this.getStackTop();\n if (top && top.client && top.client[method]) {\n (top.client as any)[method](...args, top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const stack = this.getStack();\n const parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined;\n const scope = Scope.clone(parentScope);\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n return this.getStack().pop() !== undefined;\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const top = this.getStackTop();\n\n if (!top.scope || !top.client) {\n return;\n }\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (top.client.getOptions && top.client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) {\n return;\n }\n\n const timestamp = timestampWithMs();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) {\n return;\n }\n\n top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const top = this.getStackTop();\n if (top.scope && top.client) {\n callback(top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) {\n return null;\n }\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild: boolean = false): Span {\n return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/** Returns the global shim registry. */\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Try to read the hub from an active domain, fallback to the registry if one doesnt exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n const domain = dynamicRequire(module, 'domain');\n const activeDomain = domain.active;\n\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return carrier.__SENTRY__.hub;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) {\n return false;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/index.d.ts b/node_modules/@sentry/hub/dist/index.d.ts deleted file mode 100644 index 4c45353..0000000 --- a/node_modules/@sentry/hub/dist/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { Carrier, Layer } from './interfaces'; -export { addGlobalEventProcessor, Scope } from './scope'; -export { getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier } from './hub'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/index.d.ts.map b/node_modules/@sentry/hub/dist/index.d.ts.map deleted file mode 100644 index b95f088..0000000 --- a/node_modules/@sentry/hub/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/index.js b/node_modules/@sentry/hub/dist/index.js deleted file mode 100644 index 5ecb3d7..0000000 --- a/node_modules/@sentry/hub/dist/index.js +++ /dev/null @@ -1,12 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var scope_1 = require("./scope"); -exports.addGlobalEventProcessor = scope_1.addGlobalEventProcessor; -exports.Scope = scope_1.Scope; -var hub_1 = require("./hub"); -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 \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/index.js.map b/node_modules/@sentry/hub/dist/index.js.map deleted file mode 100644 index e288cdc..0000000 --- a/node_modules/@sentry/hub/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,iCAAyD;AAAhD,0CAAA,uBAAuB,CAAA;AAAE,wBAAA,KAAK,CAAA;AACvC,6BAAyG;AAAhG,8BAAA,aAAa,CAAA;AAAE,kCAAA,iBAAiB,CAAA;AAAE,+BAAA,cAAc,CAAA;AAAE,oBAAA,GAAG,CAAA;AAAE,yBAAA,QAAQ,CAAA;AAAE,gCAAA,eAAe,CAAA","sourcesContent":["export { Carrier, Layer } from './interfaces';\nexport { addGlobalEventProcessor, Scope } from './scope';\nexport { getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier } from './hub';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/interfaces.d.ts b/node_modules/@sentry/hub/dist/interfaces.d.ts deleted file mode 100644 index 376e688..0000000 --- a/node_modules/@sentry/hub/dist/interfaces.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Client } from '@sentry/types'; -import { Hub } from './hub'; -import { Scope } from './scope'; -/** - * 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; - /** - * These are extension methods for the hub, the current instance of the hub will be bound to it - */ - extensions?: { - [key: string]: Function; - }; - }; -} -//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/interfaces.d.ts.map b/node_modules/@sentry/hub/dist/interfaces.d.ts.map deleted file mode 100644 index 6513588..0000000 --- a/node_modules/@sentry/hub/dist/interfaces.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;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,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;SAAE,CAAC;KAC1C,CAAC;CACH"} \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/interfaces.js b/node_modules/@sentry/hub/dist/interfaces.js deleted file mode 100644 index 8c67d59..0000000 --- a/node_modules/@sentry/hub/dist/interfaces.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/interfaces.js.map b/node_modules/@sentry/hub/dist/interfaces.js.map deleted file mode 100644 index 1105582..0000000 --- a/node_modules/@sentry/hub/dist/interfaces.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { Client } from '@sentry/types';\n\nimport { Hub } from './hub';\nimport { Scope } from './scope';\n\n/**\n * A layer in the process stack.\n * @hidden\n */\nexport interface Layer {\n client?: Client;\n scope?: Scope;\n}\n\n/**\n * An object that contains a hub and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: {\n hub?: Hub;\n /**\n * These are extension methods for the hub, the current instance of the hub will be bound to it\n */\n extensions?: { [key: string]: Function };\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/scope.d.ts b/node_modules/@sentry/hub/dist/scope.d.ts deleted file mode 100644 index 643bebb..0000000 --- a/node_modules/@sentry/hub/dist/scope.d.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { Breadcrumb, Event, EventHint, EventProcessor, Scope as ScopeInterface, Severity, Span, User } from '@sentry/types'; -/** - * 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 notifiying 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]: string; - }; - /** Extra */ - protected _extra: { - [key: string]: any; - }; - /** Contexts */ - protected _context: { - [key: string]: any; - }; - /** Fingerprint */ - protected _fingerprint?: string[]; - /** Severity */ - protected _level?: Severity; - /** Transaction */ - protected _transaction?: string; - /** Span */ - protected _span?: Span; - /** - * 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; - /** - * This will be called on every set call. - */ - protected _notifyScopeListeners(): void; - /** - * This will be called after {@link applyToEvent} is finished. - */ - protected _notifyEventProcessors(processors: EventProcessor[], event: Event | null, hint?: EventHint, index?: number): PromiseLike; - /** - * @inheritDoc - */ - setUser(user: User | null): this; - /** - * @inheritDoc - */ - setTags(tags: { - [key: string]: string; - }): this; - /** - * @inheritDoc - */ - setTag(key: string, value: string): this; - /** - * @inheritDoc - */ - setExtras(extras: { - [key: string]: any; - }): this; - /** - * @inheritDoc - */ - setExtra(key: string, extra: any): this; - /** - * @inheritDoc - */ - setFingerprint(fingerprint: string[]): this; - /** - * @inheritDoc - */ - setLevel(level: Severity): this; - /** - * @inheritDoc - */ - setTransaction(transaction?: string): this; - /** - * @inheritDoc - */ - setContext(key: string, context: { - [key: string]: any; - } | null): this; - /** - * @inheritDoc - */ - setSpan(span?: Span): this; - /** - * Internal getter for Span, used in Hub. - * @hidden - */ - getSpan(): Span | undefined; - /** - * Inherit values from the parent scope. - * @param scope to clone. - */ - static clone(scope?: Scope): Scope; - /** - * @inheritDoc - */ - clear(): this; - /** - * @inheritDoc - */ - addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this; - /** - * @inheritDoc - */ - clearBreadcrumbs(): this; - /** - * 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; - /** - * 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 informartion about the original exception. - * @hidden - */ - applyToEvent(event: Event, hint?: EventHint): PromiseLike; -} -/** - * Add a EventProcessor to be kept globally. - * @param callback EventProcessor to add - */ -export declare function addGlobalEventProcessor(callback: EventProcessor): void; -//# sourceMappingURL=scope.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/scope.d.ts.map b/node_modules/@sentry/hub/dist/scope.d.ts.map deleted file mode 100644 index 48b9292..0000000 --- a/node_modules/@sentry/hub/dist/scope.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,EACd,KAAK,IAAI,cAAc,EACvB,QAAQ,EACR,IAAI,EACJ,IAAI,EACL,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AACH,qBAAa,KAAM,YAAW,cAAc;IAC1C,uCAAuC;IACvC,SAAS,CAAC,mBAAmB,EAAE,OAAO,CAAS;IAE/C,oDAAoD;IACpD,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,CAAM;IAE9D,oEAAoE;IACpE,SAAS,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAM;IAElD,4BAA4B;IAC5B,SAAS,CAAC,YAAY,EAAE,UAAU,EAAE,CAAM;IAE1C,WAAW;IACX,SAAS,CAAC,KAAK,EAAE,IAAI,CAAM;IAE3B,WAAW;IACX,SAAS,CAAC,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAEhD,YAAY;IACZ,SAAS,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAM;IAE9C,eAAe;IACf,SAAS,CAAC,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CA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IACI,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAMtC;;OAEG;IACI,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IASjD;;OAEG;IACI,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,IAAI;IAM5E;;OAEG;IACI,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI;IAMjC;;;OAGG;IACI,OAAO,IAAI,IAAI,GAAG,SAAS;IAIlC;;;OAGG;WACW,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK;IAiBzC;;OAEG;IACI,KAAK,IAAI,IAAI;IAcpB;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAc3E;;OAEG;IACI,gBAAgB,IAAI,IAAI;IAM/B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAmBzB;;;;;;;OAOG;IACI,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;CA8B/E;AAYD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEtE"} \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/scope.js b/node_modules/@sentry/hub/dist/scope.js deleted file mode 100644 index 63499fc..0000000 --- a/node_modules/@sentry/hub/dist/scope.js +++ /dev/null @@ -1,307 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var utils_1 = require("@sentry/utils"); -/** - * 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 notifiying 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._context = {}; - } - /** - * 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; - }; - /** - * This will be called on every set call. - */ - Scope.prototype._notifyScopeListeners = function () { - var _this = this; - if (!this._notifyingListeners) { - this._notifyingListeners = true; - setTimeout(function () { - _this._scopeListeners.forEach(function (callback) { - callback(_this); - }); - _this._notifyingListeners = false; - }); - } - }; - /** - * 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]; - // tslint:disable-next-line:strict-type-predicates - if (event === null || typeof processor !== 'function') { - resolve(event); - } - else { - var result = processor(tslib_1.__assign({}, event), hint); - if (utils_1.isThenable(result)) { - result - .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); }) - .then(null, reject); - } - else { - _this._notifyEventProcessors(processors, result, hint, index + 1) - .then(resolve) - .then(null, reject); - } - } - }); - }; - /** - * @inheritDoc - */ - Scope.prototype.setUser = function (user) { - this._user = user || {}; - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setTags = function (tags) { - this._tags = tslib_1.__assign({}, this._tags, tags); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setTag = function (key, value) { - var _a; - this._tags = 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({}, this._extra, extras); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setExtra = function (key, extra) { - var _a; - this._extra = 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.setTransaction = function (transaction) { - this._transaction = transaction; - if (this._span) { - this._span.transaction = transaction; - } - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setContext = function (key, context) { - var _a; - this._context = tslib_1.__assign({}, this._context, (_a = {}, _a[key] = context, _a)); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setSpan = function (span) { - this._span = span; - this._notifyScopeListeners(); - return this; - }; - /** - * Internal getter for Span, used in Hub. - * @hidden - */ - Scope.prototype.getSpan = function () { - return this._span; - }; - /** - * 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._context = tslib_1.__assign({}, scope._context); - newScope._user = scope._user; - newScope._level = scope._level; - newScope._span = scope._span; - newScope._transaction = scope._transaction; - newScope._fingerprint = scope._fingerprint; - newScope._eventProcessors = tslib_1.__spread(scope._eventProcessors); - } - return newScope; - }; - /** - * @inheritDoc - */ - Scope.prototype.clear = function () { - this._breadcrumbs = []; - this._tags = {}; - this._extra = {}; - this._user = {}; - this._context = {}; - this._level = undefined; - this._transaction = undefined; - this._fingerprint = undefined; - this._span = undefined; - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) { - var mergedBreadcrumb = tslib_1.__assign({ timestamp: utils_1.timestampWithMs() }, breadcrumb); - this._breadcrumbs = - maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0 - ? tslib_1.__spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxBreadcrumbs) - : tslib_1.__spread(this._breadcrumbs, [mergedBreadcrumb]); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.clearBreadcrumbs = function () { - this._breadcrumbs = []; - this._notifyScopeListeners(); - return this; - }; - /** - * 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; - } - }; - /** - * 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 informartion about the original exception. - * @hidden - */ - Scope.prototype.applyToEvent = function (event, hint) { - if (this._extra && Object.keys(this._extra).length) { - event.extra = tslib_1.__assign({}, this._extra, event.extra); - } - if (this._tags && Object.keys(this._tags).length) { - event.tags = tslib_1.__assign({}, this._tags, event.tags); - } - if (this._user && Object.keys(this._user).length) { - event.user = tslib_1.__assign({}, this._user, event.user); - } - if (this._context && Object.keys(this._context).length) { - event.contexts = tslib_1.__assign({}, this._context, event.contexts); - } - if (this._level) { - event.level = this._level; - } - if (this._transaction) { - event.transaction = this._transaction; - } - if (this._span) { - event.contexts = tslib_1.__assign({ trace: this._span.getTraceContext() }, event.contexts); - } - this._applyFingerprint(event); - event.breadcrumbs = tslib_1.__spread((event.breadcrumbs || []), this._breadcrumbs); - event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined; - return this._notifyEventProcessors(tslib_1.__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint); - }; - return Scope; -}()); -exports.Scope = Scope; -/** - * Retruns the global event processors. - */ -function getGlobalEventProcessors() { - var global = utils_1.getGlobalObject(); - global.__SENTRY__ = global.__SENTRY__ || {}; - global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || []; - return global.__SENTRY__.globalEventProcessors; -} -/** - * 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 \ No newline at end of file diff --git a/node_modules/@sentry/hub/dist/scope.js.map b/node_modules/@sentry/hub/dist/scope.js.map deleted file mode 100644 index 5f53715..0000000 --- a/node_modules/@sentry/hub/dist/scope.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":";;AAUA,uCAA0F;AAE1F;;;GAGG;AACH;IAAA;QACE,uCAAuC;QAC7B,wBAAmB,GAAY,KAAK,CAAC;QAE/C,oDAAoD;QAC1C,oBAAe,GAAkC,EAAE,CAAC;QAE9D,oEAAoE;QAC1D,qBAAgB,GAAqB,EAAE,CAAC;QAElD,4BAA4B;QAClB,iBAAY,GAAiB,EAAE,CAAC;QAE1C,WAAW;QACD,UAAK,GAAS,EAAE,CAAC;QAE3B,WAAW;QACD,UAAK,GAA8B,EAAE,CAAC;QAEhD,YAAY;QACF,WAAM,GAA2B,EAAE,CAAC;QAE9C,eAAe;QACL,aAAQ,GAA2B,EAAE,CAAC;IAkTlD,CAAC;IApSC;;;OAGG;IACI,gCAAgB,GAAvB,UAAwB,QAAgC;QACtD,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,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;QAEjF,OAAO,IAAI,CAAC,sBAAsB,kBAAK,wBAAwB,EAAE,EAAK,IAAI,CAAC,gBAAgB,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7G,CAAC;IACH,YAAC;AAAD,CAAC,AAzUD,IAyUC;AAzUY,sBAAK;AA2UlB;;GAEG;AACH,SAAS,wBAAwB;IAC/B,IAAM,MAAM,GAAG,uBAAe,EAA0B,CAAC;IACzD,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;IAC5C,MAAM,CAAC,UAAU,CAAC,qBAAqB,GAAG,MAAM,CAAC,UAAU,CAAC,qBAAqB,IAAI,EAAE,CAAC;IACxF,OAAO,MAAM,CAAC,UAAU,CAAC,qBAAqB,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,QAAwB;IAC9D,wBAAwB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAFD,0DAEC","sourcesContent":["import {\n Breadcrumb,\n Event,\n EventHint,\n EventProcessor,\n Scope as ScopeInterface,\n Severity,\n Span,\n User,\n} from '@sentry/types';\nimport { getGlobalObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifiying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: string } = {};\n\n /** Extra */\n protected _extra: { [key: string]: any } = {};\n\n /** Contexts */\n protected _context: { [key: string]: any } = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction */\n protected _transaction?: string;\n\n /** Span */\n protected _span?: Span;\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n setTimeout(() => {\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n });\n }\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n // tslint:disable-next-line:strict-type-predicates\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransaction(transaction?: string): this {\n this._transaction = transaction;\n if (this._span) {\n (this._span as any).transaction = transaction;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: { [key: string]: any } | null): this {\n this._context = { ...this._context, [key]: context };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Internal getter for Span, used in Hub.\n * @hidden\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._context = { ...scope._context };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._transaction = scope._transaction;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n }\n return newScope;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._context = {};\n this._level = undefined;\n this._transaction = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const mergedBreadcrumb = {\n timestamp: timestampWithMs(),\n ...breadcrumb,\n };\n\n this._breadcrumbs =\n maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n ? [...this._breadcrumbs, mergedBreadcrumb].slice(-maxBreadcrumbs)\n : [...this._breadcrumbs, mergedBreadcrumb];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._context && Object.keys(this._context).length) {\n event.contexts = { ...this._context, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transaction) {\n event.transaction = this._transaction;\n }\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n}\n\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/hub.d.ts b/node_modules/@sentry/hub/esm/hub.d.ts deleted file mode 100644 index bfe8cce..0000000 --- a/node_modules/@sentry/hub/esm/hub.d.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { Breadcrumb, BreadcrumbHint, Client, Event, EventHint, Hub as HubInterface, Integration, IntegrationClass, Severity, Span, SpanContext, User } from '@sentry/types'; -import { Carrier, Layer } from './interfaces'; -import { Scope } from './scope'; -declare module 'domain' { - let active: Domain; - /** - * Extension for domain interface - */ - interface Domain { - __SENTRY__?: Carrier; - } -} -/** - * API compatibility version of this hub. - * - * WARNING: This number should only be incresed when the global interface - * changes a and new methods are introduced. - * - * @hidden - */ -export declare const API_VERSION = 3; -/** - * @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); - /** - * 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; - /** - * @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 | 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]: string; - }): void; - /** - * @inheritDoc - */ - setExtras(extras: { - [key: string]: any; - }): void; - /** - * @inheritDoc - */ - setTag(key: string, value: string): void; - /** - * @inheritDoc - */ - setExtra(key: string, extra: any): 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(integration: IntegrationClass): T | null; - /** - * @inheritDoc - */ - startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild?: boolean): Span; - /** - * @inheritDoc - */ - traceHeaders(): { - [key: string]: string; - }; - /** - * Calls global extension method and binding current instance to the function call - */ - private _callExtensionMethod; -} -/** Returns the global shim registry. */ -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; -/** - * 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 - */ -export declare function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean; -//# sourceMappingURL=hub.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/hub.d.ts.map b/node_modules/@sentry/hub/esm/hub.d.ts.map deleted file mode 100644 index c5c21ba..0000000 --- a/node_modules/@sentry/hub/esm/hub.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,KAAK,EACL,SAAS,EACT,GAAG,IAAI,YAAY,EACnB,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,IAAI,EACL,MAAM,eAAe,CAAC;AAWvB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,QAAQ,QAAQ,CAAC;IACf,IAAI,MAAM,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,UAAiB,MAAM;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;CACF;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,IAAI,CAAC;AAc7B;;GAEG;AACH,qBAAa,GAAI,YAAW,YAAY;IAe0B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IA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,GAAG,EAAE,GAAG,GAAG,GAAG,CAKtC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAenC;AA4CD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,CAOvD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAOnE"} \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/hub.js b/node_modules/@sentry/hub/esm/hub.js deleted file mode 100644 index a28d977..0000000 --- a/node_modules/@sentry/hub/esm/hub.js +++ /dev/null @@ -1,447 +0,0 @@ -import * as tslib_1 from "tslib"; -import { consoleSandbox, dynamicRequire, getGlobalObject, isNodeEnv, logger, timestampWithMs, uuid4, } from '@sentry/utils'; -import { Scope } from './scope'; -/** - * API compatibility version of this hub. - * - * WARNING: This number should only be incresed when the global interface - * changes a and new methods are introduced. - * - * @hidden - */ -export var API_VERSION = 3; -/** - * Default maximum number of breadcrumbs added to an event. Can be overwritten - * with {@link Options.maxBreadcrumbs}. - */ -var DEFAULT_BREADCRUMBS = 100; -/** - * Absolute maximum number of breadcrumbs added to an event. The - * `maxBreadcrumbs` option cannot be higher than this value. - */ -var MAX_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._stack.push({ client: client, scope: scope }); - } - /** - * 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. - */ - Hub.prototype._invokeClient = function (method) { - var _a; - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var top = this.getStackTop(); - if (top && top.client && top.client[method]) { - (_a = top.client)[method].apply(_a, tslib_1.__spread(args, [top.scope])); - } - }; - /** - * @inheritDoc - */ - Hub.prototype.isOlderThan = function (version) { - return this._version < version; - }; - /** - * @inheritDoc - */ - Hub.prototype.bindClient = function (client) { - var top = this.getStackTop(); - top.client = client; - }; - /** - * @inheritDoc - */ - Hub.prototype.pushScope = function () { - // We want to clone the content of prev scope - var stack = this.getStack(); - var parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined; - var scope = Scope.clone(parentScope); - this.getStack().push({ - client: this.getClient(), - scope: scope, - }); - return scope; - }; - /** - * @inheritDoc - */ - Hub.prototype.popScope = function () { - return this.getStack().pop() !== undefined; - }; - /** - * @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 - */ - Hub.prototype.captureException = function (exception, hint) { - var eventId = (this._lastEventId = uuid4()); - var finalHint = hint; - // If there's no explicit hint provided, mimick 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({}, finalHint, { event_id: eventId })); - return eventId; - }; - /** - * @inheritDoc - */ - Hub.prototype.captureMessage = function (message, level, hint) { - var eventId = (this._lastEventId = uuid4()); - var finalHint = hint; - // If there's no explicit hint provided, mimick 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({}, finalHint, { event_id: eventId })); - return eventId; - }; - /** - * @inheritDoc - */ - Hub.prototype.captureEvent = function (event, hint) { - var eventId = (this._lastEventId = uuid4()); - this._invokeClient('captureEvent', event, 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 top = this.getStackTop(); - if (!top.scope || !top.client) { - return; - } - var _a = (top.client.getOptions && top.client.getOptions()) || {}, _b = _a.beforeBreadcrumb, beforeBreadcrumb = _b === void 0 ? null : _b, _c = _a.maxBreadcrumbs, maxBreadcrumbs = _c === void 0 ? DEFAULT_BREADCRUMBS : _c; - if (maxBreadcrumbs <= 0) { - return; - } - var timestamp = timestampWithMs(); - var mergedBreadcrumb = tslib_1.__assign({ timestamp: timestamp }, breadcrumb); - var finalBreadcrumb = beforeBreadcrumb - ? consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); }) - : mergedBreadcrumb; - if (finalBreadcrumb === null) { - return; - } - top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS)); - }; - /** - * @inheritDoc - */ - Hub.prototype.setUser = function (user) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setUser(user); - }; - /** - * @inheritDoc - */ - Hub.prototype.setTags = function (tags) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setTags(tags); - }; - /** - * @inheritDoc - */ - Hub.prototype.setExtras = function (extras) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setExtras(extras); - }; - /** - * @inheritDoc - */ - Hub.prototype.setTag = function (key, value) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setTag(key, value); - }; - /** - * @inheritDoc - */ - Hub.prototype.setExtra = function (key, extra) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setExtra(key, extra); - }; - /** - * @inheritDoc - */ - Hub.prototype.setContext = function (name, context) { - var top = this.getStackTop(); - if (!top.scope) { - return; - } - top.scope.setContext(name, context); - }; - /** - * @inheritDoc - */ - Hub.prototype.configureScope = function (callback) { - var top = this.getStackTop(); - if (top.scope && top.client) { - callback(top.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) { - logger.warn("Cannot retrieve integration " + integration.id + " from the current Hub"); - return null; - } - }; - /** - * @inheritDoc - */ - Hub.prototype.startSpan = function (spanOrSpanContext, forceNoChild) { - if (forceNoChild === void 0) { forceNoChild = false; } - return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild); - }; - /** - * @inheritDoc - */ - Hub.prototype.traceHeaders = function () { - return this._callExtensionMethod('traceHeaders'); - }; - /** - * Calls global extension method and binding current instance to the function call - */ - // @ts-ignore - 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__; - // tslint:disable-next-line: strict-type-predicates - if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') { - return sentry.extensions[method].apply(this, args); - } - logger.warn("Extension method " + method + " couldn't be found, doing nothing."); - }; - return Hub; -}()); -export { Hub }; -/** Returns the global shim registry. */ -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); -} -/** - * Try to read the hub from an active domain, fallback to the registry if one doesnt exist - * @returns discovered hub - */ -function getHubFromActiveDomain(registry) { - try { - // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack. - // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser - // for example so we do not have to shim it and use `getCurrentHub` universally. - var domain = dynamicRequire(module, 'domain'); - var activeDomain = domain.active; - // If there no active domain, just return global hub - if (!activeDomain) { - return getHubFromCarrier(registry); - } - // If there's no hub on current domain, or its 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) { - if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) { - return true; - } - return false; -} -/** - * This will create a new {@link Hub} and add to the passed object on - * __SENTRY__.hub. - * @param carrier object - * @hidden - */ -export function getHubFromCarrier(carrier) { - if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) { - return carrier.__SENTRY__.hub; - } - carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - carrier.__SENTRY__.hub = new Hub(); - return carrier.__SENTRY__.hub; -} -/** - * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute - * @param carrier object - * @param hub Hub - */ -export function setHubOnCarrier(carrier, hub) { - if (!carrier) { - return false; - } - carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - carrier.__SENTRY__.hub = hub; - return true; -} -//# sourceMappingURL=hub.js.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/hub.js.map b/node_modules/@sentry/hub/esm/hub.js.map deleted file mode 100644 index 6b363d0..0000000 --- a/node_modules/@sentry/hub/esm/hub.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":";AAcA,OAAO,EACL,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,MAAM,EACN,eAAe,EACf,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAYhC;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,WAAW,GAAG,CAAC,CAAC;AAE7B;;;GAGG;AACH,IAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;GAGG;AACH,IAAM,eAAe,GAAG,GAAG,CAAC;AAE5B;;GAEG;AACH;IAOE;;;;;;;OAOG;IACH,aAAmB,MAAe,EAAE,KAA0B,EAAmB,QAA8B;QAA3E,sBAAA,EAAA,YAAmB,KAAK,EAAE;QAAmB,yBAAA,EAAA,sBAA8B;QAA9B,aAAQ,GA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AC,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IACnC,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,OAAgB,EAAE,GAAQ;IACxD,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;IAC9C,OAAO,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,CAAC;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n Event,\n EventHint,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Severity,\n Span,\n SpanContext,\n User,\n} from '@sentry/types';\nimport {\n consoleSandbox,\n dynamicRequire,\n getGlobalObject,\n isNodeEnv,\n logger,\n timestampWithMs,\n uuid4,\n} from '@sentry/utils';\n\nimport { Carrier, Layer } from './interfaces';\nimport { Scope } from './scope';\n\ndeclare module 'domain' {\n export let active: Domain;\n /**\n * Extension for domain interface\n */\n export interface Domain {\n __SENTRY__?: Carrier;\n }\n}\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be incresed when the global interface\n * changes a and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 3;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this._stack.push({ client, scope });\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n private _invokeClient(method: M, ...args: any[]): void {\n const top = this.getStackTop();\n if (top && top.client && top.client[method]) {\n (top.client as any)[method](...args, top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const stack = this.getStack();\n const parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined;\n const scope = Scope.clone(parentScope);\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n return this.getStack().pop() !== undefined;\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const top = this.getStackTop();\n\n if (!top.scope || !top.client) {\n return;\n }\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (top.client.getOptions && top.client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) {\n return;\n }\n\n const timestamp = timestampWithMs();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) {\n return;\n }\n\n top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const top = this.getStackTop();\n if (top.scope && top.client) {\n callback(top.scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) {\n return null;\n }\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(spanOrSpanContext?: Span | SpanContext, forceNoChild: boolean = false): Span {\n return this._callExtensionMethod('startSpan', spanOrSpanContext, forceNoChild);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/** Returns the global shim registry. */\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Try to read the hub from an active domain, fallback to the registry if one doesnt exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n const domain = dynamicRequire(module, 'domain');\n const activeDomain = domain.active;\n\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return carrier.__SENTRY__.hub;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) {\n return false;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/index.d.ts b/node_modules/@sentry/hub/esm/index.d.ts deleted file mode 100644 index 4c45353..0000000 --- a/node_modules/@sentry/hub/esm/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { Carrier, Layer } from './interfaces'; -export { addGlobalEventProcessor, Scope } from './scope'; -export { getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier } from './hub'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/index.d.ts.map b/node_modules/@sentry/hub/esm/index.d.ts.map deleted file mode 100644 index b95f088..0000000 --- a/node_modules/@sentry/hub/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/index.js b/node_modules/@sentry/hub/esm/index.js deleted file mode 100644 index ca89c2d..0000000 --- a/node_modules/@sentry/hub/esm/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { addGlobalEventProcessor, Scope } from './scope'; -export { getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier } from './hub'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/index.js.map b/node_modules/@sentry/hub/esm/index.js.map deleted file mode 100644 index 6c30d3a..0000000 --- a/node_modules/@sentry/hub/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC","sourcesContent":["export { Carrier, Layer } from './interfaces';\nexport { addGlobalEventProcessor, Scope } from './scope';\nexport { getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier } from './hub';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/interfaces.d.ts b/node_modules/@sentry/hub/esm/interfaces.d.ts deleted file mode 100644 index 376e688..0000000 --- a/node_modules/@sentry/hub/esm/interfaces.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Client } from '@sentry/types'; -import { Hub } from './hub'; -import { Scope } from './scope'; -/** - * 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; - /** - * These are extension methods for the hub, the current instance of the hub will be bound to it - */ - extensions?: { - [key: string]: Function; - }; - }; -} -//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/interfaces.d.ts.map b/node_modules/@sentry/hub/esm/interfaces.d.ts.map deleted file mode 100644 index 6513588..0000000 --- a/node_modules/@sentry/hub/esm/interfaces.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;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,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;SAAE,CAAC;KAC1C,CAAC;CACH"} \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/interfaces.js b/node_modules/@sentry/hub/esm/interfaces.js deleted file mode 100644 index eb519ec..0000000 --- a/node_modules/@sentry/hub/esm/interfaces.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/interfaces.js.map b/node_modules/@sentry/hub/esm/interfaces.js.map deleted file mode 100644 index 1105582..0000000 --- a/node_modules/@sentry/hub/esm/interfaces.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { Client } from '@sentry/types';\n\nimport { Hub } from './hub';\nimport { Scope } from './scope';\n\n/**\n * A layer in the process stack.\n * @hidden\n */\nexport interface Layer {\n client?: Client;\n scope?: Scope;\n}\n\n/**\n * An object that contains a hub and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: {\n hub?: Hub;\n /**\n * These are extension methods for the hub, the current instance of the hub will be bound to it\n */\n extensions?: { [key: string]: Function };\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/scope.d.ts b/node_modules/@sentry/hub/esm/scope.d.ts deleted file mode 100644 index 643bebb..0000000 --- a/node_modules/@sentry/hub/esm/scope.d.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { Breadcrumb, Event, EventHint, EventProcessor, Scope as ScopeInterface, Severity, Span, User } from '@sentry/types'; -/** - * 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 notifiying 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]: string; - }; - /** Extra */ - protected _extra: { - [key: string]: any; - }; - /** Contexts */ - protected _context: { - [key: string]: any; - }; - /** Fingerprint */ - protected _fingerprint?: string[]; - /** Severity */ - protected _level?: Severity; - /** Transaction */ - protected _transaction?: string; - /** Span */ - protected _span?: Span; - /** - * 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; - /** - * This will be called on every set call. - */ - protected _notifyScopeListeners(): void; - /** - * This will be called after {@link applyToEvent} is finished. - */ - protected _notifyEventProcessors(processors: EventProcessor[], event: Event | null, hint?: EventHint, index?: number): PromiseLike; - /** - * @inheritDoc - */ - setUser(user: User | null): this; - /** - * @inheritDoc - */ - setTags(tags: { - [key: string]: string; - }): this; - /** - * @inheritDoc - */ - setTag(key: string, value: string): this; - /** - * @inheritDoc - */ - setExtras(extras: { - [key: string]: any; - }): this; - /** - * @inheritDoc - */ - setExtra(key: string, extra: any): this; - /** - * @inheritDoc - */ - setFingerprint(fingerprint: string[]): this; - /** - * @inheritDoc - */ - setLevel(level: Severity): this; - /** - * @inheritDoc - */ - setTransaction(transaction?: string): this; - /** - * @inheritDoc - */ - setContext(key: string, context: { - [key: string]: any; - } | null): this; - /** - * @inheritDoc - */ - setSpan(span?: Span): this; - /** - * Internal getter for Span, used in Hub. - * @hidden - */ - getSpan(): Span | undefined; - /** - * Inherit values from the parent scope. - * @param scope to clone. - */ - static clone(scope?: Scope): Scope; - /** - * @inheritDoc - */ - clear(): this; - /** - * @inheritDoc - */ - addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this; - /** - * @inheritDoc - */ - clearBreadcrumbs(): this; - /** - * 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; - /** - * 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 informartion about the original exception. - * @hidden - */ - applyToEvent(event: Event, hint?: EventHint): PromiseLike; -} -/** - * Add a EventProcessor to be kept globally. - * @param callback EventProcessor to add - */ -export declare function addGlobalEventProcessor(callback: EventProcessor): void; -//# sourceMappingURL=scope.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/scope.d.ts.map b/node_modules/@sentry/hub/esm/scope.d.ts.map deleted file mode 100644 index 48b9292..0000000 --- a/node_modules/@sentry/hub/esm/scope.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,EACd,KAAK,IAAI,cAAc,EACvB,QAAQ,EACR,IAAI,EACJ,IAAI,EACL,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AACH,qBAAa,KAAM,YAAW,cAAc;IAC1C,uCAAuC;IACvC,SAAS,CAAC,mBAAmB,EAAE,OAAO,CAAS;IAE/C,oDAAoD;IACpD,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,CAAM;IAE9D,oEAAoE;IACpE,SAAS,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAM;IAElD,4BAA4B;IAC5B,SAAS,CAAC,YAAY,EAAE,UAAU,EAAE,CAAM;IAE1C,WAAW;IACX,SAAS,CAAC,KAAK,EAAE,IAAI,CAAM;IAE3B,WAAW;IACX,SAAS,CAAC,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAEhD,YAAY;IACZ,SAAS,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAM;IAE9C,eAAe;IACf,SAAS,CAAC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c,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI;IAMlD;;OAEG;IACI,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAMtC;;OAEG;IACI,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IASjD;;OAEG;IACI,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,IAAI;IAM5E;;OAEG;IACI,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI;IAMjC;;;OAGG;IACI,OAAO,IAAI,IAAI,GAAG,SAAS;IAIlC;;;OAGG;WACW,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK;IAiBzC;;OAEG;IACI,KAAK,IAAI,IAAI;IAcpB;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAc3E;;OAEG;IACI,gBAAgB,IAAI,IAAI;IAM/B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAmBzB;;;;;;;OAOG;IACI,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;CA8B/E;AAYD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEtE"} \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/scope.js b/node_modules/@sentry/hub/esm/scope.js deleted file mode 100644 index 7952794..0000000 --- a/node_modules/@sentry/hub/esm/scope.js +++ /dev/null @@ -1,305 +0,0 @@ -import * as tslib_1 from "tslib"; -import { getGlobalObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils'; -/** - * 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 notifiying 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._context = {}; - } - /** - * 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; - }; - /** - * This will be called on every set call. - */ - Scope.prototype._notifyScopeListeners = function () { - var _this = this; - if (!this._notifyingListeners) { - this._notifyingListeners = true; - setTimeout(function () { - _this._scopeListeners.forEach(function (callback) { - callback(_this); - }); - _this._notifyingListeners = false; - }); - } - }; - /** - * 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]; - // tslint:disable-next-line:strict-type-predicates - if (event === null || typeof processor !== 'function') { - resolve(event); - } - else { - var result = processor(tslib_1.__assign({}, event), hint); - if (isThenable(result)) { - result - .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); }) - .then(null, reject); - } - else { - _this._notifyEventProcessors(processors, result, hint, index + 1) - .then(resolve) - .then(null, reject); - } - } - }); - }; - /** - * @inheritDoc - */ - Scope.prototype.setUser = function (user) { - this._user = user || {}; - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setTags = function (tags) { - this._tags = tslib_1.__assign({}, this._tags, tags); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setTag = function (key, value) { - var _a; - this._tags = 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({}, this._extra, extras); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setExtra = function (key, extra) { - var _a; - this._extra = 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.setTransaction = function (transaction) { - this._transaction = transaction; - if (this._span) { - this._span.transaction = transaction; - } - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setContext = function (key, context) { - var _a; - this._context = tslib_1.__assign({}, this._context, (_a = {}, _a[key] = context, _a)); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.setSpan = function (span) { - this._span = span; - this._notifyScopeListeners(); - return this; - }; - /** - * Internal getter for Span, used in Hub. - * @hidden - */ - Scope.prototype.getSpan = function () { - return this._span; - }; - /** - * 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._context = tslib_1.__assign({}, scope._context); - newScope._user = scope._user; - newScope._level = scope._level; - newScope._span = scope._span; - newScope._transaction = scope._transaction; - newScope._fingerprint = scope._fingerprint; - newScope._eventProcessors = tslib_1.__spread(scope._eventProcessors); - } - return newScope; - }; - /** - * @inheritDoc - */ - Scope.prototype.clear = function () { - this._breadcrumbs = []; - this._tags = {}; - this._extra = {}; - this._user = {}; - this._context = {}; - this._level = undefined; - this._transaction = undefined; - this._fingerprint = undefined; - this._span = undefined; - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) { - var mergedBreadcrumb = tslib_1.__assign({ timestamp: timestampWithMs() }, breadcrumb); - this._breadcrumbs = - maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0 - ? tslib_1.__spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxBreadcrumbs) - : tslib_1.__spread(this._breadcrumbs, [mergedBreadcrumb]); - this._notifyScopeListeners(); - return this; - }; - /** - * @inheritDoc - */ - Scope.prototype.clearBreadcrumbs = function () { - this._breadcrumbs = []; - this._notifyScopeListeners(); - return this; - }; - /** - * 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; - } - }; - /** - * 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 informartion about the original exception. - * @hidden - */ - Scope.prototype.applyToEvent = function (event, hint) { - if (this._extra && Object.keys(this._extra).length) { - event.extra = tslib_1.__assign({}, this._extra, event.extra); - } - if (this._tags && Object.keys(this._tags).length) { - event.tags = tslib_1.__assign({}, this._tags, event.tags); - } - if (this._user && Object.keys(this._user).length) { - event.user = tslib_1.__assign({}, this._user, event.user); - } - if (this._context && Object.keys(this._context).length) { - event.contexts = tslib_1.__assign({}, this._context, event.contexts); - } - if (this._level) { - event.level = this._level; - } - if (this._transaction) { - event.transaction = this._transaction; - } - if (this._span) { - event.contexts = tslib_1.__assign({ trace: this._span.getTraceContext() }, event.contexts); - } - this._applyFingerprint(event); - event.breadcrumbs = tslib_1.__spread((event.breadcrumbs || []), this._breadcrumbs); - event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined; - return this._notifyEventProcessors(tslib_1.__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint); - }; - return Scope; -}()); -export { Scope }; -/** - * Retruns the global event processors. - */ -function getGlobalEventProcessors() { - var global = getGlobalObject(); - global.__SENTRY__ = global.__SENTRY__ || {}; - global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || []; - return global.__SENTRY__.globalEventProcessors; -} -/** - * Add a EventProcessor to be kept globally. - * @param callback EventProcessor to add - */ -export function addGlobalEventProcessor(callback) { - getGlobalEventProcessors().push(callback); -} -//# sourceMappingURL=scope.js.map \ No newline at end of file diff --git a/node_modules/@sentry/hub/esm/scope.js.map b/node_modules/@sentry/hub/esm/scope.js.map deleted file mode 100644 index c6c9e92..0000000 --- a/node_modules/@sentry/hub/esm/scope.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":";AAUA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE1F;;;GAGG;AACH;IAAA;QACE,uCAAuC;QAC7B,wBAAmB,GAAY,KAAK,CAAC;QAE/C,oDAAoD;QAC1C,oBAAe,GAAkC,EAAE,CAAC;QAE9D,oEAAoE;QAC1D,qBAAgB,GAAqB,EAAE,CAAC;QAElD,4BAA4B;QAClB,iBAAY,GAAiB,EAAE,CAAC;QAE1C,WAAW;QACD,UAAK,GAAS,EAAE,CAAC;QAE3B,WAAW;QACD,UAAK,GAA8B,EAAE,CAAC;QAEhD,YAAY;QACF,WAAM,GAA2B,EAAE,CAAC;QAE9C,eAAe;QACL,aAAQ,GAA2B,EAAE,CAAC;IAkT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I,CAAC,YAAY,CAAC,CAAC;QACzE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;QAEjF,OAAO,IAAI,CAAC,sBAAsB,kBAAK,wBAAwB,EAAE,EAAK,IAAI,CAAC,gBAAgB,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7G,CAAC;IACH,YAAC;AAAD,CAAC,AAzUD,IAyUC;;AAED;;GAEG;AACH,SAAS,wBAAwB;IAC/B,IAAM,MAAM,GAAG,eAAe,EAA0B,CAAC;IACzD,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;IAC5C,MAAM,CAAC,UAAU,CAAC,qBAAqB,GAAG,MAAM,CAAC,UAAU,CAAC,qBAAqB,IAAI,EAAE,CAAC;IACxF,OAAO,MAAM,CAAC,UAAU,CAAC,qBAAqB,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAwB;IAC9D,wBAAwB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import {\n Breadcrumb,\n Event,\n EventHint,\n EventProcessor,\n Scope as ScopeInterface,\n Severity,\n Span,\n User,\n} from '@sentry/types';\nimport { getGlobalObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifiying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: string } = {};\n\n /** Extra */\n protected _extra: { [key: string]: any } = {};\n\n /** Contexts */\n protected _context: { [key: string]: any } = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction */\n protected _transaction?: string;\n\n /** Span */\n protected _span?: Span;\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n setTimeout(() => {\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n });\n }\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n // tslint:disable-next-line:strict-type-predicates\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: { [key: string]: any }): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: any): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransaction(transaction?: string): this {\n this._transaction = transaction;\n if (this._span) {\n (this._span as any).transaction = transaction;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: { [key: string]: any } | null): this {\n this._context = { ...this._context, [key]: context };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Internal getter for Span, used in Hub.\n * @hidden\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._context = { ...scope._context };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._transaction = scope._transaction;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n }\n return newScope;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._context = {};\n this._level = undefined;\n this._transaction = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const mergedBreadcrumb = {\n timestamp: timestampWithMs(),\n ...breadcrumb,\n };\n\n this._breadcrumbs =\n maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n ? [...this._breadcrumbs, mergedBreadcrumb].slice(-maxBreadcrumbs)\n : [...this._breadcrumbs, mergedBreadcrumb];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._context && Object.keys(this._context).length) {\n event.contexts = { ...this._context, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transaction) {\n event.transaction = this._transaction;\n }\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n}\n\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/hub/package.json b/node_modules/@sentry/hub/package.json deleted file mode 100644 index 96012fe..0000000 --- a/node_modules/@sentry/hub/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - "@sentry/hub@5.14.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "@sentry/hub@5.14.1", - "_id": "@sentry/hub@5.14.1", - "_inBundle": false, - "_integrity": "sha1-GkUVVYcFsmgKbp88uAklVe0xMko=", - "_location": "/@sentry/hub", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@sentry/hub@5.14.1", - "name": "@sentry/hub", - "escapedName": "@sentry%2fhub", - "scope": "@sentry", - "rawSpec": "5.14.1", - "saveSpec": null, - "fetchSpec": "5.14.1" - }, - "_requiredBy": [ - "/@sentry/apm", - "/@sentry/core", - "/@sentry/minimal", - "/@sentry/node" - ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/hub/-/hub-5.14.1.tgz", - "_spec": "5.14.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", - "author": { - "name": "Sentry" - }, - "bugs": { - "url": "https://github.com/getsentry/sentry-javascript/issues" - }, - "dependencies": { - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "tslib": "^1.9.3" - }, - "description": "Sentry hub which handles global state managment.", - "devDependencies": { - "jest": "^24.7.1", - "npm-run-all": "^4.1.2", - "prettier": "^1.17.0", - "prettier-check": "^2.0.0", - "rimraf": "^2.6.3", - "tslint": "^5.16.0", - "typescript": "^3.4.5" - }, - "engines": { - "node": ">=6" - }, - "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/hub", - "jest": { - "collectCoverage": true, - "transform": { - "^.+\\.ts$": "ts-jest" - }, - "moduleFileExtensions": [ - "js", - "ts" - ], - "testEnvironment": "node", - "testMatch": [ - "**/*.test.ts" - ], - "globals": { - "ts-jest": { - "tsConfig": "./tsconfig.json", - "diagnostics": false - } - } - }, - "license": "BSD-3-Clause", - "main": "dist/index.js", - "module": "esm/index.js", - "name": "@sentry/hub", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git://github.com/getsentry/sentry-javascript.git" - }, - "scripts": { - "build": "run-p build:es5 build:esm", - "build:es5": "tsc -p tsconfig.build.json", - "build:esm": "tsc -p tsconfig.esm.json", - "build:watch": "run-p build:watch:es5 build:watch:esm", - "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", - "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", - "clean": "rimraf dist coverage", - "fix": "run-s fix:tslint fix:prettier", - "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", - "fix:tslint": "tslint --fix -t stylish -p .", - "link:yarn": "yarn link", - "lint": "run-s lint:prettier lint:tslint", - "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", - "lint:tslint": "tslint -t stylish -p .", - "lint:tslint:json": "tslint --format json -p . | tee lint-results.json", - "test": "jest", - "test:watch": "jest --watch" - }, - "sideEffects": false, - "types": "dist/index.d.ts", - "version": "5.14.1" -} diff --git a/node_modules/@sentry/minimal/LICENSE b/node_modules/@sentry/minimal/LICENSE deleted file mode 100644 index 8b42db8..0000000 --- a/node_modules/@sentry/minimal/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -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. diff --git a/node_modules/@sentry/minimal/README.md b/node_modules/@sentry/minimal/README.md deleted file mode 100644 index 4204f58..0000000 --- a/node_modules/@sentry/minimal/README.md +++ /dev/null @@ -1,63 +0,0 @@ -

- - - -
-

- -# Sentry JavaScript SDK Minimal - -[![npm version](https://img.shields.io/npm/v/@sentry/minimal.svg)](https://www.npmjs.com/package/@sentry/minimal) -[![npm dm](https://img.shields.io/npm/dm/@sentry/minimal.svg)](https://www.npmjs.com/package/@sentry/minimal) -[![npm dt](https://img.shields.io/npm/dt/@sentry/minimal.svg)](https://www.npmjs.com/package/@sentry/minimal) -[![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 - -A minimal Sentry SDK that uses a configured client when embedded into an application. It allows library authors add -support for a Sentry SDK without having to bundle the entire SDK or being dependent on a specific platform. If the user -is using Sentry in their application and your library uses `@sentry/minimal`, the user receives all -breadcrumbs/messages/events you added to your libraries codebase. - -## Usage - -To use the minimal, you do not have to initialize an SDK. This should be handled by the user of your library. Instead, -directly use the exported functions of `@sentry/minimal` to add breadcrumbs or capture events: - -```javascript -import * as Sentry from '@sentry/minimal'; - -// Add a breadcrumb for future events -Sentry.addBreadcrumb({ - message: 'My Breadcrumb', - // ... -}); - -// Capture exceptions, messages or manual events -Sentry.captureMessage('Hello, world!'); -Sentry.captureException(new Error('Good bye')); -Sentry.captureEvent({ - message: 'Manual', - stacktrace: [ - // ... - ], -}); -``` - -Note that while strictly possible, it is discouraged to interfere with the event context. If for some reason your -library needs to inject context information, beware that this might override the user's context values: - -```javascript -// Set user information, as well as tags and further extras -Sentry.configureScope(scope => { - scope.setExtra('battery', 0.7); - scope.setTag('user_mode', 'admin'); - scope.setUser({ id: '4711' }); - // scope.clear(); -}); -``` diff --git a/node_modules/@sentry/minimal/dist/index.d.ts b/node_modules/@sentry/minimal/dist/index.d.ts deleted file mode 100644 index 4a3dd0e..0000000 --- a/node_modules/@sentry/minimal/dist/index.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Scope } from '@sentry/hub'; -import { Breadcrumb, Event, Severity, User } from '@sentry/types'; -/** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @returns The generated eventId. - */ -export declare function captureException(exception: any): string; -/** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @returns The generated eventId. - */ -export declare function captureMessage(message: string, level?: Severity): string; -/** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @returns The generated eventId. - */ -export declare function captureEvent(event: Event): string; -/** - * Callback to set context information onto the scope. - * @param callback Callback function that receives Scope. - */ -export declare function configureScope(callback: (scope: Scope) => void): void; -/** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - */ -export declare function addBreadcrumb(breadcrumb: Breadcrumb): void; -/** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ -export declare function setContext(name: string, context: { - [key: string]: any; -} | null): void; -/** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ -export declare function setExtras(extras: { - [key: string]: any; -}): void; -/** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ -export declare function setTags(tags: { - [key: string]: string; -}): void; -/** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ -export declare function setExtra(key: string, extra: any): void; -/** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ -export declare function setTag(key: string, value: string): void; -/** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ -export declare function setUser(user: User | null): void; -/** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - * - * @param callback that will be enclosed into push/popScope. - */ -export declare function withScope(callback: (scope: Scope) => void): void; -/** - * Calls a function on the latest client. Use this with caution, it's meant as - * in "internal" helper so we don't need to expose every possible function in - * the shim. It is not guaranteed that the client actually implements the - * function. - * - * @param method The method to call on the client/client. - * @param args Arguments to pass to the client/fontend. - * @hidden - */ -export declare function _callOnClient(method: string, ...args: any[]): void; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/minimal/dist/index.d.ts.map b/node_modules/@sentry/minimal/dist/index.d.ts.map deleted file mode 100644 index f0d5bf8..0000000 --- a/node_modules/@sentry/minimal/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAgBlE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,CAWvD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,CAWxE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEjD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAErE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,IAAI,GAAG,IAAI,CAErF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,IAAI,CAE9D;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAE7D;AAED;;;;GAIG;AAEH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAE/C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAEhE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAElE"} \ No newline at end of file diff --git a/node_modules/@sentry/minimal/dist/index.js b/node_modules/@sentry/minimal/dist/index.js deleted file mode 100644 index 6dfaddc..0000000 --- a/node_modules/@sentry/minimal/dist/index.js +++ /dev/null @@ -1,179 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var hub_1 = require("@sentry/hub"); -/** - * This calls a function on the current hub. - * @param method function to call on hub. - * @param args to pass to function. - */ -function callOnHub(method) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var hub = hub_1.getCurrentHub(); - if (hub && hub[method]) { - // tslint:disable-next-line:no-unsafe-any - return hub[method].apply(hub, tslib_1.__spread(args)); - } - throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report."); -} -/** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @returns The generated eventId. - */ -function captureException(exception) { - var syntheticException; - try { - throw new Error('Sentry syntheticException'); - } - catch (exception) { - syntheticException = exception; - } - return callOnHub('captureException', exception, { - originalException: exception, - syntheticException: syntheticException, - }); -} -exports.captureException = captureException; -/** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @returns The generated eventId. - */ -function captureMessage(message, level) { - var syntheticException; - try { - throw new Error(message); - } - catch (exception) { - syntheticException = exception; - } - return callOnHub('captureMessage', message, level, { - originalException: message, - syntheticException: syntheticException, - }); -} -exports.captureMessage = captureMessage; -/** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @returns The generated eventId. - */ -function captureEvent(event) { - return callOnHub('captureEvent', event); -} -exports.captureEvent = captureEvent; -/** - * Callback to set context information onto the scope. - * @param callback Callback function that receives Scope. - */ -function configureScope(callback) { - callOnHub('configureScope', callback); -} -exports.configureScope = configureScope; -/** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - */ -function addBreadcrumb(breadcrumb) { - callOnHub('addBreadcrumb', breadcrumb); -} -exports.addBreadcrumb = addBreadcrumb; -/** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ -function setContext(name, context) { - callOnHub('setContext', name, context); -} -exports.setContext = setContext; -/** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ -function setExtras(extras) { - callOnHub('setExtras', extras); -} -exports.setExtras = setExtras; -/** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ -function setTags(tags) { - callOnHub('setTags', tags); -} -exports.setTags = setTags; -/** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ -function setExtra(key, extra) { - callOnHub('setExtra', key, extra); -} -exports.setExtra = setExtra; -/** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ -function setTag(key, value) { - callOnHub('setTag', key, value); -} -exports.setTag = setTag; -/** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ -function setUser(user) { - callOnHub('setUser', user); -} -exports.setUser = setUser; -/** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - * - * @param callback that will be enclosed into push/popScope. - */ -function withScope(callback) { - callOnHub('withScope', callback); -} -exports.withScope = withScope; -/** - * Calls a function on the latest client. Use this with caution, it's meant as - * in "internal" helper so we don't need to expose every possible function in - * the shim. It is not guaranteed that the client actually implements the - * function. - * - * @param method The method to call on the client/client. - * @param args Arguments to pass to the client/fontend. - * @hidden - */ -function _callOnClient(method) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - callOnHub.apply(void 0, tslib_1.__spread(['_invokeClient', method], args)); -} -exports._callOnClient = _callOnClient; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/minimal/dist/index.js.map b/node_modules/@sentry/minimal/dist/index.js.map deleted file mode 100644 index 43ec037..0000000 --- a/node_modules/@sentry/minimal/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mCAAwD;AAGxD;;;;GAIG;AACH,SAAS,SAAS,CAAI,MAAc;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAClD,IAAM,GAAG,GAAG,mBAAa,EAAE,CAAC;IAC5B,IAAI,GAAG,IAAI,GAAG,CAAC,MAAmB,CAAC,EAAE;QACnC,yCAAyC;QACzC,OAAQ,GAAG,CAAC,MAAmB,CAAC,OAAxB,GAAG,mBAAiC,IAAI,GAAE;KACnD;IACD,MAAM,IAAI,KAAK,CAAC,uBAAqB,MAAM,yDAAsD,CAA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AAC;AAC/C,CAAC;AAFD,gCAEC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAA8B;IACtD,SAAS,CAAO,WAAW,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,IAA+B;IACrD,SAAS,CAAO,SAAS,EAAE,IAAI,CAAC,CAAC;AACnC,CAAC;AAFD,0BAEC;AAED;;;;GAIG;AAEH,SAAgB,QAAQ,CAAC,GAAW,EAAE,KAAU;IAC9C,SAAS,CAAO,UAAU,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAC1C,CAAC;AAFD,4BAEC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CAAC,GAAW,EAAE,KAAa;IAC/C,SAAS,CAAO,QAAQ,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC;AAFD,wBAEC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CAAC,IAAiB;IACvC,SAAS,CAAO,SAAS,EAAE,IAAI,CAAC,CAAC;AACnC,CAAC;AAFD,0BAEC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,SAAS,CAAC,QAAgC;IACxD,SAAS,CAAO,WAAW,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAFD,8BAEC;AAED;;;;;;;;;GASG;AACH,SAAgB,aAAa,CAAC,MAAc;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAC1D,SAAS,iCAAO,eAAe,EAAE,MAAM,GAAK,IAAI,GAAE;AACpD,CAAC;AAFD,sCAEC","sourcesContent":["import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport { Breadcrumb, Event, Severity, User } from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\nfunction callOnHub(method: string, ...args: any[]): T {\n const hub = getCurrentHub();\n if (hub && hub[method as keyof Hub]) {\n // tslint:disable-next-line:no-unsafe-any\n return (hub[method as keyof Hub] as any)(...args);\n }\n throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\nexport function captureException(exception: any): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException,\n });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, level?: Severity): string {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureMessage', message, level, {\n originalException: message,\n syntheticException,\n });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n callOnHub('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n callOnHub('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: { [key: string]: any }): void {\n callOnHub('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: string }): void {\n callOnHub('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n\nexport function setExtra(key: string, extra: any): void {\n callOnHub('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\nexport function setTag(key: string, value: string): void {\n callOnHub('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n callOnHub('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n callOnHub('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\nexport function _callOnClient(method: string, ...args: any[]): void {\n callOnHub('_invokeClient', method, ...args);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/minimal/esm/index.d.ts b/node_modules/@sentry/minimal/esm/index.d.ts deleted file mode 100644 index 4a3dd0e..0000000 --- a/node_modules/@sentry/minimal/esm/index.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Scope } from '@sentry/hub'; -import { Breadcrumb, Event, Severity, User } from '@sentry/types'; -/** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @returns The generated eventId. - */ -export declare function captureException(exception: any): string; -/** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @returns The generated eventId. - */ -export declare function captureMessage(message: string, level?: Severity): string; -/** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @returns The generated eventId. - */ -export declare function captureEvent(event: Event): string; -/** - * Callback to set context information onto the scope. - * @param callback Callback function that receives Scope. - */ -export declare function configureScope(callback: (scope: Scope) => void): void; -/** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - */ -export declare function addBreadcrumb(breadcrumb: Breadcrumb): void; -/** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ -export declare function setContext(name: string, context: { - [key: string]: any; -} | null): void; -/** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ -export declare function setExtras(extras: { - [key: string]: any; -}): void; -/** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ -export declare function setTags(tags: { - [key: string]: string; -}): void; -/** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ -export declare function setExtra(key: string, extra: any): void; -/** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ -export declare function setTag(key: string, value: string): void; -/** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ -export declare function setUser(user: User | null): void; -/** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - * - * @param callback that will be enclosed into push/popScope. - */ -export declare function withScope(callback: (scope: Scope) => void): void; -/** - * Calls a function on the latest client. Use this with caution, it's meant as - * in "internal" helper so we don't need to expose every possible function in - * the shim. It is not guaranteed that the client actually implements the - * function. - * - * @param method The method to call on the client/client. - * @param args Arguments to pass to the client/fontend. - * @hidden - */ -export declare function _callOnClient(method: string, ...args: any[]): void; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/minimal/esm/index.d.ts.map b/node_modules/@sentry/minimal/esm/index.d.ts.map deleted file mode 100644 index f0d5bf8..0000000 --- a/node_modules/@sentry/minimal/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAgBlE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,CAWvD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,CAWxE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEjD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAErE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,IAAI,GAAG,IAAI,CAErF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,IAAI,CAE9D;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAE7D;AAED;;;;GAIG;AAEH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAE/C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAEhE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAElE"} \ No newline at end of file diff --git a/node_modules/@sentry/minimal/esm/index.js b/node_modules/@sentry/minimal/esm/index.js deleted file mode 100644 index a8620d0..0000000 --- a/node_modules/@sentry/minimal/esm/index.js +++ /dev/null @@ -1,165 +0,0 @@ -import * as tslib_1 from "tslib"; -import { getCurrentHub } from '@sentry/hub'; -/** - * This calls a function on the current hub. - * @param method function to call on hub. - * @param args to pass to function. - */ -function callOnHub(method) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var hub = getCurrentHub(); - if (hub && hub[method]) { - // tslint:disable-next-line:no-unsafe-any - return hub[method].apply(hub, tslib_1.__spread(args)); - } - throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report."); -} -/** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @returns The generated eventId. - */ -export function captureException(exception) { - var syntheticException; - try { - throw new Error('Sentry syntheticException'); - } - catch (exception) { - syntheticException = exception; - } - return callOnHub('captureException', exception, { - originalException: exception, - syntheticException: syntheticException, - }); -} -/** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @returns The generated eventId. - */ -export function captureMessage(message, level) { - var syntheticException; - try { - throw new Error(message); - } - catch (exception) { - syntheticException = exception; - } - return callOnHub('captureMessage', message, level, { - originalException: message, - syntheticException: syntheticException, - }); -} -/** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @returns The generated eventId. - */ -export function captureEvent(event) { - return callOnHub('captureEvent', event); -} -/** - * Callback to set context information onto the scope. - * @param callback Callback function that receives Scope. - */ -export function configureScope(callback) { - callOnHub('configureScope', callback); -} -/** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - */ -export function addBreadcrumb(breadcrumb) { - callOnHub('addBreadcrumb', breadcrumb); -} -/** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ -export function setContext(name, context) { - callOnHub('setContext', name, context); -} -/** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ -export function setExtras(extras) { - callOnHub('setExtras', extras); -} -/** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ -export function setTags(tags) { - callOnHub('setTags', tags); -} -/** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ -export function setExtra(key, extra) { - callOnHub('setExtra', key, extra); -} -/** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ -export function setTag(key, value) { - callOnHub('setTag', key, value); -} -/** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ -export function setUser(user) { - callOnHub('setUser', user); -} -/** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - * - * @param callback that will be enclosed into push/popScope. - */ -export function withScope(callback) { - callOnHub('withScope', callback); -} -/** - * Calls a function on the latest client. Use this with caution, it's meant as - * in "internal" helper so we don't need to expose every possible function in - * the shim. It is not guaranteed that the client actually implements the - * function. - * - * @param method The method to call on the client/client. - * @param args Arguments to pass to the client/fontend. - * @hidden - */ -export function _callOnClient(method) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - callOnHub.apply(void 0, tslib_1.__spread(['_invokeClient', method], args)); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/minimal/esm/index.js.map b/node_modules/@sentry/minimal/esm/index.js.map deleted file mode 100644 index c5de522..0000000 --- a/node_modules/@sentry/minimal/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,aAAa,CAAC;AAGxD;;;;GAIG;AACH,SAAS,SAAS,CAAI,MAAc;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAClD,IAAM,GAAG,GAAG,aAAa,EAAE,CAAC;IAC5B,IAAI,GAAG,IAAI,GAAG,CAAC,MAAmB,CAAC,EAAE;QACnC,yCAAyC;QACzC,OAAQ,GAAG,CAAC,MAAmB,CAAC,OAAxB,GAAG,mBAAiC,IAAI,GAAE;KACnD;IACD,MAAM,IAAI,KAAK,CAAC,uBAAqB,MAAM,yDAAsD,CAAC,CAAC;AACrG,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAc;IAC7C,IAAI,kBAAyB,CAAC;IAC9B,IAAI;QACF,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;KAC9C;IAAC,OAAO,SAAS,EAAE;QAClB,kBAAkB,GAAG,SAAkB,CAAC;KACzC;IACD,OAAO,SAAS,CAAC,kBAAkB,EAAE,SAAS,EAAE;QAC9C,iBAAiB,EAAE,SAAS;QAC5B,kBAAkB,oBAAA;KACnB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG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C,GAAW,EAAE,KAAa;IAC/C,SAAS,CAAO,QAAQ,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAiB;IACvC,SAAS,CAAO,SAAS,EAAE,IAAI,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,SAAS,CAAC,QAAgC;IACxD,SAAS,CAAO,WAAW,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAC1D,SAAS,iCAAO,eAAe,EAAE,MAAM,GAAK,IAAI,GAAE;AACpD,CAAC","sourcesContent":["import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport { Breadcrumb, Event, Severity, User } from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\nfunction callOnHub(method: string, ...args: any[]): T {\n const hub = getCurrentHub();\n if (hub && hub[method as keyof Hub]) {\n // tslint:disable-next-line:no-unsafe-any\n return (hub[method as keyof Hub] as any)(...args);\n }\n throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\nexport function captureException(exception: any): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException,\n });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, level?: Severity): string {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureMessage', message, level, {\n originalException: message,\n syntheticException,\n });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n callOnHub('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n callOnHub('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: { [key: string]: any }): void {\n callOnHub('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: string }): void {\n callOnHub('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n\nexport function setExtra(key: string, extra: any): void {\n callOnHub('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\nexport function setTag(key: string, value: string): void {\n callOnHub('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n callOnHub('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n callOnHub('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\nexport function _callOnClient(method: string, ...args: any[]): void {\n callOnHub('_invokeClient', method, ...args);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/minimal/package.json b/node_modules/@sentry/minimal/package.json deleted file mode 100644 index db14bf6..0000000 --- a/node_modules/@sentry/minimal/package.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "_args": [ - [ - "@sentry/minimal@5.14.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "@sentry/minimal@5.14.1", - "_id": "@sentry/minimal@5.14.1", - "_inBundle": false, - "_integrity": "sha1-PsdFA81ydy3lYYjwEKNdm8lW3JQ=", - "_location": "/@sentry/minimal", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@sentry/minimal@5.14.1", - "name": "@sentry/minimal", - "escapedName": "@sentry%2fminimal", - "scope": "@sentry", - "rawSpec": "5.14.1", - "saveSpec": null, - "fetchSpec": "5.14.1" - }, - "_requiredBy": [ - "/@sentry/apm", - "/@sentry/core" - ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/minimal/-/minimal-5.14.1.tgz", - "_spec": "5.14.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", - "author": { - "name": "Sentry" - }, - "bugs": { - "url": "https://github.com/getsentry/sentry-javascript/issues" - }, - "dependencies": { - "@sentry/hub": "5.14.1", - "@sentry/types": "5.14.1", - "tslib": "^1.9.3" - }, - "description": "Sentry minimal library that can be used in other packages", - "devDependencies": { - "jest": "^24.7.1", - "npm-run-all": "^4.1.2", - "prettier": "^1.17.0", - "prettier-check": "^2.0.0", - "rimraf": "^2.6.3", - "tslint": "^5.16.0", - "typescript": "^3.4.5" - }, - "engines": { - "node": ">=6" - }, - "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/minimal", - "jest": { - "collectCoverage": true, - "transform": { - "^.+\\.ts$": "ts-jest" - }, - "moduleFileExtensions": [ - "js", - "ts" - ], - "testEnvironment": "node", - "testMatch": [ - "**/*.test.ts" - ], - "globals": { - "ts-jest": { - "tsConfig": "./tsconfig.json", - "diagnostics": false - } - } - }, - "license": "BSD-3-Clause", - "main": "dist/index.js", - "module": "esm/index.js", - "name": "@sentry/minimal", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git://github.com/getsentry/sentry-javascript.git" - }, - "scripts": { - "build": "run-p build:es5 build:esm", - "build:es5": "tsc -p tsconfig.build.json", - "build:esm": "tsc -p tsconfig.esm.json", - "build:watch": "run-p build:watch:es5 build:watch:esm", - "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", - "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", - "clean": "rimraf dist coverage", - "fix": "run-s fix:tslint fix:prettier", - "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", - "fix:tslint": "tslint --fix -t stylish -p .", - "link:yarn": "yarn link", - "lint": "run-s lint:prettier lint:tslint", - "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", - "lint:tslint": "tslint -t stylish -p .", - "lint:tslint:json": "tslint --format json -p . | tee lint-results.json", - "test": "jest", - "test:watch": "jest --watch" - }, - "sideEffects": false, - "types": "dist/index.d.ts", - "version": "5.14.1" -} diff --git a/node_modules/@sentry/node/LICENSE b/node_modules/@sentry/node/LICENSE index 8b42db8..535ef05 100644 --- a/node_modules/@sentry/node/LICENSE +++ b/node_modules/@sentry/node/LICENSE @@ -1,29 +1,14 @@ -BSD 3-Clause License +Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. -Copyright (c) 2019, Sentry -All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. -* 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. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@sentry/node/README.md b/node_modules/@sentry/node/README.md index f59c831..e6ef857 100644 --- a/node_modules/@sentry/node/README.md +++ b/node_modules/@sentry/node/README.md @@ -1,8 +1,7 @@

- - + + Sentry -

# Official Sentry SDK for NodeJS @@ -10,7 +9,6 @@ [![npm version](https://img.shields.io/npm/v/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node) [![npm dm](https://img.shields.io/npm/dm/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node) [![npm dt](https://img.shields.io/npm/dt/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node) -[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/) ## Links diff --git a/node_modules/@sentry/node/dist/backend.d.ts b/node_modules/@sentry/node/dist/backend.d.ts deleted file mode 100644 index a8ccc67..0000000 --- a/node_modules/@sentry/node/dist/backend.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { BaseBackend } from '@sentry/core'; -import { Event, EventHint, Options, Severity, Transport } from '@sentry/types'; -/** - * Configuration options for the Sentry Node SDK. - * @see NodeClient for more information. - */ -export interface NodeOptions extends Options { - /** Callback that is executed when a fatal global error occurs. */ - onFatalError?(error: Error): void; - /** Sets an optional server name (device name) */ - serverName?: string; - /** Maximum time to wait to drain the request queue, before the process is allowed to exit. */ - shutdownTimeout?: number; - /** Set a HTTP proxy that should be used for outbound requests. */ - httpProxy?: string; - /** Set a HTTPS proxy that should be used for outbound requests. */ - httpsProxy?: string; - /** HTTPS proxy certificates path */ - caCerts?: string; - /** Sets the number of context lines for each frame when loading a file. */ - frameContextLines?: number; -} -/** - * The Sentry Node SDK Backend. - * @hidden - */ -export declare class NodeBackend extends BaseBackend { - /** - * @inheritDoc - */ - protected _setupTransport(): Transport; - /** - * @inheritDoc - */ - eventFromException(exception: any, hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike; -} -//# sourceMappingURL=backend.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/backend.d.ts.map b/node_modules/@sentry/node/dist/backend.d.ts.map deleted file mode 100644 index dfd7f8f..0000000 --- a/node_modules/@sentry/node/dist/backend.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAa,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAoB,MAAM,eAAe,CAAC;AAe5G;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO;IAC1C,kEAAkE;IAClE,YAAY,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAElC,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,8FAA8F;IAC9F,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,WAAW,CAAC,WAAW,CAAC;IACvD;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,SAAS;IAyBtC;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IA0C/E;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,QAAwB,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;CAyBhH"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/backend.js b/node_modules/@sentry/node/dist/backend.js deleted file mode 100644 index 6794e12..0000000 --- a/node_modules/@sentry/node/dist/backend.js +++ /dev/null @@ -1,106 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var parsers_1 = require("./parsers"); -var transports_1 = require("./transports"); -/** - * The Sentry Node SDK Backend. - * @hidden - */ -var NodeBackend = /** @class */ (function (_super) { - tslib_1.__extends(NodeBackend, _super); - function NodeBackend() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @inheritDoc - */ - NodeBackend.prototype._setupTransport = function () { - if (!this._options.dsn) { - // We return the noop transport here in case there is no Dsn. - return _super.prototype._setupTransport.call(this); - } - var dsn = new utils_1.Dsn(this._options.dsn); - var transportOptions = tslib_1.__assign({}, this._options.transportOptions, (this._options.httpProxy && { httpProxy: this._options.httpProxy }), (this._options.httpsProxy && { httpsProxy: this._options.httpsProxy }), (this._options.caCerts && { caCerts: this._options.caCerts }), { dsn: this._options.dsn }); - if (this._options.transport) { - return new this._options.transport(transportOptions); - } - if (dsn.protocol === 'http') { - return new transports_1.HTTPTransport(transportOptions); - } - return new transports_1.HTTPSTransport(transportOptions); - }; - /** - * @inheritDoc - */ - NodeBackend.prototype.eventFromException = function (exception, hint) { - var _this = this; - var ex = exception; - var mechanism = { - handled: true, - type: 'generic', - }; - if (!utils_1.isError(exception)) { - if (utils_1.isPlainObject(exception)) { - // This will allow us to group events based on top-level keys - // which is much better than creating new group when any key/value change - var message = "Non-Error exception captured with keys: " + utils_1.extractExceptionKeysForMessage(exception); - core_1.getCurrentHub().configureScope(function (scope) { - scope.setExtra('__serialized__', utils_1.normalizeToSize(exception)); - }); - ex = (hint && hint.syntheticException) || new Error(message); - ex.message = message; - } - else { - // This handles when someone does: `throw "something awesome";` - // We use synthesized Error here so we can extract a (rough) stack trace. - ex = (hint && hint.syntheticException) || new Error(exception); - } - mechanism.synthetic = true; - } - return new utils_1.SyncPromise(function (resolve, reject) { - return parsers_1.parseError(ex, _this._options) - .then(function (event) { - utils_1.addExceptionTypeValue(event, undefined, undefined); - utils_1.addExceptionMechanism(event, mechanism); - resolve(tslib_1.__assign({}, event, { event_id: hint && hint.event_id })); - }) - .then(null, reject); - }); - }; - /** - * @inheritDoc - */ - NodeBackend.prototype.eventFromMessage = function (message, level, hint) { - var _this = this; - if (level === void 0) { level = types_1.Severity.Info; } - var event = { - event_id: hint && hint.event_id, - level: level, - message: message, - }; - return new utils_1.SyncPromise(function (resolve) { - if (_this._options.attachStacktrace && hint && hint.syntheticException) { - var stack = hint.syntheticException ? parsers_1.extractStackFromError(hint.syntheticException) : []; - parsers_1.parseStack(stack, _this._options) - .then(function (frames) { - event.stacktrace = { - frames: parsers_1.prepareFramesForEvent(frames), - }; - resolve(event); - }) - .then(null, function () { - resolve(event); - }); - } - else { - resolve(event); - } - }); - }; - return NodeBackend; -}(core_1.BaseBackend)); -exports.NodeBackend = NodeBackend; -//# sourceMappingURL=backend.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/backend.js.map b/node_modules/@sentry/node/dist/backend.js.map deleted file mode 100644 index 81a6451..0000000 --- a/node_modules/@sentry/node/dist/backend.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":";;AAAA,qCAA0D;AAC1D,uCAA4G;AAC5G,uCASuB;AAEvB,qCAAiG;AACjG,2CAA6D;AA6B7D;;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AAgB;QAA1F,iBAwBC;QAxBwC,sBAAA,EAAA,QAAkB,gBAAQ,CAAC,IAAI;QACtE,IAAM,KAAK,GAAU;YACnB,QAAQ,EAAE,IAAI,IAAI,IAAI,CAAC,QAAQ;YAC/B,KAAK,OAAA;YACL,OAAO,SAAA;SACR,CAAC;QAEF,OAAO,IAAI,mBAAW,CAAQ,UAAA,OAAO;YACnC,IAAI,KAAI,CAAC,QAAQ,CAAC,gBAAgB,IAAI,IAAI,IAAI,IAAI,CAAC,kBAAkB,EAAE;gBACrE,IAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,+BAAqB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5F,oBAAU,CAAC,KAAK,EAAE,KAAI,CAAC,QAAQ,CAAC;qBAC7B,IAAI,CAAC,UAAA,MAAM;oBACV,KAAK,CAAC,UAAU,GAAG;wBACjB,MAAM,EAAE,+BAAqB,CAAC,MAAM,CAAC;qBACtC,CAAC;oBACF,OAAO,CAAC,KAAK,CAAC,CAAC;gBACjB,CAAC,CAAC;qBACD,IAAI,CAAC,IAAI,EAAE;oBACV,OAAO,CAAC,KAAK,CAAC,CAAC;gBACjB,CAAC,CAAC,CAAC;aACN;iBAAM;gBACL,OAAO,CAAC,KAAK,CAAC,CAAC;aAChB;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACH,kBAAC;AAAD,CAAC,AAtGD,CAAiC,kBAAW,GAsG3C;AAtGY,kCAAW","sourcesContent":["import { BaseBackend, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Mechanism, Options, Severity, Transport, TransportOptions } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n Dsn,\n extractExceptionKeysForMessage,\n isError,\n isPlainObject,\n normalizeToSize,\n SyncPromise,\n} from '@sentry/utils';\n\nimport { extractStackFromError, parseError, parseStack, prepareFramesForEvent } from './parsers';\nimport { HTTPSTransport, HTTPTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Node SDK.\n * @see NodeClient for more information.\n */\nexport interface NodeOptions extends Options {\n /** Callback that is executed when a fatal global error occurs. */\n onFatalError?(error: Error): void;\n\n /** Sets an optional server name (device name) */\n serverName?: string;\n\n /** Maximum time to wait to drain the request queue, before the process is allowed to exit. */\n shutdownTimeout?: number;\n\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n\n /** HTTPS proxy certificates path */\n caCerts?: string;\n\n /** Sets the number of context lines for each frame when loading a file. */\n frameContextLines?: number;\n}\n\n/**\n * The Sentry Node SDK Backend.\n * @hidden\n */\nexport class NodeBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const dsn = new Dsn(this._options.dsn);\n\n const transportOptions: TransportOptions = {\n ...this._options.transportOptions,\n ...(this._options.httpProxy && { httpProxy: this._options.httpProxy }),\n ...(this._options.httpsProxy && { httpsProxy: this._options.httpsProxy }),\n ...(this._options.caCerts && { caCerts: this._options.caCerts }),\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (dsn.protocol === 'http') {\n return new HTTPTransport(transportOptions);\n }\n return new HTTPSTransport(transportOptions);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n let ex: any = exception;\n const mechanism: Mechanism = {\n handled: true,\n type: 'generic',\n };\n\n if (!isError(exception)) {\n if (isPlainObject(exception)) {\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const message = `Non-Error exception captured with keys: ${extractExceptionKeysForMessage(exception)}`;\n\n getCurrentHub().configureScope(scope => {\n scope.setExtra('__serialized__', normalizeToSize(exception as {}));\n });\n\n ex = (hint && hint.syntheticException) || new Error(message);\n (ex as Error).message = message;\n } else {\n // This handles when someone does: `throw \"something awesome\";`\n // We use synthesized Error here so we can extract a (rough) stack trace.\n ex = (hint && hint.syntheticException) || new Error(exception as string);\n }\n mechanism.synthetic = true;\n }\n\n return new SyncPromise((resolve, reject) =>\n parseError(ex as Error, this._options)\n .then(event => {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, mechanism);\n\n resolve({\n ...event,\n event_id: hint && hint.event_id,\n });\n })\n .then(null, reject),\n );\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n const event: Event = {\n event_id: hint && hint.event_id,\n level,\n message,\n };\n\n return new SyncPromise(resolve => {\n if (this._options.attachStacktrace && hint && hint.syntheticException) {\n const stack = hint.syntheticException ? extractStackFromError(hint.syntheticException) : [];\n parseStack(stack, this._options)\n .then(frames => {\n event.stacktrace = {\n frames: prepareFramesForEvent(frames),\n };\n resolve(event);\n })\n .then(null, () => {\n resolve(event);\n });\n } else {\n resolve(event);\n }\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/client.d.ts b/node_modules/@sentry/node/dist/client.d.ts deleted file mode 100644 index d74a021..0000000 --- a/node_modules/@sentry/node/dist/client.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { BaseClient, Scope } from '@sentry/core'; -import { Event, EventHint } from '@sentry/types'; -import { NodeBackend, NodeOptions } from './backend'; -/** - * The Sentry Node SDK Client. - * - * @see NodeOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -export declare class NodeClient extends BaseClient { - /** - * Creates a new Node SDK instance. - * @param options Configuration options for this SDK. - */ - constructor(options: NodeOptions); - /** - * @inheritDoc - */ - protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike; -} -//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/client.d.ts.map b/node_modules/@sentry/node/dist/client.d.ts.map deleted file mode 100644 index 69a7302..0000000 --- a/node_modules/@sentry/node/dist/client.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGrD;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC;IAClE;;;OAGG;gBACgB,OAAO,EAAE,WAAW;IAIvC;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;CAqBlG"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/client.js b/node_modules/@sentry/node/dist/client.js deleted file mode 100644 index 97cdb9c..0000000 --- a/node_modules/@sentry/node/dist/client.js +++ /dev/null @@ -1,40 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var backend_1 = require("./backend"); -var version_1 = require("./version"); -/** - * The Sentry Node SDK Client. - * - * @see NodeOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -var NodeClient = /** @class */ (function (_super) { - tslib_1.__extends(NodeClient, _super); - /** - * Creates a new Node SDK instance. - * @param options Configuration options for this SDK. - */ - function NodeClient(options) { - return _super.call(this, backend_1.NodeBackend, options) || this; - } - /** - * @inheritDoc - */ - NodeClient.prototype._prepareEvent = function (event, scope, hint) { - event.platform = event.platform || 'node'; - event.sdk = tslib_1.__assign({}, event.sdk, { name: version_1.SDK_NAME, packages: tslib_1.__spread(((event.sdk && event.sdk.packages) || []), [ - { - name: 'npm:@sentry/node', - version: version_1.SDK_VERSION, - }, - ]), version: version_1.SDK_VERSION }); - if (this.getOptions().serverName) { - event.server_name = this.getOptions().serverName; - } - return _super.prototype._prepareEvent.call(this, event, scope, hint); - }; - return NodeClient; -}(core_1.BaseClient)); -exports.NodeClient = NodeClient; -//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/client.js.map b/node_modules/@sentry/node/dist/client.js.map deleted file mode 100644 index c2854ec..0000000 --- a/node_modules/@sentry/node/dist/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;AAAA,qCAAiD;AAGjD,qCAAqD;AACrD,qCAAkD;AAElD;;;;;GAKG;AACH;IAAgC,sCAAoC;IAClE;;;OAGG;IACH,oBAAmB,OAAoB;eACrC,kBAAM,qBAAW,EAAE,OAAO,CAAC;IAC7B,CAAC;IAED;;OAEG;IACO,kCAAa,GAAvB,UAAwB,KAAY,EAAE,KAAa,EAAE,IAAgB;QACnE,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAC;QAC1C,KAAK,CAAC,GAAG,wBACJ,KAAK,CAAC,GAAG,IACZ,IAAI,EAAE,kBAAQ,EACd,QAAQ,mBACH,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAC5C;oBACE,IAAI,EAAE,kBAAkB;oBACxB,OAAO,EAAE,qBAAW;iBACrB;gBAEH,OAAO,EAAE,qBAAW,GACrB,CAAC;QAEF,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE;YAChC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC;SAClD;QAED,OAAO,iBAAM,aAAa,YAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IACH,iBAAC;AAAD,CAAC,AAjCD,CAAgC,iBAAU,GAiCzC;AAjCY,gCAAU","sourcesContent":["import { BaseClient, Scope } from '@sentry/core';\nimport { Event, EventHint } from '@sentry/types';\n\nimport { NodeBackend, NodeOptions } from './backend';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * The Sentry Node SDK Client.\n *\n * @see NodeOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class NodeClient extends BaseClient {\n /**\n * Creates a new Node SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: NodeOptions) {\n super(NodeBackend, options);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'node';\n event.sdk = {\n ...event.sdk,\n name: SDK_NAME,\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/node',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n if (this.getOptions().serverName) {\n event.server_name = this.getOptions().serverName;\n }\n\n return super._prepareEvent(event, scope, hint);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/handlers.d.ts b/node_modules/@sentry/node/dist/handlers.d.ts deleted file mode 100644 index 31d3403..0000000 --- a/node_modules/@sentry/node/dist/handlers.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/// -import { Event } from '@sentry/types'; -import * as http from 'http'; -/** - * Express compatible tracing handler. - * @see Exposed as `Handlers.tracingHandler` - */ -export declare function tracingHandler(): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void; -declare type TransactionTypes = 'path' | 'methodPath' | 'handler'; -/** - * Options deciding what parts of the request to use when enhancing an event - */ -interface ParseRequestOptions { - ip?: boolean; - request?: boolean | string[]; - serverName?: boolean; - transaction?: boolean | TransactionTypes; - user?: boolean | string[]; - version?: boolean; -} -/** - * Enriches passed event with request data. - * - * @param event Will be mutated and enriched with req data - * @param req Request object - * @param options object containing flags to enable functionality - * @hidden - */ -export declare function parseRequest(event: Event, req: { - [key: string]: any; - user?: { - [key: string]: any; - }; - ip?: string; - connection?: { - remoteAddress?: string; - }; -}, options?: ParseRequestOptions): Event; -/** - * Express compatible request handler. - * @see Exposed as `Handlers.requestHandler` - */ -export declare function requestHandler(options?: ParseRequestOptions & { - flushTimeout?: number; -}): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void; -/** JSDoc */ -interface MiddlewareError extends Error { - status?: number | string; - statusCode?: number | string; - status_code?: number | string; - output?: { - statusCode?: number | string; - }; -} -/** - * Express compatible error handler. - * @see Exposed as `Handlers.errorHandler` - */ -export declare function errorHandler(options?: { - /** - * Callback method deciding whether error should be captured and sent to Sentry - * @param error Captured middleware error - */ - shouldHandleError?(error: MiddlewareError): boolean; -}): (error: MiddlewareError, req: http.IncomingMessage, res: http.ServerResponse, next: (error: MiddlewareError) => void) => void; -/** - * @hidden - */ -export declare function logAndExitProcess(error: Error): void; -export {}; -//# sourceMappingURL=handlers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/handlers.d.ts.map b/node_modules/@sentry/node/dist/handlers.d.ts.map deleted file mode 100644 index 95d21d9..0000000 --- a/node_modules/@sentry/node/dist/handlers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAItC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAS7B;;;GAGG;AACH,wBAAgB,cAAc,IAAI,CAChC,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,KACxB,IAAI,CAyBR;AAED,aAAK,gBAAgB,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,CAA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;CACH;AAcD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE;IACrC;;;OAGG;IACH,iBAAiB,CAAC,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;CACrD,GAAG,CACF,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,KACnC,IAAI,CAyBR;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAuBpD"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/handlers.js b/node_modules/@sentry/node/dist/handlers.js deleted file mode 100644 index 4839ac4..0000000 --- a/node_modules/@sentry/node/dist/handlers.js +++ /dev/null @@ -1,281 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var apm_1 = require("@sentry/apm"); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var cookie = require("cookie"); -var domain = require("domain"); -var os = require("os"); -var url = require("url"); -var sdk_1 = require("./sdk"); -var DEFAULT_SHUTDOWN_TIMEOUT = 2000; -/** - * Express compatible tracing handler. - * @see Exposed as `Handlers.tracingHandler` - */ -function tracingHandler() { - return function sentryTracingMiddleware(req, res, next) { - // TODO: At this point req.route.path we use in `extractTransaction` is not available - // but `req.path` or `req.url` should do the job as well. We could unify this here. - var reqMethod = (req.method || '').toUpperCase(); - var reqUrl = req.url; - var hub = core_1.getCurrentHub(); - var transaction = hub.startSpan({ - transaction: reqMethod + "|" + reqUrl, - }); - hub.configureScope(function (scope) { - scope.setSpan(transaction); - }); - res.once('finish', function () { - transaction.setHttpStatus(res.statusCode); - transaction.finish(); - }); - next(); - }; -} -exports.tracingHandler = tracingHandler; -/** JSDoc */ -function extractTransaction(req, type) { - try { - // Express.js shape - var request = req; - switch (type) { - case 'path': { - return request.route.path; - } - case 'handler': { - return request.route.stack[0].name; - } - case 'methodPath': - default: { - var method = request.method.toUpperCase(); - var path = request.route.path; - return method + "|" + path; - } - } - } - catch (_oO) { - return undefined; - } -} -/** Default request keys that'll be used to extract data from the request */ -var DEFAULT_REQUEST_KEYS = ['cookies', 'data', 'headers', 'method', 'query_string', 'url']; -/** JSDoc */ -function extractRequestData(req, keys) { - var request = {}; - var attributes = Array.isArray(keys) ? keys : DEFAULT_REQUEST_KEYS; - // headers: - // node, express: req.headers - // koa: req.header - var headers = (req.headers || req.header || {}); - // method: - // node, express, koa: req.method - var method = req.method; - // host: - // express: req.hostname in > 4 and req.host in < 4 - // koa: req.host - // node: req.headers.host - var host = req.hostname || req.host || headers.host || ''; - // protocol: - // node: - // express, koa: req.protocol - var protocol = req.protocol === 'https' || req.secure || (req.socket || {}).encrypted - ? 'https' - : 'http'; - // url (including path and query string): - // node, express: req.originalUrl - // koa: req.url - var originalUrl = (req.originalUrl || req.url); - // absolute url - var absoluteUrl = protocol + "://" + host + originalUrl; - attributes.forEach(function (key) { - switch (key) { - case 'headers': - request.headers = headers; - break; - case 'method': - request.method = method; - break; - case 'url': - request.url = absoluteUrl; - break; - case 'cookies': - // cookies: - // node, express, koa: req.headers.cookie - request.cookies = cookie.parse(headers.cookie || ''); - break; - case 'query_string': - // query string: - // node: req.url (raw) - // express, koa: req.query - request.query_string = url.parse(originalUrl || '', false).query; - break; - case 'data': - // body data: - // node, express, koa: req.body - var data = req.body; - if (method === 'GET' || method === 'HEAD') { - if (typeof data === 'undefined') { - data = ''; - } - } - if (data && !utils_1.isString(data)) { - // Make sure the request body is a string - data = JSON.stringify(utils_1.normalize(data)); - } - request.data = data; - break; - default: - if ({}.hasOwnProperty.call(req, key)) { - request[key] = req[key]; - } - } - }); - return request; -} -/** Default user keys that'll be used to extract data from the request */ -var DEFAULT_USER_KEYS = ['id', 'username', 'email']; -/** JSDoc */ -function extractUserData(user, keys) { - var extractedUser = {}; - var attributes = Array.isArray(keys) ? keys : DEFAULT_USER_KEYS; - attributes.forEach(function (key) { - if (user && key in user) { - extractedUser[key] = user[key]; - } - }); - return extractedUser; -} -/** - * Enriches passed event with request data. - * - * @param event Will be mutated and enriched with req data - * @param req Request object - * @param options object containing flags to enable functionality - * @hidden - */ -function parseRequest(event, req, options) { - // tslint:disable-next-line:no-parameter-reassignment - options = tslib_1.__assign({ ip: false, request: true, serverName: true, transaction: true, user: true, version: true }, options); - if (options.version) { - event.extra = tslib_1.__assign({}, event.extra, { node: global.process.version }); - } - if (options.request) { - event.request = tslib_1.__assign({}, event.request, extractRequestData(req, options.request)); - } - if (options.serverName && !event.server_name) { - event.server_name = global.process.env.SENTRY_NAME || os.hostname(); - } - if (options.user) { - var extractedUser = req.user ? extractUserData(req.user, options.user) : {}; - if (Object.keys(extractedUser)) { - event.user = tslib_1.__assign({}, event.user, extractedUser); - } - } - // client ip: - // node: req.connection.remoteAddress - // express, koa: req.ip - if (options.ip) { - var ip = req.ip || (req.connection && req.connection.remoteAddress); - if (ip) { - event.user = tslib_1.__assign({}, event.user, { ip_address: ip }); - } - } - if (options.transaction && !event.transaction) { - var transaction = extractTransaction(req, options.transaction); - if (transaction) { - event.transaction = transaction; - } - } - return event; -} -exports.parseRequest = parseRequest; -/** - * Express compatible request handler. - * @see Exposed as `Handlers.requestHandler` - */ -function requestHandler(options) { - return function sentryRequestMiddleware(req, res, next) { - if (options && options.flushTimeout && options.flushTimeout > 0) { - // tslint:disable-next-line: no-unbound-method - var _end_1 = res.end; - res.end = function (chunk, encoding, cb) { - var _this = this; - sdk_1.flush(options.flushTimeout) - .then(function () { - _end_1.call(_this, chunk, encoding, cb); - }) - .then(null, function (e) { - utils_1.logger.error(e); - }); - }; - } - var local = domain.create(); - local.add(req); - local.add(res); - local.on('error', next); - local.run(function () { - core_1.getCurrentHub().configureScope(function (scope) { - return scope.addEventProcessor(function (event) { return parseRequest(event, req, options); }); - }); - next(); - }); - }; -} -exports.requestHandler = requestHandler; -/** JSDoc */ -function getStatusCodeFromResponse(error) { - var statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode); - return statusCode ? parseInt(statusCode, 10) : 500; -} -/** Returns true if response code is internal server error */ -function defaultShouldHandleError(error) { - var status = getStatusCodeFromResponse(error); - return status >= 500; -} -/** - * Express compatible error handler. - * @see Exposed as `Handlers.errorHandler` - */ -function errorHandler(options) { - return function sentryErrorMiddleware(error, req, res, next) { - var shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError; - if (shouldHandleError(error)) { - core_1.withScope(function (scope) { - if (req.headers && utils_1.isString(req.headers['sentry-trace'])) { - var span = apm_1.Span.fromTraceparent(req.headers['sentry-trace']); - scope.setSpan(span); - } - var eventId = core_1.captureException(error); - res.sentry = eventId; - next(error); - }); - return; - } - next(error); - }; -} -exports.errorHandler = errorHandler; -/** - * @hidden - */ -function logAndExitProcess(error) { - console.error(error && error.stack ? error.stack : error); - var client = core_1.getCurrentHub().getClient(); - if (client === undefined) { - utils_1.logger.warn('No NodeClient was defined, we are exiting the process now.'); - global.process.exit(1); - return; - } - var options = client.getOptions(); - var timeout = (options && options.shutdownTimeout && options.shutdownTimeout > 0 && options.shutdownTimeout) || - DEFAULT_SHUTDOWN_TIMEOUT; - utils_1.forget(client.close(timeout).then(function (result) { - if (!result) { - utils_1.logger.warn('We reached the timeout for emptying the request buffer, still exiting now!'); - } - global.process.exit(1); - })); -} -exports.logAndExitProcess = logAndExitProcess; -//# sourceMappingURL=handlers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/handlers.js.map b/node_modules/@sentry/node/dist/handlers.js.map deleted file mode 100644 index 893400c..0000000 --- a/node_modules/@sentry/node/dist/handlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":";;AAAA,mCAAmC;AACnC,qCAA0E;AAE1E,uCAAoE;AACpE,+BAAiC;AACjC,+BAAiC;AAEjC,uBAAyB;AACzB,y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,CAAC,KAAY;IAC5C,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAE1D,IAAM,MAAM,GAAG,oBAAa,EAAE,CAAC,SAAS,EAAc,CAAC;IAEvD,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,cAAM,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;QAC1E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACvB,OAAO;KACR;IAED,IAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IACpC,IAAM,OAAO,GACX,CAAC,OAAO,IAAI,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,eAAe,GAAG,CAAC,IAAI,OAAO,CAAC,eAAe,CAAC;QAC9F,wBAAwB,CAAC;IAC3B,cAAM,CACJ,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,MAAe;QACzC,IAAI,CAAC,MAAM,EAAE;YACX,cAAM,CAAC,IAAI,CAAC,4EAA4E,CAAC,CAAC;SAC3F;QACD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAvBD,8CAuBC","sourcesContent":["import { Span } from '@sentry/apm';\nimport { captureException, getCurrentHub, withScope } from '@sentry/core';\nimport { Event } from '@sentry/types';\nimport { forget, isString, logger, normalize } from '@sentry/utils';\nimport * as cookie from 'cookie';\nimport * as domain from 'domain';\nimport * as http from 'http';\nimport * as os from 'os';\nimport * as url from 'url';\n\nimport { NodeClient } from './client';\nimport { flush } from './sdk';\n\nconst DEFAULT_SHUTDOWN_TIMEOUT = 2000;\n\n/**\n * Express compatible tracing handler.\n * @see Exposed as `Handlers.tracingHandler`\n */\nexport function tracingHandler(): (\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n) => void {\n return function sentryTracingMiddleware(\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n ): void {\n // TODO: At this point req.route.path we use in `extractTransaction` is not available\n // but `req.path` or `req.url` should do the job as well. We could unify this here.\n const reqMethod = (req.method || '').toUpperCase();\n const reqUrl = req.url;\n\n const hub = getCurrentHub();\n const transaction = hub.startSpan({\n transaction: `${reqMethod}|${reqUrl}`,\n });\n hub.configureScope(scope => {\n scope.setSpan(transaction);\n });\n res.once('finish', () => {\n transaction.setHttpStatus(res.statusCode);\n transaction.finish();\n });\n\n next();\n };\n}\n\ntype TransactionTypes = 'path' | 'methodPath' | 'handler';\n\n/** JSDoc */\nfunction extractTransaction(req: { [key: string]: any }, type: boolean | TransactionTypes): string | undefined {\n try {\n // Express.js shape\n const request = req as {\n method: string;\n route: {\n path: string;\n stack: [\n {\n name: string;\n }\n ];\n };\n };\n\n switch (type) {\n case 'path': {\n return request.route.path;\n }\n case 'handler': {\n return request.route.stack[0].name;\n }\n case 'methodPath':\n default: {\n const method = request.method.toUpperCase();\n const path = request.route.path;\n return `${method}|${path}`;\n }\n }\n } catch (_oO) {\n return undefined;\n }\n}\n\n/** Default request keys that'll be used to extract data from the request */\nconst DEFAULT_REQUEST_KEYS = ['cookies', 'data', 'headers', 'method', 'query_string', 'url'];\n\n/** JSDoc */\nfunction extractRequestData(req: { [key: string]: any }, keys: boolean | string[]): { [key: string]: string } {\n const request: { [key: string]: any } = {};\n const attributes = Array.isArray(keys) ? keys : DEFAULT_REQUEST_KEYS;\n\n // headers:\n // node, express: req.headers\n // koa: req.header\n const headers = (req.headers || req.header || {}) as {\n host?: string;\n cookie?: string;\n };\n // method:\n // node, express, koa: req.method\n const method = req.method;\n // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node: req.headers.host\n const host = req.hostname || req.host || headers.host || '';\n // protocol:\n // node: \n // express, koa: req.protocol\n const protocol =\n req.protocol === 'https' || req.secure || ((req.socket || {}) as { encrypted?: boolean }).encrypted\n ? 'https'\n : 'http';\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa: req.url\n const originalUrl = (req.originalUrl || req.url) as string;\n // absolute url\n const absoluteUrl = `${protocol}://${host}${originalUrl}`;\n\n attributes.forEach(key => {\n switch (key) {\n case 'headers':\n request.headers = headers;\n break;\n case 'method':\n request.method = method;\n break;\n case 'url':\n request.url = absoluteUrl;\n break;\n case 'cookies':\n // cookies:\n // node, express, koa: req.headers.cookie\n request.cookies = cookie.parse(headers.cookie || '');\n break;\n case 'query_string':\n // query string:\n // node: req.url (raw)\n // express, koa: req.query\n request.query_string = url.parse(originalUrl || '', false).query;\n break;\n case 'data':\n // body data:\n // node, express, koa: req.body\n let data = req.body;\n if (method === 'GET' || method === 'HEAD') {\n if (typeof data === 'undefined') {\n data = '';\n }\n }\n if (data && !isString(data)) {\n // Make sure the request body is a string\n data = JSON.stringify(normalize(data));\n }\n request.data = data;\n break;\n default:\n if ({}.hasOwnProperty.call(req, key)) {\n request[key] = (req as { [key: string]: any })[key];\n }\n }\n });\n\n return request;\n}\n\n/** Default user keys that'll be used to extract data from the request */\nconst DEFAULT_USER_KEYS = ['id', 'username', 'email'];\n\n/** JSDoc */\nfunction extractUserData(\n user: {\n [key: string]: any;\n },\n keys: boolean | string[],\n): { [key: string]: any } {\n const extractedUser: { [key: string]: any } = {};\n const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_KEYS;\n\n attributes.forEach(key => {\n if (user && key in user) {\n extractedUser[key] = user[key];\n }\n });\n\n return extractedUser;\n}\n\n/**\n * Options deciding what parts of the request to use when enhancing an event\n */\ninterface ParseRequestOptions {\n ip?: boolean;\n request?: boolean | string[];\n serverName?: boolean;\n transaction?: boolean | TransactionTypes;\n user?: boolean | string[];\n version?: boolean;\n}\n\n/**\n * Enriches passed event with request data.\n *\n * @param event Will be mutated and enriched with req data\n * @param req Request object\n * @param options object containing flags to enable functionality\n * @hidden\n */\nexport function parseRequest(\n event: Event,\n req: {\n [key: string]: any;\n user?: {\n [key: string]: any;\n };\n ip?: string;\n connection?: {\n remoteAddress?: string;\n };\n },\n options?: ParseRequestOptions,\n): Event {\n // tslint:disable-next-line:no-parameter-reassignment\n options = {\n ip: false,\n request: true,\n serverName: true,\n transaction: true,\n user: true,\n version: true,\n ...options,\n };\n\n if (options.version) {\n event.extra = {\n ...event.extra,\n node: global.process.version,\n };\n }\n\n if (options.request) {\n event.request = {\n ...event.request,\n ...extractRequestData(req, options.request),\n };\n }\n\n if (options.serverName && !event.server_name) {\n event.server_name = global.process.env.SENTRY_NAME || os.hostname();\n }\n\n if (options.user) {\n const extractedUser = req.user ? extractUserData(req.user, options.user) : {};\n\n if (Object.keys(extractedUser)) {\n event.user = {\n ...event.user,\n ...extractedUser,\n };\n }\n }\n\n // client ip:\n // node: req.connection.remoteAddress\n // express, koa: req.ip\n if (options.ip) {\n const ip = req.ip || (req.connection && req.connection.remoteAddress);\n if (ip) {\n event.user = {\n ...event.user,\n ip_address: ip,\n };\n }\n }\n\n if (options.transaction && !event.transaction) {\n const transaction = extractTransaction(req, options.transaction);\n if (transaction) {\n event.transaction = transaction;\n }\n }\n\n return event;\n}\n\n/**\n * Express compatible request handler.\n * @see Exposed as `Handlers.requestHandler`\n */\nexport function requestHandler(\n options?: ParseRequestOptions & {\n flushTimeout?: number;\n },\n): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void {\n return function sentryRequestMiddleware(\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n ): void {\n if (options && options.flushTimeout && options.flushTimeout > 0) {\n // tslint:disable-next-line: no-unbound-method\n const _end = res.end;\n res.end = function(chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): void {\n flush(options.flushTimeout)\n .then(() => {\n _end.call(this, chunk, encoding, cb);\n })\n .then(null, e => {\n logger.error(e);\n });\n };\n }\n const local = domain.create();\n local.add(req);\n local.add(res);\n local.on('error', next);\n local.run(() => {\n getCurrentHub().configureScope(scope =>\n scope.addEventProcessor((event: Event) => parseRequest(event, req, options)),\n );\n next();\n });\n };\n}\n\n/** JSDoc */\ninterface MiddlewareError extends Error {\n status?: number | string;\n statusCode?: number | string;\n status_code?: number | string;\n output?: {\n statusCode?: number | string;\n };\n}\n\n/** JSDoc */\nfunction getStatusCodeFromResponse(error: MiddlewareError): number {\n const statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode);\n return statusCode ? parseInt(statusCode as string, 10) : 500;\n}\n\n/** Returns true if response code is internal server error */\nfunction defaultShouldHandleError(error: MiddlewareError): boolean {\n const status = getStatusCodeFromResponse(error);\n return status >= 500;\n}\n\n/**\n * Express compatible error handler.\n * @see Exposed as `Handlers.errorHandler`\n */\nexport function errorHandler(options?: {\n /**\n * Callback method deciding whether error should be captured and sent to Sentry\n * @param error Captured middleware error\n */\n shouldHandleError?(error: MiddlewareError): boolean;\n}): (\n error: MiddlewareError,\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error: MiddlewareError) => void,\n) => void {\n return function sentryErrorMiddleware(\n error: MiddlewareError,\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error: MiddlewareError) => void,\n ): void {\n const shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError;\n\n if (shouldHandleError(error)) {\n withScope(scope => {\n if (req.headers && isString(req.headers['sentry-trace'])) {\n const span = Span.fromTraceparent(req.headers['sentry-trace'] as string);\n scope.setSpan(span);\n }\n const eventId = captureException(error);\n (res as any).sentry = eventId;\n next(error);\n });\n\n return;\n }\n\n next(error);\n };\n}\n\n/**\n * @hidden\n */\nexport function logAndExitProcess(error: Error): void {\n console.error(error && error.stack ? error.stack : error);\n\n const client = getCurrentHub().getClient();\n\n if (client === undefined) {\n logger.warn('No NodeClient was defined, we are exiting the process now.');\n global.process.exit(1);\n return;\n }\n\n const options = client.getOptions();\n const timeout =\n (options && options.shutdownTimeout && options.shutdownTimeout > 0 && options.shutdownTimeout) ||\n DEFAULT_SHUTDOWN_TIMEOUT;\n forget(\n client.close(timeout).then((result: boolean) => {\n if (!result) {\n logger.warn('We reached the timeout for emptying the request buffer, still exiting now!');\n }\n global.process.exit(1);\n }),\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/index.d.ts b/node_modules/@sentry/node/dist/index.d.ts deleted file mode 100644 index 61f2395..0000000 --- a/node_modules/@sentry/node/dist/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export { Breadcrumb, Request, SdkInfo, Event, Exception, Response, Severity, StackFrame, Stacktrace, Status, Thread, User, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/core'; -export { NodeOptions } from './backend'; -export { NodeClient } from './client'; -export { defaultIntegrations, init, lastEventId, flush, close } from './sdk'; -export { SDK_NAME, SDK_VERSION } from './version'; -import { Integrations as CoreIntegrations } from '@sentry/core'; -import * as Handlers from './handlers'; -import * as NodeIntegrations from './integrations'; -import * as Transports from './transports'; -declare const INTEGRATIONS: { - Console: typeof NodeIntegrations.Console; - Http: typeof NodeIntegrations.Http; - OnUncaughtException: typeof NodeIntegrations.OnUncaughtException; - OnUnhandledRejection: typeof NodeIntegrations.OnUnhandledRejection; - LinkedErrors: typeof NodeIntegrations.LinkedErrors; - Modules: typeof NodeIntegrations.Modules; - FunctionToString: typeof CoreIntegrations.FunctionToString; - InboundFilters: typeof CoreIntegrations.InboundFilters; -}; -export { INTEGRATIONS as Integrations, Transports, Handlers }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/index.d.ts.map b/node_modules/@sentry/node/dist/index.d.ts.map deleted file mode 100644 index a65a4a6..0000000 --- a/node_modules/@sentry/node/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,gBAAgB,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,QAAA,MAAM,YAAY;;;;;;;;;CAGjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/index.js b/node_modules/@sentry/node/dist/index.js deleted file mode 100644 index 9916e5a..0000000 --- a/node_modules/@sentry/node/dist/index.js +++ /dev/null @@ -1,43 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var types_1 = require("@sentry/types"); -exports.Severity = types_1.Severity; -exports.Status = types_1.Status; -var core_1 = require("@sentry/core"); -exports.addGlobalEventProcessor = core_1.addGlobalEventProcessor; -exports.addBreadcrumb = core_1.addBreadcrumb; -exports.captureException = core_1.captureException; -exports.captureEvent = core_1.captureEvent; -exports.captureMessage = core_1.captureMessage; -exports.configureScope = core_1.configureScope; -exports.getHubFromCarrier = core_1.getHubFromCarrier; -exports.getCurrentHub = core_1.getCurrentHub; -exports.Hub = core_1.Hub; -exports.Scope = core_1.Scope; -exports.setContext = core_1.setContext; -exports.setExtra = core_1.setExtra; -exports.setExtras = core_1.setExtras; -exports.setTag = core_1.setTag; -exports.setTags = core_1.setTags; -exports.setUser = core_1.setUser; -exports.withScope = core_1.withScope; -var client_1 = require("./client"); -exports.NodeClient = client_1.NodeClient; -var sdk_1 = require("./sdk"); -exports.defaultIntegrations = sdk_1.defaultIntegrations; -exports.init = sdk_1.init; -exports.lastEventId = sdk_1.lastEventId; -exports.flush = sdk_1.flush; -exports.close = sdk_1.close; -var version_1 = require("./version"); -exports.SDK_NAME = version_1.SDK_NAME; -exports.SDK_VERSION = version_1.SDK_VERSION; -var core_2 = require("@sentry/core"); -var Handlers = require("./handlers"); -exports.Handlers = Handlers; -var NodeIntegrations = require("./integrations"); -var Transports = require("./transports"); -exports.Transports = Transports; -var INTEGRATIONS = tslib_1.__assign({}, core_2.Integrations, NodeIntegrations); -exports.Integrations = INTEGRATIONS; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/index.js.map b/node_modules/@sentry/node/dist/index.js.map deleted file mode 100644 index b2e9486..0000000 --- a/node_modules/@sentry/node/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,uCAauB;AANrB,2BAAA,QAAQ,CAAA;AAGR,yBAAA,MAAM,CAAA;AAKR,qCAkBsB;AAjBpB,yCAAA,uBAAuB,CAAA;AACvB,+BAAA,aAAa,CAAA;AACb,kCAAA,gBAAgB,CAAA;AAChB,8BAAA,YAAY,CAAA;AACZ,gCAAA,cAAc,CAAA;AACd,gCAAA,cAAc,CAAA;AACd,mCAAA,iBAAiB,CAAA;AACjB,+BAAA,aAAa,CAAA;AACb,qBAAA,GAAG,CAAA;AACH,uBAAA,KAAK,CAAA;AACL,4BAAA,UAAU,CAAA;AACV,0BAAA,QAAQ,CAAA;AACR,2BAAA,SAAS,CAAA;AACT,wBAAA,MAAM,CAAA;AACN,yBAAA,OAAO,CAAA;AACP,yBAAA,OAAO,CAAA;AACP,2BAAA,SAAS,CAAA;AAIX,mCAAsC;AAA7B,8BAAA,UAAU,CAAA;AACnB,6BAA6E;AAApE,oCAAA,mBAAmB,CAAA;AAAE,qBAAA,IAAI,CAAA;AAAE,4BAAA,WAAW,CAAA;AAAE,sBAAA,KAAK,CAAA;AAAE,sBAAA,KAAK,CAAA;AAC7D,qCAAkD;AAAzC,6BAAA,QAAQ,CAAA;AAAE,gCAAA,WAAW,CAAA;AAE9B,qCAAgE;AAEhE,qCAAuC;AASY,4BAAQ;AAR3D,iDAAmD;AACnD,yCAA2C;AAOJ,gCAAU;AALjD,IAAM,YAAY,wBACb,mBAAgB,EAChB,gBAAgB,CACpB,CAAC;AAEuB,oCAAY","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n Response,\n Severity,\n StackFrame,\n Stacktrace,\n Status,\n Thread,\n User,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from '@sentry/core';\n\nexport { NodeOptions } from './backend';\nexport { NodeClient } from './client';\nexport { defaultIntegrations, init, lastEventId, flush, close } from './sdk';\nexport { SDK_NAME, SDK_VERSION } from './version';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\n\nimport * as Handlers from './handlers';\nimport * as NodeIntegrations from './integrations';\nimport * as Transports from './transports';\n\nconst INTEGRATIONS = {\n ...CoreIntegrations,\n ...NodeIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports, Handlers };\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/console.d.ts b/node_modules/@sentry/node/dist/integrations/console.d.ts deleted file mode 100644 index a3d96ee..0000000 --- a/node_modules/@sentry/node/dist/integrations/console.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Console module integration */ -export declare class Console implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - setupOnce(): void; -} -//# sourceMappingURL=console.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/console.d.ts.map b/node_modules/@sentry/node/dist/integrations/console.d.ts.map deleted file mode 100644 index 04ebc91..0000000 --- a/node_modules/@sentry/node/dist/integrations/console.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../src/integrations/console.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAY,MAAM,eAAe,CAAC;AAItD,iCAAiC;AACjC,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IACjC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACI,SAAS,IAAI,IAAI;CAMzB"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/console.js b/node_modules/@sentry/node/dist/integrations/console.js deleted file mode 100644 index 1744064..0000000 --- a/node_modules/@sentry/node/dist/integrations/console.js +++ /dev/null @@ -1,79 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var util = require("util"); -/** Console module integration */ -var Console = /** @class */ (function () { - function Console() { - /** - * @inheritDoc - */ - this.name = Console.id; - } - /** - * @inheritDoc - */ - Console.prototype.setupOnce = function () { - var e_1, _a; - var consoleModule = require('console'); - try { - for (var _b = tslib_1.__values(['debug', 'info', 'warn', 'error', 'log']), _c = _b.next(); !_c.done; _c = _b.next()) { - var level = _c.value; - utils_1.fill(consoleModule, level, createConsoleWrapper(level)); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - }; - /** - * @inheritDoc - */ - Console.id = 'Console'; - return Console; -}()); -exports.Console = Console; -/** - * Wrapper function that'll be used for every console level - */ -function createConsoleWrapper(level) { - return function consoleWrapper(originalConsoleMethod) { - var sentryLevel; - switch (level) { - case 'debug': - sentryLevel = types_1.Severity.Debug; - break; - case 'error': - sentryLevel = types_1.Severity.Error; - break; - case 'info': - sentryLevel = types_1.Severity.Info; - break; - case 'warn': - sentryLevel = types_1.Severity.Warning; - break; - default: - sentryLevel = types_1.Severity.Log; - } - return function () { - if (core_1.getCurrentHub().getIntegration(Console)) { - core_1.getCurrentHub().addBreadcrumb({ - category: 'console', - level: sentryLevel, - message: util.format.apply(undefined, arguments), - }, { - input: tslib_1.__spread(arguments), - level: level, - }); - } - originalConsoleMethod.apply(this, arguments); - }; - }; -} -//# sourceMappingURL=console.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/console.js.map b/node_modules/@sentry/node/dist/integrations/console.js.map deleted file mode 100644 index 03e989e..0000000 --- a/node_modules/@sentry/node/dist/integrations/console.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"console.js","sourceRoot":"","sources":["../../src/integrations/console.ts"],"names":[],"mappings":";;AAAA,qCAA6C;AAC7C,uCAAsD;AACtD,uCAAqC;AACrC,2BAA6B;AAE7B,iCAAiC;AACjC;IAAA;QACE;;WAEG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ACD;oBACE,KAAK,mBAAM,SAAS,CAAC;oBACrB,KAAK,OAAA;iBACN,CACF,CAAC;aACH;YAED,qBAAqB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC/C,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport { fill } from '@sentry/utils';\nimport * as util from 'util';\n\n/** Console module integration */\nexport class Console implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Console.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'Console';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n const consoleModule = require('console');\n for (const level of ['debug', 'info', 'warn', 'error', 'log']) {\n fill(consoleModule, level, createConsoleWrapper(level));\n }\n }\n}\n\n/**\n * Wrapper function that'll be used for every console level\n */\nfunction createConsoleWrapper(level: string): (originalConsoleMethod: () => void) => void {\n return function consoleWrapper(originalConsoleMethod: () => void): () => void {\n let sentryLevel: Severity;\n\n switch (level) {\n case 'debug':\n sentryLevel = Severity.Debug;\n break;\n case 'error':\n sentryLevel = Severity.Error;\n break;\n case 'info':\n sentryLevel = Severity.Info;\n break;\n case 'warn':\n sentryLevel = Severity.Warning;\n break;\n default:\n sentryLevel = Severity.Log;\n }\n\n return function(this: typeof console): void {\n if (getCurrentHub().getIntegration(Console)) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'console',\n level: sentryLevel,\n message: util.format.apply(undefined, arguments),\n },\n {\n input: [...arguments],\n level,\n },\n );\n }\n\n originalConsoleMethod.apply(this, arguments);\n };\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/http.d.ts b/node_modules/@sentry/node/dist/integrations/http.d.ts deleted file mode 100644 index 58b10ef..0000000 --- a/node_modules/@sentry/node/dist/integrations/http.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Integration } from '@sentry/types'; -/** http module integration */ -export declare class Http implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - private readonly _breadcrumbs; - /** - * @inheritDoc - */ - private readonly _tracing; - /** - * @inheritDoc - */ - constructor(options?: { - breadcrumbs?: boolean; - tracing?: boolean; - }); - /** - * @inheritDoc - */ - setupOnce(): void; -} -//# sourceMappingURL=http.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/http.d.ts.map b/node_modules/@sentry/node/dist/integrations/http.d.ts.map deleted file mode 100644 index 5548c5d..0000000 --- a/node_modules/@sentry/node/dist/integrations/http.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/integrations/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAQ,MAAM,eAAe,CAAC;AAOlD,8BAA8B;AAC9B,qBAAa,IAAK,YAAW,WAAW;IACtC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAW;IAC9B;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAU;IAElC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAU;IAEvC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;OAEG;gBACgB,OAAO,GAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO;IAK7E;;OAEG;IACI,SAAS,IAAI,IAAI;CAqBzB"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/http.js b/node_modules/@sentry/node/dist/integrations/http.js deleted file mode 100644 index 62484d5..0000000 --- a/node_modules/@sentry/node/dist/integrations/http.js +++ /dev/null @@ -1,140 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var NODE_VERSION = utils_1.parseSemver(process.versions.node); -/** http module integration */ -var Http = /** @class */ (function () { - /** - * @inheritDoc - */ - function Http(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = Http.id; - this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs; - this._tracing = typeof options.tracing === 'undefined' ? false : options.tracing; - } - /** - * @inheritDoc - */ - Http.prototype.setupOnce = function () { - // No need to instrument if we don't want to track anything - if (!this._breadcrumbs && !this._tracing) { - return; - } - var handlerWrapper = createHandlerWrapper(this._breadcrumbs, this._tracing); - var httpModule = require('http'); - utils_1.fill(httpModule, 'get', handlerWrapper); - utils_1.fill(httpModule, 'request', handlerWrapper); - // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it. - // If we do, we'd get double breadcrumbs and double spans for `https` calls. - // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately. - if (NODE_VERSION.major && NODE_VERSION.major > 8) { - var httpsModule = require('https'); - utils_1.fill(httpsModule, 'get', handlerWrapper); - utils_1.fill(httpsModule, 'request', handlerWrapper); - } - }; - /** - * @inheritDoc - */ - Http.id = 'Http'; - return Http; -}()); -exports.Http = Http; -/** - * Wrapper function for internal `request` and `get` calls within `http` and `https` modules - */ -function createHandlerWrapper(breadcrumbsEnabled, tracingEnabled) { - return function handlerWrapper(originalHandler) { - return function (options) { - var requestUrl = extractUrl(options); - if (isSentryRequest(requestUrl)) { - return originalHandler.apply(this, arguments); - } - var span; - if (tracingEnabled) { - span = core_1.getCurrentHub().startSpan({ - description: (typeof options === 'string' || !options.method ? 'GET' : options.method) + "|" + requestUrl, - op: 'request', - }); - } - return originalHandler - .apply(this, arguments) - .once('response', function (res) { - if (breadcrumbsEnabled) { - addRequestBreadcrumb('response', requestUrl, this, res); - } - if (tracingEnabled && span) { - span.setHttpStatus(res.statusCode); - span.finish(); - } - }) - .once('error', function () { - if (breadcrumbsEnabled) { - addRequestBreadcrumb('error', requestUrl, this); - } - if (tracingEnabled && span) { - span.setHttpStatus(500); - span.finish(); - } - }); - }; - }; -} -/** - * Captures Breadcrumb based on provided request/response pair - */ -function addRequestBreadcrumb(event, url, req, res) { - if (!core_1.getCurrentHub().getIntegration(Http)) { - return; - } - core_1.getCurrentHub().addBreadcrumb({ - category: 'http', - data: { - method: req.method, - status_code: res && res.statusCode, - url: url, - }, - type: 'http', - }, { - event: event, - request: req, - response: res, - }); -} -/** - * Function that can combine together a url that'll be used for our breadcrumbs. - * - * @param options url that should be returned or an object containing it's parts. - * @returns constructed url - */ -function extractUrl(options) { - if (typeof options === 'string') { - return options; - } - var protocol = options.protocol || ''; - var hostname = options.hostname || options.host || ''; - // Don't log standard :80 (http) and :443 (https) ports to reduce the noise - var port = !options.port || options.port === 80 || options.port === 443 ? '' : ":" + options.port; - var path = options.path || '/'; - return protocol + "//" + hostname + port + path; -} -/** - * Checks whether given url points to Sentry server - * @param url url to verify - */ -function isSentryRequest(url) { - var client = core_1.getCurrentHub().getClient(); - if (!url || !client) { - return false; - } - var dsn = client.getDsn(); - if (!dsn) { - return false; - } - return url.indexOf(dsn.host) !== -1; -} -//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/http.js.map b/node_modules/@sentry/node/dist/integrations/http.js.map deleted file mode 100644 index 1b2f6e8..0000000 --- a/node_modules/@sentry/node/dist/integrations/http.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/integrations/http.ts"],"names":[],"mappings":";AAAA,qCAA6C;AAE7C,uCAAkD;AAIlD,IAAM,YAAY,GAAG,mBAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAExD,8BAA8B;AAC9B;IAoBE;;OAEG;IACH,cAAmB,OAA0D;QAA1D,wBAAA,EAAA,YAA0D;QAtB7E;;WAEG;QACI,SAAI,GAAW,IAAI,CAAC,EAAE,CAAC;QAoB5B,IAAI,CAAC,YAAY,GAAG,OAAO,OAAO,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAA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,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport { Integration, Span } from '@sentry/types';\nimport { fill, parseSemver } from '@sentry/utils';\nimport * as http from 'http';\nimport * as https from 'https';\n\nconst NODE_VERSION = parseSemver(process.versions.node);\n\n/** http module integration */\nexport class Http implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Http.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'Http';\n\n /**\n * @inheritDoc\n */\n private readonly _breadcrumbs: boolean;\n\n /**\n * @inheritDoc\n */\n private readonly _tracing: boolean;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { breadcrumbs?: boolean; tracing?: boolean } = {}) {\n this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs;\n this._tracing = typeof options.tracing === 'undefined' ? false : options.tracing;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // No need to instrument if we don't want to track anything\n if (!this._breadcrumbs && !this._tracing) {\n return;\n }\n\n const handlerWrapper = createHandlerWrapper(this._breadcrumbs, this._tracing);\n\n const httpModule = require('http');\n fill(httpModule, 'get', handlerWrapper);\n fill(httpModule, 'request', handlerWrapper);\n\n // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it.\n // If we do, we'd get double breadcrumbs and double spans for `https` calls.\n // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately.\n if (NODE_VERSION.major && NODE_VERSION.major > 8) {\n const httpsModule = require('https');\n fill(httpsModule, 'get', handlerWrapper);\n fill(httpsModule, 'request', handlerWrapper);\n }\n }\n}\n\n/**\n * Wrapper function for internal `request` and `get` calls within `http` and `https` modules\n */\nfunction createHandlerWrapper(\n breadcrumbsEnabled: boolean,\n tracingEnabled: boolean,\n): (originalHandler: () => http.ClientRequest) => (options: string | http.ClientRequestArgs) => http.ClientRequest {\n return function handlerWrapper(\n originalHandler: () => http.ClientRequest,\n ): (options: string | http.ClientRequestArgs) => http.ClientRequest {\n return function(this: typeof http | typeof https, options: string | http.ClientRequestArgs): http.ClientRequest {\n const requestUrl = extractUrl(options);\n\n if (isSentryRequest(requestUrl)) {\n return originalHandler.apply(this, arguments);\n }\n\n let span: Span;\n if (tracingEnabled) {\n span = getCurrentHub().startSpan({\n description: `${typeof options === 'string' || !options.method ? 'GET' : options.method}|${requestUrl}`,\n op: 'request',\n });\n }\n\n return originalHandler\n .apply(this, arguments)\n .once('response', function(this: http.IncomingMessage, res: http.ServerResponse): void {\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('response', requestUrl, this, res);\n }\n if (tracingEnabled && span) {\n span.setHttpStatus(res.statusCode);\n span.finish();\n }\n })\n .once('error', function(this: http.IncomingMessage): void {\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('error', requestUrl, this);\n }\n if (tracingEnabled && span) {\n span.setHttpStatus(500);\n span.finish();\n }\n });\n };\n };\n}\n\n/**\n * Captures Breadcrumb based on provided request/response pair\n */\nfunction addRequestBreadcrumb(event: string, url: string, req: http.IncomingMessage, res?: http.ServerResponse): void {\n if (!getCurrentHub().getIntegration(Http)) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'http',\n data: {\n method: req.method,\n status_code: res && res.statusCode,\n url,\n },\n type: 'http',\n },\n {\n event,\n request: req,\n response: res,\n },\n );\n}\n\n/**\n * Function that can combine together a url that'll be used for our breadcrumbs.\n *\n * @param options url that should be returned or an object containing it's parts.\n * @returns constructed url\n */\nfunction extractUrl(options: string | http.ClientRequestArgs): string {\n if (typeof options === 'string') {\n return options;\n }\n const protocol = options.protocol || '';\n const hostname = options.hostname || options.host || '';\n // Don't log standard :80 (http) and :443 (https) ports to reduce the noise\n const port = !options.port || options.port === 80 || options.port === 443 ? '' : `:${options.port}`;\n const path = options.path || '/';\n return `${protocol}//${hostname}${port}${path}`;\n}\n\n/**\n * Checks whether given url points to Sentry server\n * @param url url to verify\n */\nfunction isSentryRequest(url: string): boolean {\n const client = getCurrentHub().getClient();\n if (!url || !client) {\n return false;\n }\n\n const dsn = client.getDsn();\n if (!dsn) {\n return false;\n }\n\n return url.indexOf(dsn.host) !== -1;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/index.d.ts b/node_modules/@sentry/node/dist/integrations/index.d.ts deleted file mode 100644 index 7dda59d..0000000 --- a/node_modules/@sentry/node/dist/integrations/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { Console } from './console'; -export { Http } from './http'; -export { OnUncaughtException } from './onuncaughtexception'; -export { OnUnhandledRejection } from './onunhandledrejection'; -export { LinkedErrors } from './linkederrors'; -export { Modules } from './modules'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/index.d.ts.map b/node_modules/@sentry/node/dist/integrations/index.d.ts.map deleted file mode 100644 index e13d023..0000000 --- a/node_modules/@sentry/node/dist/integrations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/index.js b/node_modules/@sentry/node/dist/integrations/index.js deleted file mode 100644 index 7e75ca4..0000000 --- a/node_modules/@sentry/node/dist/integrations/index.js +++ /dev/null @@ -1,14 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var console_1 = require("./console"); -exports.Console = console_1.Console; -var http_1 = require("./http"); -exports.Http = http_1.Http; -var onuncaughtexception_1 = require("./onuncaughtexception"); -exports.OnUncaughtException = onuncaughtexception_1.OnUncaughtException; -var onunhandledrejection_1 = require("./onunhandledrejection"); -exports.OnUnhandledRejection = onunhandledrejection_1.OnUnhandledRejection; -var linkederrors_1 = require("./linkederrors"); -exports.LinkedErrors = linkederrors_1.LinkedErrors; -var modules_1 = require("./modules"); -exports.Modules = modules_1.Modules; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/index.js.map b/node_modules/@sentry/node/dist/integrations/index.js.map deleted file mode 100644 index 974e2bf..0000000 --- a/node_modules/@sentry/node/dist/integrations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":";AAAA,qCAAoC;AAA3B,4BAAA,OAAO,CAAA;AAChB,+BAA8B;AAArB,sBAAA,IAAI,CAAA;AACb,6DAA4D;AAAnD,oDAAA,mBAAmB,CAAA;AAC5B,+DAA8D;AAArD,sDAAA,oBAAoB,CAAA;AAC7B,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,qCAAoC;AAA3B,4BAAA,OAAO,CAAA","sourcesContent":["export { Console } from './console';\nexport { Http } from './http';\nexport { OnUncaughtException } from './onuncaughtexception';\nexport { OnUnhandledRejection } from './onunhandledrejection';\nexport { LinkedErrors } from './linkederrors';\nexport { Modules } from './modules';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/linkederrors.d.ts b/node_modules/@sentry/node/dist/integrations/linkederrors.d.ts deleted file mode 100644 index d703699..0000000 --- a/node_modules/@sentry/node/dist/integrations/linkederrors.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types'; -/** Adds SDK info to an event. */ -export declare class LinkedErrors implements Integration { - /** - * @inheritDoc - */ - readonly name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - private readonly _key; - /** - * @inheritDoc - */ - private readonly _limit; - /** - * @inheritDoc - */ - constructor(options?: { - key?: string; - limit?: number; - }); - /** - * @inheritDoc - */ - setupOnce(): void; - /** - * @inheritDoc - */ - handler(event: Event, hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - walkErrorTree(error: ExtendedError, key: string, stack?: Exception[]): PromiseLike; -} -//# sourceMappingURL=linkederrors.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/linkederrors.d.ts.map b/node_modules/@sentry/node/dist/integrations/linkederrors.d.ts.map deleted file mode 100644 index 9916c24..0000000 --- a/node_modules/@sentry/node/dist/integrations/linkederrors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linkederrors.d.ts","sourceRoot":"","sources":["../../src/integrations/linkederrors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQxF,iCAAiC;AACjC,qBAAa,YAAa,YAAW,WAAW;IAC9C;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAmB;IAC/C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAkB;IAE1C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAE9B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;OAEG;gBACgB,OAAO,GAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO;IAKjE;;OAEG;IACI,SAAS,IAAI,IAAI;IAUxB;;OAEG;IACI,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAmBlE;;OAEG;IACI,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,SAAS,EAAO,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;CAkB3G"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/linkederrors.js b/node_modules/@sentry/node/dist/integrations/linkederrors.js deleted file mode 100644 index 4fbd065..0000000 --- a/node_modules/@sentry/node/dist/integrations/linkederrors.js +++ /dev/null @@ -1,85 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var parsers_1 = require("../parsers"); -var DEFAULT_KEY = 'cause'; -var DEFAULT_LIMIT = 5; -/** Adds SDK info to an event. */ -var LinkedErrors = /** @class */ (function () { - /** - * @inheritDoc - */ - function LinkedErrors(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = LinkedErrors.id; - this._key = options.key || DEFAULT_KEY; - this._limit = options.limit || DEFAULT_LIMIT; - } - /** - * @inheritDoc - */ - LinkedErrors.prototype.setupOnce = function () { - core_1.addGlobalEventProcessor(function (event, hint) { - var self = core_1.getCurrentHub().getIntegration(LinkedErrors); - if (self) { - return self.handler(event, hint); - } - return event; - }); - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype.handler = function (event, hint) { - var _this = this; - if (!event.exception || !event.exception.values || !hint || !utils_1.isInstanceOf(hint.originalException, Error)) { - return utils_1.SyncPromise.resolve(event); - } - return new utils_1.SyncPromise(function (resolve) { - _this.walkErrorTree(hint.originalException, _this._key) - .then(function (linkedErrors) { - if (event && event.exception && event.exception.values) { - event.exception.values = tslib_1.__spread(linkedErrors, event.exception.values); - } - resolve(event); - }) - .then(null, function () { - resolve(event); - }); - }); - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype.walkErrorTree = function (error, key, stack) { - var _this = this; - if (stack === void 0) { stack = []; } - if (!utils_1.isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) { - return utils_1.SyncPromise.resolve(stack); - } - return new utils_1.SyncPromise(function (resolve, reject) { - parsers_1.getExceptionFromError(error[key]) - .then(function (exception) { - _this.walkErrorTree(error[key], key, tslib_1.__spread([exception], stack)) - .then(resolve) - .then(null, function () { - reject(); - }); - }) - .then(null, function () { - reject(); - }); - }); - }; - /** - * @inheritDoc - */ - LinkedErrors.id = 'LinkedErrors'; - return LinkedErrors; -}()); -exports.LinkedErrors = LinkedErrors; -//# sourceMappingURL=linkederrors.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/linkederrors.js.map b/node_modules/@sentry/node/dist/integrations/linkederrors.js.map deleted file mode 100644 index 0b03fc7..0000000 --- a/node_modules/@sentry/node/dist/integrations/linkederrors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linkederrors.js","sourceRoot":"","sources":["../../src/integrations/linkederrors.ts"],"names":[],"mappings":";;AAAA,qCAAsE;AAEtE,uCAA0D;AAE1D,sCAAmD;AAEnD,IAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,IAAM,aAAa,GAAG,CAAC,CAAC;AAExB,iCAAiC;AACjC;IAoBE;;OAEG;IACH,sBAAmB,OAA8C;QAA9C,wBAAA,EAAA,YAA8C;QAtBjE;;WAEG;QACa,SAAI,GAAW,YAAY,CAAC,EAAE,CAAC;QAoB7C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,IAAI,WAAW,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAAC;IAC/C,CAAC;IAED;;OAEG;IACI,gCAAS,GAAhB;QACE,8BAAuB,CAAC,UAAC,KAAY,EAAE,IAAgB;YACrD,IAAM,IAAI,GAAG,oBAAa,EAAE,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;YAC1D,IAAI,IAAI,EAAE;gBACR,OAAQ,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAmC,CAAC;aACrE;YACD,OAAO,KAAK,CAAC;QACf,CAAC,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qB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBAC9B,IAAI,CAAC,UAAC,SAAoB;gBACzB,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,oBAAG,SAAS,GAAK,KAAK,EAAE;qBACvD,IAAI,CAAC,OAAO,CAAC;qBACb,IAAI,CAAC,IAAI,EAAE;oBACV,MAAM,EAAE,CAAC;gBACX,CAAC,CAAC,CAAC;YACP,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,EAAE;gBACV,MAAM,EAAE,CAAC;YACX,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;IA9ED;;OAEG;IACW,eAAE,GAAW,cAAc,CAAC;IA4E5C,mBAAC;CAAA,AApFD,IAoFC;AApFY,oCAAY","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf, SyncPromise } from '@sentry/utils';\n\nimport { getExceptionFromError } from '../parsers';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return (self.handler(event, hint) as unknown) as PromiseLike;\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public handler(event: Event, hint?: EventHint): PromiseLike {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return SyncPromise.resolve(event);\n }\n\n return new SyncPromise(resolve => {\n this.walkErrorTree(hint.originalException as Error, this._key)\n .then((linkedErrors: Exception[]) => {\n if (event && event.exception && event.exception.values) {\n event.exception.values = [...linkedErrors, ...event.exception.values];\n }\n resolve(event);\n })\n .then(null, () => {\n resolve(event);\n });\n });\n }\n\n /**\n * @inheritDoc\n */\n public walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): PromiseLike {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return SyncPromise.resolve(stack);\n }\n return new SyncPromise((resolve, reject) => {\n getExceptionFromError(error[key])\n .then((exception: Exception) => {\n this.walkErrorTree(error[key], key, [exception, ...stack])\n .then(resolve)\n .then(null, () => {\n reject();\n });\n })\n .then(null, () => {\n reject();\n });\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/modules.d.ts b/node_modules/@sentry/node/dist/integrations/modules.d.ts deleted file mode 100644 index 47bc00f..0000000 --- a/node_modules/@sentry/node/dist/integrations/modules.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { EventProcessor, Hub, Integration } from '@sentry/types'; -/** Add node modules / packages to the event */ -export declare class Modules implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; - /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */ - private _getModules; -} -//# sourceMappingURL=modules.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/modules.d.ts.map b/node_modules/@sentry/node/dist/integrations/modules.d.ts.map deleted file mode 100644 index a409a32..0000000 --- a/node_modules/@sentry/node/dist/integrations/modules.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/integrations/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AA0DjE,+CAA+C;AAC/C,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IACjC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI;IAY7G,kGAAkG;IAClG,OAAO,CAAC,WAAW;CAOpB"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/modules.js b/node_modules/@sentry/node/dist/integrations/modules.js deleted file mode 100644 index 319ed1f..0000000 --- a/node_modules/@sentry/node/dist/integrations/modules.js +++ /dev/null @@ -1,76 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var fs_1 = require("fs"); -var path_1 = require("path"); -var moduleCache; -/** Extract information about package.json modules */ -function collectModules() { - var mainPaths = (require.main && require.main.paths) || []; - var paths = require.cache ? Object.keys(require.cache) : []; - var infos = {}; - var seen = {}; - paths.forEach(function (path) { - var dir = path; - /** Traverse directories upward in the search of package.json file */ - var updir = function () { - var orig = dir; - dir = path_1.dirname(orig); - if (!dir || orig === dir || seen[orig]) { - return undefined; - } - if (mainPaths.indexOf(dir) < 0) { - return updir(); - } - var pkgfile = path_1.join(orig, 'package.json'); - seen[orig] = true; - if (!fs_1.existsSync(pkgfile)) { - return updir(); - } - try { - var info = JSON.parse(fs_1.readFileSync(pkgfile, 'utf8')); - infos[info.name] = info.version; - } - catch (_oO) { - // no-empty - } - }; - updir(); - }); - return infos; -} -/** Add node modules / packages to the event */ -var Modules = /** @class */ (function () { - function Modules() { - /** - * @inheritDoc - */ - this.name = Modules.id; - } - /** - * @inheritDoc - */ - Modules.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) { - var _this = this; - addGlobalEventProcessor(function (event) { - if (!getCurrentHub().getIntegration(Modules)) { - return event; - } - return tslib_1.__assign({}, event, { modules: _this._getModules() }); - }); - }; - /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */ - Modules.prototype._getModules = function () { - if (!moduleCache) { - // tslint:disable-next-line:no-unsafe-any - moduleCache = collectModules(); - } - return moduleCache; - }; - /** - * @inheritDoc - */ - Modules.id = 'Modules'; - return Modules; -}()); -exports.Modules = Modules; -//# sourceMappingURL=modules.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/modules.js.map b/node_modules/@sentry/node/dist/integrations/modules.js.map deleted file mode 100644 index b4a1efb..0000000 --- a/node_modules/@sentry/node/dist/integrations/modules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/integrations/modules.ts"],"names":[],"mappings":";;AACA,yBAA8C;AAC9C,6BAAqC;AAErC,IAAI,WAAsC,CAAC;AAE3C,qDAAqD;AACrD,SAAS,cAAc;IAGrB,IAAM,SAAS,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7D,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACpE,IAAM,KAAK,GAEP,EAAE,CAAC;IACP,IAAM,IAAI,GAEN,EAAE,CAAC;IAEP,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;QAChB,IAAI,GAAG,GAAG,IAAI,CAAC;QAEf,qEAAqE;QACrE,IAAM,KAAK,GAAG;YACZ,IAAM,IAAI,GAAG,GAAG,CAAC;YACjB,GAAG,GAAG,cAAO,CAAC,IAAI,CAAC,CAAC;YAEpB,IAAI,CAAC,GAAG,IAAI,IAAI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C;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IA3BD;;OAEG;IACW,UAAE,GAAW,SAAS,CAAC;IAyBvC,cAAC;CAAA,AAjCD,IAiCC;AAjCY,0BAAO","sourcesContent":["import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { existsSync, readFileSync } from 'fs';\nimport { dirname, join } from 'path';\n\nlet moduleCache: { [key: string]: string };\n\n/** Extract information about package.json modules */\nfunction collectModules(): {\n [name: string]: string;\n} {\n const mainPaths = (require.main && require.main.paths) || [];\n const paths = require.cache ? Object.keys(require.cache as {}) : [];\n const infos: {\n [name: string]: string;\n } = {};\n const seen: {\n [path: string]: boolean;\n } = {};\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = (): void | (() => void) => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen[orig]) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen[orig] = true;\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8')) as {\n name: string;\n version: string;\n };\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Add node modules / packages to the event */\nexport class Modules implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Modules.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'Modules';\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n if (!getCurrentHub().getIntegration(Modules)) {\n return event;\n }\n return {\n ...event,\n modules: this._getModules(),\n };\n });\n }\n\n /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\n private _getModules(): { [key: string]: string } {\n if (!moduleCache) {\n // tslint:disable-next-line:no-unsafe-any\n moduleCache = collectModules();\n }\n return moduleCache;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/onuncaughtexception.d.ts b/node_modules/@sentry/node/dist/integrations/onuncaughtexception.d.ts deleted file mode 100644 index f991c08..0000000 --- a/node_modules/@sentry/node/dist/integrations/onuncaughtexception.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Global Promise Rejection handler */ -export declare class OnUncaughtException implements Integration { - private readonly _options; - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - readonly handler: (error: Error) => void; - /** - * @inheritDoc - */ - constructor(_options?: { - /** - * Default onFatalError handler - * @param firstError Error that has been thrown - * @param secondError If this was called multiple times this will be set - */ - onFatalError?(firstError: Error, secondError?: Error): void; - }); - /** - * @inheritDoc - */ - setupOnce(): void; - /** - * @hidden - */ - private _makeErrorHandler; -} -//# sourceMappingURL=onuncaughtexception.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/onuncaughtexception.d.ts.map b/node_modules/@sentry/node/dist/integrations/onuncaughtexception.d.ts.map deleted file mode 100644 index f8a0e04..0000000 --- a/node_modules/@sentry/node/dist/integrations/onuncaughtexception.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onuncaughtexception.d.ts","sourceRoot":"","sources":["../../src/integrations/onuncaughtexception.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAY,MAAM,eAAe,CAAC;AAMtD,uCAAuC;AACvC,qBAAa,mBAAoB,YAAW,WAAW;IAmBnD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAlB3B;;OAEG;IACI,IAAI,EAAE,MAAM,CAA0B;IAC7C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAyB;IAEjD;;OAEG;IACH,SAAgB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAA4B;IAE3E;;OAEG;gBAEgB,QAAQ,GAAE;QACzB;;;;WAIG;QACH,YAAY,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;KACxD;IAER;;OAEG;IACI,SAAS,IAAI,IAAI;IAIxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CA2E1B"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/onuncaughtexception.js b/node_modules/@sentry/node/dist/integrations/onuncaughtexception.js deleted file mode 100644 index 0c51024..0000000 --- a/node_modules/@sentry/node/dist/integrations/onuncaughtexception.js +++ /dev/null @@ -1,113 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var core_1 = require("@sentry/core"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var handlers_1 = require("../handlers"); -/** Global Promise Rejection handler */ -var OnUncaughtException = /** @class */ (function () { - /** - * @inheritDoc - */ - function OnUncaughtException(_options) { - if (_options === void 0) { _options = {}; } - this._options = _options; - /** - * @inheritDoc - */ - this.name = OnUncaughtException.id; - /** - * @inheritDoc - */ - this.handler = this._makeErrorHandler(); - } - /** - * @inheritDoc - */ - OnUncaughtException.prototype.setupOnce = function () { - global.process.on('uncaughtException', this.handler.bind(this)); - }; - /** - * @hidden - */ - OnUncaughtException.prototype._makeErrorHandler = function () { - var _this = this; - var timeout = 2000; - var caughtFirstError = false; - var caughtSecondError = false; - var calledFatalError = false; - var firstError; - return function (error) { - var onFatalError = handlers_1.logAndExitProcess; - var client = core_1.getCurrentHub().getClient(); - if (_this._options.onFatalError) { - onFatalError = _this._options.onFatalError; - } - else if (client && client.getOptions().onFatalError) { - onFatalError = client.getOptions().onFatalError; - } - if (!caughtFirstError) { - var hub_1 = core_1.getCurrentHub(); - // this is the first uncaught error and the ultimate reason for shutting down - // we want to do absolutely everything possible to ensure it gets captured - // also we want to make sure we don't go recursion crazy if more errors happen after this one - firstError = error; - caughtFirstError = true; - if (hub_1.getIntegration(OnUncaughtException)) { - hub_1.withScope(function (scope) { - scope.setLevel(types_1.Severity.Fatal); - hub_1.captureException(error, { originalException: error }); - if (!calledFatalError) { - calledFatalError = true; - onFatalError(error); - } - }); - } - else { - if (!calledFatalError) { - calledFatalError = true; - onFatalError(error); - } - } - } - else if (calledFatalError) { - // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down - utils_1.logger.warn('uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown'); - handlers_1.logAndExitProcess(error); - } - else if (!caughtSecondError) { - // two cases for how we can hit this branch: - // - capturing of first error blew up and we just caught the exception from that - // - quit trying to capture, proceed with shutdown - // - a second independent error happened while waiting for first error to capture - // - want to avoid causing premature shutdown before first error capture finishes - // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff - // so let's instead just delay a bit before we proceed with our action here - // in case 1, we just wait a bit unnecessarily but ultimately do the same thing - // in case 2, the delay hopefully made us wait long enough for the capture to finish - // two potential nonideal outcomes: - // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError - // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error - // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError) - // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish - caughtSecondError = true; - setTimeout(function () { - if (!calledFatalError) { - // it was probably case 1, let's treat err as the sendErr and call onFatalError - calledFatalError = true; - onFatalError(firstError, error); - } - else { - // it was probably case 2, our first error finished capturing while we waited, cool, do nothing - } - }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc - } - }; - }; - /** - * @inheritDoc - */ - OnUncaughtException.id = 'OnUncaughtException'; - return OnUncaughtException; -}()); -exports.OnUncaughtException = OnUncaughtException; -//# sourceMappingURL=onuncaughtexception.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/onuncaughtexception.js.map b/node_modules/@sentry/node/dist/integrations/onuncaughtexception.js.map deleted file mode 100644 index e9e2f1f..0000000 --- a/node_modules/@sentry/node/dist/integrations/onuncaughtexception.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onuncaughtexception.js","sourceRoot":"","sources":["../../src/integrations/onuncaughtexception.ts"],"names":[],"mappings":";AAAA,qCAAoD;AACpD,uCAAsD;AACtD,uCAAuC;AAGvC,wCAAgD;AAEhD,uCAAuC;AACvC;IAeE;;OAEG;IACH,6BACmB,QAOX;QAPW,yBAAA,EAAA,aAOX;QAPW,aAAQ,GAAR,QAAQ,CAOnB;QAzBR;;WAEG;QACI,SAAI,GAAW,mBAAmB,CAAC,EAAE,CAAC;QAM7C;;WAEG;QACa,YAAO,GAA2B,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAcxE,CAAC;IACJ;;OAEG;IACI,uCAAS,GAAhB;QACE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACK,+CAAiB,GAAzB;QAAA,iBA0EC;QAzEC,IAAM,OAAO,GAAG,IAAI,CAAC;QACrB,IAAI,gBAAgB,GAAY,KAAK,CAAC;QACtC,IAAI,iBAAiB,GAAY,KAAK,CAAC;QACvC,IAAI,gBAAgB,GAAY,KAAK,CAAC;QACtC,IAAI,UAAiB,CAAC;QAEtB,OAAO,UAAC,KAAY;YAGlB,IAAI,YAAY,GAA4B,4BAAiB,CAAC;YAC9D,IAAM,MAAM,GAAG,oBAAa,EAAE,CAAC,SAAS,EAAc,CAAC;YAEvD,IAAI,KAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;gBAC9B,YAAY,GAAG,KAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;aAC3C;iBAAM,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE;gBACrD,YAAY,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC,YAAuC,CAAC;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AA+E;wBAC/E,gBAAgB,GAAG,IAAI,CAAC;wBACxB,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;qBACjC;yBAAM;wBACL,+FAA+F;qBAChG;gBACH,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,sIAAsI;aACpJ;QACH,CAAC,CAAC;IACJ,CAAC;IA3GD;;OAEG;IACW,sBAAE,GAAW,qBAAqB,CAAC;IAyGnD,0BAAC;CAAA,AAjHD,IAiHC;AAjHY,kDAAmB","sourcesContent":["import { getCurrentHub, Scope } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { NodeClient } from '../client';\nimport { logAndExitProcess } from '../handlers';\n\n/** Global Promise Rejection handler */\nexport class OnUncaughtException implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = OnUncaughtException.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'OnUncaughtException';\n\n /**\n * @inheritDoc\n */\n public readonly handler: (error: Error) => void = this._makeErrorHandler();\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n /**\n * Default onFatalError handler\n * @param firstError Error that has been thrown\n * @param secondError If this was called multiple times this will be set\n */\n onFatalError?(firstError: Error, secondError?: Error): void;\n } = {},\n ) {}\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n global.process.on('uncaughtException', this.handler.bind(this));\n }\n\n /**\n * @hidden\n */\n private _makeErrorHandler(): (error: Error) => void {\n const timeout = 2000;\n let caughtFirstError: boolean = false;\n let caughtSecondError: boolean = false;\n let calledFatalError: boolean = false;\n let firstError: Error;\n\n return (error: Error): void => {\n type onFatalErrorHandlerType = (firstError: Error, secondError?: Error) => void;\n\n let onFatalError: onFatalErrorHandlerType = logAndExitProcess;\n const client = getCurrentHub().getClient();\n\n if (this._options.onFatalError) {\n onFatalError = this._options.onFatalError;\n } else if (client && client.getOptions().onFatalError) {\n onFatalError = client.getOptions().onFatalError as onFatalErrorHandlerType;\n }\n\n if (!caughtFirstError) {\n const hub = getCurrentHub();\n\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (hub.getIntegration(OnUncaughtException)) {\n hub.withScope((scope: Scope) => {\n scope.setLevel(Severity.Fatal);\n hub.captureException(error, { originalException: error });\n if (!calledFatalError) {\n calledFatalError = true;\n onFatalError(error);\n }\n });\n } else {\n if (!calledFatalError) {\n calledFatalError = true;\n onFatalError(error);\n }\n }\n } else if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n logger.warn('uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown');\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n } else {\n // it was probably case 2, our first error finished capturing while we waited, cool, do nothing\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/onunhandledrejection.d.ts b/node_modules/@sentry/node/dist/integrations/onunhandledrejection.d.ts deleted file mode 100644 index 918fd36..0000000 --- a/node_modules/@sentry/node/dist/integrations/onunhandledrejection.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Integration } from '@sentry/types'; -declare type UnhandledRejectionMode = 'none' | 'warn' | 'strict'; -/** Global Promise Rejection handler */ -export declare class OnUnhandledRejection implements Integration { - private readonly _options; - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - constructor(_options?: { - /** - * Option deciding what to do after capturing unhandledRejection, - * that mimicks behavior of node's --unhandled-rejection flag. - */ - mode: UnhandledRejectionMode; - }); - /** - * @inheritDoc - */ - setupOnce(): void; - /** - * Send an exception with reason - * @param reason string - * @param promise promise - */ - sendUnhandledPromise(reason: any, promise: any): void; - /** - * Handler for `mode` option - */ - private _handleRejection; -} -export {}; -//# sourceMappingURL=onunhandledrejection.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/onunhandledrejection.d.ts.map b/node_modules/@sentry/node/dist/integrations/onunhandledrejection.d.ts.map deleted file mode 100644 index fd8bee5..0000000 --- a/node_modules/@sentry/node/dist/integrations/onunhandledrejection.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onunhandledrejection.d.ts","sourceRoot":"","sources":["../../src/integrations/onunhandledrejection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,aAAK,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzD,uCAAuC;AACvC,qBAAa,oBAAqB,YAAW,WAAW;IAcpD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAb3B;;OAEG;IACI,IAAI,EAAE,MAAM,CAA2B;IAC9C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAA0B;IAElD;;OAEG;gBAEgB,QAAQ,GAAE;QACzB;;;WAGG;QACH,IAAI,EAAE,sBAAsB,CAAC;KACX;IAGtB;;OAEG;IACI,SAAS,IAAI,IAAI;IAIxB;;;;OAIG;IACI,oBAAoB,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,IAAI;IA8B5D;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAoBzB"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/onunhandledrejection.js b/node_modules/@sentry/node/dist/integrations/onunhandledrejection.js deleted file mode 100644 index acb5222..0000000 --- a/node_modules/@sentry/node/dist/integrations/onunhandledrejection.js +++ /dev/null @@ -1,81 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var core_1 = require("@sentry/core"); -var utils_1 = require("@sentry/utils"); -var handlers_1 = require("../handlers"); -/** Global Promise Rejection handler */ -var OnUnhandledRejection = /** @class */ (function () { - /** - * @inheritDoc - */ - function OnUnhandledRejection(_options) { - if (_options === void 0) { _options = { mode: 'warn' }; } - this._options = _options; - /** - * @inheritDoc - */ - this.name = OnUnhandledRejection.id; - } - /** - * @inheritDoc - */ - OnUnhandledRejection.prototype.setupOnce = function () { - global.process.on('unhandledRejection', this.sendUnhandledPromise.bind(this)); - }; - /** - * Send an exception with reason - * @param reason string - * @param promise promise - */ - OnUnhandledRejection.prototype.sendUnhandledPromise = function (reason, promise) { - var hub = core_1.getCurrentHub(); - if (!hub.getIntegration(OnUnhandledRejection)) { - this._handleRejection(reason); - return; - } - var context = (promise.domain && promise.domain.sentryContext) || {}; - hub.withScope(function (scope) { - scope.setExtra('unhandledPromiseRejection', true); - // Preserve backwards compatibility with raven-node for now - if (context.user) { - scope.setUser(context.user); - } - if (context.tags) { - scope.setTags(context.tags); - } - if (context.extra) { - scope.setExtras(context.extra); - } - hub.captureException(reason, { originalException: promise }); - }); - this._handleRejection(reason); - }; - /** - * Handler for `mode` option - */ - OnUnhandledRejection.prototype._handleRejection = function (reason) { - // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240 - var rejectionWarning = 'This error originated either by ' + - 'throwing inside of an async function without a catch block, ' + - 'or by rejecting a promise which was not handled with .catch().' + - ' The promise rejected with the reason:'; - if (this._options.mode === 'warn') { - utils_1.consoleSandbox(function () { - console.warn(rejectionWarning); - console.error(reason && reason.stack ? reason.stack : reason); - }); - } - else if (this._options.mode === 'strict') { - utils_1.consoleSandbox(function () { - console.warn(rejectionWarning); - }); - handlers_1.logAndExitProcess(reason); - } - }; - /** - * @inheritDoc - */ - OnUnhandledRejection.id = 'OnUnhandledRejection'; - return OnUnhandledRejection; -}()); -exports.OnUnhandledRejection = OnUnhandledRejection; -//# sourceMappingURL=onunhandledrejection.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/integrations/onunhandledrejection.js.map b/node_modules/@sentry/node/dist/integrations/onunhandledrejection.js.map deleted file mode 100644 index 4ca779f..0000000 --- a/node_modules/@sentry/node/dist/integrations/onunhandledrejection.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onunhandledrejection.js","sourceRoot":"","sources":["../../src/integrations/onunhandledrejection.ts"],"names":[],"mappings":";AAAA,qCAAoD;AAEpD,uCAA+C;AAE/C,wCAAgD;AAIhD,uCAAuC;AACvC;IAUE;;OAEG;IACH,8BACmB,QAMG;QANH,yBAAA,EAAA,aAMX,IAAI,EAAE,MAAM,EAAE;QANH,aAAQ,GAAR,QAAQ,CAML;QAnBtB;;WAEG;QACI,SAAI,GAAW,oBAAoB,CAAC,EAAE,CAAC;IAiB3C,CAAC;IAEJ;;OAEG;IACI,wCAAS,GAAhB;QACE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,CAAC;IAED;;;;OAIG;IACI,mDAAoB,GAA3B,UAA4B,MAAW,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M,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;SACJ;aAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC1C,sBAAc,CAAC;gBACb,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;YACH,4BAAiB,CAAC,MAAM,CAAC,CAAC;SAC3B;IACH,CAAC;IAlFD;;OAEG;IACW,uBAAE,GAAW,sBAAsB,CAAC;IAgFpD,2BAAC;CAAA,AAxFD,IAwFC;AAxFY,oDAAoB","sourcesContent":["import { getCurrentHub, Scope } from '@sentry/core';\nimport { Integration } from '@sentry/types';\nimport { consoleSandbox } from '@sentry/utils';\n\nimport { logAndExitProcess } from '../handlers';\n\ntype UnhandledRejectionMode = 'none' | 'warn' | 'strict';\n\n/** Global Promise Rejection handler */\nexport class OnUnhandledRejection implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = OnUnhandledRejection.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'OnUnhandledRejection';\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n /**\n * Option deciding what to do after capturing unhandledRejection,\n * that mimicks behavior of node's --unhandled-rejection flag.\n */\n mode: UnhandledRejectionMode;\n } = { mode: 'warn' },\n ) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n global.process.on('unhandledRejection', this.sendUnhandledPromise.bind(this));\n }\n\n /**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n */\n public sendUnhandledPromise(reason: any, promise: any): void {\n const hub = getCurrentHub();\n\n if (!hub.getIntegration(OnUnhandledRejection)) {\n this._handleRejection(reason);\n return;\n }\n\n const context = (promise.domain && promise.domain.sentryContext) || {};\n\n hub.withScope((scope: Scope) => {\n scope.setExtra('unhandledPromiseRejection', true);\n\n // Preserve backwards compatibility with raven-node for now\n if (context.user) {\n scope.setUser(context.user);\n }\n if (context.tags) {\n scope.setTags(context.tags);\n }\n if (context.extra) {\n scope.setExtras(context.extra);\n }\n\n hub.captureException(reason, { originalException: promise });\n });\n\n this._handleRejection(reason);\n }\n\n /**\n * Handler for `mode` option\n */\n private _handleRejection(reason: any): void {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n if (this._options.mode === 'warn') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (this._options.mode === 'strict') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n logAndExitProcess(reason);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/parsers.d.ts b/node_modules/@sentry/node/dist/parsers.d.ts deleted file mode 100644 index 986dd4e..0000000 --- a/node_modules/@sentry/node/dist/parsers.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Event, Exception, ExtendedError, StackFrame } from '@sentry/types'; -import { NodeOptions } from './backend'; -import * as stacktrace from './stacktrace'; -/** - * Resets the file cache. Exists for testing purposes. - * @hidden - */ -export declare function resetFileContentCache(): void; -/** - * @hidden - */ -export declare function extractStackFromError(error: Error): stacktrace.StackFrame[]; -/** - * @hidden - */ -export declare function parseStack(stack: stacktrace.StackFrame[], options?: NodeOptions): PromiseLike; -/** - * @hidden - */ -export declare function getExceptionFromError(error: Error, options?: NodeOptions): PromiseLike; -/** - * @hidden - */ -export declare function parseError(error: ExtendedError, options?: NodeOptions): PromiseLike; -/** - * @hidden - */ -export declare function prepareFramesForEvent(stack: StackFrame[]): StackFrame[]; -//# sourceMappingURL=parsers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/parsers.d.ts.map b/node_modules/@sentry/node/dist/parsers.d.ts.map deleted file mode 100644 index 34c31cf..0000000 --- a/node_modules/@sentry/node/dist/parsers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK5E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAM3C;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAsGD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAAC,UAAU,EAAE,CAM3E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC,CAmD3G;AAkCD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,CAejG;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,CAU1F;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAcvE"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/parsers.js b/node_modules/@sentry/node/dist/parsers.js deleted file mode 100644 index 3cabd24..0000000 --- a/node_modules/@sentry/node/dist/parsers.js +++ /dev/null @@ -1,241 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = require("@sentry/utils"); -var fs_1 = require("fs"); -var lru_map_1 = require("lru_map"); -var stacktrace = require("./stacktrace"); -// tslint:disable-next-line:no-unsafe-any -var DEFAULT_LINES_OF_CONTEXT = 7; -var FILE_CONTENT_CACHE = new lru_map_1.LRUMap(100); -/** - * Resets the file cache. Exists for testing purposes. - * @hidden - */ -function resetFileContentCache() { - FILE_CONTENT_CACHE.clear(); -} -exports.resetFileContentCache = resetFileContentCache; -/** JSDoc */ -function getFunction(frame) { - try { - return frame.functionName || frame.typeName + "." + (frame.methodName || ''); - } - catch (e) { - // This seems to happen sometimes when using 'use strict', - // stemming from `getTypeName`. - // [TypeError: Cannot read property 'constructor' of undefined] - return ''; - } -} -var mainModule = ((require.main && require.main.filename && utils_1.dirname(require.main.filename)) || - global.process.cwd()) + "/"; -/** JSDoc */ -function getModule(filename, base) { - if (!base) { - base = mainModule; // tslint:disable-line:no-parameter-reassignment - } - // It's specifically a module - var file = utils_1.basename(filename, '.js'); - filename = utils_1.dirname(filename); // tslint:disable-line:no-parameter-reassignment - var n = filename.lastIndexOf('/node_modules/'); - if (n > -1) { - // /node_modules/ is 14 chars - return filename.substr(n + 14).replace(/\//g, '.') + ":" + file; - } - // Let's see if it's a part of the main module - // To be a part of main module, it has to share the same base - n = (filename + "/").lastIndexOf(base, 0); - if (n === 0) { - var moduleName = filename.substr(base.length).replace(/\//g, '.'); - if (moduleName) { - moduleName += ':'; - } - moduleName += file; - return moduleName; - } - return file; -} -/** - * This function reads file contents and caches them in a global LRU cache. - * Returns a Promise filepath => content array for all files that we were able to read. - * - * @param filenames Array of filepaths to read content from. - */ -function readSourceFiles(filenames) { - // we're relying on filenames being de-duped already - if (filenames.length === 0) { - return utils_1.SyncPromise.resolve({}); - } - return new utils_1.SyncPromise(function (resolve) { - var sourceFiles = {}; - var count = 0; - var _loop_1 = function (i) { - var filename = filenames[i]; - var cache = FILE_CONTENT_CACHE.get(filename); - // We have a cache hit - if (cache !== undefined) { - // If it's not null (which means we found a file and have a content) - // we set the content and return it later. - if (cache !== null) { - sourceFiles[filename] = cache; - } - count++; - // In any case we want to skip here then since we have a content already or we couldn't - // read the file and don't want to try again. - if (count === filenames.length) { - resolve(sourceFiles); - } - return "continue"; - } - fs_1.readFile(filename, function (err, data) { - var content = err ? null : data.toString(); - sourceFiles[filename] = content; - // We always want to set the cache, even to null which means there was an error reading the file. - // We do not want to try to read the file again. - FILE_CONTENT_CACHE.set(filename, content); - count++; - if (count === filenames.length) { - resolve(sourceFiles); - } - }); - }; - // tslint:disable-next-line:prefer-for-of - for (var i = 0; i < filenames.length; i++) { - _loop_1(i); - } - }); -} -/** - * @hidden - */ -function extractStackFromError(error) { - var stack = stacktrace.parse(error); - if (!stack) { - return []; - } - return stack; -} -exports.extractStackFromError = extractStackFromError; -/** - * @hidden - */ -function parseStack(stack, options) { - var filesToRead = []; - var linesOfContext = options && options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT; - var frames = stack.map(function (frame) { - var parsedFrame = { - colno: frame.columnNumber, - filename: frame.fileName || '', - function: getFunction(frame), - lineno: frame.lineNumber, - }; - var isInternal = frame.native || - (parsedFrame.filename && - !parsedFrame.filename.startsWith('/') && - !parsedFrame.filename.startsWith('.') && - parsedFrame.filename.indexOf(':\\') !== 1); - // in_app is all that's not an internal Node function or a module within node_modules - // note that isNative appears to return true even for node core libraries - // see https://github.com/getsentry/raven-node/issues/176 - parsedFrame.in_app = - !isInternal && parsedFrame.filename !== undefined && parsedFrame.filename.indexOf('node_modules/') === -1; - // Extract a module name based on the filename - if (parsedFrame.filename) { - parsedFrame.module = getModule(parsedFrame.filename); - if (!isInternal && linesOfContext > 0) { - filesToRead.push(parsedFrame.filename); - } - } - return parsedFrame; - }); - // We do an early return if we do not want to fetch context liens - if (linesOfContext <= 0) { - return utils_1.SyncPromise.resolve(frames); - } - try { - return addPrePostContext(filesToRead, frames, linesOfContext); - } - catch (_) { - // This happens in electron for example where we are not able to read files from asar. - // So it's fine, we recover be just returning all frames without pre/post context. - return utils_1.SyncPromise.resolve(frames); - } -} -exports.parseStack = parseStack; -/** - * This function tries to read the source files + adding pre and post context (source code) - * to a frame. - * @param filesToRead string[] of filepaths - * @param frames StackFrame[] containg all frames - */ -function addPrePostContext(filesToRead, frames, linesOfContext) { - return new utils_1.SyncPromise(function (resolve) { - return readSourceFiles(filesToRead).then(function (sourceFiles) { - var result = frames.map(function (frame) { - if (frame.filename && sourceFiles[frame.filename]) { - try { - var lines = sourceFiles[frame.filename].split('\n'); - utils_1.addContextToFrame(lines, frame, linesOfContext); - } - catch (e) { - // anomaly, being defensive in case - // unlikely to ever happen in practice but can definitely happen in theory - } - } - return frame; - }); - resolve(result); - }); - }); -} -/** - * @hidden - */ -function getExceptionFromError(error, options) { - var name = error.name || error.constructor.name; - var stack = extractStackFromError(error); - return new utils_1.SyncPromise(function (resolve) { - return parseStack(stack, options).then(function (frames) { - var result = { - stacktrace: { - frames: prepareFramesForEvent(frames), - }, - type: name, - value: error.message, - }; - resolve(result); - }); - }); -} -exports.getExceptionFromError = getExceptionFromError; -/** - * @hidden - */ -function parseError(error, options) { - return new utils_1.SyncPromise(function (resolve) { - return getExceptionFromError(error, options).then(function (exception) { - resolve({ - exception: { - values: [exception], - }, - }); - }); - }); -} -exports.parseError = parseError; -/** - * @hidden - */ -function prepareFramesForEvent(stack) { - if (!stack || !stack.length) { - return []; - } - var localStack = stack; - var firstFrameFunction = localStack[0].function || ''; - if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { - localStack = localStack.slice(1); - } - // The frame where the crash happened, should be the last entry in the array - return localStack.reverse(); -} -exports.prepareFramesForEvent = prepareFramesForEvent; -//# sourceMappingURL=parsers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/parsers.js.map b/node_modules/@sentry/node/dist/parsers.js.map deleted file mode 100644 index 7720fe3..0000000 --- a/node_modules/@sentry/node/dist/parsers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"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,CAAC;YACF,OAAO,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC,CAAC;IATF,CASE,CACH,CAAC;AACJ,CAAC;AAfD,sDAeC;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,KAAoB,EAAE,OAAqB;IACpE,OAAO,IAAI,mBAAW,CAAQ,UAAA,OAAO;QACnC,OAAA,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,SAAoB;YAC9D,OAAO,CAAC;gBACN,SAAS,EAAE;oBACT,MAAM,EAAE,CAAC,SAAS,CAAC;iBACpB;aACF,CAAC,CAAC;QACL,CAAC,CAAC;IANF,CAME,CACH,CAAC;AACJ,CAAC;AAVD,gCAUC;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,KAAmB;IACvD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QAC3B,OAAO,EAAE,CAAC;KACX;IAED,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAM,kBAAkB,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;IAExD,IAAI,kBAAkB,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE;QAChH,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAClC;IAED,4EAA4E;IAC5E,OAAO,UAAU,CAAC,OAAO,EAAE,CAAC;AAC9B,CAAC;AAdD,sDAcC","sourcesContent":["import { Event, Exception, ExtendedError, StackFrame } from '@sentry/types';\nimport { addContextToFrame, basename, dirname, SyncPromise } from '@sentry/utils';\nimport { readFile } from 'fs';\nimport { LRUMap } from 'lru_map';\n\nimport { NodeOptions } from './backend';\nimport * as stacktrace from './stacktrace';\n\n// tslint:disable-next-line:no-unsafe-any\nconst DEFAULT_LINES_OF_CONTEXT: number = 7;\nconst FILE_CONTENT_CACHE = new LRUMap(100);\n\n/**\n * Resets the file cache. Exists for testing purposes.\n * @hidden\n */\nexport function resetFileContentCache(): void {\n FILE_CONTENT_CACHE.clear();\n}\n\n/** JSDoc */\nfunction getFunction(frame: stacktrace.StackFrame): string {\n try {\n return frame.functionName || `${frame.typeName}.${frame.methodName || ''}`;\n } catch (e) {\n // This seems to happen sometimes when using 'use strict',\n // stemming from `getTypeName`.\n // [TypeError: Cannot read property 'constructor' of undefined]\n return '';\n }\n}\n\nconst mainModule: string = `${(require.main && require.main.filename && dirname(require.main.filename)) ||\n global.process.cwd()}/`;\n\n/** JSDoc */\nfunction getModule(filename: string, base?: string): string {\n if (!base) {\n base = mainModule; // tslint:disable-line:no-parameter-reassignment\n }\n\n // It's specifically a module\n const file = basename(filename, '.js');\n filename = dirname(filename); // tslint:disable-line:no-parameter-reassignment\n let n = filename.lastIndexOf('/node_modules/');\n if (n > -1) {\n // /node_modules/ is 14 chars\n return `${filename.substr(n + 14).replace(/\\//g, '.')}:${file}`;\n }\n // Let's see if it's a part of the main module\n // To be a part of main module, it has to share the same base\n n = `${filename}/`.lastIndexOf(base, 0);\n if (n === 0) {\n let moduleName = filename.substr(base.length).replace(/\\//g, '.');\n if (moduleName) {\n moduleName += ':';\n }\n moduleName += file;\n return moduleName;\n }\n return file;\n}\n\n/**\n * This function reads file contents and caches them in a global LRU cache.\n * Returns a Promise filepath => content array for all files that we were able to read.\n *\n * @param filenames Array of filepaths to read content from.\n */\nfunction readSourceFiles(filenames: string[]): PromiseLike<{ [key: string]: string | null }> {\n // we're relying on filenames being de-duped already\n if (filenames.length === 0) {\n return SyncPromise.resolve({});\n }\n\n return new SyncPromise<{\n [key: string]: string | null;\n }>(resolve => {\n const sourceFiles: {\n [key: string]: string | null;\n } = {};\n\n let count = 0;\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < filenames.length; i++) {\n const filename = filenames[i];\n\n const cache = FILE_CONTENT_CACHE.get(filename);\n // We have a cache hit\n if (cache !== undefined) {\n // If it's not null (which means we found a file and have a content)\n // we set the content and return it later.\n if (cache !== null) {\n sourceFiles[filename] = cache;\n }\n count++;\n // In any case we want to skip here then since we have a content already or we couldn't\n // read the file and don't want to try again.\n if (count === filenames.length) {\n resolve(sourceFiles);\n }\n continue;\n }\n\n readFile(filename, (err: Error | null, data: Buffer) => {\n const content = err ? null : data.toString();\n sourceFiles[filename] = content;\n\n // We always want to set the cache, even to null which means there was an error reading the file.\n // We do not want to try to read the file again.\n FILE_CONTENT_CACHE.set(filename, content);\n count++;\n if (count === filenames.length) {\n resolve(sourceFiles);\n }\n });\n }\n });\n}\n\n/**\n * @hidden\n */\nexport function extractStackFromError(error: Error): stacktrace.StackFrame[] {\n const stack = stacktrace.parse(error);\n if (!stack) {\n return [];\n }\n return stack;\n}\n\n/**\n * @hidden\n */\nexport function parseStack(stack: stacktrace.StackFrame[], options?: NodeOptions): PromiseLike {\n const filesToRead: string[] = [];\n\n const linesOfContext =\n options && options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;\n\n const frames: StackFrame[] = stack.map(frame => {\n const parsedFrame: StackFrame = {\n colno: frame.columnNumber,\n filename: frame.fileName || '',\n function: getFunction(frame),\n lineno: frame.lineNumber,\n };\n\n const isInternal =\n frame.native ||\n (parsedFrame.filename &&\n !parsedFrame.filename.startsWith('/') &&\n !parsedFrame.filename.startsWith('.') &&\n parsedFrame.filename.indexOf(':\\\\') !== 1);\n\n // in_app is all that's not an internal Node function or a module within node_modules\n // note that isNative appears to return true even for node core libraries\n // see https://github.com/getsentry/raven-node/issues/176\n parsedFrame.in_app =\n !isInternal && parsedFrame.filename !== undefined && parsedFrame.filename.indexOf('node_modules/') === -1;\n\n // Extract a module name based on the filename\n if (parsedFrame.filename) {\n parsedFrame.module = getModule(parsedFrame.filename);\n\n if (!isInternal && linesOfContext > 0) {\n filesToRead.push(parsedFrame.filename);\n }\n }\n\n return parsedFrame;\n });\n\n // We do an early return if we do not want to fetch context liens\n if (linesOfContext <= 0) {\n return SyncPromise.resolve(frames);\n }\n\n try {\n return addPrePostContext(filesToRead, frames, linesOfContext);\n } catch (_) {\n // This happens in electron for example where we are not able to read files from asar.\n // So it's fine, we recover be just returning all frames without pre/post context.\n return SyncPromise.resolve(frames);\n }\n}\n\n/**\n * This function tries to read the source files + adding pre and post context (source code)\n * to a frame.\n * @param filesToRead string[] of filepaths\n * @param frames StackFrame[] containg all frames\n */\nfunction addPrePostContext(\n filesToRead: string[],\n frames: StackFrame[],\n linesOfContext: number,\n): PromiseLike {\n return new SyncPromise(resolve =>\n readSourceFiles(filesToRead).then(sourceFiles => {\n const result = frames.map(frame => {\n if (frame.filename && sourceFiles[frame.filename]) {\n try {\n const lines = (sourceFiles[frame.filename] as string).split('\\n');\n\n addContextToFrame(lines, frame, linesOfContext);\n } catch (e) {\n // anomaly, being defensive in case\n // unlikely to ever happen in practice but can definitely happen in theory\n }\n }\n return frame;\n });\n\n resolve(result);\n }),\n );\n}\n\n/**\n * @hidden\n */\nexport function getExceptionFromError(error: Error, options?: NodeOptions): PromiseLike {\n const name = error.name || error.constructor.name;\n const stack = extractStackFromError(error);\n return new SyncPromise(resolve =>\n parseStack(stack, options).then(frames => {\n const result = {\n stacktrace: {\n frames: prepareFramesForEvent(frames),\n },\n type: name,\n value: error.message,\n };\n resolve(result);\n }),\n );\n}\n\n/**\n * @hidden\n */\nexport function parseError(error: ExtendedError, options?: NodeOptions): PromiseLike {\n return new SyncPromise(resolve =>\n getExceptionFromError(error, options).then((exception: Exception) => {\n resolve({\n exception: {\n values: [exception],\n },\n });\n }),\n );\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: StackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n const firstFrameFunction = localStack[0].function || '';\n\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack.reverse();\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/sdk.d.ts b/node_modules/@sentry/node/dist/sdk.d.ts deleted file mode 100644 index 29ad6ad..0000000 --- a/node_modules/@sentry/node/dist/sdk.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Integrations as CoreIntegrations } from '@sentry/core'; -import { NodeOptions } from './backend'; -import { Console, Http, LinkedErrors, OnUncaughtException, OnUnhandledRejection } from './integrations'; -export declare const defaultIntegrations: (CoreIntegrations.FunctionToString | CoreIntegrations.InboundFilters | Console | Http | OnUncaughtException | OnUnhandledRejection | LinkedErrors)[]; -/** - * The Sentry Node SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible in the - * main entry module. To set context information or send manual events, use the - * provided methods. - * - * @example - * ``` - * - * const { init } = require('@sentry/node'); - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const { configureScope } = require('@sentry/node'); - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * const { addBreadcrumb } = require('@sentry/node'); - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const Sentry = require('@sentry/node'); - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link NodeOptions} for documentation on configuration options. - */ -export declare function init(options?: NodeOptions): void; -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -export declare function lastEventId(): string | undefined; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export declare function flush(timeout?: number): Promise; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export declare function close(timeout?: number): Promise; -//# sourceMappingURL=sdk.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/sdk.d.ts.map b/node_modules/@sentry/node/dist/sdk.d.ts.map deleted file mode 100644 index 5c9fa6b..0000000 --- a/node_modules/@sentry/node/dist/sdk.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAK5F,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAExG,eAAO,MAAM,mBAAmB,sJAY/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,IAAI,CA8BpD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD;AAED;;;;;GAKG;AACH,wBAAsB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM9D;AAED;;;;;GAKG;AACH,wBAAsB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM9D"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/sdk.js b/node_modules/@sentry/node/dist/sdk.js deleted file mode 100644 index 5ecfb16..0000000 --- a/node_modules/@sentry/node/dist/sdk.js +++ /dev/null @@ -1,152 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var hub_1 = require("@sentry/hub"); -var utils_1 = require("@sentry/utils"); -var domain = require("domain"); -var client_1 = require("./client"); -var integrations_1 = require("./integrations"); -exports.defaultIntegrations = [ - // Common - new core_1.Integrations.InboundFilters(), - new core_1.Integrations.FunctionToString(), - // Native Wrappers - new integrations_1.Console(), - new integrations_1.Http(), - // Global Handlers - new integrations_1.OnUncaughtException(), - new integrations_1.OnUnhandledRejection(), - // Misc - new integrations_1.LinkedErrors(), -]; -/** - * The Sentry Node SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible in the - * main entry module. To set context information or send manual events, use the - * provided methods. - * - * @example - * ``` - * - * const { init } = require('@sentry/node'); - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const { configureScope } = require('@sentry/node'); - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * const { addBreadcrumb } = require('@sentry/node'); - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const Sentry = require('@sentry/node'); - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link NodeOptions} for documentation on configuration options. - */ -function init(options) { - if (options === void 0) { options = {}; } - if (options.defaultIntegrations === undefined) { - options.defaultIntegrations = exports.defaultIntegrations; - } - if (options.dsn === undefined && process.env.SENTRY_DSN) { - options.dsn = process.env.SENTRY_DSN; - } - if (options.release === undefined) { - var global_1 = utils_1.getGlobalObject(); - // Prefer env var over global - if (process.env.SENTRY_RELEASE) { - options.release = process.env.SENTRY_RELEASE; - } - // This supports the variable that sentry-webpack-plugin injects - else if (global_1.SENTRY_RELEASE && global_1.SENTRY_RELEASE.id) { - options.release = global_1.SENTRY_RELEASE.id; - } - } - if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) { - options.environment = process.env.SENTRY_ENVIRONMENT; - } - if (domain.active) { - hub_1.setHubOnCarrier(hub_1.getMainCarrier(), core_1.getCurrentHub()); - } - core_1.initAndBind(client_1.NodeClient, options); -} -exports.init = init; -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -function lastEventId() { - return core_1.getCurrentHub().lastEventId(); -} -exports.lastEventId = lastEventId; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -function flush(timeout) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var client; - return tslib_1.__generator(this, function (_a) { - client = core_1.getCurrentHub().getClient(); - if (client) { - return [2 /*return*/, client.flush(timeout)]; - } - return [2 /*return*/, Promise.reject(false)]; - }); - }); -} -exports.flush = flush; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -function close(timeout) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var client; - return tslib_1.__generator(this, function (_a) { - client = core_1.getCurrentHub().getClient(); - if (client) { - return [2 /*return*/, client.close(timeout)]; - } - return [2 /*return*/, Promise.reject(false)]; - }); - }); -} -exports.close = close; -//# sourceMappingURL=sdk.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/sdk.js.map b/node_modules/@sentry/node/dist/sdk.js.map deleted file mode 100644 index fd72c9a..0000000 --- a/node_modules/@sentry/node/dist/sdk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";;AAAA,qCAA4F;AAC5F,mCAA8D;AAC9D,uCAAgD;AAChD,+BAAiC;AAGjC,mCAAsC;AACtC,+CAAwG;AAE3F,QAAA,mBAAmB,GAAG;IACjC,SAAS;IACT,IAAI,mBAAgB,CAAC,cAAc,EAA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Ac,EAAE,EAAE,oBAAa,EAAE,CAAC,CAAC;KACpD;IAED,kBAAW,CAAC,mBAAU,EAAE,OAAO,CAAC,CAAC;AACnC,CAAC;AA9BD,oBA8BC;AAED;;;;GAIG;AACH,SAAgB,WAAW;IACzB,OAAO,oBAAa,EAAE,CAAC,WAAW,EAAE,CAAC;AACvC,CAAC;AAFD,kCAEC;AAED;;;;;GAKG;AACH,SAAsB,KAAK,CAAC,OAAgB;;;;YACpC,MAAM,GAAG,oBAAa,EAAE,CAAC,SAAS,EAAc,CAAC;YACvD,IAAI,MAAM,EAAE;gBACV,sBAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC;aAC9B;YACD,sBAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;;;CAC9B;AAND,sBAMC;AAED;;;;;GAKG;AACH,SAAsB,KAAK,CAAC,OAAgB;;;;YACpC,MAAM,GAAG,oBAAa,EAAE,CAAC,SAAS,EAAc,CAAC;YACvD,IAAI,MAAM,EAAE;gBACV,sBAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC;aAC9B;YACD,sBAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;;;CAC9B;AAND,sBAMC","sourcesContent":["import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getMainCarrier, setHubOnCarrier } from '@sentry/hub';\nimport { getGlobalObject } from '@sentry/utils';\nimport * as domain from 'domain';\n\nimport { NodeOptions } from './backend';\nimport { NodeClient } from './client';\nimport { Console, Http, LinkedErrors, OnUncaughtException, OnUnhandledRejection } from './integrations';\n\nexport const defaultIntegrations = [\n // Common\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n // Native Wrappers\n new Console(),\n new Http(),\n // Global Handlers\n new OnUncaughtException(),\n new OnUnhandledRejection(),\n // Misc\n new LinkedErrors(),\n];\n\n/**\n * The Sentry Node SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible in the\n * main entry module. To set context information or send manual events, use the\n * provided methods.\n *\n * @example\n * ```\n *\n * const { init } = require('@sentry/node');\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { configureScope } = require('@sentry/node');\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { addBreadcrumb } = require('@sentry/node');\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const Sentry = require('@sentry/node');\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link NodeOptions} for documentation on configuration options.\n */\nexport function init(options: NodeOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n\n if (options.dsn === undefined && process.env.SENTRY_DSN) {\n options.dsn = process.env.SENTRY_DSN;\n }\n\n if (options.release === undefined) {\n const global = getGlobalObject();\n // Prefer env var over global\n if (process.env.SENTRY_RELEASE) {\n options.release = process.env.SENTRY_RELEASE;\n }\n // This supports the variable that sentry-webpack-plugin injects\n else if (global.SENTRY_RELEASE && global.SENTRY_RELEASE.id) {\n options.release = global.SENTRY_RELEASE.id;\n }\n }\n\n if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {\n options.environment = process.env.SENTRY_ENVIRONMENT;\n }\n\n if (domain.active) {\n setHubOnCarrier(getMainCarrier(), getCurrentHub());\n }\n\n initAndBind(NodeClient, options);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport async function flush(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return Promise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport async function close(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return Promise.reject(false);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/stacktrace.d.ts b/node_modules/@sentry/node/dist/stacktrace.d.ts deleted file mode 100644 index 6785b00..0000000 --- a/node_modules/@sentry/node/dist/stacktrace.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * stack-trace - Parses node.js stack traces - * - * This was originally forked to fix this issue: - * https://github.com/felixge/node-stack-trace/issues/31 - * - * Mar 19,2019 - #4fd379e - * - * https://github.com/felixge/node-stack-trace/ - * @license MIT - */ -/** Decoded StackFrame */ -export interface StackFrame { - fileName: string; - lineNumber: number; - functionName: string; - typeName: string; - methodName: string; - native: boolean; - columnNumber: number; -} -/** Extracts StackFrames fron the Error */ -export declare function parse(err: Error): StackFrame[]; -//# sourceMappingURL=stacktrace.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/stacktrace.d.ts.map b/node_modules/@sentry/node/dist/stacktrace.d.ts.map deleted file mode 100644 index 26196fb..0000000 --- a/node_modules/@sentry/node/dist/stacktrace.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,yBAAyB;AACzB,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,0CAA0C;AAC1C,wBAAgB,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,UAAU,EAAE,CA0E9C"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/stacktrace.js b/node_modules/@sentry/node/dist/stacktrace.js deleted file mode 100644 index a143da8..0000000 --- a/node_modules/@sentry/node/dist/stacktrace.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * stack-trace - Parses node.js stack traces - * - * This was originally forked to fix this issue: - * https://github.com/felixge/node-stack-trace/issues/31 - * - * Mar 19,2019 - #4fd379e - * - * https://github.com/felixge/node-stack-trace/ - * @license MIT - */ -Object.defineProperty(exports, "__esModule", { value: true }); -/** Extracts StackFrames fron the Error */ -function parse(err) { - if (!err.stack) { - return []; - } - var lines = err.stack.split('\n').slice(1); - return lines - .map(function (line) { - if (line.match(/^\s*[-]{4,}$/)) { - return { - columnNumber: null, - fileName: line, - functionName: null, - lineNumber: null, - methodName: null, - native: null, - typeName: null, - }; - } - var lineMatch = line.match(/at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/); - if (!lineMatch) { - return undefined; - } - var object = null; - var method = null; - var functionName = null; - var typeName = null; - var methodName = null; - var isNative = lineMatch[5] === 'native'; - if (lineMatch[1]) { - functionName = lineMatch[1]; - var methodStart = functionName.lastIndexOf('.'); - if (functionName[methodStart - 1] === '.') { - methodStart--; - } - if (methodStart > 0) { - object = functionName.substr(0, methodStart); - method = functionName.substr(methodStart + 1); - var objectEnd = object.indexOf('.Module'); - if (objectEnd > 0) { - functionName = functionName.substr(objectEnd + 1); - object = object.substr(0, objectEnd); - } - } - typeName = null; - } - if (method) { - typeName = object; - methodName = method; - } - if (method === '') { - methodName = null; - functionName = null; - } - var properties = { - columnNumber: parseInt(lineMatch[4], 10) || null, - fileName: lineMatch[2] || null, - functionName: functionName, - lineNumber: parseInt(lineMatch[3], 10) || null, - methodName: methodName, - native: isNative, - typeName: typeName, - }; - return properties; - }) - .filter(function (callSite) { return !!callSite; }); -} -exports.parse = parse; -//# sourceMappingURL=stacktrace.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/stacktrace.js.map b/node_modules/@sentry/node/dist/stacktrace.js.map deleted file mode 100644 index 7cc86c7..0000000 --- a/node_modules/@sentry/node/dist/stacktrace.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stacktrace.js","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;AAaH,0CAA0C;AAC1C,SAAgB,KAAK,CAAC,GAAU;IAC9B,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE;QACd,OAAO,EAAE,CAAC;KACX;IAED,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE7C,OAAO,KAAK;SACT,GAAG,CAAC,UAAA,IAAI;QACP,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;YAC9B,OAAO;gBACL,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,IAAI;gBACd,YAAY,EAAE,IAAI;gBAClB,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,IAAI;aACf,CAAC;SACH;QAED,IAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;QACxF,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,YAAY,GAAG,IAAI,CAAC;QACxB,IAAI,QAAQ,GAAG,IAAI,CAAC;QACpB,IAAI,UAAU,GAAG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,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI;YAC9C,UAAU,YAAA;YACV,MAAM,EAAE,QAAQ;YAChB,QAAQ,UAAA;SACT,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;SACD,MAAM,CAAC,UAAA,QAAQ,IAAI,OAAA,CAAC,CAAC,QAAQ,EAAV,CAAU,CAAiB,CAAC;AACpD,CAAC;AA1ED,sBA0EC","sourcesContent":["/**\n * stack-trace - Parses node.js stack traces\n *\n * This was originally forked to fix this issue:\n * https://github.com/felixge/node-stack-trace/issues/31\n *\n * Mar 19,2019 - #4fd379e\n *\n * https://github.com/felixge/node-stack-trace/\n * @license MIT\n */\n\n/** Decoded StackFrame */\nexport interface StackFrame {\n fileName: string;\n lineNumber: number;\n functionName: string;\n typeName: string;\n methodName: string;\n native: boolean;\n columnNumber: number;\n}\n\n/** Extracts StackFrames fron the Error */\nexport function parse(err: Error): StackFrame[] {\n if (!err.stack) {\n return [];\n }\n\n const lines = err.stack.split('\\n').slice(1);\n\n return lines\n .map(line => {\n if (line.match(/^\\s*[-]{4,}$/)) {\n return {\n columnNumber: null,\n fileName: line,\n functionName: null,\n lineNumber: null,\n methodName: null,\n native: null,\n typeName: null,\n };\n }\n\n const lineMatch = line.match(/at (?:(.+?)\\s+\\()?(?:(.+?):(\\d+)(?::(\\d+))?|([^)]+))\\)?/);\n if (!lineMatch) {\n return undefined;\n }\n\n let object = null;\n let method = null;\n let functionName = null;\n let typeName = null;\n let methodName = null;\n const isNative = lineMatch[5] === 'native';\n\n if (lineMatch[1]) {\n functionName = lineMatch[1];\n let methodStart = functionName.lastIndexOf('.');\n if (functionName[methodStart - 1] === '.') {\n methodStart--;\n }\n if (methodStart > 0) {\n object = functionName.substr(0, methodStart);\n method = functionName.substr(methodStart + 1);\n const objectEnd = object.indexOf('.Module');\n if (objectEnd > 0) {\n functionName = functionName.substr(objectEnd + 1);\n object = object.substr(0, objectEnd);\n }\n }\n typeName = null;\n }\n\n if (method) {\n typeName = object;\n methodName = method;\n }\n\n if (method === '') {\n methodName = null;\n functionName = null;\n }\n\n const properties = {\n columnNumber: parseInt(lineMatch[4], 10) || null,\n fileName: lineMatch[2] || null,\n functionName,\n lineNumber: parseInt(lineMatch[3], 10) || null,\n methodName,\n native: isNative,\n typeName,\n };\n\n return properties;\n })\n .filter(callSite => !!callSite) as StackFrame[];\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/base.d.ts b/node_modules/@sentry/node/dist/transports/base.d.ts deleted file mode 100644 index 9119669..0000000 --- a/node_modules/@sentry/node/dist/transports/base.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/// -import { API } from '@sentry/core'; -import { Event, Response, Transport, TransportOptions } from '@sentry/types'; -import { PromiseBuffer } from '@sentry/utils'; -import * as http from 'http'; -import * as https from 'https'; -import * as url from 'url'; -/** - * Internal used interface for typescript. - * @hidden - */ -export interface HTTPRequest { - /** - * Request wrapper - * @param options These are {@see TransportOptions} - * @param callback Callback when request is finished - */ - request(options: http.RequestOptions | https.RequestOptions | string | url.URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; -} -/** Base Transport class implementation */ -export declare abstract class BaseTransport implements Transport { - options: TransportOptions; - /** API object */ - protected _api: API; - /** The Agent used for corresponding transport */ - module?: HTTPRequest; - /** The Agent used for corresponding transport */ - client?: http.Agent | https.Agent; - /** A simple buffer holding all requests. */ - protected readonly _buffer: PromiseBuffer; - /** Locks transport after receiving 429 response */ - private _disabledUntil; - /** Create instance and set this.dsn */ - constructor(options: TransportOptions); - /** Returns a build request option object used by request */ - protected _getRequestOptions(): http.RequestOptions | https.RequestOptions; - /** JSDoc */ - protected _sendWithModule(httpModule: HTTPRequest, event: Event): Promise; - /** - * @inheritDoc - */ - sendEvent(_: Event): PromiseLike; - /** - * @inheritDoc - */ - close(timeout?: number): PromiseLike; -} -//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/base.d.ts.map b/node_modules/@sentry/node/dist/transports/base.d.ts.map deleted file mode 100644 index 6df47d3..0000000 --- a/node_modules/@sentry/node/dist/transports/base.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/transports/base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAU,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAiC,aAAa,EAAe,MAAM,eAAe,CAAC;AAE1F,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAI3B;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,OAAO,CACL,OAAO,EAAE,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,GAAG,MAAM,GAAG,GAAG,CAAC,GAAG,EACtE,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,eAAe,KAAK,IAAI,GAC7C,IAAI,CAAC,aAAa,CAAC;CACvB;AAED,0CAA0C;AAC1C,8BAAsB,aAAc,YAAW,SAAS;IAiB5B,OAAO,EAAE,gBAAgB;IAhBnD,iBAAiB;IACjB,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC;IAEpB,iDAAiD;IAC1C,MAAM,CAAC,EAAE,WAAW,CAAC;IAE5B,iDAAiD;IAC1C,MAAM,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAEzC,4CAA4C;IAC5C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAyB;IAE5E,mDAAmD;IACnD,OAAO,CAAC,cAAc,CAA8B;IAEpD,uCAAuC;gBACb,OAAO,EAAE,gBAAgB;IAInD,4DAA4D;IAC5D,SAAS,CAAC,kBAAkB,IAAI,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc;IA0B1E,YAAY;cACI,eAAe,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;IAiDzF;;OAEG;IACI,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;IAIjD;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;CAGrD"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/base.js b/node_modules/@sentry/node/dist/transports/base.js deleted file mode 100644 index 6aef625..0000000 --- a/node_modules/@sentry/node/dist/transports/base.js +++ /dev/null @@ -1,99 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var core_1 = require("@sentry/core"); -var types_1 = require("@sentry/types"); -var utils_1 = require("@sentry/utils"); -var fs = require("fs"); -var version_1 = require("../version"); -/** Base Transport class implementation */ -var BaseTransport = /** @class */ (function () { - /** Create instance and set this.dsn */ - function BaseTransport(options) { - this.options = options; - /** A simple buffer holding all requests. */ - this._buffer = new utils_1.PromiseBuffer(30); - /** Locks transport after receiving 429 response */ - this._disabledUntil = new Date(Date.now()); - this._api = new core_1.API(options.dsn); - } - /** Returns a build request option object used by request */ - BaseTransport.prototype._getRequestOptions = function () { - var headers = tslib_1.__assign({}, this._api.getRequestHeaders(version_1.SDK_NAME, version_1.SDK_VERSION), this.options.headers); - var dsn = this._api.getDsn(); - var options = { - agent: this.client, - headers: headers, - hostname: dsn.host, - method: 'POST', - path: this._api.getStoreEndpointPath(), - port: dsn.port, - protocol: dsn.protocol + ":", - }; - if (this.options.caCerts) { - options.ca = fs.readFileSync(this.options.caCerts); - } - return options; - }; - /** JSDoc */ - BaseTransport.prototype._sendWithModule = function (httpModule, event) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var _this = this; - return tslib_1.__generator(this, function (_a) { - if (new Date(Date.now()) < this._disabledUntil) { - return [2 /*return*/, Promise.reject(new utils_1.SentryError("Transport locked till " + this._disabledUntil + " due to too many requests."))]; - } - if (!this._buffer.isReady()) { - return [2 /*return*/, Promise.reject(new utils_1.SentryError('Not adding Promise due to buffer limit reached.'))]; - } - return [2 /*return*/, this._buffer.add(new Promise(function (resolve, reject) { - var req = httpModule.request(_this._getRequestOptions(), function (res) { - var statusCode = res.statusCode || 500; - var status = types_1.Status.fromHttpCode(statusCode); - res.setEncoding('utf8'); - if (status === types_1.Status.Success) { - resolve({ status: status }); - } - else { - if (status === types_1.Status.RateLimit) { - var now = Date.now(); - var header = res.headers ? res.headers['Retry-After'] : ''; - header = Array.isArray(header) ? header[0] : header; - _this._disabledUntil = new Date(now + utils_1.parseRetryAfterHeader(now, header)); - utils_1.logger.warn("Too many requests, backing off till: " + _this._disabledUntil); - } - var rejectionMessage = "HTTP Error (" + statusCode + ")"; - if (res.headers && res.headers['x-sentry-error']) { - rejectionMessage += ": " + res.headers['x-sentry-error']; - } - reject(new utils_1.SentryError(rejectionMessage)); - } - // Force the socket to drain - res.on('data', function () { - // Drain - }); - res.on('end', function () { - // Drain - }); - }); - req.on('error', reject); - req.end(JSON.stringify(event)); - }))]; - }); - }); - }; - /** - * @inheritDoc - */ - BaseTransport.prototype.sendEvent = function (_) { - throw new utils_1.SentryError('Transport Class has to implement `sendEvent` method.'); - }; - /** - * @inheritDoc - */ - BaseTransport.prototype.close = function (timeout) { - return this._buffer.drain(timeout); - }; - return BaseTransport; -}()); -exports.BaseTransport = BaseTransport; -//# sourceMappingURL=base.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/base.js.map b/node_modules/@sentry/node/dist/transports/base.js.map deleted file mode 100644 index edf0107..0000000 --- a/node_modules/@sentry/node/dist/transports/base.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.js","source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AAc,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,6BAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;oCACzE,cAAM,CAAC,IAAI,CAAC,0CAAwC,KAAI,CAAC,cAAgB,CAAC,CAAC;iCAC5E;gCAED,IAAI,gBAAgB,GAAG,iBAAe,UAAU,MAAG,CAAC;gCACpD,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;oCAChD,gBAAgB,IAAI,OAAK,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAG,CAAC;iCAC1D;gCAED,MAAM,CAAC,IAAI,mBAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;6BAC3C;4BAED,4BAA4B;4BAC5B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE;gCACb,QAAQ;4BACV,CAAC,CAAC,CAAC;4BACH,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE;gCACZ,QAAQ;4BACV,CAAC,CAAC,CAAC;wBACL,CAAC,CAAC,CAAC;wBACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;wBACxB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;oBACjC,CAAC,CAAC,CACH,EAAC;;;KACH;IAED;;OAEG;IACI,iCAAS,GAAhB,UAAiB,CAAQ;QACvB,MAAM,IAAI,mBAAW,CAAC,sDAAsD,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACI,6BAAK,GAAZ,UAAa,OAAgB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IACH,oBAAC;AAAD,CAAC,AA/GD,IA+GC;AA/GqB,sCAAa","sourcesContent":["import { API } from '@sentry/core';\nimport { Event, Response, Status, Transport, TransportOptions } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, PromiseBuffer, SentryError } from '@sentry/utils';\nimport * as fs from 'fs';\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as url from 'url';\n\nimport { SDK_NAME, SDK_VERSION } from '../version';\n\n/**\n * Internal used interface for typescript.\n * @hidden\n */\nexport interface HTTPRequest {\n /**\n * Request wrapper\n * @param options These are {@see TransportOptions}\n * @param callback Callback when request is finished\n */\n request(\n options: http.RequestOptions | https.RequestOptions | string | url.URL,\n callback?: (res: http.IncomingMessage) => void,\n ): http.ClientRequest;\n}\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /** API object */\n protected _api: API;\n\n /** The Agent used for corresponding transport */\n public module?: HTTPRequest;\n\n /** The Agent used for corresponding transport */\n public client?: http.Agent | https.Agent;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /** Create instance and set this.dsn */\n public constructor(public options: TransportOptions) {\n this._api = new API(options.dsn);\n }\n\n /** Returns a build request option object used by request */\n protected _getRequestOptions(): http.RequestOptions | https.RequestOptions {\n const headers = {\n ...this._api.getRequestHeaders(SDK_NAME, SDK_VERSION),\n ...this.options.headers,\n };\n const dsn = this._api.getDsn();\n\n const options: {\n [key: string]: any;\n } = {\n agent: this.client,\n headers,\n hostname: dsn.host,\n method: 'POST',\n path: this._api.getStoreEndpointPath(),\n port: dsn.port,\n protocol: `${dsn.protocol}:`,\n };\n\n if (this.options.caCerts) {\n options.ca = fs.readFileSync(this.options.caCerts);\n }\n\n return options;\n }\n\n /** JSDoc */\n protected async _sendWithModule(httpModule: HTTPRequest, event: Event): Promise {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject(new SentryError(`Transport locked till ${this._disabledUntil} due to too many requests.`));\n }\n\n if (!this._buffer.isReady()) {\n return Promise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n return this._buffer.add(\n new Promise((resolve, reject) => {\n const req = httpModule.request(this._getRequestOptions(), (res: http.IncomingMessage) => {\n const statusCode = res.statusCode || 500;\n const status = Status.fromHttpCode(statusCode);\n\n res.setEncoding('utf8');\n\n if (status === Status.Success) {\n resolve({ status });\n } else {\n if (status === Status.RateLimit) {\n const now = Date.now();\n let header = res.headers ? res.headers['Retry-After'] : '';\n header = Array.isArray(header) ? header[0] : header;\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, header));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n let rejectionMessage = `HTTP Error (${statusCode})`;\n if (res.headers && res.headers['x-sentry-error']) {\n rejectionMessage += `: ${res.headers['x-sentry-error']}`;\n }\n\n reject(new SentryError(rejectionMessage));\n }\n\n // Force the socket to drain\n res.on('data', () => {\n // Drain\n });\n res.on('end', () => {\n // Drain\n });\n });\n req.on('error', reject);\n req.end(JSON.stringify(event));\n }),\n );\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method.');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/http.d.ts b/node_modules/@sentry/node/dist/transports/http.d.ts deleted file mode 100644 index 5cb1e5e..0000000 --- a/node_modules/@sentry/node/dist/transports/http.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Event, Response, TransportOptions } from '@sentry/types'; -import { BaseTransport } from './base'; -/** Node http module transport */ -export declare class HTTPTransport extends BaseTransport { - options: TransportOptions; - /** Create a new instance and set this.agent */ - constructor(options: TransportOptions); - /** - * @inheritDoc - */ - sendEvent(event: Event): Promise; -} -//# sourceMappingURL=http.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/http.d.ts.map b/node_modules/@sentry/node/dist/transports/http.d.ts.map deleted file mode 100644 index 3772aed..0000000 --- a/node_modules/@sentry/node/dist/transports/http.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIlE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,iCAAiC;AACjC,qBAAa,aAAc,SAAQ,aAAa;IAEpB,OAAO,EAAE,gBAAgB;IADnD,+CAA+C;gBACrB,OAAO,EAAE,gBAAgB;IASnD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;CAMlD"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/http.js b/node_modules/@sentry/node/dist/transports/http.js deleted file mode 100644 index ac1f8bc..0000000 --- a/node_modules/@sentry/node/dist/transports/http.js +++ /dev/null @@ -1,32 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var utils_1 = require("@sentry/utils"); -var http = require("http"); -var base_1 = require("./base"); -/** Node http module transport */ -var HTTPTransport = /** @class */ (function (_super) { - tslib_1.__extends(HTTPTransport, _super); - /** Create a new instance and set this.agent */ - function HTTPTransport(options) { - var _this = _super.call(this, options) || this; - _this.options = options; - var proxy = options.httpProxy || process.env.http_proxy; - _this.module = http; - _this.client = proxy - ? new (require('https-proxy-agent'))(proxy) // tslint:disable-line:no-unsafe-any - : new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 }); - return _this; - } - /** - * @inheritDoc - */ - HTTPTransport.prototype.sendEvent = function (event) { - if (!this.module) { - throw new utils_1.SentryError('No module available in HTTPTransport'); - } - return this._sendWithModule(this.module, event); - }; - return HTTPTransport; -}(base_1.BaseTransport)); -exports.HTTPTransport = HTTPTransport; -//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/http.js.map b/node_modules/@sentry/node/dist/transports/http.js.map deleted file mode 100644 index 949d4dd..0000000 --- a/node_modules/@sentry/node/dist/transports/http.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":";;AACA,uCAA4C;AAC5C,2BAA6B;AAE7B,+BAAuC;AAEvC,iCAAiC;AACjC;IAAmC,yCAAa;IAC9C,+CAA+C;IAC/C,uBAA0B,OAAyB;QAAnD,YACE,kBAAM,OAAO,CAAC,SAMf;QAPyB,aAAO,GAAP,OAAO,CAAkB;QAEjD,IAAM,KAAK,GAAG,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QAC1D,KAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,KAAI,CAAC,MAAM,GAAG,KAAK;YACjB,CAAC,CAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAgB,CAAC,oCAAoC;YAChG,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;;IAC1E,CAAC;IAED;;OAEG;IACI,iCAAS,GAAhB,UAAiB,KAAY;QAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,mBAAW,CAAC,sCAAsC,CAAC,CAAC;SAC/D;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IACH,oBAAC;AAAD,CAAC,AApBD,CAAmC,oBAAa,GAoB/C;AApBY,sCAAa","sourcesContent":["import { Event, Response, TransportOptions } from '@sentry/types';\nimport { SentryError } from '@sentry/utils';\nimport * as http from 'http';\n\nimport { BaseTransport } from './base';\n\n/** Node http module transport */\nexport class HTTPTransport extends BaseTransport {\n /** Create a new instance and set this.agent */\n public constructor(public options: TransportOptions) {\n super(options);\n const proxy = options.httpProxy || process.env.http_proxy;\n this.module = http;\n this.client = proxy\n ? (new (require('https-proxy-agent'))(proxy) as http.Agent) // tslint:disable-line:no-unsafe-any\n : new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 });\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): Promise {\n if (!this.module) {\n throw new SentryError('No module available in HTTPTransport');\n }\n return this._sendWithModule(this.module, event);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/https.d.ts b/node_modules/@sentry/node/dist/transports/https.d.ts deleted file mode 100644 index a8ec6b7..0000000 --- a/node_modules/@sentry/node/dist/transports/https.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Event, Response, TransportOptions } from '@sentry/types'; -import { BaseTransport } from './base'; -/** Node https module transport */ -export declare class HTTPSTransport extends BaseTransport { - options: TransportOptions; - /** Create a new instance and set this.agent */ - constructor(options: TransportOptions); - /** - * @inheritDoc - */ - sendEvent(event: Event): Promise; -} -//# sourceMappingURL=https.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/https.d.ts.map b/node_modules/@sentry/node/dist/transports/https.d.ts.map deleted file mode 100644 index d9c0cbe..0000000 --- a/node_modules/@sentry/node/dist/transports/https.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"https.d.ts","sourceRoot":"","sources":["../../src/transports/https.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIlE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,kCAAkC;AAClC,qBAAa,cAAe,SAAQ,aAAa;IAErB,OAAO,EAAE,gBAAgB;IADnD,+CAA+C;gBACrB,OAAO,EAAE,gBAAgB;IASnD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;CAMlD"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/https.js b/node_modules/@sentry/node/dist/transports/https.js deleted file mode 100644 index f5352c2..0000000 --- a/node_modules/@sentry/node/dist/transports/https.js +++ /dev/null @@ -1,32 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var utils_1 = require("@sentry/utils"); -var https = require("https"); -var base_1 = require("./base"); -/** Node https module transport */ -var HTTPSTransport = /** @class */ (function (_super) { - tslib_1.__extends(HTTPSTransport, _super); - /** Create a new instance and set this.agent */ - function HTTPSTransport(options) { - var _this = _super.call(this, options) || this; - _this.options = options; - var proxy = options.httpsProxy || options.httpProxy || process.env.https_proxy || process.env.http_proxy; - _this.module = https; - _this.client = proxy - ? new (require('https-proxy-agent'))(proxy) // tslint:disable-line:no-unsafe-any - : new https.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 }); - return _this; - } - /** - * @inheritDoc - */ - HTTPSTransport.prototype.sendEvent = function (event) { - if (!this.module) { - throw new utils_1.SentryError('No module available in HTTPSTransport'); - } - return this._sendWithModule(this.module, event); - }; - return HTTPSTransport; -}(base_1.BaseTransport)); -exports.HTTPSTransport = HTTPSTransport; -//# sourceMappingURL=https.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/https.js.map b/node_modules/@sentry/node/dist/transports/https.js.map deleted file mode 100644 index 16c072d..0000000 --- a/node_modules/@sentry/node/dist/transports/https.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"https.js","sourceRoot":"","sources":["../../src/transports/https.ts"],"names":[],"mappings":";;AACA,uCAA4C;AAC5C,6BAA+B;AAE/B,+BAAuC;AAEvC,kCAAkC;AAClC;IAAoC,0CAAa;IAC/C,+CAA+C;IAC/C,wBAA0B,OAAyB;QAAnD,YACE,kBAAM,OAAO,CAAC,SAMf;QAPyB,aAAO,GAAP,OAAO,CAAkB;QAEjD,IAAM,KAAK,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QAC3G,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,KAAI,CAAC,MAAM,GAAG,KAAK;YACjB,CAAC,CAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAiB,CAAC,oCAAoC;YACjG,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;;IAC3E,CAAC;IAED;;OAEG;IACI,kCAAS,GAAhB,UAAiB,KAAY;QAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,mBAAW,CAAC,uCAAuC,CAAC,CAAC;SAChE;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IACH,qBAAC;AAAD,CAAC,AApBD,CAAoC,oBAAa,GAoBhD;AApBY,wCAAc","sourcesContent":["import { Event, Response, TransportOptions } from '@sentry/types';\nimport { SentryError } from '@sentry/utils';\nimport * as https from 'https';\n\nimport { BaseTransport } from './base';\n\n/** Node https module transport */\nexport class HTTPSTransport extends BaseTransport {\n /** Create a new instance and set this.agent */\n public constructor(public options: TransportOptions) {\n super(options);\n const proxy = options.httpsProxy || options.httpProxy || process.env.https_proxy || process.env.http_proxy;\n this.module = https;\n this.client = proxy\n ? (new (require('https-proxy-agent'))(proxy) as https.Agent) // tslint:disable-line:no-unsafe-any\n : new https.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 });\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): Promise {\n if (!this.module) {\n throw new SentryError('No module available in HTTPSTransport');\n }\n return this._sendWithModule(this.module, event);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/index.d.ts b/node_modules/@sentry/node/dist/transports/index.d.ts deleted file mode 100644 index 827c079..0000000 --- a/node_modules/@sentry/node/dist/transports/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { BaseTransport } from './base'; -export { HTTPTransport } from './http'; -export { HTTPSTransport } from './https'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/index.d.ts.map b/node_modules/@sentry/node/dist/transports/index.d.ts.map deleted file mode 100644 index 25b90b3..0000000 --- a/node_modules/@sentry/node/dist/transports/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/index.js b/node_modules/@sentry/node/dist/transports/index.js deleted file mode 100644 index 0cc0869..0000000 --- a/node_modules/@sentry/node/dist/transports/index.js +++ /dev/null @@ -1,8 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var base_1 = require("./base"); -exports.BaseTransport = base_1.BaseTransport; -var http_1 = require("./http"); -exports.HTTPTransport = http_1.HTTPTransport; -var https_1 = require("./https"); -exports.HTTPSTransport = https_1.HTTPSTransport; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/transports/index.js.map b/node_modules/@sentry/node/dist/transports/index.js.map deleted file mode 100644 index dbd8739..0000000 --- a/node_modules/@sentry/node/dist/transports/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transports/index.ts"],"names":[],"mappings":";AAAA,+BAAuC;AAA9B,+BAAA,aAAa,CAAA;AACtB,+BAAuC;AAA9B,+BAAA,aAAa,CAAA;AACtB,iCAAyC;AAAhC,iCAAA,cAAc,CAAA","sourcesContent":["export { BaseTransport } from './base';\nexport { HTTPTransport } from './http';\nexport { HTTPSTransport } from './https';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/version.d.ts b/node_modules/@sentry/node/dist/version.d.ts deleted file mode 100644 index b14d8f8..0000000 --- a/node_modules/@sentry/node/dist/version.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const SDK_NAME = "sentry.javascript.node"; -export declare const SDK_VERSION = "5.14.1"; -//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/version.d.ts.map b/node_modules/@sentry/node/dist/version.d.ts.map deleted file mode 100644 index 51c3f03..0000000 --- a/node_modules/@sentry/node/dist/version.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,2BAA2B,CAAC;AACjD,eAAO,MAAM,WAAW,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/version.js b/node_modules/@sentry/node/dist/version.js deleted file mode 100644 index 4911f4c..0000000 --- a/node_modules/@sentry/node/dist/version.js +++ /dev/null @@ -1,4 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SDK_NAME = 'sentry.javascript.node'; -exports.SDK_VERSION = '5.14.1'; -//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/dist/version.js.map b/node_modules/@sentry/node/dist/version.js.map deleted file mode 100644 index 7e3d6a2..0000000 --- a/node_modules/@sentry/node/dist/version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";AAAa,QAAA,QAAQ,GAAG,wBAAwB,CAAC;AACpC,QAAA,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_NAME = 'sentry.javascript.node';\nexport const SDK_VERSION = '5.14.1';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/backend.d.ts b/node_modules/@sentry/node/esm/backend.d.ts deleted file mode 100644 index a8ccc67..0000000 --- a/node_modules/@sentry/node/esm/backend.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { BaseBackend } from '@sentry/core'; -import { Event, EventHint, Options, Severity, Transport } from '@sentry/types'; -/** - * Configuration options for the Sentry Node SDK. - * @see NodeClient for more information. - */ -export interface NodeOptions extends Options { - /** Callback that is executed when a fatal global error occurs. */ - onFatalError?(error: Error): void; - /** Sets an optional server name (device name) */ - serverName?: string; - /** Maximum time to wait to drain the request queue, before the process is allowed to exit. */ - shutdownTimeout?: number; - /** Set a HTTP proxy that should be used for outbound requests. */ - httpProxy?: string; - /** Set a HTTPS proxy that should be used for outbound requests. */ - httpsProxy?: string; - /** HTTPS proxy certificates path */ - caCerts?: string; - /** Sets the number of context lines for each frame when loading a file. */ - frameContextLines?: number; -} -/** - * The Sentry Node SDK Backend. - * @hidden - */ -export declare class NodeBackend extends BaseBackend { - /** - * @inheritDoc - */ - protected _setupTransport(): Transport; - /** - * @inheritDoc - */ - eventFromException(exception: any, hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike; -} -//# sourceMappingURL=backend.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/backend.d.ts.map b/node_modules/@sentry/node/esm/backend.d.ts.map deleted file mode 100644 index dfd7f8f..0000000 --- a/node_modules/@sentry/node/esm/backend.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAa,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAoB,MAAM,eAAe,CAAC;AAe5G;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO;IAC1C,kEAAkE;IAClE,YAAY,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAElC,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,8FAA8F;IAC9F,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,WAAW,CAAC,WAAW,CAAC;IACvD;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,SAAS;IAyBtC;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IA0C/E;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,QAAwB,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;CAyBhH"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/backend.js b/node_modules/@sentry/node/esm/backend.js deleted file mode 100644 index f79cf67..0000000 --- a/node_modules/@sentry/node/esm/backend.js +++ /dev/null @@ -1,105 +0,0 @@ -import * as tslib_1 from "tslib"; -import { BaseBackend, getCurrentHub } from '@sentry/core'; -import { Severity } from '@sentry/types'; -import { addExceptionMechanism, addExceptionTypeValue, Dsn, extractExceptionKeysForMessage, isError, isPlainObject, normalizeToSize, SyncPromise, } from '@sentry/utils'; -import { extractStackFromError, parseError, parseStack, prepareFramesForEvent } from './parsers'; -import { HTTPSTransport, HTTPTransport } from './transports'; -/** - * The Sentry Node SDK Backend. - * @hidden - */ -var NodeBackend = /** @class */ (function (_super) { - tslib_1.__extends(NodeBackend, _super); - function NodeBackend() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @inheritDoc - */ - NodeBackend.prototype._setupTransport = function () { - if (!this._options.dsn) { - // We return the noop transport here in case there is no Dsn. - return _super.prototype._setupTransport.call(this); - } - var dsn = new Dsn(this._options.dsn); - var transportOptions = tslib_1.__assign({}, this._options.transportOptions, (this._options.httpProxy && { httpProxy: this._options.httpProxy }), (this._options.httpsProxy && { httpsProxy: this._options.httpsProxy }), (this._options.caCerts && { caCerts: this._options.caCerts }), { dsn: this._options.dsn }); - if (this._options.transport) { - return new this._options.transport(transportOptions); - } - if (dsn.protocol === 'http') { - return new HTTPTransport(transportOptions); - } - return new HTTPSTransport(transportOptions); - }; - /** - * @inheritDoc - */ - NodeBackend.prototype.eventFromException = function (exception, hint) { - var _this = this; - var ex = exception; - var mechanism = { - handled: true, - type: 'generic', - }; - if (!isError(exception)) { - if (isPlainObject(exception)) { - // This will allow us to group events based on top-level keys - // which is much better than creating new group when any key/value change - var message = "Non-Error exception captured with keys: " + extractExceptionKeysForMessage(exception); - getCurrentHub().configureScope(function (scope) { - scope.setExtra('__serialized__', normalizeToSize(exception)); - }); - ex = (hint && hint.syntheticException) || new Error(message); - ex.message = message; - } - else { - // This handles when someone does: `throw "something awesome";` - // We use synthesized Error here so we can extract a (rough) stack trace. - ex = (hint && hint.syntheticException) || new Error(exception); - } - mechanism.synthetic = true; - } - return new SyncPromise(function (resolve, reject) { - return parseError(ex, _this._options) - .then(function (event) { - addExceptionTypeValue(event, undefined, undefined); - addExceptionMechanism(event, mechanism); - resolve(tslib_1.__assign({}, event, { event_id: hint && hint.event_id })); - }) - .then(null, reject); - }); - }; - /** - * @inheritDoc - */ - NodeBackend.prototype.eventFromMessage = function (message, level, hint) { - var _this = this; - if (level === void 0) { level = Severity.Info; } - var event = { - event_id: hint && hint.event_id, - level: level, - message: message, - }; - return new SyncPromise(function (resolve) { - if (_this._options.attachStacktrace && hint && hint.syntheticException) { - var stack = hint.syntheticException ? extractStackFromError(hint.syntheticException) : []; - parseStack(stack, _this._options) - .then(function (frames) { - event.stacktrace = { - frames: prepareFramesForEvent(frames), - }; - resolve(event); - }) - .then(null, function () { - resolve(event); - }); - } - else { - resolve(event); - } - }); - }; - return NodeBackend; -}(BaseBackend)); -export { NodeBackend }; -//# sourceMappingURL=backend.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/backend.js.map b/node_modules/@sentry/node/esm/backend.js.map deleted file mode 100644 index 7746538..0000000 --- a/node_modules/@sentry/node/esm/backend.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAwC,QAAQ,EAA+B,MAAM,eAAe,CAAC;AAC5G,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,GAAG,EACH,8BAA8B,EAC9B,OAAO,EACP,aAAa,EACb,eAAe,EACf,WAAW,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AA6B7D;;;GAGG;AACH;IAAiC,uCAAwB;IAAzD;;IAsGA,CAAC;IArGC;;OAEG;IACO,qCAAe,GAAzB;QACE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACtB,6DAA6D;YAC7D,OAAO,iBAAM,eAAe,WAAE,CAAC;SAChC;QAED,IAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAEvC,IAAM,gBAAgB,wBACjB,IAAI,CAAC,QAAQ,CAAC,gBA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AAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5F,UAAU,CAAC,KAAK,EAAE,KAAI,CAAC,QAAQ,CAAC;qBAC7B,IAAI,CAAC,UAAA,MAAM;oBACV,KAAK,CAAC,UAAU,GAAG;wBACjB,MAAM,EAAE,qBAAqB,CAAC,MAAM,CAAC;qBACtC,CAAC;oBACF,OAAO,CAAC,KAAK,CAAC,CAAC;gBACjB,CAAC,CAAC;qBACD,IAAI,CAAC,IAAI,EAAE;oBACV,OAAO,CAAC,KAAK,CAAC,CAAC;gBACjB,CAAC,CAAC,CAAC;aACN;iBAAM;gBACL,OAAO,CAAC,KAAK,CAAC,CAAC;aAChB;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACH,kBAAC;AAAD,CAAC,AAtGD,CAAiC,WAAW,GAsG3C","sourcesContent":["import { BaseBackend, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Mechanism, Options, Severity, Transport, TransportOptions } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n Dsn,\n extractExceptionKeysForMessage,\n isError,\n isPlainObject,\n normalizeToSize,\n SyncPromise,\n} from '@sentry/utils';\n\nimport { extractStackFromError, parseError, parseStack, prepareFramesForEvent } from './parsers';\nimport { HTTPSTransport, HTTPTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Node SDK.\n * @see NodeClient for more information.\n */\nexport interface NodeOptions extends Options {\n /** Callback that is executed when a fatal global error occurs. */\n onFatalError?(error: Error): void;\n\n /** Sets an optional server name (device name) */\n serverName?: string;\n\n /** Maximum time to wait to drain the request queue, before the process is allowed to exit. */\n shutdownTimeout?: number;\n\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n\n /** HTTPS proxy certificates path */\n caCerts?: string;\n\n /** Sets the number of context lines for each frame when loading a file. */\n frameContextLines?: number;\n}\n\n/**\n * The Sentry Node SDK Backend.\n * @hidden\n */\nexport class NodeBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const dsn = new Dsn(this._options.dsn);\n\n const transportOptions: TransportOptions = {\n ...this._options.transportOptions,\n ...(this._options.httpProxy && { httpProxy: this._options.httpProxy }),\n ...(this._options.httpsProxy && { httpsProxy: this._options.httpsProxy }),\n ...(this._options.caCerts && { caCerts: this._options.caCerts }),\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (dsn.protocol === 'http') {\n return new HTTPTransport(transportOptions);\n }\n return new HTTPSTransport(transportOptions);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n let ex: any = exception;\n const mechanism: Mechanism = {\n handled: true,\n type: 'generic',\n };\n\n if (!isError(exception)) {\n if (isPlainObject(exception)) {\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const message = `Non-Error exception captured with keys: ${extractExceptionKeysForMessage(exception)}`;\n\n getCurrentHub().configureScope(scope => {\n scope.setExtra('__serialized__', normalizeToSize(exception as {}));\n });\n\n ex = (hint && hint.syntheticException) || new Error(message);\n (ex as Error).message = message;\n } else {\n // This handles when someone does: `throw \"something awesome\";`\n // We use synthesized Error here so we can extract a (rough) stack trace.\n ex = (hint && hint.syntheticException) || new Error(exception as string);\n }\n mechanism.synthetic = true;\n }\n\n return new SyncPromise((resolve, reject) =>\n parseError(ex as Error, this._options)\n .then(event => {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, mechanism);\n\n resolve({\n ...event,\n event_id: hint && hint.event_id,\n });\n })\n .then(null, reject),\n );\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n const event: Event = {\n event_id: hint && hint.event_id,\n level,\n message,\n };\n\n return new SyncPromise(resolve => {\n if (this._options.attachStacktrace && hint && hint.syntheticException) {\n const stack = hint.syntheticException ? extractStackFromError(hint.syntheticException) : [];\n parseStack(stack, this._options)\n .then(frames => {\n event.stacktrace = {\n frames: prepareFramesForEvent(frames),\n };\n resolve(event);\n })\n .then(null, () => {\n resolve(event);\n });\n } else {\n resolve(event);\n }\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/client.d.ts b/node_modules/@sentry/node/esm/client.d.ts deleted file mode 100644 index d74a021..0000000 --- a/node_modules/@sentry/node/esm/client.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { BaseClient, Scope } from '@sentry/core'; -import { Event, EventHint } from '@sentry/types'; -import { NodeBackend, NodeOptions } from './backend'; -/** - * The Sentry Node SDK Client. - * - * @see NodeOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -export declare class NodeClient extends BaseClient { - /** - * Creates a new Node SDK instance. - * @param options Configuration options for this SDK. - */ - constructor(options: NodeOptions); - /** - * @inheritDoc - */ - protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike; -} -//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/client.d.ts.map b/node_modules/@sentry/node/esm/client.d.ts.map deleted file mode 100644 index 69a7302..0000000 --- a/node_modules/@sentry/node/esm/client.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGrD;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC;IAClE;;;OAGG;gBACgB,OAAO,EAAE,WAAW;IAIvC;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;CAqBlG"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/client.js b/node_modules/@sentry/node/esm/client.js index 437507b..2c64fcd 100644 --- a/node_modules/@sentry/node/esm/client.js +++ b/node_modules/@sentry/node/esm/client.js @@ -1,39 +1,165 @@ -import * as tslib_1 from "tslib"; -import { BaseClient } from '@sentry/core'; -import { NodeBackend } from './backend'; -import { SDK_NAME, SDK_VERSION } from './version'; +import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; +import { BaseClient, SDK_VERSION, SessionFlusher } from '@sentry/core'; +import { logger, resolvedSyncPromise } from '@sentry/utils'; +import * as os from 'os'; +import { TextEncoder } from 'util'; +import { eventFromUnknownInput, eventFromMessage } from './eventbuilder.js'; + /** * The Sentry Node SDK Client. * - * @see NodeOptions for documentation on configuration options. + * @see NodeClientOptions for documentation on configuration options. * @see SentryClient for usage documentation. */ -var NodeClient = /** @class */ (function (_super) { - tslib_1.__extends(NodeClient, _super); - /** - * Creates a new Node SDK instance. - * @param options Configuration options for this SDK. - */ - function NodeClient(options) { - return _super.call(this, NodeBackend, options) || this; +class NodeClient extends BaseClient { + + /** + * Creates a new Node SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + options._metadata = options._metadata || {}; + options._metadata.sdk = options._metadata.sdk || { + name: 'sentry.javascript.node', + packages: [ + { + name: 'npm:@sentry/node', + version: SDK_VERSION, + }, + ], + version: SDK_VERSION, + }; + + // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util + options.transportOptions = { + textEncoder: new TextEncoder(), + ...options.transportOptions, + }; + + super(options); + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + captureException(exception, hint, scope) { + // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only + // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload + // sent to the Server only when the `requestHandler` middleware is used + if (this._options.autoSessionTracking && this._sessionFlusher && scope) { + const requestSession = scope.getRequestSession(); + + // Necessary checks to ensure this is code block is executed only within a request + // Should override the status only if `requestSession.status` is `Ok`, which is its initial stage + if (requestSession && requestSession.status === 'ok') { + requestSession.status = 'errored'; + } } - /** - * @inheritDoc - */ - NodeClient.prototype._prepareEvent = function (event, scope, hint) { - event.platform = event.platform || 'node'; - event.sdk = tslib_1.__assign({}, event.sdk, { name: SDK_NAME, packages: tslib_1.__spread(((event.sdk && event.sdk.packages) || []), [ - { - name: 'npm:@sentry/node', - version: SDK_VERSION, - }, - ]), version: SDK_VERSION }); - if (this.getOptions().serverName) { - event.server_name = this.getOptions().serverName; + + return super.captureException(exception, hint, scope); + } + + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only + // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload + // sent to the Server only when the `requestHandler` middleware is used + if (this._options.autoSessionTracking && this._sessionFlusher && scope) { + const eventType = event.type || 'exception'; + const isException = + eventType === 'exception' && event.exception && event.exception.values && event.exception.values.length > 0; + + // If the event is of type Exception, then a request session should be captured + if (isException) { + const requestSession = scope.getRequestSession(); + + // Ensure that this is happening within the bounds of a request, and make sure not to override + // Session Status if Errored / Crashed + if (requestSession && requestSession.status === 'ok') { + requestSession.status = 'errored'; } - return _super.prototype._prepareEvent.call(this, event, scope, hint); + } + } + + return super.captureEvent(event, hint, scope); + } + + /** + * + * @inheritdoc + */ + close(timeout) { + _optionalChain([this, 'access', _ => _._sessionFlusher, 'optionalAccess', _2 => _2.close, 'call', _3 => _3()]); + return super.close(timeout); + } + + /** Method that initialises an instance of SessionFlusher on Client */ + initSessionFlusher() { + const { release, environment } = this._options; + if (!release) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot initialise an instance of SessionFlusher if no release is provided!'); + } else { + this._sessionFlusher = new SessionFlusher(this, { + release, + environment, + }); + } + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + eventFromException(exception, hint) { + return resolvedSyncPromise(eventFromUnknownInput(this._options.stackParser, exception, hint)); + } + + /** + * @inheritDoc + */ + eventFromMessage( + message, + // eslint-disable-next-line deprecation/deprecation + level = 'info', + hint, + ) { + return resolvedSyncPromise( + eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace), + ); + } + + /** + * @inheritDoc + */ + _prepareEvent(event, hint, scope) { + event.platform = event.platform || 'node'; + event.contexts = { + ...event.contexts, + runtime: _optionalChain([event, 'access', _4 => _4.contexts, 'optionalAccess', _5 => _5.runtime]) || { + name: 'node', + version: global.process.version, + }, }; - return NodeClient; -}(BaseClient)); + event.server_name = + event.server_name || this.getOptions().serverName || global.process.env.SENTRY_NAME || os.hostname(); + return super._prepareEvent(event, hint, scope); + } + + /** + * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment + * appropriate session aggregates bucket + */ + _captureRequestSession() { + if (!this._sessionFlusher) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Discarded request mode session because autoSessionTracking option was disabled'); + } else { + this._sessionFlusher.incrementSessionStatusCount(); + } + } +} + export { NodeClient }; -//# sourceMappingURL=client.js.map \ No newline at end of file +//# sourceMappingURL=client.js.map diff --git a/node_modules/@sentry/node/esm/client.js.map b/node_modules/@sentry/node/esm/client.js.map index a35ba7c..9faf3d5 100644 --- a/node_modules/@sentry/node/esm/client.js.map +++ b/node_modules/@sentry/node/esm/client.js.map @@ -1 +1 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAS,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAe,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;GAKG;AACH;IAAgC,sCAAoC;IAClE;;;OAGG;IACH,oBAAmB,OAAoB;eACrC,kBAAM,WAAW,EAAE,OAAO,CAAC;IAC7B,CAAC;IAED;;OAEG;IACO,kCAAa,GAAvB,UAAwB,KAAY,EAAE,KAAa,EAAE,IAAgB;QACnE,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAC;QAC1C,KAAK,CAAC,GAAG,wBACJ,KAAK,CAAC,GAAG,IACZ,IAAI,EAAE,QAAQ,EACd,QAAQ,mBACH,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAC5C;oBACE,IAAI,EAAE,kBAAkB;oBACxB,OAAO,EAAE,WAAW;iBACrB;gBAEH,OAAO,EAAE,WAAW,GACrB,CAAC;QAEF,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE;YAChC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC;SAClD;QAED,OAAO,iBAAM,aAAa,YAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IACH,iBAAC;AAAD,CAAC,AAjCD,CAAgC,UAAU,GAiCzC","sourcesContent":["import { BaseClient, Scope } from '@sentry/core';\nimport { Event, EventHint } from '@sentry/types';\n\nimport { NodeBackend, NodeOptions } from './backend';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n/**\n * The Sentry Node SDK Client.\n *\n * @see NodeOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class NodeClient extends BaseClient {\n /**\n * Creates a new Node SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: NodeOptions) {\n super(NodeBackend, options);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'node';\n event.sdk = {\n ...event.sdk,\n name: SDK_NAME,\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/node',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n if (this.getOptions().serverName) {\n event.server_name = this.getOptions().serverName;\n }\n\n return super._prepareEvent(event, scope, hint);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"client.js","sources":["../../src/client.ts"],"sourcesContent":["import type { Scope } from '@sentry/core';\nimport { BaseClient, SDK_VERSION, SessionFlusher } from '@sentry/core';\nimport type { Event, EventHint, Severity, SeverityLevel } from '@sentry/types';\nimport { logger, resolvedSyncPromise } from '@sentry/utils';\nimport * as os from 'os';\nimport { TextEncoder } from 'util';\n\nimport { eventFromMessage, eventFromUnknownInput } from './eventbuilder';\nimport type { NodeClientOptions } from './types';\n\n/**\n * The Sentry Node SDK Client.\n *\n * @see NodeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class NodeClient extends BaseClient {\n protected _sessionFlusher: SessionFlusher | undefined;\n\n /**\n * Creates a new Node SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: NodeClientOptions) {\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.node',\n packages: [\n {\n name: 'npm:@sentry/node',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util\n options.transportOptions = {\n textEncoder: new TextEncoder(),\n ...options.transportOptions,\n };\n\n super(options);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only\n // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload\n // sent to the Server only when the `requestHandler` middleware is used\n if (this._options.autoSessionTracking && this._sessionFlusher && scope) {\n const requestSession = scope.getRequestSession();\n\n // Necessary checks to ensure this is code block is executed only within a request\n // Should override the status only if `requestSession.status` is `Ok`, which is its initial stage\n if (requestSession && requestSession.status === 'ok') {\n requestSession.status = 'errored';\n }\n }\n\n return super.captureException(exception, hint, scope);\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only\n // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload\n // sent to the Server only when the `requestHandler` middleware is used\n if (this._options.autoSessionTracking && this._sessionFlusher && scope) {\n const eventType = event.type || 'exception';\n const isException =\n eventType === 'exception' && event.exception && event.exception.values && event.exception.values.length > 0;\n\n // If the event is of type Exception, then a request session should be captured\n if (isException) {\n const requestSession = scope.getRequestSession();\n\n // Ensure that this is happening within the bounds of a request, and make sure not to override\n // Session Status if Errored / Crashed\n if (requestSession && requestSession.status === 'ok') {\n requestSession.status = 'errored';\n }\n }\n }\n\n return super.captureEvent(event, hint, scope);\n }\n\n /**\n *\n * @inheritdoc\n */\n public close(timeout?: number): PromiseLike {\n this._sessionFlusher?.close();\n return super.close(timeout);\n }\n\n /** Method that initialises an instance of SessionFlusher on Client */\n public initSessionFlusher(): void {\n const { release, environment } = this._options;\n if (!release) {\n __DEBUG_BUILD__ && logger.warn('Cannot initialise an instance of SessionFlusher if no release is provided!');\n } else {\n this._sessionFlusher = new SessionFlusher(this, {\n release,\n environment,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n return resolvedSyncPromise(eventFromUnknownInput(this._options.stackParser, exception, hint));\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n ): PromiseLike {\n return resolvedSyncPromise(\n eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),\n );\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n event.platform = event.platform || 'node';\n event.contexts = {\n ...event.contexts,\n runtime: event.contexts?.runtime || {\n name: 'node',\n version: global.process.version,\n },\n };\n event.server_name =\n event.server_name || this.getOptions().serverName || global.process.env.SENTRY_NAME || os.hostname();\n return super._prepareEvent(event, hint, scope);\n }\n\n /**\n * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment\n * appropriate session aggregates bucket\n */\n protected _captureRequestSession(): void {\n if (!this._sessionFlusher) {\n __DEBUG_BUILD__ && logger.warn('Discarded request mode session because autoSessionTracking option was disabled');\n } else {\n this._sessionFlusher.incrementSessionStatusCount();\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;AAUA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA;CACA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;IACA;EACA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/handlers.d.ts b/node_modules/@sentry/node/esm/handlers.d.ts deleted file mode 100644 index 31d3403..0000000 --- a/node_modules/@sentry/node/esm/handlers.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/// -import { Event } from '@sentry/types'; -import * as http from 'http'; -/** - * Express compatible tracing handler. - * @see Exposed as `Handlers.tracingHandler` - */ -export declare function tracingHandler(): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void; -declare type TransactionTypes = 'path' | 'methodPath' | 'handler'; -/** - * Options deciding what parts of the request to use when enhancing an event - */ -interface ParseRequestOptions { - ip?: boolean; - request?: boolean | string[]; - serverName?: boolean; - transaction?: boolean | TransactionTypes; - user?: boolean | string[]; - version?: boolean; -} -/** - * Enriches passed event with request data. - * - * @param event Will be mutated and enriched with req data - * @param req Request object - * @param options object containing flags to enable functionality - * @hidden - */ -export declare function parseRequest(event: Event, req: { - [key: string]: any; - user?: { - [key: string]: any; - }; - ip?: string; - connection?: { - remoteAddress?: string; - }; -}, options?: ParseRequestOptions): Event; -/** - * Express compatible request handler. - * @see Exposed as `Handlers.requestHandler` - */ -export declare function requestHandler(options?: ParseRequestOptions & { - flushTimeout?: number; -}): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void; -/** JSDoc */ -interface MiddlewareError extends Error { - status?: number | string; - statusCode?: number | string; - status_code?: number | string; - output?: { - statusCode?: number | string; - }; -} -/** - * Express compatible error handler. - * @see Exposed as `Handlers.errorHandler` - */ -export declare function errorHandler(options?: { - /** - * Callback method deciding whether error should be captured and sent to Sentry - * @param error Captured middleware error - */ - shouldHandleError?(error: MiddlewareError): boolean; -}): (error: MiddlewareError, req: http.IncomingMessage, res: http.ServerResponse, next: (error: MiddlewareError) => void) => void; -/** - * @hidden - */ -export declare function logAndExitProcess(error: Error): void; -export {}; -//# sourceMappingURL=handlers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/handlers.d.ts.map b/node_modules/@sentry/node/esm/handlers.d.ts.map deleted file mode 100644 index 95d21d9..0000000 --- a/node_modules/@sentry/node/esm/handlers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAItC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAS7B;;;GAGG;AACH,wBAAgB,cAAc,IAAI,CAChC,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,KACxB,IAAI,CAyBR;AAED,aAAK,gBAAgB,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;AA+I1D;;GAEG;AACH,UAAU,mBAAmB;IAC3B,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IACzC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,CAAC,EAAE;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ers.js index 61d6478..1c9c387 100644 --- a/node_modules/@sentry/node/esm/handlers.js +++ b/node_modules/@sentry/node/esm/handlers.js @@ -1,275 +1,289 @@ -import * as tslib_1 from "tslib"; -import { Span } from '@sentry/apm'; -import { captureException, getCurrentHub, withScope } from '@sentry/core'; -import { forget, isString, logger, normalize } from '@sentry/utils'; -import * as cookie from 'cookie'; +import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; +import { getCurrentHub, startTransaction, withScope, captureException } from '@sentry/core'; +import { logger, isString, extractTraceparentData, baggageHeaderToDynamicSamplingContext, extractPathForTransaction, addRequestDataToTransaction, dropUndefinedKeys } from '@sentry/utils'; import * as domain from 'domain'; -import * as os from 'os'; -import * as url from 'url'; -import { flush } from './sdk'; -var DEFAULT_SHUTDOWN_TIMEOUT = 2000; +import { extractRequestData } from './requestdata.js'; +import { isAutoSessionTrackingEnabled, flush } from './sdk.js'; +export { extractRequestData, parseRequest } from './requestDataDeprecated.js'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + /** - * Express compatible tracing handler. + * Express-compatible tracing handler. * @see Exposed as `Handlers.tracingHandler` */ -export function tracingHandler() { - return function sentryTracingMiddleware(req, res, next) { - // TODO: At this point req.route.path we use in `extractTransaction` is not available - // but `req.path` or `req.url` should do the job as well. We could unify this here. - var reqMethod = (req.method || '').toUpperCase(); - var reqUrl = req.url; - var hub = getCurrentHub(); - var transaction = hub.startSpan({ - transaction: reqMethod + "|" + reqUrl, - }); - hub.configureScope(function (scope) { - scope.setSpan(transaction); - }); - res.once('finish', function () { - transaction.setHttpStatus(res.statusCode); - transaction.finish(); - }); - next(); - }; -} -/** JSDoc */ -function extractTransaction(req, type) { - try { - // Express.js shape - var request = req; - switch (type) { - case 'path': { - return request.route.path; - } - case 'handler': { - return request.route.stack[0].name; - } - case 'methodPath': - default: { - var method = request.method.toUpperCase(); - var path = request.route.path; - return method + "|" + path; - } - } +function tracingHandler() + + { + return function sentryTracingMiddleware( + req, + res, + next, + ) { + const hub = getCurrentHub(); + const options = _optionalChain([hub, 'access', _ => _.getClient, 'call', _2 => _2(), 'optionalAccess', _3 => _3.getOptions, 'call', _4 => _4()]); + + if ( + !options || + options.instrumenter !== 'sentry' || + _optionalChain([req, 'access', _5 => _5.method, 'optionalAccess', _6 => _6.toUpperCase, 'call', _7 => _7()]) === 'OPTIONS' || + _optionalChain([req, 'access', _8 => _8.method, 'optionalAccess', _9 => _9.toUpperCase, 'call', _10 => _10()]) === 'HEAD' + ) { + return next(); } - catch (_oO) { - return undefined; + + // TODO: This is the `hasTracingEnabled` check, but we're doing it manually since `@sentry/tracing` isn't a + // dependency of `@sentry/node`. Long term, that function should probably move to `@sentry/hub. + if (!('tracesSampleRate' in options) && !('tracesSampler' in options)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.warn( + 'Sentry `tracingHandler` is being used, but tracing is disabled. Please enable tracing by setting ' + + 'either `tracesSampleRate` or `tracesSampler` in your `Sentry.init()` options.', + ); + return next(); } -} -/** Default request keys that'll be used to extract data from the request */ -var DEFAULT_REQUEST_KEYS = ['cookies', 'data', 'headers', 'method', 'query_string', 'url']; -/** JSDoc */ -function extractRequestData(req, keys) { - var request = {}; - var attributes = Array.isArray(keys) ? keys : DEFAULT_REQUEST_KEYS; - // headers: - // node, express: req.headers - // koa: req.header - var headers = (req.headers || req.header || {}); - // method: - // node, express, koa: req.method - var method = req.method; - // host: - // express: req.hostname in > 4 and req.host in < 4 - // koa: req.host - // node: req.headers.host - var host = req.hostname || req.host || headers.host || ''; - // protocol: - // node: - // express, koa: req.protocol - var protocol = req.protocol === 'https' || req.secure || (req.socket || {}).encrypted - ? 'https' - : 'http'; - // url (including path and query string): - // node, express: req.originalUrl - // koa: req.url - var originalUrl = (req.originalUrl || req.url); - // absolute url - var absoluteUrl = protocol + "://" + host + originalUrl; - attributes.forEach(function (key) { - switch (key) { - case 'headers': - request.headers = headers; - break; - case 'method': - request.method = method; - break; - case 'url': - request.url = absoluteUrl; - break; - case 'cookies': - // cookies: - // node, express, koa: req.headers.cookie - request.cookies = cookie.parse(headers.cookie || ''); - break; - case 'query_string': - // query string: - // node: req.url (raw) - // express, koa: req.query - request.query_string = url.parse(originalUrl || '', false).query; - break; - case 'data': - // body data: - // node, express, koa: req.body - var data = req.body; - if (method === 'GET' || method === 'HEAD') { - if (typeof data === 'undefined') { - data = ''; - } - } - if (data && !isString(data)) { - // Make sure the request body is a string - data = JSON.stringify(normalize(data)); - } - request.data = data; - break; - default: - if ({}.hasOwnProperty.call(req, key)) { - request[key] = req[key]; - } - } + + // If there is a trace header set, we extract the data from it (parentSpanId, traceId, and sampling decision) + const traceparentData = + req.headers && isString(req.headers['sentry-trace']) && extractTraceparentData(req.headers['sentry-trace']); + const incomingBaggageHeaders = _optionalChain([req, 'access', _11 => _11.headers, 'optionalAccess', _12 => _12.baggage]); + const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(incomingBaggageHeaders); + + const [name, source] = extractPathForTransaction(req, { path: true, method: true }); + const transaction = startTransaction( + { + name, + op: 'http.server', + ...traceparentData, + metadata: { + dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, + // The request should already have been stored in `scope.sdkProcessingMetadata` (which will become + // `event.sdkProcessingMetadata` the same way the metadata here will) by `sentryRequestMiddleware`, but on the + // off chance someone is using `sentryTracingMiddleware` without `sentryRequestMiddleware`, it doesn't hurt to + // be sure + request: req, + source, + }, + }, + // extra context passed to the tracesSampler + { request: extractRequestData(req) }, + ); + + // We put the transaction on the scope so users can attach children to it + hub.configureScope(scope => { + scope.setSpan(transaction); }); - return request; -} -/** Default user keys that'll be used to extract data from the request */ -var DEFAULT_USER_KEYS = ['id', 'username', 'email']; -/** JSDoc */ -function extractUserData(user, keys) { - var extractedUser = {}; - var attributes = Array.isArray(keys) ? keys : DEFAULT_USER_KEYS; - attributes.forEach(function (key) { - if (user && key in user) { - extractedUser[key] = user[key]; - } + + // We also set __sentry_transaction on the response so people can grab the transaction there to add + // spans to it later. + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + (res ).__sentry_transaction = transaction; + + res.once('finish', () => { + // Push `transaction.finish` to the next event loop so open spans have a chance to finish before the transaction + // closes + setImmediate(() => { + addRequestDataToTransaction(transaction, req); + transaction.setHttpStatus(res.statusCode); + transaction.finish(); + }); }); - return extractedUser; + + next(); + }; } + /** - * Enriches passed event with request data. + * Backwards compatibility shim which can be removed in v8. Forces the given options to follow the + * `AddRequestDataToEventOptions` interface. * - * @param event Will be mutated and enriched with req data - * @param req Request object - * @param options object containing flags to enable functionality - * @hidden + * TODO (v8): Get rid of this, and stop passing `requestDataOptionsFromExpressHandler` to `setSDKProcessingMetadata`. */ -export function parseRequest(event, req, options) { - // tslint:disable-next-line:no-parameter-reassignment - options = tslib_1.__assign({ ip: false, request: true, serverName: true, transaction: true, user: true, version: true }, options); - if (options.version) { - event.extra = tslib_1.__assign({}, event.extra, { node: global.process.version }); - } - if (options.request) { - event.request = tslib_1.__assign({}, event.request, extractRequestData(req, options.request)); - } - if (options.serverName && !event.server_name) { - event.server_name = global.process.env.SENTRY_NAME || os.hostname(); - } - if (options.user) { - var extractedUser = req.user ? extractUserData(req.user, options.user) : {}; - if (Object.keys(extractedUser)) { - event.user = tslib_1.__assign({}, event.user, extractedUser); - } +function convertReqHandlerOptsToAddReqDataOpts( + reqHandlerOptions = {}, +) { + let addRequestDataOptions; + + if ('include' in reqHandlerOptions) { + addRequestDataOptions = { include: reqHandlerOptions.include }; + } else { + // eslint-disable-next-line deprecation/deprecation + const { ip, request, transaction, user } = reqHandlerOptions ; + + if (ip || request || transaction || user) { + addRequestDataOptions = { include: dropUndefinedKeys({ ip, request, transaction, user }) }; } - // client ip: - // node: req.connection.remoteAddress - // express, koa: req.ip - if (options.ip) { - var ip = req.ip || (req.connection && req.connection.remoteAddress); - if (ip) { - event.user = tslib_1.__assign({}, event.user, { ip_address: ip }); - } - } - if (options.transaction && !event.transaction) { - var transaction = extractTransaction(req, options.transaction); - if (transaction) { - event.transaction = transaction; - } - } - return event; + } + + return addRequestDataOptions; } + /** * Express compatible request handler. * @see Exposed as `Handlers.requestHandler` */ -export function requestHandler(options) { - return function sentryRequestMiddleware(req, res, next) { - if (options && options.flushTimeout && options.flushTimeout > 0) { - // tslint:disable-next-line: no-unbound-method - var _end_1 = res.end; - res.end = function (chunk, encoding, cb) { - var _this = this; - flush(options.flushTimeout) - .then(function () { - _end_1.call(_this, chunk, encoding, cb); - }) - .then(null, function (e) { - logger.error(e); - }); - }; - } - var local = domain.create(); - local.add(req); - local.add(res); - local.on('error', next); - local.run(function () { - getCurrentHub().configureScope(function (scope) { - return scope.addEventProcessor(function (event) { return parseRequest(event, req, options); }); - }); - next(); +function requestHandler( + options, +) { + // TODO (v8): Get rid of this + const requestDataOptions = convertReqHandlerOptsToAddReqDataOpts(options); + + const currentHub = getCurrentHub(); + const client = currentHub.getClient(); + // Initialise an instance of SessionFlusher on the client when `autoSessionTracking` is enabled and the + // `requestHandler` middleware is used indicating that we are running in SessionAggregates mode + if (client && isAutoSessionTrackingEnabled(client)) { + client.initSessionFlusher(); + + // If Scope contains a Single mode Session, it is removed in favor of using Session Aggregates mode + const scope = currentHub.getScope(); + if (scope && scope.getSession()) { + scope.setSession(); + } + } + + return function sentryRequestMiddleware( + req, + res, + next, + ) { + if (options && options.flushTimeout && options.flushTimeout > 0) { + // eslint-disable-next-line @typescript-eslint/unbound-method + const _end = res.end; + res.end = function (chunk, encoding, cb) { + void flush(options.flushTimeout) + .then(() => { + _end.call(this, chunk, encoding, cb); + }) + .then(null, e => { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(e); + _end.call(this, chunk, encoding, cb); + }); + }; + } + const local = domain.create(); + local.add(req); + local.add(res); + + local.run(() => { + const currentHub = getCurrentHub(); + + currentHub.configureScope(scope => { + scope.setSDKProcessingMetadata({ + request: req, + // TODO (v8): Stop passing this + requestDataOptionsFromExpressHandler: requestDataOptions, }); - }; + + const client = currentHub.getClient(); + if (isAutoSessionTrackingEnabled(client)) { + const scope = currentHub.getScope(); + if (scope) { + // Set `status` of `RequestSession` to Ok, at the beginning of the request + scope.setRequestSession({ status: 'ok' }); + } + } + }); + + res.once('finish', () => { + const client = currentHub.getClient(); + if (isAutoSessionTrackingEnabled(client)) { + setImmediate(() => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (client && (client )._captureRequestSession) { + // Calling _captureRequestSession to capture request session at the end of the request by incrementing + // the correct SessionAggregates bucket i.e. crashed, errored or exited + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + (client )._captureRequestSession(); + } + }); + } + }); + next(); + }); + }; } + +/** JSDoc */ + /** JSDoc */ function getStatusCodeFromResponse(error) { - var statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode); - return statusCode ? parseInt(statusCode, 10) : 500; + const statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode); + return statusCode ? parseInt(statusCode , 10) : 500; } + /** Returns true if response code is internal server error */ function defaultShouldHandleError(error) { - var status = getStatusCodeFromResponse(error); - return status >= 500; + const status = getStatusCodeFromResponse(error); + return status >= 500; } + /** * Express compatible error handler. * @see Exposed as `Handlers.errorHandler` */ -export function errorHandler(options) { - return function sentryErrorMiddleware(error, req, res, next) { - var shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError; - if (shouldHandleError(error)) { - withScope(function (scope) { - if (req.headers && isString(req.headers['sentry-trace'])) { - var span = Span.fromTraceparent(req.headers['sentry-trace']); - scope.setSpan(span); - } - var eventId = captureException(error); - res.sentry = eventId; - next(error); - }); - return; +function errorHandler(options + +) + + { + return function sentryErrorMiddleware( + error, + _req, + res, + next, + ) { + const shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError; + + if (shouldHandleError(error)) { + withScope(_scope => { + // The request should already have been stored in `scope.sdkProcessingMetadata` by `sentryRequestMiddleware`, + // but on the off chance someone is using `sentryErrorMiddleware` without `sentryRequestMiddleware`, it doesn't + // hurt to be sure + _scope.setSDKProcessingMetadata({ request: _req }); + + // For some reason we need to set the transaction on the scope again + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + const transaction = (res ).__sentry_transaction ; + if (transaction && _scope.getSpan() === undefined) { + _scope.setSpan(transaction); + } + + const client = getCurrentHub().getClient(); + if (client && isAutoSessionTrackingEnabled(client)) { + // Check if the `SessionFlusher` is instantiated on the client to go into this branch that marks the + // `requestSession.status` as `Crashed`, and this check is necessary because the `SessionFlusher` is only + // instantiated when the the`requestHandler` middleware is initialised, which indicates that we should be + // running in SessionAggregates mode + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + const isSessionAggregatesMode = (client )._sessionFlusher !== undefined; + if (isSessionAggregatesMode) { + const requestSession = _scope.getRequestSession(); + // If an error bubbles to the `errorHandler`, then this is an unhandled error, and should be reported as a + // Crashed session. The `_requestSession.status` is checked to ensure that this error is happening within + // the bounds of a request, and if so the status is updated + if (requestSession && requestSession.status !== undefined) { + requestSession.status = 'crashed'; + } + } } + + const eventId = captureException(error); + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + (res ).sentry = eventId; next(error); - }; -} -/** - * @hidden - */ -export function logAndExitProcess(error) { - console.error(error && error.stack ? error.stack : error); - var client = getCurrentHub().getClient(); - if (client === undefined) { - logger.warn('No NodeClient was defined, we are exiting the process now.'); - global.process.exit(1); - return; + }); + + return; } - var options = client.getOptions(); - var timeout = (options && options.shutdownTimeout && options.shutdownTimeout > 0 && options.shutdownTimeout) || - DEFAULT_SHUTDOWN_TIMEOUT; - forget(client.close(timeout).then(function (result) { - if (!result) { - logger.warn('We reached the timeout for emptying the request buffer, still exiting now!'); - } - global.process.exit(1); - })); + + next(error); + }; } -//# sourceMappingURL=handlers.js.map \ No newline at end of file + +// TODO (v8 / #5257): Remove this +// eslint-disable-next-line deprecation/deprecation +; + +export { errorHandler, requestHandler, tracingHandler }; +//# sourceMappingURL=handlers.js.map diff --git a/node_modules/@sentry/node/esm/handlers.js.map b/node_modules/@sentry/node/esm/handlers.js.map index 132eaf9..1f1fa1d 100644 --- a/node_modules/@sentry/node/esm/handlers.js.map +++ b/node_modules/@sentry/node/esm/handlers.js.map @@ -1 +1 @@ -{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,IAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,cAAc;IAK5B,OAAO,SAAS,uBAAuB,CACrC,GAAyB,EACzB,GAAwB,EACxB,IAA2B;QAE3B,qFAAqF;QACrF,mFAAmF;QACnF,IAAM,SAAS,GAAG,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QACnD,IAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC;QAEvB,IAAM,GAAG,GAAG,aAAa,EAAE,CAAC;QAC5B,IAAM,WAAW,GAAG,GAAG,CAAC,SAAS,CAAC;YAChC,WAAW,EAAK,SAAS,SAAI,MAAQ;SACtC,CAAC,CAAC;QACH,GAAG,CAAC,cAAc,CAAC,UAAA,KAAK;YACtB,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,IAAI,CAAC,QA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C,MAAM,EAAE;YACX,MAAM,CAAC,IAAI,CAAC,4EAA4E,CAAC,CAAC;SAC3F;QACD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { Span } from '@sentry/apm';\nimport { captureException, getCurrentHub, withScope } from '@sentry/core';\nimport { Event } from '@sentry/types';\nimport { forget, isString, logger, normalize } from '@sentry/utils';\nimport * as cookie from 'cookie';\nimport * as domain from 'domain';\nimport * as http from 'http';\nimport * as os from 'os';\nimport * as url from 'url';\n\nimport { NodeClient } from './client';\nimport { flush } from './sdk';\n\nconst DEFAULT_SHUTDOWN_TIMEOUT = 2000;\n\n/**\n * Express compatible tracing handler.\n * @see Exposed as `Handlers.tracingHandler`\n */\nexport function tracingHandler(): (\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n) => void {\n return function sentryTracingMiddleware(\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n ): void {\n // TODO: At this point req.route.path we use in `extractTransaction` is not available\n // but `req.path` or `req.url` should do the job as well. We could unify this here.\n const reqMethod = (req.method || '').toUpperCase();\n const reqUrl = req.url;\n\n const hub = getCurrentHub();\n const transaction = hub.startSpan({\n transaction: `${reqMethod}|${reqUrl}`,\n });\n hub.configureScope(scope => {\n scope.setSpan(transaction);\n });\n res.once('finish', () => {\n transaction.setHttpStatus(res.statusCode);\n transaction.finish();\n });\n\n next();\n };\n}\n\ntype TransactionTypes = 'path' | 'methodPath' | 'handler';\n\n/** JSDoc */\nfunction extractTransaction(req: { [key: string]: any }, type: boolean | TransactionTypes): string | undefined {\n try {\n // Express.js shape\n const request = req as {\n method: string;\n route: {\n path: string;\n stack: [\n {\n name: string;\n }\n ];\n };\n };\n\n switch (type) {\n case 'path': {\n return request.route.path;\n }\n case 'handler': {\n return request.route.stack[0].name;\n }\n case 'methodPath':\n default: {\n const method = request.method.toUpperCase();\n const path = request.route.path;\n return `${method}|${path}`;\n }\n }\n } catch (_oO) {\n return undefined;\n }\n}\n\n/** Default request keys that'll be used to extract data from the request */\nconst DEFAULT_REQUEST_KEYS = ['cookies', 'data', 'headers', 'method', 'query_string', 'url'];\n\n/** JSDoc */\nfunction extractRequestData(req: { [key: string]: any }, keys: boolean | string[]): { [key: string]: string } {\n const request: { [key: string]: any } = {};\n const attributes = Array.isArray(keys) ? keys : DEFAULT_REQUEST_KEYS;\n\n // headers:\n // node, express: req.headers\n // koa: req.header\n const headers = (req.headers || req.header || {}) as {\n host?: string;\n cookie?: string;\n };\n // method:\n // node, express, koa: req.method\n const method = req.method;\n // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node: req.headers.host\n const host = req.hostname || req.host || headers.host || '';\n // protocol:\n // node: \n // express, koa: req.protocol\n const protocol =\n req.protocol === 'https' || req.secure || ((req.socket || {}) as { encrypted?: boolean }).encrypted\n ? 'https'\n : 'http';\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa: req.url\n const originalUrl = (req.originalUrl || req.url) as string;\n // absolute url\n const absoluteUrl = `${protocol}://${host}${originalUrl}`;\n\n attributes.forEach(key => {\n switch (key) {\n case 'headers':\n request.headers = headers;\n break;\n case 'method':\n request.method = method;\n break;\n case 'url':\n request.url = absoluteUrl;\n break;\n case 'cookies':\n // cookies:\n // node, express, koa: req.headers.cookie\n request.cookies = cookie.parse(headers.cookie || '');\n break;\n case 'query_string':\n // query string:\n // node: req.url (raw)\n // express, koa: req.query\n request.query_string = url.parse(originalUrl || '', false).query;\n break;\n case 'data':\n // body data:\n // node, express, koa: req.body\n let data = req.body;\n if (method === 'GET' || method === 'HEAD') {\n if (typeof data === 'undefined') {\n data = '';\n }\n }\n if (data && !isString(data)) {\n // Make sure the request body is a string\n data = JSON.stringify(normalize(data));\n }\n request.data = data;\n break;\n default:\n if ({}.hasOwnProperty.call(req, key)) {\n request[key] = (req as { [key: string]: any })[key];\n }\n }\n });\n\n return request;\n}\n\n/** Default user keys that'll be used to extract data from the request */\nconst DEFAULT_USER_KEYS = ['id', 'username', 'email'];\n\n/** JSDoc */\nfunction extractUserData(\n user: {\n [key: string]: any;\n },\n keys: boolean | string[],\n): { [key: string]: any } {\n const extractedUser: { [key: string]: any } = {};\n const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_KEYS;\n\n attributes.forEach(key => {\n if (user && key in user) {\n extractedUser[key] = user[key];\n }\n });\n\n return extractedUser;\n}\n\n/**\n * Options deciding what parts of the request to use when enhancing an event\n */\ninterface ParseRequestOptions {\n ip?: boolean;\n request?: boolean | string[];\n serverName?: boolean;\n transaction?: boolean | TransactionTypes;\n user?: boolean | string[];\n version?: boolean;\n}\n\n/**\n * Enriches passed event with request data.\n *\n * @param event Will be mutated and enriched with req data\n * @param req Request object\n * @param options object containing flags to enable functionality\n * @hidden\n */\nexport function parseRequest(\n event: Event,\n req: {\n [key: string]: any;\n user?: {\n [key: string]: any;\n };\n ip?: string;\n connection?: {\n remoteAddress?: string;\n };\n },\n options?: ParseRequestOptions,\n): Event {\n // tslint:disable-next-line:no-parameter-reassignment\n options = {\n ip: false,\n request: true,\n serverName: true,\n transaction: true,\n user: true,\n version: true,\n ...options,\n };\n\n if (options.version) {\n event.extra = {\n ...event.extra,\n node: global.process.version,\n };\n }\n\n if (options.request) {\n event.request = {\n ...event.request,\n ...extractRequestData(req, options.request),\n };\n }\n\n if (options.serverName && !event.server_name) {\n event.server_name = global.process.env.SENTRY_NAME || os.hostname();\n }\n\n if (options.user) {\n const extractedUser = req.user ? extractUserData(req.user, options.user) : {};\n\n if (Object.keys(extractedUser)) {\n event.user = {\n ...event.user,\n ...extractedUser,\n };\n }\n }\n\n // client ip:\n // node: req.connection.remoteAddress\n // express, koa: req.ip\n if (options.ip) {\n const ip = req.ip || (req.connection && req.connection.remoteAddress);\n if (ip) {\n event.user = {\n ...event.user,\n ip_address: ip,\n };\n }\n }\n\n if (options.transaction && !event.transaction) {\n const transaction = extractTransaction(req, options.transaction);\n if (transaction) {\n event.transaction = transaction;\n }\n }\n\n return event;\n}\n\n/**\n * Express compatible request handler.\n * @see Exposed as `Handlers.requestHandler`\n */\nexport function requestHandler(\n options?: ParseRequestOptions & {\n flushTimeout?: number;\n },\n): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void {\n return function sentryRequestMiddleware(\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n ): void {\n if (options && options.flushTimeout && options.flushTimeout > 0) {\n // tslint:disable-next-line: no-unbound-method\n const _end = res.end;\n res.end = function(chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): void {\n flush(options.flushTimeout)\n .then(() => {\n _end.call(this, chunk, encoding, cb);\n })\n .then(null, e => {\n logger.error(e);\n });\n };\n }\n const local = domain.create();\n local.add(req);\n local.add(res);\n local.on('error', next);\n local.run(() => {\n getCurrentHub().configureScope(scope =>\n scope.addEventProcessor((event: Event) => parseRequest(event, req, options)),\n );\n next();\n });\n };\n}\n\n/** JSDoc */\ninterface MiddlewareError extends Error {\n status?: number | string;\n statusCode?: number | string;\n status_code?: number | string;\n output?: {\n statusCode?: number | string;\n };\n}\n\n/** JSDoc */\nfunction getStatusCodeFromResponse(error: MiddlewareError): number {\n const statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode);\n return statusCode ? parseInt(statusCode as string, 10) : 500;\n}\n\n/** Returns true if response code is internal server error */\nfunction defaultShouldHandleError(error: MiddlewareError): boolean {\n const status = getStatusCodeFromResponse(error);\n return status >= 500;\n}\n\n/**\n * Express compatible error handler.\n * @see Exposed as `Handlers.errorHandler`\n */\nexport function errorHandler(options?: {\n /**\n * Callback method deciding whether error should be captured and sent to Sentry\n * @param error Captured middleware error\n */\n shouldHandleError?(error: MiddlewareError): boolean;\n}): (\n error: MiddlewareError,\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error: MiddlewareError) => void,\n) => void {\n return function sentryErrorMiddleware(\n error: MiddlewareError,\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error: MiddlewareError) => void,\n ): void {\n const shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError;\n\n if (shouldHandleError(error)) {\n withScope(scope => {\n if (req.headers && isString(req.headers['sentry-trace'])) {\n const span = Span.fromTraceparent(req.headers['sentry-trace'] as string);\n scope.setSpan(span);\n }\n const eventId = captureException(error);\n (res as any).sentry = eventId;\n next(error);\n });\n\n return;\n }\n\n next(error);\n };\n}\n\n/**\n * @hidden\n */\nexport function logAndExitProcess(error: Error): void {\n console.error(error && error.stack ? error.stack : error);\n\n const client = getCurrentHub().getClient();\n\n if (client === undefined) {\n logger.warn('No NodeClient was defined, we are exiting the process now.');\n global.process.exit(1);\n return;\n }\n\n const options = client.getOptions();\n const timeout =\n (options && options.shutdownTimeout && options.shutdownTimeout > 0 && options.shutdownTimeout) ||\n DEFAULT_SHUTDOWN_TIMEOUT;\n forget(\n client.close(timeout).then((result: boolean) => {\n if (!result) {\n logger.warn('We reached the timeout for emptying the request buffer, still exiting now!');\n }\n global.process.exit(1);\n }),\n );\n}\n"]} \ No newline at end of file +{"version":3,"file":"handlers.js","sources":["../../src/handlers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { captureException, getCurrentHub, startTransaction, withScope } from '@sentry/core';\nimport type { Span } from '@sentry/types';\nimport type { AddRequestDataToEventOptions } from '@sentry/utils';\nimport {\n addRequestDataToTransaction,\n baggageHeaderToDynamicSamplingContext,\n dropUndefinedKeys,\n extractPathForTransaction,\n extractTraceparentData,\n isString,\n logger,\n} from '@sentry/utils';\nimport * as domain from 'domain';\nimport type * as http from 'http';\n\nimport type { NodeClient } from './client';\nimport { extractRequestData } from './requestdata';\n// TODO (v8 / XXX) Remove this import\nimport type { ParseRequestOptions } from './requestDataDeprecated';\nimport { flush, isAutoSessionTrackingEnabled } from './sdk';\n\n/**\n * Express-compatible tracing handler.\n * @see Exposed as `Handlers.tracingHandler`\n */\nexport function tracingHandler(): (\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n) => void {\n return function sentryTracingMiddleware(\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n ): void {\n const hub = getCurrentHub();\n const options = hub.getClient()?.getOptions();\n\n if (\n !options ||\n options.instrumenter !== 'sentry' ||\n req.method?.toUpperCase() === 'OPTIONS' ||\n req.method?.toUpperCase() === 'HEAD'\n ) {\n return next();\n }\n\n // TODO: This is the `hasTracingEnabled` check, but we're doing it manually since `@sentry/tracing` isn't a\n // dependency of `@sentry/node`. Long term, that function should probably move to `@sentry/hub.\n if (!('tracesSampleRate' in options) && !('tracesSampler' in options)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n 'Sentry `tracingHandler` is being used, but tracing is disabled. Please enable tracing by setting ' +\n 'either `tracesSampleRate` or `tracesSampler` in your `Sentry.init()` options.',\n );\n return next();\n }\n\n // If there is a trace header set, we extract the data from it (parentSpanId, traceId, and sampling decision)\n const traceparentData =\n req.headers && isString(req.headers['sentry-trace']) && extractTraceparentData(req.headers['sentry-trace']);\n const incomingBaggageHeaders = req.headers?.baggage;\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(incomingBaggageHeaders);\n\n const [name, source] = extractPathForTransaction(req, { path: true, method: true });\n const transaction = startTransaction(\n {\n name,\n op: 'http.server',\n ...traceparentData,\n metadata: {\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n // The request should already have been stored in `scope.sdkProcessingMetadata` (which will become\n // `event.sdkProcessingMetadata` the same way the metadata here will) by `sentryRequestMiddleware`, but on the\n // off chance someone is using `sentryTracingMiddleware` without `sentryRequestMiddleware`, it doesn't hurt to\n // be sure\n request: req,\n source,\n },\n },\n // extra context passed to the tracesSampler\n { request: extractRequestData(req) },\n );\n\n // We put the transaction on the scope so users can attach children to it\n hub.configureScope(scope => {\n scope.setSpan(transaction);\n });\n\n // We also set __sentry_transaction on the response so people can grab the transaction there to add\n // spans to it later.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (res as any).__sentry_transaction = transaction;\n\n res.once('finish', () => {\n // Push `transaction.finish` to the next event loop so open spans have a chance to finish before the transaction\n // closes\n setImmediate(() => {\n addRequestDataToTransaction(transaction, req);\n transaction.setHttpStatus(res.statusCode);\n transaction.finish();\n });\n });\n\n next();\n };\n}\n\nexport type RequestHandlerOptions =\n // TODO (v8 / XXX) Remove ParseRequestOptions type and eslint override\n // eslint-disable-next-line deprecation/deprecation\n | (ParseRequestOptions | AddRequestDataToEventOptions) & {\n flushTimeout?: number;\n };\n\n/**\n * Backwards compatibility shim which can be removed in v8. Forces the given options to follow the\n * `AddRequestDataToEventOptions` interface.\n *\n * TODO (v8): Get rid of this, and stop passing `requestDataOptionsFromExpressHandler` to `setSDKProcessingMetadata`.\n */\nfunction convertReqHandlerOptsToAddReqDataOpts(\n reqHandlerOptions: RequestHandlerOptions = {},\n): AddRequestDataToEventOptions | undefined {\n let addRequestDataOptions: AddRequestDataToEventOptions | undefined;\n\n if ('include' in reqHandlerOptions) {\n addRequestDataOptions = { include: reqHandlerOptions.include };\n } else {\n // eslint-disable-next-line deprecation/deprecation\n const { ip, request, transaction, user } = reqHandlerOptions as ParseRequestOptions;\n\n if (ip || request || transaction || user) {\n addRequestDataOptions = { include: dropUndefinedKeys({ ip, request, transaction, user }) };\n }\n }\n\n return addRequestDataOptions;\n}\n\n/**\n * Express compatible request handler.\n * @see Exposed as `Handlers.requestHandler`\n */\nexport function requestHandler(\n options?: RequestHandlerOptions,\n): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void {\n // TODO (v8): Get rid of this\n const requestDataOptions = convertReqHandlerOptsToAddReqDataOpts(options);\n\n const currentHub = getCurrentHub();\n const client = currentHub.getClient();\n // Initialise an instance of SessionFlusher on the client when `autoSessionTracking` is enabled and the\n // `requestHandler` middleware is used indicating that we are running in SessionAggregates mode\n if (client && isAutoSessionTrackingEnabled(client)) {\n client.initSessionFlusher();\n\n // If Scope contains a Single mode Session, it is removed in favor of using Session Aggregates mode\n const scope = currentHub.getScope();\n if (scope && scope.getSession()) {\n scope.setSession();\n }\n }\n\n return function sentryRequestMiddleware(\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n ): void {\n if (options && options.flushTimeout && options.flushTimeout > 0) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _end = res.end;\n res.end = function (chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): void {\n void flush(options.flushTimeout)\n .then(() => {\n _end.call(this, chunk, encoding, cb);\n })\n .then(null, e => {\n __DEBUG_BUILD__ && logger.error(e);\n _end.call(this, chunk, encoding, cb);\n });\n };\n }\n const local = domain.create();\n local.add(req);\n local.add(res);\n\n local.run(() => {\n const currentHub = getCurrentHub();\n\n currentHub.configureScope(scope => {\n scope.setSDKProcessingMetadata({\n request: req,\n // TODO (v8): Stop passing this\n requestDataOptionsFromExpressHandler: requestDataOptions,\n });\n\n const client = currentHub.getClient();\n if (isAutoSessionTrackingEnabled(client)) {\n const scope = currentHub.getScope();\n if (scope) {\n // Set `status` of `RequestSession` to Ok, at the beginning of the request\n scope.setRequestSession({ status: 'ok' });\n }\n }\n });\n\n res.once('finish', () => {\n const client = currentHub.getClient();\n if (isAutoSessionTrackingEnabled(client)) {\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (client && (client as any)._captureRequestSession) {\n // Calling _captureRequestSession to capture request session at the end of the request by incrementing\n // the correct SessionAggregates bucket i.e. crashed, errored or exited\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (client as any)._captureRequestSession();\n }\n });\n }\n });\n next();\n });\n };\n}\n\n/** JSDoc */\ninterface MiddlewareError extends Error {\n status?: number | string;\n statusCode?: number | string;\n status_code?: number | string;\n output?: {\n statusCode?: number | string;\n };\n}\n\n/** JSDoc */\nfunction getStatusCodeFromResponse(error: MiddlewareError): number {\n const statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode);\n return statusCode ? parseInt(statusCode as string, 10) : 500;\n}\n\n/** Returns true if response code is internal server error */\nfunction defaultShouldHandleError(error: MiddlewareError): boolean {\n const status = getStatusCodeFromResponse(error);\n return status >= 500;\n}\n\n/**\n * Express compatible error handler.\n * @see Exposed as `Handlers.errorHandler`\n */\nexport function errorHandler(options?: {\n /**\n * Callback method deciding whether error should be captured and sent to Sentry\n * @param error Captured middleware error\n */\n shouldHandleError?(this: void, error: MiddlewareError): boolean;\n}): (\n error: MiddlewareError,\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error: MiddlewareError) => void,\n) => void {\n return function sentryErrorMiddleware(\n error: MiddlewareError,\n _req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error: MiddlewareError) => void,\n ): void {\n const shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError;\n\n if (shouldHandleError(error)) {\n withScope(_scope => {\n // The request should already have been stored in `scope.sdkProcessingMetadata` by `sentryRequestMiddleware`,\n // but on the off chance someone is using `sentryErrorMiddleware` without `sentryRequestMiddleware`, it doesn't\n // hurt to be sure\n _scope.setSDKProcessingMetadata({ request: _req });\n\n // For some reason we need to set the transaction on the scope again\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const transaction = (res as any).__sentry_transaction as Span;\n if (transaction && _scope.getSpan() === undefined) {\n _scope.setSpan(transaction);\n }\n\n const client = getCurrentHub().getClient();\n if (client && isAutoSessionTrackingEnabled(client)) {\n // Check if the `SessionFlusher` is instantiated on the client to go into this branch that marks the\n // `requestSession.status` as `Crashed`, and this check is necessary because the `SessionFlusher` is only\n // instantiated when the the`requestHandler` middleware is initialised, which indicates that we should be\n // running in SessionAggregates mode\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const isSessionAggregatesMode = (client as any)._sessionFlusher !== undefined;\n if (isSessionAggregatesMode) {\n const requestSession = _scope.getRequestSession();\n // If an error bubbles to the `errorHandler`, then this is an unhandled error, and should be reported as a\n // Crashed session. The `_requestSession.status` is checked to ensure that this error is happening within\n // the bounds of a request, and if so the status is updated\n if (requestSession && requestSession.status !== undefined) {\n requestSession.status = 'crashed';\n }\n }\n }\n\n const eventId = captureException(error);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (res as any).sentry = eventId;\n next(error);\n });\n\n return;\n }\n\n next(error);\n };\n}\n\n// TODO (v8 / #5257): Remove this\n// eslint-disable-next-line deprecation/deprecation\nexport type { ParseRequestOptions, ExpressRequest } from './requestDataDeprecated';\n// eslint-disable-next-line deprecation/deprecation\nexport { parseRequest, extractRequestData } from './requestDataDeprecated';\n"],"names":[],"mappings":";;;;;;;;AAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;;AAsBA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,C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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,OAAA;QACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;MACA,CAAA,CAAA;;MAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA;;IAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EACA,CAAA;AACA;;AAEA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/index.d.ts b/node_modules/@sentry/node/esm/index.d.ts deleted file mode 100644 index 61f2395..0000000 --- a/node_modules/@sentry/node/esm/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export { Breadcrumb, Request, SdkInfo, Event, Exception, Response, Severity, StackFrame, Stacktrace, Status, Thread, User, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/core'; -export { NodeOptions } from './backend'; -export { NodeClient } from './client'; -export { defaultIntegrations, init, lastEventId, flush, close } from './sdk'; -export { SDK_NAME, SDK_VERSION } from './version'; -import { Integrations as CoreIntegrations } from '@sentry/core'; -import * as Handlers from './handlers'; -import * as NodeIntegrations from './integrations'; -import * as Transports from './transports'; -declare const INTEGRATIONS: { - Console: typeof NodeIntegrations.Console; - Http: typeof NodeIntegrations.Http; - OnUncaughtException: typeof NodeIntegrations.OnUncaughtException; - OnUnhandledRejection: typeof NodeIntegrations.OnUnhandledRejection; - LinkedErrors: typeof NodeIntegrations.LinkedErrors; - Modules: typeof NodeIntegrations.Modules; - FunctionToString: typeof CoreIntegrations.FunctionToString; - InboundFilters: typeof CoreIntegrations.InboundFilters; -}; -export { INTEGRATIONS as Integrations, Transports, Handlers }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/index.d.ts.map b/node_modules/@sentry/node/esm/index.d.ts.map deleted file mode 100644 index a65a4a6..0000000 --- a/node_modules/@sentry/node/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,gBAAgB,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,QAAA,MAAM,YAAY;;;;;;;;;CAGjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/index.js b/node_modules/@sentry/node/esm/index.js index b937b16..4802891 100644 --- a/node_modules/@sentry/node/esm/index.js +++ b/node_modules/@sentry/node/esm/index.js @@ -1,13 +1,34 @@ -import * as tslib_1 from "tslib"; -export { Severity, Status, } from '@sentry/types'; -export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/core'; -export { NodeClient } from './client'; -export { defaultIntegrations, init, lastEventId, flush, close } from './sdk'; -export { SDK_NAME, SDK_VERSION } from './version'; -import { Integrations as CoreIntegrations } from '@sentry/core'; -import * as Handlers from './handlers'; -import * as NodeIntegrations from './integrations'; -import * as Transports from './transports'; -var INTEGRATIONS = tslib_1.__assign({}, CoreIntegrations, NodeIntegrations); -export { INTEGRATIONS as Integrations, Transports, Handlers }; -//# sourceMappingURL=index.js.map \ No newline at end of file +import { Integrations, getMainCarrier } from '@sentry/core'; +export { Hub, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, captureEvent, captureException, captureMessage, configureScope, createTransport, getCurrentHub, getHubFromCarrier, makeMain, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope } from '@sentry/core'; +export { NodeClient } from './client.js'; +import './transports/index.js'; +export { close, defaultIntegrations, defaultStackParser, flush, getSentryRelease, init, lastEventId } from './sdk.js'; +export { DEFAULT_USER_INCLUDES, addRequestDataToEvent, extractRequestData } from './requestdata.js'; +export { deepReadDirSync } from './utils.js'; +import * as domain from 'domain'; +import * as handlers from './handlers.js'; +export { handlers as Handlers }; +import * as index from './integrations/index.js'; +export { makeNodeTransport } from './transports/http.js'; + +; +; + +; +; + +const INTEGRATIONS = { + ...Integrations, + ...index, +}; + +// We need to patch domain on the global __SENTRY__ object to make it work for node in cross-platform packages like +// @sentry/core. If we don't do this, browser bundlers will have troubles resolving `require('domain')`. +const carrier = getMainCarrier(); +if (carrier.__SENTRY__) { + carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; + carrier.__SENTRY__.extensions.domain = carrier.__SENTRY__.extensions.domain || domain; +} + +export { INTEGRATIONS as Integrations }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/node/esm/index.js.map b/node_modules/@sentry/node/esm/index.js.map index 78d88f8..da23ead 100644 --- a/node_modules/@sentry/node/esm/index.js.map +++ b/node_modules/@sentry/node/esm/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAOL,QAAQ,EAGR,MAAM,GAGP,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,gBAAgB,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,IAAM,YAAY,wBACb,gBAAgB,EAChB,gBAAgB,CACpB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n Response,\n Severity,\n StackFrame,\n Stacktrace,\n Status,\n Thread,\n User,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from '@sentry/core';\n\nexport { NodeOptions } from './backend';\nexport { NodeClient } from './client';\nexport { defaultIntegrations, init, lastEventId, flush, close } from './sdk';\nexport { SDK_NAME, SDK_VERSION } from './version';\n\nimport { Integrations as CoreIntegrations } from '@sentry/core';\n\nimport * as Handlers from './handlers';\nimport * as NodeIntegrations from './integrations';\nimport * as Transports from './transports';\n\nconst INTEGRATIONS = {\n ...CoreIntegrations,\n ...NodeIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Transports, Handlers };\n"]} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["export type {\n Breadcrumb,\n BreadcrumbHint,\n PolymorphicRequest,\n Request,\n SdkInfo,\n Event,\n EventHint,\n Exception,\n Session,\n // eslint-disable-next-line deprecation/deprecation\n Severity,\n SeverityLevel,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n Span,\n} from '@sentry/types';\nexport type { AddRequestDataToEventOptions } from '@sentry/utils';\n\nexport type { TransactionNamingScheme } from './requestdata';\nexport type { NodeOptions } from './types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n createTransport,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n makeMain,\n Scope,\n startTransaction,\n SDK_VERSION,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from '@sentry/core';\n\nexport { NodeClient } from './client';\nexport { makeNodeTransport } from './transports';\nexport { defaultIntegrations, init, defaultStackParser, lastEventId, flush, close, getSentryRelease } from './sdk';\nexport { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from './requestdata';\nexport { deepReadDirSync } from './utils';\n\nimport { getMainCarrier, Integrations as CoreIntegrations } from '@sentry/core';\nimport * as domain from 'domain';\n\nimport * as Handlers from './handlers';\nimport * as NodeIntegrations from './integrations';\n\nconst INTEGRATIONS = {\n ...CoreIntegrations,\n ...NodeIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Handlers };\n\n// We need to patch domain on the global __SENTRY__ object to make it work for node in cross-platform packages like\n// @sentry/core. If we don't do this, browser bundlers will have troubles resolving `require('domain')`.\nconst carrier = getMainCarrier();\nif (carrier.__SENTRY__) {\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n carrier.__SENTRY__.extensions.domain = carrier.__SENTRY__.extensions.domain || domain;\n}\n"],"names":["CoreIntegrations","NodeIntegrations"],"mappings":";;;;;;;;;;;;;AAkBA,CAAA;AACA,CAAA;AACA;AACA,CAAA;AACA,CAAA;AAqCA;AACA,MAAA,YAAA,GAAA;AACA,EAAA,GAAAA,YAAA;AACA,EAAA,GAAAC,KAAA;AACA,EAAA;AAGA;AACA;AACA;AACA,MAAA,OAAA,GAAA,cAAA,EAAA,CAAA;AACA,IAAA,OAAA,CAAA,UAAA,EAAA;AACA,EAAA,OAAA,CAAA,UAAA,CAAA,UAAA,GAAA,OAAA,CAAA,UAAA,CAAA,UAAA,IAAA,EAAA,CAAA;AACA,EAAA,OAAA,CAAA,UAAA,CAAA,UAAA,CAAA,MAAA,GAAA,OAAA,CAAA,UAAA,CAAA,UAAA,CAAA,MAAA,IAAA,MAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/console.d.ts b/node_modules/@sentry/node/esm/integrations/console.d.ts deleted file mode 100644 index a3d96ee..0000000 --- a/node_modules/@sentry/node/esm/integrations/console.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Console module integration */ -export declare class Console implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - setupOnce(): void; -} -//# sourceMappingURL=console.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/console.d.ts.map b/node_modules/@sentry/node/esm/integrations/console.d.ts.map deleted file mode 100644 index 04ebc91..0000000 --- a/node_modules/@sentry/node/esm/integrations/console.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../src/integrations/console.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAY,MAAM,eAAe,CAAC;AAItD,iCAAiC;AACjC,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IACjC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACI,SAAS,IAAI,IAAI;CAMzB"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/console.js b/node_modules/@sentry/node/esm/integrations/console.js index 5db4e6d..e8d013d 100644 --- a/node_modules/@sentry/node/esm/integrations/console.js +++ b/node_modules/@sentry/node/esm/integrations/console.js @@ -1,78 +1,57 @@ -import * as tslib_1 from "tslib"; import { getCurrentHub } from '@sentry/core'; -import { Severity } from '@sentry/types'; -import { fill } from '@sentry/utils'; +import { fill, severityLevelFromString } from '@sentry/utils'; import * as util from 'util'; + /** Console module integration */ -var Console = /** @class */ (function () { - function Console() { - /** - * @inheritDoc - */ - this.name = Console.id; +class Console {constructor() { Console.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Console';} + + /** + * @inheritDoc + */ + __init() {this.name = Console.id;} + + /** + * @inheritDoc + */ + setupOnce() { + for (const level of ['debug', 'info', 'warn', 'error', 'log']) { + fill(console, level, createConsoleWrapper(level)); } - /** - * @inheritDoc - */ - Console.prototype.setupOnce = function () { - var e_1, _a; - var consoleModule = require('console'); - try { - for (var _b = tslib_1.__values(['debug', 'info', 'warn', 'error', 'log']), _c = _b.next(); !_c.done; _c = _b.next()) { - var level = _c.value; - fill(consoleModule, level, createConsoleWrapper(level)); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - }; - /** - * @inheritDoc - */ - Console.id = 'Console'; - return Console; -}()); -export { Console }; + } +} Console.__initStatic(); + /** * Wrapper function that'll be used for every console level */ function createConsoleWrapper(level) { - return function consoleWrapper(originalConsoleMethod) { - var sentryLevel; - switch (level) { - case 'debug': - sentryLevel = Severity.Debug; - break; - case 'error': - sentryLevel = Severity.Error; - break; - case 'info': - sentryLevel = Severity.Info; - break; - case 'warn': - sentryLevel = Severity.Warning; - break; - default: - sentryLevel = Severity.Log; - } - return function () { - if (getCurrentHub().getIntegration(Console)) { - getCurrentHub().addBreadcrumb({ - category: 'console', - level: sentryLevel, - message: util.format.apply(undefined, arguments), - }, { - input: tslib_1.__spread(arguments), - level: level, - }); - } - originalConsoleMethod.apply(this, arguments); - }; + return function consoleWrapper(originalConsoleMethod) { + const sentryLevel = severityLevelFromString(level); + + /* eslint-disable prefer-rest-params */ + return function () { + if (getCurrentHub().getIntegration(Console)) { + getCurrentHub().addBreadcrumb( + { + category: 'console', + level: sentryLevel, + message: util.format.apply(undefined, arguments), + }, + { + input: [...arguments], + level, + }, + ); + } + + originalConsoleMethod.apply(this, arguments); }; + /* eslint-enable prefer-rest-params */ + }; } -//# sourceMappingURL=console.js.map \ No newline at end of file + +export { Console }; +//# sourceMappingURL=console.js.map diff --git a/node_modules/@sentry/node/esm/integrations/console.js.map b/node_modules/@sentry/node/esm/integrations/console.js.map index a0e99fa..1d527dc 100644 --- a/node_modules/@sentry/node/esm/integrations/console.js.map +++ b/node_modules/@sentry/node/esm/integrations/console.js.map @@ -1 +1 @@ -{"version":3,"file":"console.js","sourceRoot":"","sources":["../../src/integrations/console.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,iCAAiC;AACjC;IAAA;QACE;;WAEG;QACI,SAAI,GAAW,OAAO,CAAC,EAAE,CAAC;IAenC,CAAC;IATC;;OAEG;IACI,2BAAS,GAAhB;;QACE,IAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;;YACzC,KAAoB,IAAA,KAAA,iBAAA,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KA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entry/types';\nimport { fill } from '@sentry/utils';\nimport * as util from 'util';\n\n/** Console module integration */\nexport class Console implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Console.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'Console';\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n const consoleModule = require('console');\n for (const level of ['debug', 'info', 'warn', 'error', 'log']) {\n fill(consoleModule, level, createConsoleWrapper(level));\n }\n }\n}\n\n/**\n * Wrapper function that'll be used for every console level\n */\nfunction createConsoleWrapper(level: string): (originalConsoleMethod: () => void) => void {\n return function consoleWrapper(originalConsoleMethod: () => void): () => void {\n let sentryLevel: Severity;\n\n switch (level) {\n case 'debug':\n sentryLevel = Severity.Debug;\n break;\n case 'error':\n sentryLevel = Severity.Error;\n break;\n case 'info':\n sentryLevel = Severity.Info;\n break;\n case 'warn':\n sentryLevel = Severity.Warning;\n break;\n default:\n sentryLevel = Severity.Log;\n }\n\n return function(this: typeof console): void {\n if (getCurrentHub().getIntegration(Console)) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'console',\n level: sentryLevel,\n message: util.format.apply(undefined, arguments),\n },\n {\n input: [...arguments],\n level,\n },\n );\n }\n\n originalConsoleMethod.apply(this, arguments);\n };\n };\n}\n"]} \ No newline at end of file +{"version":3,"file":"console.js","sources":["../../../src/integrations/console.ts"],"sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { fill, severityLevelFromString } from '@sentry/utils';\nimport * as util from 'util';\n\n/** Console module integration */\nexport class Console implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Console';\n\n /**\n * @inheritDoc\n */\n public name: string = Console.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n for (const level of ['debug', 'info', 'warn', 'error', 'log']) {\n fill(console, level, createConsoleWrapper(level));\n }\n }\n}\n\n/**\n * Wrapper function that'll be used for every console level\n */\nfunction createConsoleWrapper(level: string): (originalConsoleMethod: () => void) => void {\n return function consoleWrapper(originalConsoleMethod: () => void): () => void {\n const sentryLevel = severityLevelFromString(level);\n\n /* eslint-disable prefer-rest-params */\n return function (this: typeof console): void {\n if (getCurrentHub().getIntegration(Console)) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'console',\n level: sentryLevel,\n message: util.format.apply(undefined, arguments),\n },\n {\n input: [...arguments],\n level,\n },\n );\n }\n\n originalConsoleMethod.apply(this, arguments);\n };\n /* eslint-enable prefer-rest-params */\n };\n}\n"],"names":[],"mappings":";;;;AAKA;AACA,MAAA,OAAA,EAAA,CAAA,WAAA,GAAA,EAAA,OAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,UAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,OAAA,CAAA,GAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,SAAA,GAAA;AACA,IAAA,KAAA,MAAA,KAAA,IAAA,CAAA,OAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,KAAA,CAAA,EAAA;AACA,MAAA,IAAA,CAAA,OAAA,EAAA,KAAA,EAAA,oBAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA,CAAA,CAAA,OAAA,CAAA,YAAA,EAAA,CAAA;AACA;AACA;AACA;AACA;AACA,SAAA,oBAAA,CAAA,KAAA,EAAA;AACA,EAAA,OAAA,SAAA,cAAA,CAAA,qBAAA,EAAA;AACA,IAAA,MAAA,WAAA,GAAA,uBAAA,CAAA,KAAA,CAAA,CAAA;AACA;AACA;AACA,IAAA,OAAA,YAAA;AACA,MAAA,IAAA,aAAA,EAAA,CAAA,cAAA,CAAA,OAAA,CAAA,EAAA;AACA,QAAA,aAAA,EAAA,CAAA,aAAA;AACA,UAAA;AACA,YAAA,QAAA,EAAA,SAAA;AACA,YAAA,KAAA,EAAA,WAAA;AACA,YAAA,OAAA,EAAA,IAAA,CAAA,MAAA,CAAA,KAAA,CAAA,SAAA,EAAA,SAAA,CAAA;AACA,WAAA;AACA,UAAA;AACA,YAAA,KAAA,EAAA,CAAA,GAAA,SAAA,CAAA;AACA,YAAA,KAAA;AACA,WAAA;AACA,SAAA,CAAA;AACA,OAAA;AACA;AACA,MAAA,qBAAA,CAAA,KAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AACA,KAAA,CAAA;AACA;AACA,GAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/http.d.ts b/node_modules/@sentry/node/esm/integrations/http.d.ts deleted file mode 100644 index 58b10ef..0000000 --- a/node_modules/@sentry/node/esm/integrations/http.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Integration } from '@sentry/types'; -/** http module integration */ -export declare class Http implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - private readonly _breadcrumbs; - /** - * @inheritDoc - */ - private readonly _tracing; - /** - * @inheritDoc - */ - constructor(options?: { - breadcrumbs?: boolean; - tracing?: boolean; - }); - /** - * @inheritDoc - */ - setupOnce(): void; -} -//# sourceMappingURL=http.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/http.d.ts.map b/node_modules/@sentry/node/esm/integrations/http.d.ts.map deleted file mode 100644 index 5548c5d..0000000 --- a/node_modules/@sentry/node/esm/integrations/http.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/integrations/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAQ,MAAM,eAAe,CAAC;AAOlD,8BAA8B;AAC9B,qBAAa,IAAK,YAAW,WAAW;IACtC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAW;IAC9B;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAU;IAElC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAU;IAEvC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;OAEG;gBACgB,OAAO,GAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO;IAK7E;;OAEG;IACI,SAAS,IAAI,IAAI;CAqBzB"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/http.js b/node_modules/@sentry/node/esm/integrations/http.js index e059ba7..5818812 100644 --- a/node_modules/@sentry/node/esm/integrations/http.js +++ b/node_modules/@sentry/node/esm/integrations/http.js @@ -1,139 +1,260 @@ +import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; import { getCurrentHub } from '@sentry/core'; -import { fill, parseSemver } from '@sentry/utils'; -var NODE_VERSION = parseSemver(process.versions.node); -/** http module integration */ -var Http = /** @class */ (function () { - /** - * @inheritDoc - */ - function Http(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = Http.id; - this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs; - this._tracing = typeof options.tracing === 'undefined' ? false : options.tracing; +import { parseSemver, logger, fill, stringMatchesSomePattern, dynamicSamplingContextToSentryBaggageHeader } from '@sentry/utils'; +import { normalizeRequestArgs, extractUrl, isSentryRequest, cleanSpanDescription } from './utils/http.js'; + +const NODE_VERSION = parseSemver(process.versions.node); + +/** + * The http module integration instruments Node's internal http module. It creates breadcrumbs, transactions for outgoing + * http requests and attaches trace data when tracing is enabled via its `tracing` option. + */ +class Http { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Http';} + + /** + * @inheritDoc + */ + __init() {this.name = Http.id;} + + /** + * @inheritDoc + */ + constructor(options = {}) {;Http.prototype.__init.call(this); + this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs; + this._tracing = !options.tracing ? undefined : options.tracing === true ? {} : options.tracing; + } + + /** + * @inheritDoc + */ + setupOnce( + _addGlobalEventProcessor, + setupOnceGetCurrentHub, + ) { + // No need to instrument if we don't want to track anything + if (!this._breadcrumbs && !this._tracing) { + return; } - /** - * @inheritDoc - */ - Http.prototype.setupOnce = function () { - // No need to instrument if we don't want to track anything - if (!this._breadcrumbs && !this._tracing) { - return; - } - var handlerWrapper = createHandlerWrapper(this._breadcrumbs, this._tracing); - var httpModule = require('http'); - fill(httpModule, 'get', handlerWrapper); - fill(httpModule, 'request', handlerWrapper); - // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it. - // If we do, we'd get double breadcrumbs and double spans for `https` calls. - // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately. - if (NODE_VERSION.major && NODE_VERSION.major > 8) { - var httpsModule = require('https'); - fill(httpsModule, 'get', handlerWrapper); - fill(httpsModule, 'request', handlerWrapper); - } - }; - /** - * @inheritDoc - */ - Http.id = 'Http'; - return Http; -}()); -export { Http }; + + const clientOptions = _optionalChain([setupOnceGetCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]); + + // Do not auto-instrument for other instrumenter + if (clientOptions && clientOptions.instrumenter !== 'sentry') { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('HTTP Integration is skipped because of instrumenter configuration.'); + return; + } + + // TODO (v8): `tracePropagationTargets` and `shouldCreateSpanForRequest` will be removed from clientOptions + // and we will no longer have to do this optional merge, we can just pass `this._tracing` directly. + const tracingOptions = this._tracing ? { ...clientOptions, ...this._tracing } : undefined; + + const wrappedHandlerMaker = _createWrappedRequestMethodFactory(this._breadcrumbs, tracingOptions); + + // eslint-disable-next-line @typescript-eslint/no-var-requires + const httpModule = require('http'); + fill(httpModule, 'get', wrappedHandlerMaker); + fill(httpModule, 'request', wrappedHandlerMaker); + + // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it. + // If we do, we'd get double breadcrumbs and double spans for `https` calls. + // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately. + if (NODE_VERSION.major && NODE_VERSION.major > 8) { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const httpsModule = require('https'); + fill(httpsModule, 'get', wrappedHandlerMaker); + fill(httpsModule, 'request', wrappedHandlerMaker); + } + } +}Http.__initStatic(); + +// for ease of reading below + /** - * Wrapper function for internal `request` and `get` calls within `http` and `https` modules + * Function which creates a function which creates wrapped versions of internal `request` and `get` calls within `http` + * and `https` modules. (NB: Not a typo - this is a creator^2!) + * + * @param breadcrumbsEnabled Whether or not to record outgoing requests as breadcrumbs + * @param tracingEnabled Whether or not to record outgoing requests as tracing spans + * + * @returns A function which accepts the exiting handler and returns a wrapped handler */ -function createHandlerWrapper(breadcrumbsEnabled, tracingEnabled) { - return function handlerWrapper(originalHandler) { - return function (options) { - var requestUrl = extractUrl(options); - if (isSentryRequest(requestUrl)) { - return originalHandler.apply(this, arguments); +function _createWrappedRequestMethodFactory( + breadcrumbsEnabled, + tracingOptions, +) { + // We're caching results so we don't have to recompute regexp every time we create a request. + const createSpanUrlMap = {}; + const headersUrlMap = {}; + + const shouldCreateSpan = (url) => { + if (_optionalChain([tracingOptions, 'optionalAccess', _6 => _6.shouldCreateSpanForRequest]) === undefined) { + return true; + } + + if (createSpanUrlMap[url]) { + return createSpanUrlMap[url]; + } + + createSpanUrlMap[url] = tracingOptions.shouldCreateSpanForRequest(url); + + return createSpanUrlMap[url]; + }; + + const shouldAttachTraceData = (url) => { + if (_optionalChain([tracingOptions, 'optionalAccess', _7 => _7.tracePropagationTargets]) === undefined) { + return true; + } + + if (headersUrlMap[url]) { + return headersUrlMap[url]; + } + + headersUrlMap[url] = stringMatchesSomePattern(url, tracingOptions.tracePropagationTargets); + + return headersUrlMap[url]; + }; + + return function wrappedRequestMethodFactory(originalRequestMethod) { + return function wrappedMethod( ...args) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const httpModule = this; + + const requestArgs = normalizeRequestArgs(this, args); + const requestOptions = requestArgs[0]; + const requestUrl = extractUrl(requestOptions); + + // we don't want to record requests to Sentry as either breadcrumbs or spans, so just use the original method + if (isSentryRequest(requestUrl)) { + return originalRequestMethod.apply(httpModule, requestArgs); + } + + let requestSpan; + let parentSpan; + + const scope = getCurrentHub().getScope(); + + if (scope && tracingOptions && shouldCreateSpan(requestUrl)) { + parentSpan = scope.getSpan(); + + if (parentSpan) { + requestSpan = parentSpan.startChild({ + description: `${requestOptions.method || 'GET'} ${requestUrl}`, + op: 'http.client', + }); + + if (shouldAttachTraceData(requestUrl)) { + const sentryTraceHeader = requestSpan.toTraceparent(); + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.log( + `[Tracing] Adding sentry-trace header ${sentryTraceHeader} to outgoing request to "${requestUrl}": `, + ); + + requestOptions.headers = { + ...requestOptions.headers, + 'sentry-trace': sentryTraceHeader, + }; + + if (parentSpan.transaction) { + const dynamicSamplingContext = parentSpan.transaction.getDynamicSamplingContext(); + const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); + + let newBaggageHeaderField; + if (!requestOptions.headers || !requestOptions.headers.baggage) { + newBaggageHeaderField = sentryBaggageHeader; + } else if (!sentryBaggageHeader) { + newBaggageHeaderField = requestOptions.headers.baggage; + } else if (Array.isArray(requestOptions.headers.baggage)) { + newBaggageHeaderField = [...requestOptions.headers.baggage, sentryBaggageHeader]; + } else { + // Type-cast explanation: + // Technically this the following could be of type `(number | string)[]` but for the sake of simplicity + // we say this is undefined behaviour, since it would not be baggage spec conform if the user did this. + newBaggageHeaderField = [requestOptions.headers.baggage, sentryBaggageHeader] ; + } + + requestOptions.headers = { + ...requestOptions.headers, + // Setting a hader to `undefined` will crash in node so we only set the baggage header when it's defined + ...(newBaggageHeaderField && { baggage: newBaggageHeaderField }), + }; } - var span; - if (tracingEnabled) { - span = getCurrentHub().startSpan({ - description: (typeof options === 'string' || !options.method ? 'GET' : options.method) + "|" + requestUrl, - op: 'request', - }); + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.log( + `[Tracing] Not adding sentry-trace header to outgoing request (${requestUrl}) due to mismatching tracePropagationTargets option.`, + ); + } + + const transaction = parentSpan.transaction; + if (transaction) { + transaction.metadata.propagations++; + } + } + } + + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return originalRequestMethod + .apply(httpModule, requestArgs) + .once('response', function ( res) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const req = this; + if (breadcrumbsEnabled) { + addRequestBreadcrumb('response', requestUrl, req, res); + } + if (requestSpan) { + if (res.statusCode) { + requestSpan.setHttpStatus(res.statusCode); } - return originalHandler - .apply(this, arguments) - .once('response', function (res) { - if (breadcrumbsEnabled) { - addRequestBreadcrumb('response', requestUrl, this, res); - } - if (tracingEnabled && span) { - span.setHttpStatus(res.statusCode); - span.finish(); - } - }) - .once('error', function () { - if (breadcrumbsEnabled) { - addRequestBreadcrumb('error', requestUrl, this); - } - if (tracingEnabled && span) { - span.setHttpStatus(500); - span.finish(); - } - }); - }; + requestSpan.description = cleanSpanDescription(requestSpan.description, requestOptions, req); + requestSpan.finish(); + } + }) + .once('error', function () { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const req = this; + + if (breadcrumbsEnabled) { + addRequestBreadcrumb('error', requestUrl, req); + } + if (requestSpan) { + requestSpan.setHttpStatus(500); + requestSpan.description = cleanSpanDescription(requestSpan.description, requestOptions, req); + requestSpan.finish(); + } + }); }; + }; } + /** * Captures Breadcrumb based on provided request/response pair */ function addRequestBreadcrumb(event, url, req, res) { - if (!getCurrentHub().getIntegration(Http)) { - return; - } - getCurrentHub().addBreadcrumb({ - category: 'http', - data: { - method: req.method, - status_code: res && res.statusCode, - url: url, - }, - type: 'http', - }, { - event: event, - request: req, - response: res, - }); -} -/** - * Function that can combine together a url that'll be used for our breadcrumbs. - * - * @param options url that should be returned or an object containing it's parts. - * @returns constructed url - */ -function extractUrl(options) { - if (typeof options === 'string') { - return options; - } - var protocol = options.protocol || ''; - var hostname = options.hostname || options.host || ''; - // Don't log standard :80 (http) and :443 (https) ports to reduce the noise - var port = !options.port || options.port === 80 || options.port === 443 ? '' : ":" + options.port; - var path = options.path || '/'; - return protocol + "//" + hostname + port + path; + if (!getCurrentHub().getIntegration(Http)) { + return; + } + + getCurrentHub().addBreadcrumb( + { + category: 'http', + data: { + method: req.method, + status_code: res && res.statusCode, + url, + }, + type: 'http', + }, + { + event, + request: req, + response: res, + }, + ); } -/** - * Checks whether given url points to Sentry server - * @param url url to verify - */ -function isSentryRequest(url) { - var client = getCurrentHub().getClient(); - if (!url || !client) { - return false; - } - var dsn = client.getDsn(); - if (!dsn) { - return false; - } - return url.indexOf(dsn.host) !== -1; -} -//# sourceMappingURL=http.js.map \ No newline at end of file + +export { Http }; +//# sourceMappingURL=http.js.map diff --git a/node_modules/@sentry/node/esm/integrations/http.js.map b/node_modules/@sentry/node/esm/integrations/http.js.map index ca91ed2..fc037bf 100644 --- a/node_modules/@sentry/node/esm/integrations/http.js.map +++ b/node_modules/@sentry/node/esm/integrations/http.js.map @@ -1 +1 @@ -{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/integrations/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIlD,IAAM,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAExD,8BAA8B;AAC9B;IAoBE;;OAEG;IACH,cAAmB,OAA0D;QAA1D,wBAAA,EAAA,YAA0D;QAtB7E;;WAEG;QACI,SAAI,GAAW,IAAI,CAAC,EAAE,CAAC;QAoB5B,IAAI,CAAC,YAAY,GAAG,OAAO,OAAO,CAAC,WAAW,KAAK,WAAW,C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CAAC;KACd;IAED,OAAO,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport { Integration, Span } from '@sentry/types';\nimport { fill, parseSemver } from '@sentry/utils';\nimport * as http from 'http';\nimport * as https from 'https';\n\nconst NODE_VERSION = parseSemver(process.versions.node);\n\n/** http module integration */\nexport class Http implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Http.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'Http';\n\n /**\n * @inheritDoc\n */\n private readonly _breadcrumbs: boolean;\n\n /**\n * @inheritDoc\n */\n private readonly _tracing: boolean;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { breadcrumbs?: boolean; tracing?: boolean } = {}) {\n this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs;\n this._tracing = typeof options.tracing === 'undefined' ? false : options.tracing;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // No need to instrument if we don't want to track anything\n if (!this._breadcrumbs && !this._tracing) {\n return;\n }\n\n const handlerWrapper = createHandlerWrapper(this._breadcrumbs, this._tracing);\n\n const httpModule = require('http');\n fill(httpModule, 'get', handlerWrapper);\n fill(httpModule, 'request', handlerWrapper);\n\n // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it.\n // If we do, we'd get double breadcrumbs and double spans for `https` calls.\n // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately.\n if (NODE_VERSION.major && NODE_VERSION.major > 8) {\n const httpsModule = require('https');\n fill(httpsModule, 'get', handlerWrapper);\n fill(httpsModule, 'request', handlerWrapper);\n }\n }\n}\n\n/**\n * Wrapper function for internal `request` and `get` calls within `http` and `https` modules\n */\nfunction createHandlerWrapper(\n breadcrumbsEnabled: boolean,\n tracingEnabled: boolean,\n): (originalHandler: () => http.ClientRequest) => (options: string | http.ClientRequestArgs) => http.ClientRequest {\n return function handlerWrapper(\n originalHandler: () => http.ClientRequest,\n ): (options: string | http.ClientRequestArgs) => http.ClientRequest {\n return function(this: typeof http | typeof https, options: string | http.ClientRequestArgs): http.ClientRequest {\n const requestUrl = extractUrl(options);\n\n if (isSentryRequest(requestUrl)) {\n return originalHandler.apply(this, arguments);\n }\n\n let span: Span;\n if (tracingEnabled) {\n span = getCurrentHub().startSpan({\n description: `${typeof options === 'string' || !options.method ? 'GET' : options.method}|${requestUrl}`,\n op: 'request',\n });\n }\n\n return originalHandler\n .apply(this, arguments)\n .once('response', function(this: http.IncomingMessage, res: http.ServerResponse): void {\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('response', requestUrl, this, res);\n }\n if (tracingEnabled && span) {\n span.setHttpStatus(res.statusCode);\n span.finish();\n }\n })\n .once('error', function(this: http.IncomingMessage): void {\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('error', requestUrl, this);\n }\n if (tracingEnabled && span) {\n span.setHttpStatus(500);\n span.finish();\n }\n });\n };\n };\n}\n\n/**\n * Captures Breadcrumb based on provided request/response pair\n */\nfunction addRequestBreadcrumb(event: string, url: string, req: http.IncomingMessage, res?: http.ServerResponse): void {\n if (!getCurrentHub().getIntegration(Http)) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'http',\n data: {\n method: req.method,\n status_code: res && res.statusCode,\n url,\n },\n type: 'http',\n },\n {\n event,\n request: req,\n response: res,\n },\n );\n}\n\n/**\n * Function that can combine together a url that'll be used for our breadcrumbs.\n *\n * @param options url that should be returned or an object containing it's parts.\n * @returns constructed url\n */\nfunction extractUrl(options: string | http.ClientRequestArgs): string {\n if (typeof options === 'string') {\n return options;\n }\n const protocol = options.protocol || '';\n const hostname = options.hostname || options.host || '';\n // Don't log standard :80 (http) and :443 (https) ports to reduce the noise\n const port = !options.port || options.port === 80 || options.port === 443 ? '' : `:${options.port}`;\n const path = options.path || '/';\n return `${protocol}//${hostname}${port}${path}`;\n}\n\n/**\n * Checks whether given url points to Sentry server\n * @param url url to verify\n */\nfunction isSentryRequest(url: string): boolean {\n const client = getCurrentHub().getClient();\n if (!url || !client) {\n return false;\n }\n\n const dsn = client.getDsn();\n if (!dsn) {\n return false;\n }\n\n return url.indexOf(dsn.host) !== -1;\n}\n"]} \ No newline at end of file +{"version":3,"file":"http.js","sources":["../../../src/integrations/http.ts"],"sourcesContent":["import type { Hub } from '@sentry/core';\nimport { getCurrentHub } from '@sentry/core';\nimport type { EventProcessor, Integration, Span, TracePropagationTargets } from '@sentry/types';\nimport {\n dynamicSamplingContextToSentryBaggageHeader,\n fill,\n logger,\n parseSemver,\n stringMatchesSomePattern,\n} from '@sentry/utils';\nimport type * as http from 'http';\nimport type * as https from 'https';\n\nimport type { NodeClient } from '../client';\nimport type { RequestMethod, RequestMethodArgs } from './utils/http';\nimport { cleanSpanDescription, extractUrl, isSentryRequest, normalizeRequestArgs } from './utils/http';\n\nconst NODE_VERSION = parseSemver(process.versions.node);\n\ninterface TracingOptions {\n /**\n * List of strings/regex controlling to which outgoing requests\n * the SDK will attach tracing headers.\n *\n * By default the SDK will attach those headers to all outgoing\n * requests. If this option is provided, the SDK will match the\n * request URL of outgoing requests against the items in this\n * array, and only attach tracing headers if a match was found.\n */\n tracePropagationTargets?: TracePropagationTargets;\n\n /**\n * Function determining whether or not to create spans to track outgoing requests to the given URL.\n * By default, spans will be created for all outgoing requests.\n */\n shouldCreateSpanForRequest?: (url: string) => boolean;\n}\n\ninterface HttpOptions {\n /**\n * Whether breadcrumbs should be recorded for requests\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * Whether tracing spans should be created for requests\n * Defaults to false\n */\n tracing?: TracingOptions | boolean;\n}\n\n/**\n * The http module integration instruments Node's internal http module. It creates breadcrumbs, transactions for outgoing\n * http requests and attaches trace data when tracing is enabled via its `tracing` option.\n */\nexport class Http implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Http';\n\n /**\n * @inheritDoc\n */\n public name: string = Http.id;\n\n private readonly _breadcrumbs: boolean;\n private readonly _tracing: TracingOptions | undefined;\n\n /**\n * @inheritDoc\n */\n public constructor(options: HttpOptions = {}) {\n this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs;\n this._tracing = !options.tracing ? undefined : options.tracing === true ? {} : options.tracing;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(\n _addGlobalEventProcessor: (callback: EventProcessor) => void,\n setupOnceGetCurrentHub: () => Hub,\n ): void {\n // No need to instrument if we don't want to track anything\n if (!this._breadcrumbs && !this._tracing) {\n return;\n }\n\n const clientOptions = setupOnceGetCurrentHub().getClient()?.getOptions();\n\n // Do not auto-instrument for other instrumenter\n if (clientOptions && clientOptions.instrumenter !== 'sentry') {\n __DEBUG_BUILD__ && logger.log('HTTP Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n // TODO (v8): `tracePropagationTargets` and `shouldCreateSpanForRequest` will be removed from clientOptions\n // and we will no longer have to do this optional merge, we can just pass `this._tracing` directly.\n const tracingOptions = this._tracing ? { ...clientOptions, ...this._tracing } : undefined;\n\n const wrappedHandlerMaker = _createWrappedRequestMethodFactory(this._breadcrumbs, tracingOptions);\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const httpModule = require('http');\n fill(httpModule, 'get', wrappedHandlerMaker);\n fill(httpModule, 'request', wrappedHandlerMaker);\n\n // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it.\n // If we do, we'd get double breadcrumbs and double spans for `https` calls.\n // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately.\n if (NODE_VERSION.major && NODE_VERSION.major > 8) {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const httpsModule = require('https');\n fill(httpsModule, 'get', wrappedHandlerMaker);\n fill(httpsModule, 'request', wrappedHandlerMaker);\n }\n }\n}\n\n// for ease of reading below\ntype OriginalRequestMethod = RequestMethod;\ntype WrappedRequestMethod = RequestMethod;\ntype WrappedRequestMethodFactory = (original: OriginalRequestMethod) => WrappedRequestMethod;\n\n/**\n * Function which creates a function which creates wrapped versions of internal `request` and `get` calls within `http`\n * and `https` modules. (NB: Not a typo - this is a creator^2!)\n *\n * @param breadcrumbsEnabled Whether or not to record outgoing requests as breadcrumbs\n * @param tracingEnabled Whether or not to record outgoing requests as tracing spans\n *\n * @returns A function which accepts the exiting handler and returns a wrapped handler\n */\nfunction _createWrappedRequestMethodFactory(\n breadcrumbsEnabled: boolean,\n tracingOptions: TracingOptions | undefined,\n): WrappedRequestMethodFactory {\n // We're caching results so we don't have to recompute regexp every time we create a request.\n const createSpanUrlMap: Record = {};\n const headersUrlMap: Record = {};\n\n const shouldCreateSpan = (url: string): boolean => {\n if (tracingOptions?.shouldCreateSpanForRequest === undefined) {\n return true;\n }\n\n if (createSpanUrlMap[url]) {\n return createSpanUrlMap[url];\n }\n\n createSpanUrlMap[url] = tracingOptions.shouldCreateSpanForRequest(url);\n\n return createSpanUrlMap[url];\n };\n\n const shouldAttachTraceData = (url: string): boolean => {\n if (tracingOptions?.tracePropagationTargets === undefined) {\n return true;\n }\n\n if (headersUrlMap[url]) {\n return headersUrlMap[url];\n }\n\n headersUrlMap[url] = stringMatchesSomePattern(url, tracingOptions.tracePropagationTargets);\n\n return headersUrlMap[url];\n };\n\n return function wrappedRequestMethodFactory(originalRequestMethod: OriginalRequestMethod): WrappedRequestMethod {\n return function wrappedMethod(this: typeof http | typeof https, ...args: RequestMethodArgs): http.ClientRequest {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const httpModule = this;\n\n const requestArgs = normalizeRequestArgs(this, args);\n const requestOptions = requestArgs[0];\n const requestUrl = extractUrl(requestOptions);\n\n // we don't want to record requests to Sentry as either breadcrumbs or spans, so just use the original method\n if (isSentryRequest(requestUrl)) {\n return originalRequestMethod.apply(httpModule, requestArgs);\n }\n\n let requestSpan: Span | undefined;\n let parentSpan: Span | undefined;\n\n const scope = getCurrentHub().getScope();\n\n if (scope && tracingOptions && shouldCreateSpan(requestUrl)) {\n parentSpan = scope.getSpan();\n\n if (parentSpan) {\n requestSpan = parentSpan.startChild({\n description: `${requestOptions.method || 'GET'} ${requestUrl}`,\n op: 'http.client',\n });\n\n if (shouldAttachTraceData(requestUrl)) {\n const sentryTraceHeader = requestSpan.toTraceparent();\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Adding sentry-trace header ${sentryTraceHeader} to outgoing request to \"${requestUrl}\": `,\n );\n\n requestOptions.headers = {\n ...requestOptions.headers,\n 'sentry-trace': sentryTraceHeader,\n };\n\n if (parentSpan.transaction) {\n const dynamicSamplingContext = parentSpan.transaction.getDynamicSamplingContext();\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n\n let newBaggageHeaderField;\n if (!requestOptions.headers || !requestOptions.headers.baggage) {\n newBaggageHeaderField = sentryBaggageHeader;\n } else if (!sentryBaggageHeader) {\n newBaggageHeaderField = requestOptions.headers.baggage;\n } else if (Array.isArray(requestOptions.headers.baggage)) {\n newBaggageHeaderField = [...requestOptions.headers.baggage, sentryBaggageHeader];\n } else {\n // Type-cast explanation:\n // Technically this the following could be of type `(number | string)[]` but for the sake of simplicity\n // we say this is undefined behaviour, since it would not be baggage spec conform if the user did this.\n newBaggageHeaderField = [requestOptions.headers.baggage, sentryBaggageHeader] as string[];\n }\n\n requestOptions.headers = {\n ...requestOptions.headers,\n // Setting a hader to `undefined` will crash in node so we only set the baggage header when it's defined\n ...(newBaggageHeaderField && { baggage: newBaggageHeaderField }),\n };\n }\n } else {\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Not adding sentry-trace header to outgoing request (${requestUrl}) due to mismatching tracePropagationTargets option.`,\n );\n }\n\n const transaction = parentSpan.transaction;\n if (transaction) {\n transaction.metadata.propagations++;\n }\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalRequestMethod\n .apply(httpModule, requestArgs)\n .once('response', function (this: http.ClientRequest, res: http.IncomingMessage): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const req = this;\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('response', requestUrl, req, res);\n }\n if (requestSpan) {\n if (res.statusCode) {\n requestSpan.setHttpStatus(res.statusCode);\n }\n requestSpan.description = cleanSpanDescription(requestSpan.description, requestOptions, req);\n requestSpan.finish();\n }\n })\n .once('error', function (this: http.ClientRequest): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const req = this;\n\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('error', requestUrl, req);\n }\n if (requestSpan) {\n requestSpan.setHttpStatus(500);\n requestSpan.description = cleanSpanDescription(requestSpan.description, requestOptions, req);\n requestSpan.finish();\n }\n });\n };\n };\n}\n\n/**\n * Captures Breadcrumb based on provided request/response pair\n */\nfunction addRequestBreadcrumb(event: string, url: string, req: http.ClientRequest, res?: http.IncomingMessage): void {\n if (!getCurrentHub().getIntegration(Http)) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'http',\n data: {\n method: req.method,\n status_code: res && res.statusCode,\n url,\n },\n type: 'http',\n },\n {\n event,\n request: req,\n response: res,\n },\n );\n}\n"],"names":[],"mappings":";;;;;AAiBA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;AAmCA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,C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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,WAAA,EAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,CAAA,CAAA,CAAA;MACA,CAAA;MACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,CAAA;IACA;MACA,CAAA,CAAA,CAAA,CAAA,CAAA;MACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;MACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;IACA,CAAA;EACA,CAAA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/index.d.ts b/node_modules/@sentry/node/esm/integrations/index.d.ts deleted file mode 100644 index 7dda59d..0000000 --- a/node_modules/@sentry/node/esm/integrations/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { Console } from './console'; -export { Http } from './http'; -export { OnUncaughtException } from './onuncaughtexception'; -export { OnUnhandledRejection } from './onunhandledrejection'; -export { LinkedErrors } from './linkederrors'; -export { Modules } from './modules'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/index.d.ts.map b/node_modules/@sentry/node/esm/integrations/index.d.ts.map deleted file mode 100644 index e13d023..0000000 --- a/node_modules/@sentry/node/esm/integrations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/index.js b/node_modules/@sentry/node/esm/integrations/index.js index 8d82475..d6a1182 100644 --- a/node_modules/@sentry/node/esm/integrations/index.js +++ b/node_modules/@sentry/node/esm/integrations/index.js @@ -1,7 +1,11 @@ -export { Console } from './console'; -export { Http } from './http'; -export { OnUncaughtException } from './onuncaughtexception'; -export { OnUnhandledRejection } from './onunhandledrejection'; -export { LinkedErrors } from './linkederrors'; -export { Modules } from './modules'; -//# sourceMappingURL=index.js.map \ No newline at end of file +export { Console } from './console.js'; +export { Http } from './http.js'; +export { OnUncaughtException } from './onuncaughtexception.js'; +export { OnUnhandledRejection } from './onunhandledrejection.js'; +export { LinkedErrors } from './linkederrors.js'; +export { Modules } from './modules.js'; +export { ContextLines } from './contextlines.js'; +export { Context } from './context.js'; +export { RequestData } from './requestdata.js'; +export { LocalVariables } from './localvariables.js'; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/node/esm/integrations/index.js.map b/node_modules/@sentry/node/esm/integrations/index.js.map index a1ed26d..6d75ebc 100644 --- a/node_modules/@sentry/node/esm/integrations/index.js.map +++ b/node_modules/@sentry/node/esm/integrations/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { Console } from './console';\nexport { Http } from './http';\nexport { OnUncaughtException } from './onuncaughtexception';\nexport { OnUnhandledRejection } from './onunhandledrejection';\nexport { LinkedErrors } from './linkederrors';\nexport { Modules } from './modules';\n"]} \ No newline at end of file +{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/linkederrors.d.ts b/node_modules/@sentry/node/esm/integrations/linkederrors.d.ts deleted file mode 100644 index d703699..0000000 --- a/node_modules/@sentry/node/esm/integrations/linkederrors.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types'; -/** Adds SDK info to an event. */ -export declare class LinkedErrors implements Integration { - /** - * @inheritDoc - */ - readonly name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - private readonly _key; - /** - * @inheritDoc - */ - private readonly _limit; - /** - * @inheritDoc - */ - constructor(options?: { - key?: string; - limit?: number; - }); - /** - * @inheritDoc - */ - setupOnce(): void; - /** - * @inheritDoc - */ - handler(event: Event, hint?: EventHint): PromiseLike; - /** - * @inheritDoc - */ - walkErrorTree(error: ExtendedError, key: string, stack?: Exception[]): PromiseLike; -} -//# sourceMappingURL=linkederrors.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/linkederrors.d.ts.map b/node_modules/@sentry/node/esm/integrations/linkederrors.d.ts.map deleted file mode 100644 index 9916c24..0000000 --- a/node_modules/@sentry/node/esm/integrations/linkederrors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linkederrors.d.ts","sourceRoot":"","sources":["../../src/integrations/linkederrors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQxF,iCAAiC;AACjC,qBAAa,YAAa,YAAW,WAAW;IAC9C;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAmB;IAC/C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAkB;IAE1C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAE9B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;OAEG;gBACgB,OAAO,GAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO;IAKjE;;OAEG;IACI,SAAS,IAAI,IAAI;IAUxB;;OAEG;IACI,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAmBlE;;OAEG;IACI,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,SAAS,EAAO,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;CAkB3G"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/linkederrors.js b/node_modules/@sentry/node/esm/integrations/linkederrors.js index 9305960..bc39b9a 100644 --- a/node_modules/@sentry/node/esm/integrations/linkederrors.js +++ b/node_modules/@sentry/node/esm/integrations/linkederrors.js @@ -1,84 +1,108 @@ -import * as tslib_1 from "tslib"; +import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core'; -import { isInstanceOf, SyncPromise } from '@sentry/utils'; -import { getExceptionFromError } from '../parsers'; -var DEFAULT_KEY = 'cause'; -var DEFAULT_LIMIT = 5; +import { isInstanceOf, resolvedSyncPromise, SyncPromise } from '@sentry/utils'; +import { exceptionFromError } from '../eventbuilder.js'; +import { ContextLines } from './contextlines.js'; + +const DEFAULT_KEY = 'cause'; +const DEFAULT_LIMIT = 5; + /** Adds SDK info to an event. */ -var LinkedErrors = /** @class */ (function () { - /** - * @inheritDoc - */ - function LinkedErrors(options) { - if (options === void 0) { options = {}; } - /** - * @inheritDoc - */ - this.name = LinkedErrors.id; - this._key = options.key || DEFAULT_KEY; - this._limit = options.limit || DEFAULT_LIMIT; +class LinkedErrors { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'LinkedErrors';} + + /** + * @inheritDoc + */ + __init() {this.name = LinkedErrors.id;} + + /** + * @inheritDoc + */ + + /** + * @inheritDoc + */ + + /** + * @inheritDoc + */ + constructor(options = {}) {;LinkedErrors.prototype.__init.call(this); + this._key = options.key || DEFAULT_KEY; + this._limit = options.limit || DEFAULT_LIMIT; + } + + /** + * @inheritDoc + */ + setupOnce() { + addGlobalEventProcessor(async (event, hint) => { + const hub = getCurrentHub(); + const self = hub.getIntegration(LinkedErrors); + const client = hub.getClient(); + if (client && self && self._handler && typeof self._handler === 'function') { + await self._handler(client.getOptions().stackParser, event, hint); + } + return event; + }); + } + + /** + * @inheritDoc + */ + _handler(stackParser, event, hint) { + if (!event.exception || !event.exception.values || !isInstanceOf(hint.originalException, Error)) { + return resolvedSyncPromise(event); } - /** - * @inheritDoc - */ - LinkedErrors.prototype.setupOnce = function () { - addGlobalEventProcessor(function (event, hint) { - var self = getCurrentHub().getIntegration(LinkedErrors); - if (self) { - return self.handler(event, hint); - } - return event; + + return new SyncPromise(resolve => { + void this._walkErrorTree(stackParser, hint.originalException , this._key) + .then((linkedErrors) => { + if (event && event.exception && event.exception.values) { + event.exception.values = [...linkedErrors, ...event.exception.values]; + } + resolve(event); + }) + .then(null, () => { + resolve(event); }); - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype.handler = function (event, hint) { - var _this = this; - if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) { - return SyncPromise.resolve(event); - } - return new SyncPromise(function (resolve) { - _this.walkErrorTree(hint.originalException, _this._key) - .then(function (linkedErrors) { - if (event && event.exception && event.exception.values) { - event.exception.values = tslib_1.__spread(linkedErrors, event.exception.values); - } - resolve(event); - }) - .then(null, function () { - resolve(event); - }); - }); - }; - /** - * @inheritDoc - */ - LinkedErrors.prototype.walkErrorTree = function (error, key, stack) { - var _this = this; - if (stack === void 0) { stack = []; } - if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) { - return SyncPromise.resolve(stack); - } - return new SyncPromise(function (resolve, reject) { - getExceptionFromError(error[key]) - .then(function (exception) { - _this.walkErrorTree(error[key], key, tslib_1.__spread([exception], stack)) - .then(resolve) - .then(null, function () { - reject(); - }); - }) - .then(null, function () { - reject(); - }); + }); + } + + /** + * @inheritDoc + */ + async _walkErrorTree( + stackParser, + error, + key, + stack = [], + ) { + if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) { + return Promise.resolve(stack); + } + + const exception = exceptionFromError(stackParser, error[key]); + + // If the ContextLines integration is enabled, we add source code context to linked errors + // because we can't guarantee the order that integrations are run. + const contextLines = getCurrentHub().getIntegration(ContextLines); + if (contextLines && _optionalChain([exception, 'access', _ => _.stacktrace, 'optionalAccess', _2 => _2.frames])) { + await contextLines.addSourceContextToFrames(exception.stacktrace.frames); + } + + return new Promise((resolve, reject) => { + void this._walkErrorTree(stackParser, error[key], key, [exception, ...stack]) + .then(resolve) + .then(null, () => { + reject(); }); - }; - /** - * @inheritDoc - */ - LinkedErrors.id = 'LinkedErrors'; - return LinkedErrors; -}()); + }); + } +}LinkedErrors.__initStatic(); + export { LinkedErrors }; -//# sourceMappingURL=linkederrors.js.map \ No newline at end of file +//# sourceMappingURL=linkederrors.js.map diff --git a/node_modules/@sentry/node/esm/integrations/linkederrors.js.map b/node_modules/@sentry/node/esm/integrations/linkederrors.js.map index 66004ce..9632c54 100644 --- a/node_modules/@sentry/node/esm/integrations/linkederrors.js.map +++ b/node_modules/@sentry/node/esm/integrations/linkederrors.js.map @@ -1 +1 @@ -{"version":3,"file":"linkederrors.js","sourceRoot":"","sources":["../../src/integrations/linkederrors.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uB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cAAc,CAAC;IA4E5C,mBAAC;CAAA,AApFD,IAoFC;SApFY,YAAY","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf, SyncPromise } from '@sentry/utils';\n\nimport { getExceptionFromError } from '../parsers';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return (self.handler(event, hint) as unknown) as PromiseLike;\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public handler(event: Event, hint?: EventHint): PromiseLike {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return SyncPromise.resolve(event);\n }\n\n return new SyncPromise(resolve => {\n this.walkErrorTree(hint.originalException as Error, this._key)\n .then((linkedErrors: Exception[]) => {\n if (event && event.exception && event.exception.values) {\n event.exception.values = [...linkedErrors, ...event.exception.values];\n }\n resolve(event);\n })\n .then(null, () => {\n resolve(event);\n });\n });\n }\n\n /**\n * @inheritDoc\n */\n public walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): PromiseLike {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return SyncPromise.resolve(stack);\n }\n return new SyncPromise((resolve, reject) => {\n getExceptionFromError(error[key])\n .then((exception: Exception) => {\n this.walkErrorTree(error[key], key, [exception, ...stack])\n .then(resolve)\n .then(null, () => {\n reject();\n });\n })\n .then(null, () => {\n reject();\n });\n });\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"linkederrors.js","sources":["../../../src/integrations/linkederrors.ts"],"sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Exception, ExtendedError, Integration, StackParser } from '@sentry/types';\nimport { isInstanceOf, resolvedSyncPromise, SyncPromise } from '@sentry/utils';\n\nimport type { NodeClient } from '../client';\nimport { exceptionFromError } from '../eventbuilder';\nimport { ContextLines } from './contextlines';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event, hint: EventHint) => {\n const hub = getCurrentHub();\n const self = hub.getIntegration(LinkedErrors);\n const client = hub.getClient();\n if (client && self && self._handler && typeof self._handler === 'function') {\n await self._handler(client.getOptions().stackParser, event, hint);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(stackParser: StackParser, event: Event, hint: EventHint): PromiseLike {\n if (!event.exception || !event.exception.values || !isInstanceOf(hint.originalException, Error)) {\n return resolvedSyncPromise(event);\n }\n\n return new SyncPromise(resolve => {\n void this._walkErrorTree(stackParser, hint.originalException as Error, this._key)\n .then((linkedErrors: Exception[]) => {\n if (event && event.exception && event.exception.values) {\n event.exception.values = [...linkedErrors, ...event.exception.values];\n }\n resolve(event);\n })\n .then(null, () => {\n resolve(event);\n });\n });\n }\n\n /**\n * @inheritDoc\n */\n private async _walkErrorTree(\n stackParser: StackParser,\n error: ExtendedError,\n key: string,\n stack: Exception[] = [],\n ): Promise {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return Promise.resolve(stack);\n }\n\n const exception = exceptionFromError(stackParser, error[key]);\n\n // If the ContextLines integration is enabled, we add source code context to linked errors\n // because we can't guarantee the order that integrations are run.\n const contextLines = getCurrentHub().getIntegration(ContextLines);\n if (contextLines && exception.stacktrace?.frames) {\n await contextLines.addSourceContextToFrames(exception.stacktrace.frames);\n }\n\n return new Promise((resolve, reject) => {\n void this._walkErrorTree(stackParser, error[key], key, [exception, ...stack])\n .then(resolve)\n .then(null, () => {\n reject();\n });\n });\n }\n}\n"],"names":[],"mappings":";;;;;;AAQA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA;;AAEA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,cAAA;EACA,CAAA,CAAA;GACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;GACA,CAAA;GACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,YAAA,CAAA,EAAA,CAAA,IAAA,CAAA,CAAA,E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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA;;IAEA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA;MACA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA;UACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;QACA,CAAA,CAAA;IACA,CAAA,CAAA;EACA;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/modules.d.ts b/node_modules/@sentry/node/esm/integrations/modules.d.ts deleted file mode 100644 index 47bc00f..0000000 --- a/node_modules/@sentry/node/esm/integrations/modules.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { EventProcessor, Hub, Integration } from '@sentry/types'; -/** Add node modules / packages to the event */ -export declare class Modules implements Integration { - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; - /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */ - private _getModules; -} -//# sourceMappingURL=modules.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/modules.d.ts.map b/node_modules/@sentry/node/esm/integrations/modules.d.ts.map deleted file mode 100644 index a409a32..0000000 --- a/node_modules/@sentry/node/esm/integrations/modules.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/integrations/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AA0DjE,+CAA+C;AAC/C,qBAAa,OAAQ,YAAW,WAAW;IACzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAc;IACjC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAa;IAErC;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI;IAY7G,kGAAkG;IAClG,OAAO,CAAC,WAAW;CAOpB"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/modules.js b/node_modules/@sentry/node/esm/integrations/modules.js index 0e72998..486cf88 100644 --- a/node_modules/@sentry/node/esm/integrations/modules.js +++ b/node_modules/@sentry/node/esm/integrations/modules.js @@ -1,75 +1,106 @@ -import * as tslib_1 from "tslib"; import { existsSync, readFileSync } from 'fs'; import { dirname, join } from 'path'; -var moduleCache; + +let moduleCache; + +/** Extract information about paths */ +function getPaths() { + try { + return require.cache ? Object.keys(require.cache ) : []; + } catch (e) { + return []; + } +} + /** Extract information about package.json modules */ -function collectModules() { - var mainPaths = (require.main && require.main.paths) || []; - var paths = require.cache ? Object.keys(require.cache) : []; - var infos = {}; - var seen = {}; - paths.forEach(function (path) { - var dir = path; - /** Traverse directories upward in the search of package.json file */ - var updir = function () { - var orig = dir; - dir = dirname(orig); - if (!dir || orig === dir || seen[orig]) { - return undefined; - } - if (mainPaths.indexOf(dir) < 0) { - return updir(); - } - var pkgfile = join(orig, 'package.json'); - seen[orig] = true; - if (!existsSync(pkgfile)) { - return updir(); - } - try { - var info = JSON.parse(readFileSync(pkgfile, 'utf8')); - infos[info.name] = info.version; - } - catch (_oO) { - // no-empty - } - }; - updir(); - }); - return infos; +function collectModules() + + { + const mainPaths = (require.main && require.main.paths) || []; + const paths = getPaths(); + const infos + + = {}; + const seen + + = {}; + + paths.forEach(path => { + let dir = path; + + /** Traverse directories upward in the search of package.json file */ + const updir = () => { + const orig = dir; + dir = dirname(orig); + + if (!dir || orig === dir || seen[orig]) { + return undefined; + } + if (mainPaths.indexOf(dir) < 0) { + return updir(); + } + + const pkgfile = join(orig, 'package.json'); + seen[orig] = true; + + if (!existsSync(pkgfile)) { + return updir(); + } + + try { + const info = JSON.parse(readFileSync(pkgfile, 'utf8')) + +; + infos[info.name] = info.version; + } catch (_oO) { + // no-empty + } + }; + + updir(); + }); + + return infos; } + /** Add node modules / packages to the event */ -var Modules = /** @class */ (function () { - function Modules() { - /** - * @inheritDoc - */ - this.name = Modules.id; +class Modules {constructor() { Modules.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Modules';} + + /** + * @inheritDoc + */ + __init() {this.name = Modules.id;} + + /** + * @inheritDoc + */ + setupOnce(addGlobalEventProcessor, getCurrentHub) { + addGlobalEventProcessor(event => { + if (!getCurrentHub().getIntegration(Modules)) { + return event; + } + return { + ...event, + modules: { + ...event.modules, + ...this._getModules(), + }, + }; + }); + } + + /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */ + _getModules() { + if (!moduleCache) { + moduleCache = collectModules(); } - /** - * @inheritDoc - */ - Modules.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) { - var _this = this; - addGlobalEventProcessor(function (event) { - if (!getCurrentHub().getIntegration(Modules)) { - return event; - } - return tslib_1.__assign({}, event, { modules: _this._getModules() }); - }); - }; - /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */ - Modules.prototype._getModules = function () { - if (!moduleCache) { - // tslint:disable-next-line:no-unsafe-any - moduleCache = collectModules(); - } - return moduleCache; - }; - /** - * @inheritDoc - */ - Modules.id = 'Modules'; - return Modules; -}()); + return moduleCache; + } +} Modules.__initStatic(); + export { Modules }; -//# sourceMappingURL=modules.js.map \ No newline at end of file +//# sourceMappingURL=modules.js.map diff --git a/node_modules/@sentry/node/esm/integrations/modules.js.map b/node_modules/@sentry/node/esm/integrations/modules.js.map index 9c90658..d45856c 100644 --- a/node_modules/@sentry/node/esm/integrations/modules.js.map +++ b/node_modules/@sentry/node/esm/integrations/modules.js.map @@ -1 +1 @@ -{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/integrations/modules.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,IAAI,WAAsC,CAAC;AAE3C,qDAAqD;AACrD,SAAS,cAAc;IAGrB,IAAM,SAAS,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7D,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACpE,IAAM,KAAK,GAEP,EAAE,CAAC;IACP,IAAM,IAAI,GAEN,EAAE,CAAC;IAEP,KAAK,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;aACd;YACD,4BACK,KAAK,IACR,OAAO,EAAE,KAAI,CAAC,WAAW,EAAE,IAC3B;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,kGAAkG;IAC1F,6BAAW,GAAnB;QACE,IAAI,CAAC,WAAW,EAAE;YAChB,yCAAyC;YACzC,WAAW,GAAG,cAAc,EAAE,CAAC;SAChC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IA3BD;;OAEG;IACW,UAAE,GAAW,SAAS,CAAC;IAyBvC,cAAC;CAAA,AAjCD,IAiCC;SAjCY,OAAO","sourcesContent":["import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { existsSync, readFileSync } from 'fs';\nimport { dirname, join } from 'path';\n\nlet moduleCache: { [key: string]: string };\n\n/** Extract information about package.json modules */\nfunction collectModules(): {\n [name: string]: string;\n} {\n const mainPaths = (require.main && require.main.paths) || [];\n const paths = require.cache ? Object.keys(require.cache as {}) : [];\n const infos: {\n [name: string]: string;\n } = {};\n const seen: {\n [path: string]: boolean;\n } = {};\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = (): void | (() => void) => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen[orig]) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen[orig] = true;\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8')) as {\n name: string;\n version: string;\n };\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Add node modules / packages to the event */\nexport class Modules implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = Modules.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'Modules';\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n if (!getCurrentHub().getIntegration(Modules)) {\n return event;\n }\n return {\n ...event,\n modules: this._getModules(),\n };\n });\n }\n\n /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\n private _getModules(): { [key: string]: string } {\n if (!moduleCache) {\n // tslint:disable-next-line:no-unsafe-any\n moduleCache = collectModules();\n }\n return moduleCache;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"modules.js","sources":["../../../src/integrations/modules.ts"],"sourcesContent":["import type { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { existsSync, readFileSync } from 'fs';\nimport { dirname, join } from 'path';\n\nlet moduleCache: { [key: string]: string };\n\n/** Extract information about paths */\nfunction getPaths(): string[] {\n try {\n return require.cache ? Object.keys(require.cache as Record) : [];\n } catch (e) {\n return [];\n }\n}\n\n/** Extract information about package.json modules */\nfunction collectModules(): {\n [name: string]: string;\n} {\n const mainPaths = (require.main && require.main.paths) || [];\n const paths = getPaths();\n const infos: {\n [name: string]: string;\n } = {};\n const seen: {\n [path: string]: boolean;\n } = {};\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = (): void | (() => void) => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen[orig]) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen[orig] = true;\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8')) as {\n name: string;\n version: string;\n };\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Add node modules / packages to the event */\nexport class Modules implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Modules';\n\n /**\n * @inheritDoc\n */\n public name: string = Modules.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n if (!getCurrentHub().getIntegration(Modules)) {\n return event;\n }\n return {\n ...event,\n modules: {\n ...event.modules,\n ...this._getModules(),\n },\n };\n });\n }\n\n /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\n private _getModules(): { [key: string]: string } {\n if (!moduleCache) {\n moduleCache = collectModules();\n }\n return moduleCache;\n }\n}\n"],"names":[],"mappings":";;;AAIA,IAAA,WAAA,CAAA;AACA;AACA;AACA,SAAA,QAAA,GAAA;AACA,EAAA,IAAA;AACA,IAAA,OAAA,OAAA,CAAA,KAAA,GAAA,MAAA,CAAA,IAAA,CAAA,OAAA,CAAA,KAAA,EAAA,GAAA,EAAA,CAAA;AACA,GAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,EAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,cAAA;AACA;AACA,CAAA;AACA,EAAA,MAAA,SAAA,GAAA,CAAA,OAAA,CAAA,IAAA,IAAA,OAAA,CAAA,IAAA,CAAA,KAAA,KAAA,EAAA,CAAA;AACA,EAAA,MAAA,KAAA,GAAA,QAAA,EAAA,CAAA;AACA,EAAA,MAAA,KAAA;AACA;AACA,GAAA,EAAA,CAAA;AACA,EAAA,MAAA,IAAA;AACA;AACA,GAAA,EAAA,CAAA;AACA;AACA,EAAA,KAAA,CAAA,OAAA,CAAA,IAAA,IAAA;AACA,IAAA,IAAA,GAAA,GAAA,IAAA,CAAA;AACA;AACA;AACA,IAAA,MAAA,KAAA,GAAA,MAAA;AACA,MAAA,MAAA,IAAA,GAAA,GAAA,CAAA;AACA,MAAA,GAAA,GAAA,OAAA,CAAA,IAAA,CAAA,CAAA;AACA;AACA,MAAA,IAAA,CAAA,GAAA,IAAA,IAAA,KAAA,GAAA,IAAA,IAAA,CAAA,IAAA,CAAA,EAAA;AACA,QAAA,OAAA,SAAA,CAAA;AACA,OAAA;AACA,MAAA,IAAA,SAAA,CAAA,OAAA,CAAA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AAA,GAAA,KAAA;AACA,QAAA,OAAA,EAAA;AACA,UAAA,GAAA,KAAA,CAAA,OAAA;AACA,UAAA,GAAA,IAAA,CAAA,WAAA,EAAA;AACA,SAAA;AACA,OAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA;AACA,GAAA,WAAA,GAAA;AACA,IAAA,IAAA,CAAA,WAAA,EAAA;AACA,MAAA,WAAA,GAAA,cAAA,EAAA,CAAA;AACA,KAAA;AACA,IAAA,OAAA,WAAA,CAAA;AACA,GAAA;AACA,CAAA,CAAA,OAAA,CAAA,YAAA,EAAA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.d.ts b/node_modules/@sentry/node/esm/integrations/onuncaughtexception.d.ts deleted file mode 100644 index f991c08..0000000 --- a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Integration } from '@sentry/types'; -/** Global Promise Rejection handler */ -export declare class OnUncaughtException implements Integration { - private readonly _options; - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - readonly handler: (error: Error) => void; - /** - * @inheritDoc - */ - constructor(_options?: { - /** - * Default onFatalError handler - * @param firstError Error that has been thrown - * @param secondError If this was called multiple times this will be set - */ - onFatalError?(firstError: Error, secondError?: Error): void; - }); - /** - * @inheritDoc - */ - setupOnce(): void; - /** - * @hidden - */ - private _makeErrorHandler; -} -//# sourceMappingURL=onuncaughtexception.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.d.ts.map b/node_modules/@sentry/node/esm/integrations/onuncaughtexception.d.ts.map deleted file mode 100644 index f8a0e04..0000000 --- a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onuncaughtexception.d.ts","sourceRoot":"","sources":["../../src/integrations/onuncaughtexception.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAY,MAAM,eAAe,CAAC;AAMtD,uCAAuC;AACvC,qBAAa,mBAAoB,YAAW,WAAW;IAmBnD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAlB3B;;OAEG;IACI,IAAI,EAAE,MAAM,CAA0B;IAC7C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAyB;IAEjD;;OAEG;IACH,SAAgB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAA4B;IAE3E;;OAEG;gBAEgB,QAAQ,GAAE;QACzB;;;;WAIG;QACH,YAAY,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;KACxD;IAER;;OAEG;IACI,SAAS,IAAI,IAAI;IAIxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CA2E1B"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js b/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js index 7ae5d98..732b498 100644 --- a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js +++ b/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js @@ -1,112 +1,151 @@ import { getCurrentHub } from '@sentry/core'; -import { Severity } from '@sentry/types'; import { logger } from '@sentry/utils'; -import { logAndExitProcess } from '../handlers'; -/** Global Promise Rejection handler */ -var OnUncaughtException = /** @class */ (function () { - /** - * @inheritDoc - */ - function OnUncaughtException(_options) { - if (_options === void 0) { _options = {}; } - this._options = _options; - /** - * @inheritDoc - */ - this.name = OnUncaughtException.id; - /** - * @inheritDoc - */ - this.handler = this._makeErrorHandler(); - } - /** - * @inheritDoc - */ - OnUncaughtException.prototype.setupOnce = function () { - global.process.on('uncaughtException', this.handler.bind(this)); +import { logAndExitProcess } from './utils/errorhandling.js'; + +/** Global Exception handler */ +class OnUncaughtException { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'OnUncaughtException';} + + /** + * @inheritDoc + */ + __init() {this.name = OnUncaughtException.id;} + + /** + * @inheritDoc + */ + __init2() {this.handler = this._makeErrorHandler();} + + // CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts` + + /** + * @inheritDoc + */ + constructor(options = {}) {;OnUncaughtException.prototype.__init.call(this);OnUncaughtException.prototype.__init2.call(this); + this._options = { + exitEvenIfOtherHandlersAreRegistered: true, + ...options, }; - /** - * @hidden - */ - OnUncaughtException.prototype._makeErrorHandler = function () { - var _this = this; - var timeout = 2000; - var caughtFirstError = false; - var caughtSecondError = false; - var calledFatalError = false; - var firstError; - return function (error) { - var onFatalError = logAndExitProcess; - var client = getCurrentHub().getClient(); - if (_this._options.onFatalError) { - onFatalError = _this._options.onFatalError; + } + + /** + * @inheritDoc + */ + setupOnce() { + global.process.on('uncaughtException', this.handler); + } + + /** + * @hidden + */ + _makeErrorHandler() { + const timeout = 2000; + let caughtFirstError = false; + let caughtSecondError = false; + let calledFatalError = false; + let firstError; + + return (error) => { + let onFatalError = logAndExitProcess; + const client = getCurrentHub().getClient(); + + if (this._options.onFatalError) { + onFatalError = this._options.onFatalError; + } else if (client && client.getOptions().onFatalError) { + onFatalError = client.getOptions().onFatalError ; + } + + // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not + // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust + // exit behaviour of the SDK accordingly: + // - If other listeners are attached, do not exit. + // - If the only listener attached is ours, exit. + const userProvidedListenersCount = global.process + .listeners('uncaughtException') + .reduce((acc, listener) => { + if ( + listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself + listener === this.handler // filter the handler we registered ourselves) + ) { + return acc; + } else { + return acc + 1; + } + }, 0); + + const processWouldExit = userProvidedListenersCount === 0; + const shouldApplyFatalHandlingLogic = this._options.exitEvenIfOtherHandlersAreRegistered || processWouldExit; + + if (!caughtFirstError) { + const hub = getCurrentHub(); + + // this is the first uncaught error and the ultimate reason for shutting down + // we want to do absolutely everything possible to ensure it gets captured + // also we want to make sure we don't go recursion crazy if more errors happen after this one + firstError = error; + caughtFirstError = true; + + if (hub.getIntegration(OnUncaughtException)) { + hub.withScope((scope) => { + scope.setLevel('fatal'); + hub.captureException(error, { + originalException: error, + data: { mechanism: { handled: false, type: 'onuncaughtexception' } }, + }); + if (!calledFatalError && shouldApplyFatalHandlingLogic) { + calledFatalError = true; + onFatalError(error); } - else if (client && client.getOptions().onFatalError) { - onFatalError = client.getOptions().onFatalError; - } - if (!caughtFirstError) { - var hub_1 = getCurrentHub(); - // this is the first uncaught error and the ultimate reason for shutting down - // we want to do absolutely everything possible to ensure it gets captured - // also we want to make sure we don't go recursion crazy if more errors happen after this one - firstError = error; - caughtFirstError = true; - if (hub_1.getIntegration(OnUncaughtException)) { - hub_1.withScope(function (scope) { - scope.setLevel(Severity.Fatal); - hub_1.captureException(error, { originalException: error }); - if (!calledFatalError) { - calledFatalError = true; - onFatalError(error); - } - }); - } - else { - if (!calledFatalError) { - calledFatalError = true; - onFatalError(error); - } - } - } - else if (calledFatalError) { - // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down - logger.warn('uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown'); - logAndExitProcess(error); - } - else if (!caughtSecondError) { - // two cases for how we can hit this branch: - // - capturing of first error blew up and we just caught the exception from that - // - quit trying to capture, proceed with shutdown - // - a second independent error happened while waiting for first error to capture - // - want to avoid causing premature shutdown before first error capture finishes - // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff - // so let's instead just delay a bit before we proceed with our action here - // in case 1, we just wait a bit unnecessarily but ultimately do the same thing - // in case 2, the delay hopefully made us wait long enough for the capture to finish - // two potential nonideal outcomes: - // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError - // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error - // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError) - // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish - caughtSecondError = true; - setTimeout(function () { - if (!calledFatalError) { - // it was probably case 1, let's treat err as the sendErr and call onFatalError - calledFatalError = true; - onFatalError(firstError, error); - } - else { - // it was probably case 2, our first error finished capturing while we waited, cool, do nothing - } - }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc - } - }; + }); + } else { + if (!calledFatalError && shouldApplyFatalHandlingLogic) { + calledFatalError = true; + onFatalError(error); + } + } + } else { + if (shouldApplyFatalHandlingLogic) { + if (calledFatalError) { + // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.warn( + 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown', + ); + logAndExitProcess(error); + } else if (!caughtSecondError) { + // two cases for how we can hit this branch: + // - capturing of first error blew up and we just caught the exception from that + // - quit trying to capture, proceed with shutdown + // - a second independent error happened while waiting for first error to capture + // - want to avoid causing premature shutdown before first error capture finishes + // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff + // so let's instead just delay a bit before we proceed with our action here + // in case 1, we just wait a bit unnecessarily but ultimately do the same thing + // in case 2, the delay hopefully made us wait long enough for the capture to finish + // two potential nonideal outcomes: + // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError + // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error + // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError) + // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish + caughtSecondError = true; + setTimeout(() => { + if (!calledFatalError) { + // it was probably case 1, let's treat err as the sendErr and call onFatalError + calledFatalError = true; + onFatalError(firstError, error); + } else { + // it was probably case 2, our first error finished capturing while we waited, cool, do nothing + } + }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc + } + } + } }; - /** - * @inheritDoc - */ - OnUncaughtException.id = 'OnUncaughtException'; - return OnUncaughtException; -}()); + } +} OnUncaughtException.__initStatic(); + export { OnUncaughtException }; -//# sourceMappingURL=onuncaughtexception.js.map \ No newline at end of file +//# sourceMappingURL=onuncaughtexception.js.map diff --git a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map b/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map index b43f0fb..a97371d 100644 --- a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map +++ b/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map @@ -1 +1 @@ -{"version":3,"file":"onuncaughtexception.js","sourceRoot":"","sources":["../../src/integrations/onuncaughtexception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,cAAc,CAAC;AACpD,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,uCAAuC;AACvC;IAeE;;OAEG;IACH,6BACmB,QAOX;QAPW,yBAAA,EAAA,aAOX;QAPW,aAAQ,GAAR,QAAQ,CAOnB;QAzBR;;WAEG;QACI,SAAI,GAAW,mBAAmB,CAAC,EAAE,CAAC;QAM7C;;WAEG;QACa,YAAO,GAA2B,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAcxE,CAAC;IACJ;;OAEG;IACI,uCAAS,GAAhB;QACE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACK,+CAAiB,GAAzB;QAAA,iBA0EC;QAzEC,IAAM,OAAO,GAAG,IAAI,CAAC;QACrB,IAAI,gBAAgB,GAAY,KAAK,CAAC;QAC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AC3B,+FAA+F;gBAC/F,MAAM,CAAC,IAAI,CAAC,gGAAgG,CAAC,CAAC;gBAC9G,iBAAiB,CAAC,KAAK,CAAC,CAAC;aAC1B;iBAAM,IAAI,CAAC,iBAAiB,EAAE;gBAC7B,4CAA4C;gBAC5C,kFAAkF;gBAClF,sDAAsD;gBACtD,mFAAmF;gBACnF,qFAAqF;gBACrF,sGAAsG;gBACtG,2EAA2E;gBAC3E,+EAA+E;gBAC/E,oFAAoF;gBACpF,mCAAmC;gBACnC,6IAA6I;gBAC7I,6MAA6M;gBAC7M,iHAAiH;gBACjH,wGAAwG;gBACxG,iBAAiB,GAAG,IAAI,CAAC;gBACzB,UAAU,CAAC;oBACT,IAAI,CAAC,gBAAgB,EAAE;wBACrB,+EAA+E;wBAC/E,gBAAgB,GAAG,IAAI,CAAC;wBACxB,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;qBACjC;yBAAM;wBACL,+FAA+F;qBAChG;gBACH,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,sIAAsI;aACpJ;QACH,CAAC,CAAC;IACJ,CAAC;IA3GD;;OAEG;IACW,sBAAE,GAAW,qBAAqB,CAAC;IAyGnD,0BAAC;CAAA,AAjHD,IAiHC;SAjHY,mBAAmB","sourcesContent":["import { getCurrentHub, Scope } from '@sentry/core';\nimport { Integration, Severity } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { NodeClient } from '../client';\nimport { logAndExitProcess } from '../handlers';\n\n/** Global Promise Rejection handler */\nexport class OnUncaughtException implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = OnUncaughtException.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'OnUncaughtException';\n\n /**\n * @inheritDoc\n */\n public readonly handler: (error: Error) => void = this._makeErrorHandler();\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n /**\n * Default onFatalError handler\n * @param firstError Error that has been thrown\n * @param secondError If this was called multiple times this will be set\n */\n onFatalError?(firstError: Error, secondError?: Error): void;\n } = {},\n ) {}\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n global.process.on('uncaughtException', this.handler.bind(this));\n }\n\n /**\n * @hidden\n */\n private _makeErrorHandler(): (error: Error) => void {\n const timeout = 2000;\n let caughtFirstError: boolean = false;\n let caughtSecondError: boolean = false;\n let calledFatalError: boolean = false;\n let firstError: Error;\n\n return (error: Error): void => {\n type onFatalErrorHandlerType = (firstError: Error, secondError?: Error) => void;\n\n let onFatalError: onFatalErrorHandlerType = logAndExitProcess;\n const client = getCurrentHub().getClient();\n\n if (this._options.onFatalError) {\n onFatalError = this._options.onFatalError;\n } else if (client && client.getOptions().onFatalError) {\n onFatalError = client.getOptions().onFatalError as onFatalErrorHandlerType;\n }\n\n if (!caughtFirstError) {\n const hub = getCurrentHub();\n\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (hub.getIntegration(OnUncaughtException)) {\n hub.withScope((scope: Scope) => {\n scope.setLevel(Severity.Fatal);\n hub.captureException(error, { originalException: error });\n if (!calledFatalError) {\n calledFatalError = true;\n onFatalError(error);\n }\n });\n } else {\n if (!calledFatalError) {\n calledFatalError = true;\n onFatalError(error);\n }\n }\n } else if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n logger.warn('uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown');\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n } else {\n // it was probably case 2, our first error finished capturing while we waited, cool, do nothing\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n };\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"onuncaughtexception.js","sources":["../../../src/integrations/onuncaughtexception.ts"],"sourcesContent":["import type { Scope } from '@sentry/core';\nimport { getCurrentHub } from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport type { NodeClient } from '../client';\nimport { logAndExitProcess } from './utils/errorhandling';\n\ntype OnFatalErrorHandler = (firstError: Error, secondError?: Error) => void;\n\n// CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts`\ninterface OnUncaughtExceptionOptions {\n // TODO(v8): Evaluate whether we should switch the default behaviour here.\n // Also, we can evaluate using https://nodejs.org/api/process.html#event-uncaughtexceptionmonitor per default, and\n // falling back to current behaviour when that's not available.\n /**\n * Controls if the SDK should register a handler to exit the process on uncaught errors:\n * - `true`: The SDK will exit the process on all uncaught errors.\n * - `false`: The SDK will only exit the process when there are no other `uncaughtException` handlers attached.\n *\n * Default: `true`\n */\n exitEvenIfOtherHandlersAreRegistered: boolean;\n\n /**\n * This is called when an uncaught error would cause the process to exit.\n *\n * @param firstError Uncaught error causing the process to exit\n * @param secondError Will be set if the handler was called multiple times. This can happen either because\n * `onFatalError` itself threw, or because an independent error happened somewhere else while `onFatalError`\n * was running.\n */\n onFatalError?(this: void, firstError: Error, secondError?: Error): void;\n}\n\n/** Global Exception handler */\nexport class OnUncaughtException implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'OnUncaughtException';\n\n /**\n * @inheritDoc\n */\n public name: string = OnUncaughtException.id;\n\n /**\n * @inheritDoc\n */\n public readonly handler: (error: Error) => void = this._makeErrorHandler();\n\n // CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts`\n private readonly _options: OnUncaughtExceptionOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options: Partial = {}) {\n this._options = {\n exitEvenIfOtherHandlersAreRegistered: true,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n global.process.on('uncaughtException', this.handler);\n }\n\n /**\n * @hidden\n */\n private _makeErrorHandler(): (error: Error) => void {\n const timeout = 2000;\n let caughtFirstError: boolean = false;\n let caughtSecondError: boolean = false;\n let calledFatalError: boolean = false;\n let firstError: Error;\n\n return (error: Error): void => {\n let onFatalError: OnFatalErrorHandler = logAndExitProcess;\n const client = getCurrentHub().getClient();\n\n if (this._options.onFatalError) {\n onFatalError = this._options.onFatalError;\n } else if (client && client.getOptions().onFatalError) {\n onFatalError = client.getOptions().onFatalError as OnFatalErrorHandler;\n }\n\n // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not\n // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust\n // exit behaviour of the SDK accordingly:\n // - If other listeners are attached, do not exit.\n // - If the only listener attached is ours, exit.\n const userProvidedListenersCount = global.process\n .listeners('uncaughtException')\n .reduce((acc, listener) => {\n if (\n listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself\n listener === this.handler // filter the handler we registered ourselves)\n ) {\n return acc;\n } else {\n return acc + 1;\n }\n }, 0);\n\n const processWouldExit = userProvidedListenersCount === 0;\n const shouldApplyFatalHandlingLogic = this._options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;\n\n if (!caughtFirstError) {\n const hub = getCurrentHub();\n\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (hub.getIntegration(OnUncaughtException)) {\n hub.withScope((scope: Scope) => {\n scope.setLevel('fatal');\n hub.captureException(error, {\n originalException: error,\n data: { mechanism: { handled: false, type: 'onuncaughtexception' } },\n });\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n });\n } else {\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n }\n } else {\n if (shouldApplyFatalHandlingLogic) {\n if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n __DEBUG_BUILD__ &&\n logger.warn(\n 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown',\n );\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n } else {\n // it was probably case 2, our first error finished capturing while we waited, cool, do nothing\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n }\n }\n };\n }\n}\n"],"names":[],"mappings":";;;;AAmCA;AACA,MAAA,mBAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,sBAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,mBAAA,CAAA,GAAA,CAAA;AACA;AACA;AACA;AACA;AACA,IAAA,OAAA,GAAA,CAAA,IAAA,CAAA,OAAA,GAAA,IAAA,CAAA,iBAAA,GAAA,CAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,GAAA,WAAA,CAAA,OAAA,GAAA,EAAA,EAAA,CAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,OAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA;AACA,MAAA,oCAAA,EAAA,IAAA;AACA,MAAA,GAAA,OAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA;AACA;AACA;AACA;AACA,GAAA,SAAA,GAAA;AACA,IAAA,MAAA,CAAA,OAAA,CAAA,EAAA,CAAA,mBAAA,EAAA,IAAA,CAAA,OAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA;AACA;AACA;AACA,GAAA,iBAAA,GAAA;AACA,IAAA,MAAA,OAAA,GAAA,IAAA,CAAA;AACA,IAAA,IAAA,gBAAA,GAAA,KAAA,CAAA;AACA,IAAA,IAAA,iBAAA,GAAA,KAAA,CAAA;AACA,IAAA,IAAA,gBAAA,GAAA,KAAA,CAAA;AACA,IAAA,IAAA,UAAA,CAAA;A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;AACA,SAAA;AACA,OAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA,CAAA,CAAA,mBAAA,CAAA,YAAA,EAAA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.d.ts b/node_modules/@sentry/node/esm/integrations/onunhandledrejection.d.ts deleted file mode 100644 index 918fd36..0000000 --- a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Integration } from '@sentry/types'; -declare type UnhandledRejectionMode = 'none' | 'warn' | 'strict'; -/** Global Promise Rejection handler */ -export declare class OnUnhandledRejection implements Integration { - private readonly _options; - /** - * @inheritDoc - */ - name: string; - /** - * @inheritDoc - */ - static id: string; - /** - * @inheritDoc - */ - constructor(_options?: { - /** - * Option deciding what to do after capturing unhandledRejection, - * that mimicks behavior of node's --unhandled-rejection flag. - */ - mode: UnhandledRejectionMode; - }); - /** - * @inheritDoc - */ - setupOnce(): void; - /** - * Send an exception with reason - * @param reason string - * @param promise promise - */ - sendUnhandledPromise(reason: any, promise: any): void; - /** - * Handler for `mode` option - */ - private _handleRejection; -} -export {}; -//# sourceMappingURL=onunhandledrejection.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.d.ts.map b/node_modules/@sentry/node/esm/integrations/onunhandledrejection.d.ts.map deleted file mode 100644 index fd8bee5..0000000 --- a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onunhandledrejection.d.ts","sourceRoot":"","sources":["../../src/integrations/onunhandledrejection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,aAAK,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzD,uCAAuC;AACvC,qBAAa,oBAAqB,YAAW,WAAW;IAcpD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAb3B;;OAEG;IACI,IAAI,EAAE,MAAM,CAA2B;IAC9C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAA0B;IAElD;;OAEG;gBAEgB,QAAQ,GAAE;QACzB;;;WAGG;QACH,IAAI,EAAE,sBAAsB,CAAC;KACX;IAGtB;;OAEG;IACI,SAAS,IAAI,IAAI;IAIxB;;;;OAIG;IACI,oBAAoB,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,IAAI;IA8B5D;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAoBzB"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js b/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js index b8fe267..075d1d8 100644 --- a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js +++ b/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js @@ -1,80 +1,83 @@ import { getCurrentHub } from '@sentry/core'; import { consoleSandbox } from '@sentry/utils'; -import { logAndExitProcess } from '../handlers'; +import { logAndExitProcess } from './utils/errorhandling.js'; + /** Global Promise Rejection handler */ -var OnUnhandledRejection = /** @class */ (function () { - /** - * @inheritDoc - */ - function OnUnhandledRejection(_options) { - if (_options === void 0) { _options = { mode: 'warn' }; } - this._options = _options; - /** - * @inheritDoc - */ - this.name = OnUnhandledRejection.id; - } - /** - * @inheritDoc - */ - OnUnhandledRejection.prototype.setupOnce = function () { - global.process.on('unhandledRejection', this.sendUnhandledPromise.bind(this)); - }; - /** - * Send an exception with reason - * @param reason string - * @param promise promise - */ - OnUnhandledRejection.prototype.sendUnhandledPromise = function (reason, promise) { - var hub = getCurrentHub(); - if (!hub.getIntegration(OnUnhandledRejection)) { - this._handleRejection(reason); - return; - } - var context = (promise.domain && promise.domain.sentryContext) || {}; - hub.withScope(function (scope) { - scope.setExtra('unhandledPromiseRejection', true); - // Preserve backwards compatibility with raven-node for now - if (context.user) { - scope.setUser(context.user); - } - if (context.tags) { - scope.setTags(context.tags); - } - if (context.extra) { - scope.setExtras(context.extra); - } - hub.captureException(reason, { originalException: promise }); +class OnUnhandledRejection { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'OnUnhandledRejection';} + + /** + * @inheritDoc + */ + __init() {this.name = OnUnhandledRejection.id;} + + /** + * @inheritDoc + */ + constructor( + _options + + = { mode: 'warn' }, + ) {;this._options = _options;OnUnhandledRejection.prototype.__init.call(this);} + + /** + * @inheritDoc + */ + setupOnce() { + global.process.on('unhandledRejection', this.sendUnhandledPromise.bind(this)); + } + + /** + * Send an exception with reason + * @param reason string + * @param promise promise + */ + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any + sendUnhandledPromise(reason, promise) { + const hub = getCurrentHub(); + if (hub.getIntegration(OnUnhandledRejection)) { + hub.withScope((scope) => { + scope.setExtra('unhandledPromiseRejection', true); + hub.captureException(reason, { + originalException: promise, + data: { mechanism: { handled: false, type: 'onunhandledrejection' } }, }); - this._handleRejection(reason); - }; - /** - * Handler for `mode` option - */ - OnUnhandledRejection.prototype._handleRejection = function (reason) { - // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240 - var rejectionWarning = 'This error originated either by ' + - 'throwing inside of an async function without a catch block, ' + - 'or by rejecting a promise which was not handled with .catch().' + - ' The promise rejected with the reason:'; - if (this._options.mode === 'warn') { - consoleSandbox(function () { - console.warn(rejectionWarning); - console.error(reason && reason.stack ? reason.stack : reason); - }); - } - else if (this._options.mode === 'strict') { - consoleSandbox(function () { - console.warn(rejectionWarning); - }); - logAndExitProcess(reason); - } - }; - /** - * @inheritDoc - */ - OnUnhandledRejection.id = 'OnUnhandledRejection'; - return OnUnhandledRejection; -}()); + }); + } + this._handleRejection(reason); + } + + /** + * Handler for `mode` option + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _handleRejection(reason) { + // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240 + const rejectionWarning = + 'This error originated either by ' + + 'throwing inside of an async function without a catch block, ' + + 'or by rejecting a promise which was not handled with .catch().' + + ' The promise rejected with the reason:'; + + /* eslint-disable no-console */ + if (this._options.mode === 'warn') { + consoleSandbox(() => { + console.warn(rejectionWarning); + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + console.error(reason && reason.stack ? reason.stack : reason); + }); + } else if (this._options.mode === 'strict') { + consoleSandbox(() => { + console.warn(rejectionWarning); + }); + logAndExitProcess(reason); + } + /* eslint-enable no-console */ + } +} OnUnhandledRejection.__initStatic(); + export { OnUnhandledRejection }; -//# sourceMappingURL=onunhandledrejection.js.map \ No newline at end of file +//# sourceMappingURL=onunhandledrejection.js.map diff --git a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map b/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map index 9d0d8c9..7a89d40 100644 --- a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map +++ b/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map @@ -1 +1 @@ -{"version":3,"file":"onunhandledrejection.js","sourceRoot":"","sources":["../../src/integrations/onunhandledrejection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD,uCAAuC;AACvC;IAUE;;OAEG;IACH,8BACmB,QAMG;QANH,yBAAA,EAAA,aAMX,IAAI,EAAE,MAAM,EAAE;QANH,aAAQ,GAAR,QAAQ,CAML;QAnBtB;;WAEG;QACI,SAAI,GAAW,oBAAoB,CAAC,EAAE,CAAC;IAiB3C,CAAC;IAEJ;;OAEG;IACI,wCAAS,GAAhB;QACE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAA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AC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBAC/B,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;SACJ;aAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC1C,cAAc,CAAC;gBACb,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;YACH,iBAAiB,CAAC,MAAM,CAAC,CAAC;SAC3B;IACH,CAAC;IAlFD;;OAEG;IACW,uBAAE,GAAW,sBAAsB,CAAC;IAgFpD,2BAAC;CAAA,AAxFD,IAwFC;SAxFY,oBAAoB","sourcesContent":["import { getCurrentHub, Scope } from '@sentry/core';\nimport { Integration } from '@sentry/types';\nimport { consoleSandbox } from '@sentry/utils';\n\nimport { logAndExitProcess } from '../handlers';\n\ntype UnhandledRejectionMode = 'none' | 'warn' | 'strict';\n\n/** Global Promise Rejection handler */\nexport class OnUnhandledRejection implements Integration {\n /**\n * @inheritDoc\n */\n public name: string = OnUnhandledRejection.id;\n /**\n * @inheritDoc\n */\n public static id: string = 'OnUnhandledRejection';\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n /**\n * Option deciding what to do after capturing unhandledRejection,\n * that mimicks behavior of node's --unhandled-rejection flag.\n */\n mode: UnhandledRejectionMode;\n } = { mode: 'warn' },\n ) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n global.process.on('unhandledRejection', this.sendUnhandledPromise.bind(this));\n }\n\n /**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n */\n public sendUnhandledPromise(reason: any, promise: any): void {\n const hub = getCurrentHub();\n\n if (!hub.getIntegration(OnUnhandledRejection)) {\n this._handleRejection(reason);\n return;\n }\n\n const context = (promise.domain && promise.domain.sentryContext) || {};\n\n hub.withScope((scope: Scope) => {\n scope.setExtra('unhandledPromiseRejection', true);\n\n // Preserve backwards compatibility with raven-node for now\n if (context.user) {\n scope.setUser(context.user);\n }\n if (context.tags) {\n scope.setTags(context.tags);\n }\n if (context.extra) {\n scope.setExtras(context.extra);\n }\n\n hub.captureException(reason, { originalException: promise });\n });\n\n this._handleRejection(reason);\n }\n\n /**\n * Handler for `mode` option\n */\n private _handleRejection(reason: any): void {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n if (this._options.mode === 'warn') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (this._options.mode === 'strict') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n logAndExitProcess(reason);\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"onunhandledrejection.js","sources":["../../../src/integrations/onunhandledrejection.ts"],"sourcesContent":["import type { Scope } from '@sentry/core';\nimport { getCurrentHub } from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { consoleSandbox } from '@sentry/utils';\n\nimport { logAndExitProcess } from './utils/errorhandling';\n\ntype UnhandledRejectionMode = 'none' | 'warn' | 'strict';\n\n/** Global Promise Rejection handler */\nexport class OnUnhandledRejection implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'OnUnhandledRejection';\n\n /**\n * @inheritDoc\n */\n public name: string = OnUnhandledRejection.id;\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n /**\n * Option deciding what to do after capturing unhandledRejection,\n * that mimicks behavior of node's --unhandled-rejection flag.\n */\n mode: UnhandledRejectionMode;\n } = { mode: 'warn' },\n ) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n global.process.on('unhandledRejection', this.sendUnhandledPromise.bind(this));\n }\n\n /**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n public sendUnhandledPromise(reason: any, promise: any): void {\n const hub = getCurrentHub();\n if (hub.getIntegration(OnUnhandledRejection)) {\n hub.withScope((scope: Scope) => {\n scope.setExtra('unhandledPromiseRejection', true);\n hub.captureException(reason, {\n originalException: promise,\n data: { mechanism: { handled: false, type: 'onunhandledrejection' } },\n });\n });\n }\n this._handleRejection(reason);\n }\n\n /**\n * Handler for `mode` option\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _handleRejection(reason: any): void {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n /* eslint-disable no-console */\n if (this._options.mode === 'warn') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (this._options.mode === 'strict') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n logAndExitProcess(reason);\n }\n /* eslint-enable no-console */\n }\n}\n"],"names":[],"mappings":";;;;AASA;AACA,MAAA,oBAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,uBAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,oBAAA,CAAA,GAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,WAAA;AACA,MAAA,QAAA;;AAMA,GAAA,EAAA,IAAA,EAAA,MAAA,EAAA;AACA,IAAA,CAAA,CAAA,IAAA,CAAA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AA,KAAA,CAAA,MAAA,IAAA,MAAA,CAAA,KAAA,GAAA,MAAA,CAAA,KAAA,GAAA,MAAA,CAAA,CAAA;AACA,OAAA,CAAA,CAAA;AACA,KAAA,MAAA,IAAA,IAAA,CAAA,QAAA,CAAA,IAAA,KAAA,QAAA,EAAA;AACA,MAAA,cAAA,CAAA,MAAA;AACA,QAAA,OAAA,CAAA,IAAA,CAAA,gBAAA,CAAA,CAAA;AACA,OAAA,CAAA,CAAA;AACA,MAAA,iBAAA,CAAA,MAAA,CAAA,CAAA;AACA,KAAA;AACA;AACA,GAAA;AACA,CAAA,CAAA,oBAAA,CAAA,YAAA,EAAA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/parsers.d.ts b/node_modules/@sentry/node/esm/parsers.d.ts deleted file mode 100644 index 986dd4e..0000000 --- a/node_modules/@sentry/node/esm/parsers.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Event, Exception, ExtendedError, StackFrame } from '@sentry/types'; -import { NodeOptions } from './backend'; -import * as stacktrace from './stacktrace'; -/** - * Resets the file cache. Exists for testing purposes. - * @hidden - */ -export declare function resetFileContentCache(): void; -/** - * @hidden - */ -export declare function extractStackFromError(error: Error): stacktrace.StackFrame[]; -/** - * @hidden - */ -export declare function parseStack(stack: stacktrace.StackFrame[], options?: NodeOptions): PromiseLike; -/** - * @hidden - */ -export declare function getExceptionFromError(error: Error, options?: NodeOptions): PromiseLike; -/** - * @hidden - */ -export declare function parseError(error: ExtendedError, options?: NodeOptions): PromiseLike; -/** - * @hidden - */ -export declare function prepareFramesForEvent(stack: StackFrame[]): StackFrame[]; -//# sourceMappingURL=parsers.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/parsers.d.ts.map b/node_modules/@sentry/node/esm/parsers.d.ts.map deleted file mode 100644 index 34c31cf..0000000 --- a/node_modules/@sentry/node/esm/parsers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK5E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAM3C;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAsGD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAAC,UAAU,EAAE,CAM3E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC,CAmD3G;AAkCD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,CAejG;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,CAU1F;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAcvE"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/parsers.js b/node_modules/@sentry/node/esm/parsers.js deleted file mode 100644 index 6aa667b..0000000 --- a/node_modules/@sentry/node/esm/parsers.js +++ /dev/null @@ -1,234 +0,0 @@ -import { addContextToFrame, basename, dirname, SyncPromise } from '@sentry/utils'; -import { readFile } from 'fs'; -import { LRUMap } from 'lru_map'; -import * as stacktrace from './stacktrace'; -// tslint:disable-next-line:no-unsafe-any -var DEFAULT_LINES_OF_CONTEXT = 7; -var FILE_CONTENT_CACHE = new LRUMap(100); -/** - * Resets the file cache. Exists for testing purposes. - * @hidden - */ -export function resetFileContentCache() { - FILE_CONTENT_CACHE.clear(); -} -/** JSDoc */ -function getFunction(frame) { - try { - return frame.functionName || frame.typeName + "." + (frame.methodName || ''); - } - catch (e) { - // This seems to happen sometimes when using 'use strict', - // stemming from `getTypeName`. - // [TypeError: Cannot read property 'constructor' of undefined] - return ''; - } -} -var mainModule = ((require.main && require.main.filename && dirname(require.main.filename)) || - global.process.cwd()) + "/"; -/** JSDoc */ -function getModule(filename, base) { - if (!base) { - base = mainModule; // tslint:disable-line:no-parameter-reassignment - } - // It's specifically a module - var file = basename(filename, '.js'); - filename = dirname(filename); // tslint:disable-line:no-parameter-reassignment - var n = filename.lastIndexOf('/node_modules/'); - if (n > -1) { - // /node_modules/ is 14 chars - return filename.substr(n + 14).replace(/\//g, '.') + ":" + file; - } - // Let's see if it's a part of the main module - // To be a part of main module, it has to share the same base - n = (filename + "/").lastIndexOf(base, 0); - if (n === 0) { - var moduleName = filename.substr(base.length).replace(/\//g, '.'); - if (moduleName) { - moduleName += ':'; - } - moduleName += file; - return moduleName; - } - return file; -} -/** - * This function reads file contents and caches them in a global LRU cache. - * Returns a Promise filepath => content array for all files that we were able to read. - * - * @param filenames Array of filepaths to read content from. - */ -function readSourceFiles(filenames) { - // we're relying on filenames being de-duped already - if (filenames.length === 0) { - return SyncPromise.resolve({}); - } - return new SyncPromise(function (resolve) { - var sourceFiles = {}; - var count = 0; - var _loop_1 = function (i) { - var filename = filenames[i]; - var cache = FILE_CONTENT_CACHE.get(filename); - // We have a cache hit - if (cache !== undefined) { - // If it's not null (which means we found a file and have a content) - // we set the content and return it later. - if (cache !== null) { - sourceFiles[filename] = cache; - } - count++; - // In any case we want to skip here then since we have a content already or we couldn't - // read the file and don't want to try again. - if (count === filenames.length) { - resolve(sourceFiles); - } - return "continue"; - } - readFile(filename, function (err, data) { - var content = err ? null : data.toString(); - sourceFiles[filename] = content; - // We always want to set the cache, even to null which means there was an error reading the file. - // We do not want to try to read the file again. - FILE_CONTENT_CACHE.set(filename, content); - count++; - if (count === filenames.length) { - resolve(sourceFiles); - } - }); - }; - // tslint:disable-next-line:prefer-for-of - for (var i = 0; i < filenames.length; i++) { - _loop_1(i); - } - }); -} -/** - * @hidden - */ -export function extractStackFromError(error) { - var stack = stacktrace.parse(error); - if (!stack) { - return []; - } - return stack; -} -/** - * @hidden - */ -export function parseStack(stack, options) { - var filesToRead = []; - var linesOfContext = options && options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT; - var frames = stack.map(function (frame) { - var parsedFrame = { - colno: frame.columnNumber, - filename: frame.fileName || '', - function: getFunction(frame), - lineno: frame.lineNumber, - }; - var isInternal = frame.native || - (parsedFrame.filename && - !parsedFrame.filename.startsWith('/') && - !parsedFrame.filename.startsWith('.') && - parsedFrame.filename.indexOf(':\\') !== 1); - // in_app is all that's not an internal Node function or a module within node_modules - // note that isNative appears to return true even for node core libraries - // see https://github.com/getsentry/raven-node/issues/176 - parsedFrame.in_app = - !isInternal && parsedFrame.filename !== undefined && parsedFrame.filename.indexOf('node_modules/') === -1; - // Extract a module name based on the filename - if (parsedFrame.filename) { - parsedFrame.module = getModule(parsedFrame.filename); - if (!isInternal && linesOfContext > 0) { - filesToRead.push(parsedFrame.filename); - } - } - return parsedFrame; - }); - // We do an early return if we do not want to fetch context liens - if (linesOfContext <= 0) { - return SyncPromise.resolve(frames); - } - try { - return addPrePostContext(filesToRead, frames, linesOfContext); - } - catch (_) { - // This happens in electron for example where we are not able to read files from asar. - // So it's fine, we recover be just returning all frames without pre/post context. - return SyncPromise.resolve(frames); - } -} -/** - * This function tries to read the source files + adding pre and post context (source code) - * to a frame. - * @param filesToRead string[] of filepaths - * @param frames StackFrame[] containg all frames - */ -function addPrePostContext(filesToRead, frames, linesOfContext) { - return new SyncPromise(function (resolve) { - return readSourceFiles(filesToRead).then(function (sourceFiles) { - var result = frames.map(function (frame) { - if (frame.filename && sourceFiles[frame.filename]) { - try { - var lines = sourceFiles[frame.filename].split('\n'); - addContextToFrame(lines, frame, linesOfContext); - } - catch (e) { - // anomaly, being defensive in case - // unlikely to ever happen in practice but can definitely happen in theory - } - } - return frame; - }); - resolve(result); - }); - }); -} -/** - * @hidden - */ -export function getExceptionFromError(error, options) { - var name = error.name || error.constructor.name; - var stack = extractStackFromError(error); - return new SyncPromise(function (resolve) { - return parseStack(stack, options).then(function (frames) { - var result = { - stacktrace: { - frames: prepareFramesForEvent(frames), - }, - type: name, - value: error.message, - }; - resolve(result); - }); - }); -} -/** - * @hidden - */ -export function parseError(error, options) { - return new SyncPromise(function (resolve) { - return getExceptionFromError(error, options).then(function (exception) { - resolve({ - exception: { - values: [exception], - }, - }); - }); - }); -} -/** - * @hidden - */ -export function prepareFramesForEvent(stack) { - if (!stack || !stack.length) { - return []; - } - var localStack = stack; - var firstFrameFunction = localStack[0].function || ''; - if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { - localStack = localStack.slice(1); - } - // The frame where the crash happened, should be the last entry in the array - return localStack.reverse(); -} -//# sourceMappingURL=parsers.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/parsers.js.map b/node_modules/@sentry/node/esm/parsers.js.map deleted file mode 100644 index d0bb573..0000000 --- a/node_modules/@sentry/node/esm/parsers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,yCAAyC;AACzC,IAAM,wBAAwB,GAAW,CAAC,CAAC;AAC3C,IAAM,kBAAkB,GAAG,IAAI,MAAM,CAAwB,GAAG,CAAC,CAAC;AAElE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AK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,SAAoB;YAC9D,OAAO,CAAC;gBACN,SAAS,EAAE;oBACT,MAAM,EAAE,CAAC,SAAS,CAAC;iBACpB;aACF,CAAC,CAAC;QACL,CAAC,CAAC;IANF,CAME,CACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAmB;IACvD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QAC3B,OAAO,EAAE,CAAC;KACX;IAED,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAM,kBAAkB,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;IAExD,IAAI,kBAAkB,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE;QAChH,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAClC;IAED,4EAA4E;IAC5E,OAAO,UAAU,CAAC,OAAO,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["import { Event, Exception, ExtendedError, StackFrame } from '@sentry/types';\nimport { addContextToFrame, basename, dirname, SyncPromise } from '@sentry/utils';\nimport { readFile } from 'fs';\nimport { LRUMap } from 'lru_map';\n\nimport { NodeOptions } from './backend';\nimport * as stacktrace from './stacktrace';\n\n// tslint:disable-next-line:no-unsafe-any\nconst DEFAULT_LINES_OF_CONTEXT: number = 7;\nconst FILE_CONTENT_CACHE = new LRUMap(100);\n\n/**\n * Resets the file cache. Exists for testing purposes.\n * @hidden\n */\nexport function resetFileContentCache(): void {\n FILE_CONTENT_CACHE.clear();\n}\n\n/** JSDoc */\nfunction getFunction(frame: stacktrace.StackFrame): string {\n try {\n return frame.functionName || `${frame.typeName}.${frame.methodName || ''}`;\n } catch (e) {\n // This seems to happen sometimes when using 'use strict',\n // stemming from `getTypeName`.\n // [TypeError: Cannot read property 'constructor' of undefined]\n return '';\n }\n}\n\nconst mainModule: string = `${(require.main && require.main.filename && dirname(require.main.filename)) ||\n global.process.cwd()}/`;\n\n/** JSDoc */\nfunction getModule(filename: string, base?: string): string {\n if (!base) {\n base = mainModule; // tslint:disable-line:no-parameter-reassignment\n }\n\n // It's specifically a module\n const file = basename(filename, '.js');\n filename = dirname(filename); // tslint:disable-line:no-parameter-reassignment\n let n = filename.lastIndexOf('/node_modules/');\n if (n > -1) {\n // /node_modules/ is 14 chars\n return `${filename.substr(n + 14).replace(/\\//g, '.')}:${file}`;\n }\n // Let's see if it's a part of the main module\n // To be a part of main module, it has to share the same base\n n = `${filename}/`.lastIndexOf(base, 0);\n if (n === 0) {\n let moduleName = filename.substr(base.length).replace(/\\//g, '.');\n if (moduleName) {\n moduleName += ':';\n }\n moduleName += file;\n return moduleName;\n }\n return file;\n}\n\n/**\n * This function reads file contents and caches them in a global LRU cache.\n * Returns a Promise filepath => content array for all files that we were able to read.\n *\n * @param filenames Array of filepaths to read content from.\n */\nfunction readSourceFiles(filenames: string[]): PromiseLike<{ [key: string]: string | null }> {\n // we're relying on filenames being de-duped already\n if (filenames.length === 0) {\n return SyncPromise.resolve({});\n }\n\n return new SyncPromise<{\n [key: string]: string | null;\n }>(resolve => {\n const sourceFiles: {\n [key: string]: string | null;\n } = {};\n\n let count = 0;\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < filenames.length; i++) {\n const filename = filenames[i];\n\n const cache = FILE_CONTENT_CACHE.get(filename);\n // We have a cache hit\n if (cache !== undefined) {\n // If it's not null (which means we found a file and have a content)\n // we set the content and return it later.\n if (cache !== null) {\n sourceFiles[filename] = cache;\n }\n count++;\n // In any case we want to skip here then since we have a content already or we couldn't\n // read the file and don't want to try again.\n if (count === filenames.length) {\n resolve(sourceFiles);\n }\n continue;\n }\n\n readFile(filename, (err: Error | null, data: Buffer) => {\n const content = err ? null : data.toString();\n sourceFiles[filename] = content;\n\n // We always want to set the cache, even to null which means there was an error reading the file.\n // We do not want to try to read the file again.\n FILE_CONTENT_CACHE.set(filename, content);\n count++;\n if (count === filenames.length) {\n resolve(sourceFiles);\n }\n });\n }\n });\n}\n\n/**\n * @hidden\n */\nexport function extractStackFromError(error: Error): stacktrace.StackFrame[] {\n const stack = stacktrace.parse(error);\n if (!stack) {\n return [];\n }\n return stack;\n}\n\n/**\n * @hidden\n */\nexport function parseStack(stack: stacktrace.StackFrame[], options?: NodeOptions): PromiseLike {\n const filesToRead: string[] = [];\n\n const linesOfContext =\n options && options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;\n\n const frames: StackFrame[] = stack.map(frame => {\n const parsedFrame: StackFrame = {\n colno: frame.columnNumber,\n filename: frame.fileName || '',\n function: getFunction(frame),\n lineno: frame.lineNumber,\n };\n\n const isInternal =\n frame.native ||\n (parsedFrame.filename &&\n !parsedFrame.filename.startsWith('/') &&\n !parsedFrame.filename.startsWith('.') &&\n parsedFrame.filename.indexOf(':\\\\') !== 1);\n\n // in_app is all that's not an internal Node function or a module within node_modules\n // note that isNative appears to return true even for node core libraries\n // see https://github.com/getsentry/raven-node/issues/176\n parsedFrame.in_app =\n !isInternal && parsedFrame.filename !== undefined && parsedFrame.filename.indexOf('node_modules/') === -1;\n\n // Extract a module name based on the filename\n if (parsedFrame.filename) {\n parsedFrame.module = getModule(parsedFrame.filename);\n\n if (!isInternal && linesOfContext > 0) {\n filesToRead.push(parsedFrame.filename);\n }\n }\n\n return parsedFrame;\n });\n\n // We do an early return if we do not want to fetch context liens\n if (linesOfContext <= 0) {\n return SyncPromise.resolve(frames);\n }\n\n try {\n return addPrePostContext(filesToRead, frames, linesOfContext);\n } catch (_) {\n // This happens in electron for example where we are not able to read files from asar.\n // So it's fine, we recover be just returning all frames without pre/post context.\n return SyncPromise.resolve(frames);\n }\n}\n\n/**\n * This function tries to read the source files + adding pre and post context (source code)\n * to a frame.\n * @param filesToRead string[] of filepaths\n * @param frames StackFrame[] containg all frames\n */\nfunction addPrePostContext(\n filesToRead: string[],\n frames: StackFrame[],\n linesOfContext: number,\n): PromiseLike {\n return new SyncPromise(resolve =>\n readSourceFiles(filesToRead).then(sourceFiles => {\n const result = frames.map(frame => {\n if (frame.filename && sourceFiles[frame.filename]) {\n try {\n const lines = (sourceFiles[frame.filename] as string).split('\\n');\n\n addContextToFrame(lines, frame, linesOfContext);\n } catch (e) {\n // anomaly, being defensive in case\n // unlikely to ever happen in practice but can definitely happen in theory\n }\n }\n return frame;\n });\n\n resolve(result);\n }),\n );\n}\n\n/**\n * @hidden\n */\nexport function getExceptionFromError(error: Error, options?: NodeOptions): PromiseLike {\n const name = error.name || error.constructor.name;\n const stack = extractStackFromError(error);\n return new SyncPromise(resolve =>\n parseStack(stack, options).then(frames => {\n const result = {\n stacktrace: {\n frames: prepareFramesForEvent(frames),\n },\n type: name,\n value: error.message,\n };\n resolve(result);\n }),\n );\n}\n\n/**\n * @hidden\n */\nexport function parseError(error: ExtendedError, options?: NodeOptions): PromiseLike {\n return new SyncPromise(resolve =>\n getExceptionFromError(error, options).then((exception: Exception) => {\n resolve({\n exception: {\n values: [exception],\n },\n });\n }),\n );\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: StackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n const firstFrameFunction = localStack[0].function || '';\n\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack.reverse();\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/sdk.d.ts b/node_modules/@sentry/node/esm/sdk.d.ts deleted file mode 100644 index 29ad6ad..0000000 --- a/node_modules/@sentry/node/esm/sdk.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Integrations as CoreIntegrations } from '@sentry/core'; -import { NodeOptions } from './backend'; -import { Console, Http, LinkedErrors, OnUncaughtException, OnUnhandledRejection } from './integrations'; -export declare const defaultIntegrations: (CoreIntegrations.FunctionToString | CoreIntegrations.InboundFilters | Console | Http | OnUncaughtException | OnUnhandledRejection | LinkedErrors)[]; -/** - * The Sentry Node SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible in the - * main entry module. To set context information or send manual events, use the - * provided methods. - * - * @example - * ``` - * - * const { init } = require('@sentry/node'); - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const { configureScope } = require('@sentry/node'); - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * const { addBreadcrumb } = require('@sentry/node'); - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const Sentry = require('@sentry/node'); - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link NodeOptions} for documentation on configuration options. - */ -export declare function init(options?: NodeOptions): void; -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -export declare function lastEventId(): string | undefined; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export declare function flush(timeout?: number): Promise; -/** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ -export declare function close(timeout?: number): Promise; -//# sourceMappingURL=sdk.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/sdk.d.ts.map b/node_modules/@sentry/node/esm/sdk.d.ts.map deleted file mode 100644 index 5c9fa6b..0000000 --- a/node_modules/@sentry/node/esm/sdk.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAK5F,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAExG,eAAO,MAAM,mBAAmB,sJAY/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,IAAI,CA8BpD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD;AAED;;;;;GAKG;AACH,wBAAsB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM9D;AAED;;;;;GAKG;AACH,wBAAsB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM9D"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/sdk.js b/node_modules/@sentry/node/esm/sdk.js index 0dfbf32..ace7582 100644 --- a/node_modules/@sentry/node/esm/sdk.js +++ b/node_modules/@sentry/node/esm/sdk.js @@ -1,23 +1,45 @@ -import * as tslib_1 from "tslib"; -import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core'; -import { getMainCarrier, setHubOnCarrier } from '@sentry/hub'; -import { getGlobalObject } from '@sentry/utils'; +import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; +import { Integrations, getMainCarrier, setHubOnCarrier, getCurrentHub, getIntegrationsToSetup, initAndBind } from '@sentry/core'; +import { stackParserFromStackParserOptions, logger, GLOBAL_OBJ, createStackParser, nodeStackLineParser } from '@sentry/utils'; import * as domain from 'domain'; -import { NodeClient } from './client'; -import { Console, Http, LinkedErrors, OnUncaughtException, OnUnhandledRejection } from './integrations'; -export var defaultIntegrations = [ - // Common - new CoreIntegrations.InboundFilters(), - new CoreIntegrations.FunctionToString(), - // Native Wrappers - new Console(), - new Http(), - // Global Handlers - new OnUncaughtException(), - new OnUnhandledRejection(), - // Misc - new LinkedErrors(), +import { NodeClient } from './client.js'; +import './integrations/index.js'; +import { getModule } from './module.js'; +import './transports/index.js'; +import { Console } from './integrations/console.js'; +import { Http } from './integrations/http.js'; +import { OnUncaughtException } from './integrations/onuncaughtexception.js'; +import { OnUnhandledRejection } from './integrations/onunhandledrejection.js'; +import { ContextLines } from './integrations/contextlines.js'; +import { LocalVariables } from './integrations/localvariables.js'; +import { Context } from './integrations/context.js'; +import { Modules } from './integrations/modules.js'; +import { RequestData } from './integrations/requestdata.js'; +import { LinkedErrors } from './integrations/linkederrors.js'; +import { makeNodeTransport } from './transports/http.js'; + +/* eslint-disable max-lines */ + +const defaultIntegrations = [ + // Common + new Integrations.InboundFilters(), + new Integrations.FunctionToString(), + // Native Wrappers + new Console(), + new Http(), + // Global Handlers + new OnUncaughtException(), + new OnUnhandledRejection(), + // Event Info + new ContextLines(), + new LocalVariables(), + new Context(), + new Modules(), + new RequestData(), + // Misc + new LinkedErrors(), ]; + /** * The Sentry Node SDK Client. * @@ -73,75 +95,183 @@ export var defaultIntegrations = [ * * @see {@link NodeOptions} for documentation on configuration options. */ -export function init(options) { - if (options === void 0) { options = {}; } - if (options.defaultIntegrations === undefined) { - options.defaultIntegrations = defaultIntegrations; +function init(options = {}) { + const carrier = getMainCarrier(); + const autoloadedIntegrations = _optionalChain([carrier, 'access', _ => _.__SENTRY__, 'optionalAccess', _2 => _2.integrations]) || []; + + options.defaultIntegrations = + options.defaultIntegrations === false + ? [] + : [ + ...(Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : defaultIntegrations), + ...autoloadedIntegrations, + ]; + + if (options.dsn === undefined && process.env.SENTRY_DSN) { + options.dsn = process.env.SENTRY_DSN; + } + + if (options.tracesSampleRate === undefined && process.env.SENTRY_TRACES_SAMPLE_RATE) { + const tracesSampleRate = parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE); + if (isFinite(tracesSampleRate)) { + options.tracesSampleRate = tracesSampleRate; } - if (options.dsn === undefined && process.env.SENTRY_DSN) { - options.dsn = process.env.SENTRY_DSN; + } + + if (options.release === undefined) { + const detectedRelease = getSentryRelease(); + if (detectedRelease !== undefined) { + options.release = detectedRelease; + } else { + // If release is not provided, then we should disable autoSessionTracking + options.autoSessionTracking = false; } - if (options.release === undefined) { - var global_1 = getGlobalObject(); - // Prefer env var over global - if (process.env.SENTRY_RELEASE) { - options.release = process.env.SENTRY_RELEASE; - } - // This supports the variable that sentry-webpack-plugin injects - else if (global_1.SENTRY_RELEASE && global_1.SENTRY_RELEASE.id) { - options.release = global_1.SENTRY_RELEASE.id; - } - } - if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) { - options.environment = process.env.SENTRY_ENVIRONMENT; - } - if (domain.active) { - setHubOnCarrier(getMainCarrier(), getCurrentHub()); - } - initAndBind(NodeClient, options); + } + + if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) { + options.environment = process.env.SENTRY_ENVIRONMENT; + } + + if (options.autoSessionTracking === undefined && options.dsn !== undefined) { + options.autoSessionTracking = true; + } + + if (options.instrumenter === undefined) { + options.instrumenter = 'sentry'; + } + + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any + if ((domain ).active) { + setHubOnCarrier(carrier, getCurrentHub()); + } + + // TODO(v7): Refactor this to reduce the logic above + const clientOptions = { + ...options, + stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser), + integrations: getIntegrationsToSetup(options), + transport: options.transport || makeNodeTransport, + }; + + initAndBind(NodeClient, clientOptions); + + if (options.autoSessionTracking) { + startSessionTracking(); + } } + /** * This is the getter for lastEventId. * * @returns The last event id of a captured event. */ -export function lastEventId() { - return getCurrentHub().lastEventId(); +function lastEventId() { + return getCurrentHub().lastEventId(); } + /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. + * Call `flush()` on the current client, if there is one. See {@link Client.flush}. * - * @param timeout Maximum time in ms the client should wait. + * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause + * the client to wait until all events are sent before resolving the promise. + * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it + * doesn't (or if there's no client defined). */ -export function flush(timeout) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var client; - return tslib_1.__generator(this, function (_a) { - client = getCurrentHub().getClient(); - if (client) { - return [2 /*return*/, client.flush(timeout)]; - } - return [2 /*return*/, Promise.reject(false)]; - }); - }); +async function flush(timeout) { + const client = getCurrentHub().getClient(); + if (client) { + return client.flush(timeout); + } + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events. No client defined.'); + return Promise.resolve(false); } + /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. + * Call `close()` on the current client, if there is one. See {@link Client.close}. * - * @param timeout Maximum time in ms the client should wait. + * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this + * parameter will cause the client to wait until all events are sent before disabling itself. + * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it + * doesn't (or if there's no client defined). + */ +async function close(timeout) { + const client = getCurrentHub().getClient(); + if (client) { + return client.close(timeout); + } + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events and disable SDK. No client defined.'); + return Promise.resolve(false); +} + +/** + * Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client + */ +function isAutoSessionTrackingEnabled(client) { + if (client === undefined) { + return false; + } + const clientOptions = client && client.getOptions(); + if (clientOptions && clientOptions.autoSessionTracking !== undefined) { + return clientOptions.autoSessionTracking; + } + return false; +} + +/** + * Returns a release dynamically from environment variables. + */ +function getSentryRelease(fallback) { + // Always read first as Sentry takes this as precedence + if (process.env.SENTRY_RELEASE) { + return process.env.SENTRY_RELEASE; + } + + // This supports the variable that sentry-webpack-plugin injects + if (GLOBAL_OBJ.SENTRY_RELEASE && GLOBAL_OBJ.SENTRY_RELEASE.id) { + return GLOBAL_OBJ.SENTRY_RELEASE.id; + } + + return ( + // GitHub Actions - https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables + process.env.GITHUB_SHA || + // Netlify - https://docs.netlify.com/configure-builds/environment-variables/#build-metadata + process.env.COMMIT_REF || + // Vercel - https://vercel.com/docs/v2/build-step#system-environment-variables + process.env.VERCEL_GIT_COMMIT_SHA || + process.env.VERCEL_GITHUB_COMMIT_SHA || + process.env.VERCEL_GITLAB_COMMIT_SHA || + process.env.VERCEL_BITBUCKET_COMMIT_SHA || + // Zeit (now known as Vercel) + process.env.ZEIT_GITHUB_COMMIT_SHA || + process.env.ZEIT_GITLAB_COMMIT_SHA || + process.env.ZEIT_BITBUCKET_COMMIT_SHA || + fallback + ); +} + +/** Node.js stack parser */ +const defaultStackParser = createStackParser(nodeStackLineParser(getModule)); + +/** + * Enable automatic Session Tracking for the node process. */ -export function close(timeout) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var client; - return tslib_1.__generator(this, function (_a) { - client = getCurrentHub().getClient(); - if (client) { - return [2 /*return*/, client.close(timeout)]; - } - return [2 /*return*/, Promise.reject(false)]; - }); - }); +function startSessionTracking() { + const hub = getCurrentHub(); + hub.startSession(); + // Emitted in the case of healthy sessions, error of `mechanism.handled: true` and unhandledrejections because + // The 'beforeExit' event is not emitted for conditions causing explicit termination, + // such as calling process.exit() or uncaught exceptions. + // Ref: https://nodejs.org/api/process.html#process_event_beforeexit + process.on('beforeExit', () => { + const session = _optionalChain([hub, 'access', _3 => _3.getScope, 'call', _4 => _4(), 'optionalAccess', _5 => _5.getSession, 'call', _6 => _6()]); + const terminalStates = ['exited', 'crashed']; + // Only call endSession, if the Session exists on Scope and SessionStatus is not a + // Terminal Status i.e. Exited or Crashed because + // "When a session is moved away from ok it must not be updated anymore." + // Ref: https://develop.sentry.dev/sdk/sessions/ + if (session && !terminalStates.includes(session.status)) hub.endSession(); + }); } -//# sourceMappingURL=sdk.js.map \ No newline at end of file + +export { close, defaultIntegrations, defaultStackParser, flush, getSentryRelease, init, isAutoSessionTrackingEnabled, lastEventId }; +//# sourceMappingURL=sdk.js.map diff --git a/node_modules/@sentry/node/esm/sdk.js.map b/node_modules/@sentry/node/esm/sdk.js.map index ed463a5..675314d 100644 --- a/node_modules/@sentry/node/esm/sdk.js.map +++ b/node_modules/@sentry/node/esm/sdk.js.map @@ -1 +1 @@ -{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAExG,MAAM,CAAC,IAAM,mBAAmB,GAAG;IACjC,SAAS;IACT,IAAI,gBAAgB,CAAC,cAAc,EAAE;IACrC,IAAI,gBAAgB,CAAC,gBAAgB,EAAE;IACvC,kBAAkB;IAClB,IAAI,OAAO,EAAE;IACb,IAAI,IAAI,EAAE;IACV,kBAAkB;IAClB,IAAI,mBAAmB,EAAE;IACzB,IAAI,oBAAoB,EAAE;IAC1B,OAAO;IACP,IAAI,YAAY,EAAE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;;;GAKG;AACH,MAAM,UAAgB,KAAK,CAAC,OAAgB;;;;YACpC,MAAM,GAAG,aAAa,EAAE,CAAC,SAAS,EAAc,CAAC;YACvD,IAAI,MAAM,EAAE;gBACV,sBAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC;aAC9B;YACD,sBAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;;;CAC9B;AAED;;;;;GAKG;AACH,MAAM,UAAgB,KAAK,CAAC,OAAgB;;;;YACpC,MAAM,GAAG,aAAa,EAAE,CAAC,SAAS,EAAc,CAAC;YACvD,IAAI,MAAM,EAAE;gBACV,sBAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC;aAC9B;YACD,sBAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;;;CAC9B","sourcesContent":["import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getMainCarrier, setHubOnCarrier } from '@sentry/hub';\nimport { getGlobalObject } from '@sentry/utils';\nimport * as domain from 'domain';\n\nimport { NodeOptions } from './backend';\nimport { NodeClient } from './client';\nimport { Console, Http, LinkedErrors, OnUncaughtException, OnUnhandledRejection } from './integrations';\n\nexport const defaultIntegrations = [\n // Common\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n // Native Wrappers\n new Console(),\n new Http(),\n // Global Handlers\n new OnUncaughtException(),\n new OnUnhandledRejection(),\n // Misc\n new LinkedErrors(),\n];\n\n/**\n * The Sentry Node SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible in the\n * main entry module. To set context information or send manual events, use the\n * provided methods.\n *\n * @example\n * ```\n *\n * const { init } = require('@sentry/node');\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { configureScope } = require('@sentry/node');\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { addBreadcrumb } = require('@sentry/node');\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const Sentry = require('@sentry/node');\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link NodeOptions} for documentation on configuration options.\n */\nexport function init(options: NodeOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n\n if (options.dsn === undefined && process.env.SENTRY_DSN) {\n options.dsn = process.env.SENTRY_DSN;\n }\n\n if (options.release === undefined) {\n const global = getGlobalObject();\n // Prefer env var over global\n if (process.env.SENTRY_RELEASE) {\n options.release = process.env.SENTRY_RELEASE;\n }\n // This supports the variable that sentry-webpack-plugin injects\n else if (global.SENTRY_RELEASE && global.SENTRY_RELEASE.id) {\n options.release = global.SENTRY_RELEASE.id;\n }\n }\n\n if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {\n options.environment = process.env.SENTRY_ENVIRONMENT;\n }\n\n if (domain.active) {\n setHubOnCarrier(getMainCarrier(), getCurrentHub());\n }\n\n initAndBind(NodeClient, options);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport async function flush(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return Promise.reject(false);\n}\n\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport async function close(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return Promise.reject(false);\n}\n"]} \ No newline at end of file +{"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport {\n getCurrentHub,\n getIntegrationsToSetup,\n getMainCarrier,\n initAndBind,\n Integrations as CoreIntegrations,\n setHubOnCarrier,\n} from '@sentry/core';\nimport type { SessionStatus, StackParser } from '@sentry/types';\nimport {\n createStackParser,\n GLOBAL_OBJ,\n logger,\n nodeStackLineParser,\n stackParserFromStackParserOptions,\n} from '@sentry/utils';\nimport * as domain from 'domain';\n\nimport { NodeClient } from './client';\nimport {\n Console,\n Context,\n ContextLines,\n Http,\n LinkedErrors,\n LocalVariables,\n Modules,\n OnUncaughtException,\n OnUnhandledRejection,\n RequestData,\n} from './integrations';\nimport { getModule } from './module';\nimport { makeNodeTransport } from './transports';\nimport type { NodeClientOptions, NodeOptions } from './types';\n\nexport const defaultIntegrations = [\n // Common\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n // Native Wrappers\n new Console(),\n new Http(),\n // Global Handlers\n new OnUncaughtException(),\n new OnUnhandledRejection(),\n // Event Info\n new ContextLines(),\n new LocalVariables(),\n new Context(),\n new Modules(),\n new RequestData(),\n // Misc\n new LinkedErrors(),\n];\n\n/**\n * The Sentry Node SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible in the\n * main entry module. To set context information or send manual events, use the\n * provided methods.\n *\n * @example\n * ```\n *\n * const { init } = require('@sentry/node');\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { configureScope } = require('@sentry/node');\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { addBreadcrumb } = require('@sentry/node');\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const Sentry = require('@sentry/node');\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link NodeOptions} for documentation on configuration options.\n */\nexport function init(options: NodeOptions = {}): void {\n const carrier = getMainCarrier();\n const autoloadedIntegrations = carrier.__SENTRY__?.integrations || [];\n\n options.defaultIntegrations =\n options.defaultIntegrations === false\n ? []\n : [\n ...(Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : defaultIntegrations),\n ...autoloadedIntegrations,\n ];\n\n if (options.dsn === undefined && process.env.SENTRY_DSN) {\n options.dsn = process.env.SENTRY_DSN;\n }\n\n if (options.tracesSampleRate === undefined && process.env.SENTRY_TRACES_SAMPLE_RATE) {\n const tracesSampleRate = parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE);\n if (isFinite(tracesSampleRate)) {\n options.tracesSampleRate = tracesSampleRate;\n }\n }\n\n if (options.release === undefined) {\n const detectedRelease = getSentryRelease();\n if (detectedRelease !== undefined) {\n options.release = detectedRelease;\n } else {\n // If release is not provided, then we should disable autoSessionTracking\n options.autoSessionTracking = false;\n }\n }\n\n if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {\n options.environment = process.env.SENTRY_ENVIRONMENT;\n }\n\n if (options.autoSessionTracking === undefined && options.dsn !== undefined) {\n options.autoSessionTracking = true;\n }\n\n if (options.instrumenter === undefined) {\n options.instrumenter = 'sentry';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n if ((domain as any).active) {\n setHubOnCarrier(carrier, getCurrentHub());\n }\n\n // TODO(v7): Refactor this to reduce the logic above\n const clientOptions: NodeClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeNodeTransport,\n };\n\n initAndBind(NodeClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function flush(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n __DEBUG_BUILD__ && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function close(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n __DEBUG_BUILD__ && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client\n */\nexport function isAutoSessionTrackingEnabled(client?: NodeClient): boolean {\n if (client === undefined) {\n return false;\n }\n const clientOptions = client && client.getOptions();\n if (clientOptions && clientOptions.autoSessionTracking !== undefined) {\n return clientOptions.autoSessionTracking;\n }\n return false;\n}\n\n/**\n * Returns a release dynamically from environment variables.\n */\nexport function getSentryRelease(fallback?: string): string | undefined {\n // Always read first as Sentry takes this as precedence\n if (process.env.SENTRY_RELEASE) {\n return process.env.SENTRY_RELEASE;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (GLOBAL_OBJ.SENTRY_RELEASE && GLOBAL_OBJ.SENTRY_RELEASE.id) {\n return GLOBAL_OBJ.SENTRY_RELEASE.id;\n }\n\n return (\n // GitHub Actions - https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables\n process.env.GITHUB_SHA ||\n // Netlify - https://docs.netlify.com/configure-builds/environment-variables/#build-metadata\n process.env.COMMIT_REF ||\n // Vercel - https://vercel.com/docs/v2/build-step#system-environment-variables\n process.env.VERCEL_GIT_COMMIT_SHA ||\n process.env.VERCEL_GITHUB_COMMIT_SHA ||\n process.env.VERCEL_GITLAB_COMMIT_SHA ||\n process.env.VERCEL_BITBUCKET_COMMIT_SHA ||\n // Zeit (now known as Vercel)\n process.env.ZEIT_GITHUB_COMMIT_SHA ||\n process.env.ZEIT_GITLAB_COMMIT_SHA ||\n process.env.ZEIT_BITBUCKET_COMMIT_SHA ||\n fallback\n );\n}\n\n/** Node.js stack parser */\nexport const defaultStackParser: StackParser = createStackParser(nodeStackLineParser(getModule));\n\n/**\n * Enable automatic Session Tracking for the node process.\n */\nfunction startSessionTracking(): void {\n const hub = getCurrentHub();\n hub.startSession();\n // Emitted in the case of healthy sessions, error of `mechanism.handled: true` and unhandledrejections because\n // The 'beforeExit' event is not emitted for conditions causing explicit termination,\n // such as calling process.exit() or uncaught exceptions.\n // Ref: https://nodejs.org/api/process.html#process_event_beforeexit\n process.on('beforeExit', () => {\n const session = hub.getScope()?.getSession();\n const terminalStates: SessionStatus[] = ['exited', 'crashed'];\n // Only call endSession, if the Session exists on Scope and SessionStatus is not a\n // Terminal Status i.e. Exited or Crashed because\n // \"When a session is moved away from ok it must not be updated anymore.\"\n // Ref: https://develop.sentry.dev/sdk/sessions/\n if (session && !terminalStates.includes(session.status)) hub.endSession();\n });\n}\n"],"names":["CoreIntegrations"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAA,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;EACA,CAAA,CAAA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/stacktrace.d.ts b/node_modules/@sentry/node/esm/stacktrace.d.ts deleted file mode 100644 index 6785b00..0000000 --- a/node_modules/@sentry/node/esm/stacktrace.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * stack-trace - Parses node.js stack traces - * - * This was originally forked to fix this issue: - * https://github.com/felixge/node-stack-trace/issues/31 - * - * Mar 19,2019 - #4fd379e - * - * https://github.com/felixge/node-stack-trace/ - * @license MIT - */ -/** Decoded StackFrame */ -export interface StackFrame { - fileName: string; - lineNumber: number; - functionName: string; - typeName: string; - methodName: string; - native: boolean; - columnNumber: number; -} -/** Extracts StackFrames fron the Error */ -export declare function parse(err: Error): StackFrame[]; -//# sourceMappingURL=stacktrace.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/stacktrace.d.ts.map b/node_modules/@sentry/node/esm/stacktrace.d.ts.map deleted file mode 100644 index 26196fb..0000000 --- a/node_modules/@sentry/node/esm/stacktrace.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,yBAAyB;AACzB,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,0CAA0C;AAC1C,wBAAgB,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,UAAU,EAAE,CA0E9C"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/stacktrace.js b/node_modules/@sentry/node/esm/stacktrace.js deleted file mode 100644 index c787210..0000000 --- a/node_modules/@sentry/node/esm/stacktrace.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * stack-trace - Parses node.js stack traces - * - * This was originally forked to fix this issue: - * https://github.com/felixge/node-stack-trace/issues/31 - * - * Mar 19,2019 - #4fd379e - * - * https://github.com/felixge/node-stack-trace/ - * @license MIT - */ -/** Extracts StackFrames fron the Error */ -export function parse(err) { - if (!err.stack) { - return []; - } - var lines = err.stack.split('\n').slice(1); - return lines - .map(function (line) { - if (line.match(/^\s*[-]{4,}$/)) { - return { - columnNumber: null, - fileName: line, - functionName: null, - lineNumber: null, - methodName: null, - native: null, - typeName: null, - }; - } - var lineMatch = line.match(/at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/); - if (!lineMatch) { - return undefined; - } - var object = null; - var method = null; - var functionName = null; - var typeName = null; - var methodName = null; - var isNative = lineMatch[5] === 'native'; - if (lineMatch[1]) { - functionName = lineMatch[1]; - var methodStart = functionName.lastIndexOf('.'); - if (functionName[methodStart - 1] === '.') { - methodStart--; - } - if (methodStart > 0) { - object = functionName.substr(0, methodStart); - method = functionName.substr(methodStart + 1); - var objectEnd = object.indexOf('.Module'); - if (objectEnd > 0) { - functionName = functionName.substr(objectEnd + 1); - object = object.substr(0, objectEnd); - } - } - typeName = null; - } - if (method) { - typeName = object; - methodName = method; - } - if (method === '') { - methodName = null; - functionName = null; - } - var properties = { - columnNumber: parseInt(lineMatch[4], 10) || null, - fileName: lineMatch[2] || null, - functionName: functionName, - lineNumber: parseInt(lineMatch[3], 10) || null, - methodName: methodName, - native: isNative, - typeName: typeName, - }; - return properties; - }) - .filter(function (callSite) { return !!callSite; }); -} -//# sourceMappingURL=stacktrace.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/stacktrace.js.map b/node_modules/@sentry/node/esm/stacktrace.js.map deleted file mode 100644 index 2cd7ba0..0000000 --- a/node_modules/@sentry/node/esm/stacktrace.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stacktrace.js","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAaH,0CAA0C;AAC1C,MAAM,UAAU,KAAK,CAAC,GAAU;IAC9B,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE;QACd,OAAO,EAAE,CAAC;KACX;IAED,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE7C,OAAO,KAAK;SACT,GAAG,CAAC,UAAA,IAAI;QACP,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;YAC9B,OAAO;gBAC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EAAE,SAAS,CAAC,CAAC;iBACtC;aACF;YACD,QAAQ,GAAG,IAAI,CAAC;SACjB;QAED,IAAI,MAAM,EAAE;YACV,QAAQ,GAAG,MAAM,CAAC;YAClB,UAAU,GAAG,MAAM,CAAC;SACrB;QAED,IAAI,MAAM,KAAK,aAAa,EAAE;YAC5B,UAAU,GAAG,IAAI,CAAC;YAClB,YAAY,GAAG,IAAI,CAAC;SACrB;QAED,IAAM,UAAU,GAAG;YACjB,YAAY,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI;YAChD,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI;YAC9B,YAAY,cAAA;YACZ,UAAU,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI;YAC9C,UAAU,YAAA;YACV,MAAM,EAAE,QAAQ;YAChB,QAAQ,UAAA;SACT,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;SACD,MAAM,CAAC,UAAA,QAAQ,IAAI,OAAA,CAAC,CAAC,QAAQ,EAAV,CAAU,CAAiB,CAAC;AACpD,CAAC","sourcesContent":["/**\n * stack-trace - Parses node.js stack traces\n *\n * This was originally forked to fix this issue:\n * https://github.com/felixge/node-stack-trace/issues/31\n *\n * Mar 19,2019 - #4fd379e\n *\n * https://github.com/felixge/node-stack-trace/\n * @license MIT\n */\n\n/** Decoded StackFrame */\nexport interface StackFrame {\n fileName: string;\n lineNumber: number;\n functionName: string;\n typeName: string;\n methodName: string;\n native: boolean;\n columnNumber: number;\n}\n\n/** Extracts StackFrames fron the Error */\nexport function parse(err: Error): StackFrame[] {\n if (!err.stack) {\n return [];\n }\n\n const lines = err.stack.split('\\n').slice(1);\n\n return lines\n .map(line => {\n if (line.match(/^\\s*[-]{4,}$/)) {\n return {\n columnNumber: null,\n fileName: line,\n functionName: null,\n lineNumber: null,\n methodName: null,\n native: null,\n typeName: null,\n };\n }\n\n const lineMatch = line.match(/at (?:(.+?)\\s+\\()?(?:(.+?):(\\d+)(?::(\\d+))?|([^)]+))\\)?/);\n if (!lineMatch) {\n return undefined;\n }\n\n let object = null;\n let method = null;\n let functionName = null;\n let typeName = null;\n let methodName = null;\n const isNative = lineMatch[5] === 'native';\n\n if (lineMatch[1]) {\n functionName = lineMatch[1];\n let methodStart = functionName.lastIndexOf('.');\n if (functionName[methodStart - 1] === '.') {\n methodStart--;\n }\n if (methodStart > 0) {\n object = functionName.substr(0, methodStart);\n method = functionName.substr(methodStart + 1);\n const objectEnd = object.indexOf('.Module');\n if (objectEnd > 0) {\n functionName = functionName.substr(objectEnd + 1);\n object = object.substr(0, objectEnd);\n }\n }\n typeName = null;\n }\n\n if (method) {\n typeName = object;\n methodName = method;\n }\n\n if (method === '') {\n methodName = null;\n functionName = null;\n }\n\n const properties = {\n columnNumber: parseInt(lineMatch[4], 10) || null,\n fileName: lineMatch[2] || null,\n functionName,\n lineNumber: parseInt(lineMatch[3], 10) || null,\n methodName,\n native: isNative,\n typeName,\n };\n\n return properties;\n })\n .filter(callSite => !!callSite) as StackFrame[];\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/base.d.ts b/node_modules/@sentry/node/esm/transports/base.d.ts deleted file mode 100644 index 9119669..0000000 --- a/node_modules/@sentry/node/esm/transports/base.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/// -import { API } from '@sentry/core'; -import { Event, Response, Transport, TransportOptions } from '@sentry/types'; -import { PromiseBuffer } from '@sentry/utils'; -import * as http from 'http'; -import * as https from 'https'; -import * as url from 'url'; -/** - * Internal used interface for typescript. - * @hidden - */ -export interface HTTPRequest { - /** - * Request wrapper - * @param options These are {@see TransportOptions} - * @param callback Callback when request is finished - */ - request(options: http.RequestOptions | https.RequestOptions | string | url.URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; -} -/** Base Transport class implementation */ -export declare abstract class BaseTransport implements Transport { - options: TransportOptions; - /** API object */ - protected _api: API; - /** The Agent used for corresponding transport */ - module?: HTTPRequest; - /** The Agent used for corresponding transport */ - client?: http.Agent | https.Agent; - /** A simple buffer holding all requests. */ - protected readonly _buffer: PromiseBuffer; - /** Locks transport after receiving 429 response */ - private _disabledUntil; - /** Create instance and set this.dsn */ - constructor(options: TransportOptions); - /** Returns a build request option object used by request */ - protected _getRequestOptions(): http.RequestOptions | https.RequestOptions; - /** JSDoc */ - protected _sendWithModule(httpModule: HTTPRequest, event: Event): Promise; - /** - * @inheritDoc - */ - sendEvent(_: Event): PromiseLike; - /** - * @inheritDoc - */ - close(timeout?: number): PromiseLike; -} -//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/base.d.ts.map b/node_modules/@sentry/node/esm/transports/base.d.ts.map deleted file mode 100644 index 6df47d3..0000000 --- a/node_modules/@sentry/node/esm/transports/base.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/transports/base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAU,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAiC,aAAa,EAAe,MAAM,eAAe,CAAC;AAE1F,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAI3B;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,OAAO,CACL,OAAO,EAAE,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,GAAG,MAAM,GAAG,GAAG,CAAC,GAAG,EACtE,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,eAAe,KAAK,IAAI,GAC7C,IAAI,CAAC,aAAa,CAAC;CACvB;AAED,0CAA0C;AAC1C,8BAAsB,aAAc,YAAW,SAAS;IAiB5B,OAAO,EAAE,gBAAgB;IAhBnD,iBAAiB;IACjB,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC;IAEpB,iDAAiD;IAC1C,MAAM,CAAC,EAAE,WAAW,CAAC;IAE5B,iDAAiD;IAC1C,MAAM,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAEzC,4CAA4C;IAC5C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAyB;IAE5E,mDAAmD;IACnD,OAAO,CAAC,cAAc,CAA8B;IAEpD,uCAAuC;gBACb,OAAO,EAAE,gBAAgB;IAInD,4DAA4D;IAC5D,SAAS,CAAC,kBAAkB,IAAI,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc;IA0B1E,YAAY;cACI,eAAe,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;IAiDzF;;OAEG;IACI,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC;IAIjD;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;CAGrD"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/base.js b/node_modules/@sentry/node/esm/transports/base.js deleted file mode 100644 index 7345d50..0000000 --- a/node_modules/@sentry/node/esm/transports/base.js +++ /dev/null @@ -1,98 +0,0 @@ -import * as tslib_1 from "tslib"; -import { API } from '@sentry/core'; -import { Status } from '@sentry/types'; -import { logger, parseRetryAfterHeader, PromiseBuffer, SentryError } from '@sentry/utils'; -import * as fs from 'fs'; -import { SDK_NAME, SDK_VERSION } from '../version'; -/** Base Transport class implementation */ -var BaseTransport = /** @class */ (function () { - /** Create instance and set this.dsn */ - function BaseTransport(options) { - this.options = options; - /** A simple buffer holding all requests. */ - this._buffer = new PromiseBuffer(30); - /** Locks transport after receiving 429 response */ - this._disabledUntil = new Date(Date.now()); - this._api = new API(options.dsn); - } - /** Returns a build request option object used by request */ - BaseTransport.prototype._getRequestOptions = function () { - var headers = tslib_1.__assign({}, this._api.getRequestHeaders(SDK_NAME, SDK_VERSION), this.options.headers); - var dsn = this._api.getDsn(); - var options = { - agent: this.client, - headers: headers, - hostname: dsn.host, - method: 'POST', - path: this._api.getStoreEndpointPath(), - port: dsn.port, - protocol: dsn.protocol + ":", - }; - if (this.options.caCerts) { - options.ca = fs.readFileSync(this.options.caCerts); - } - return options; - }; - /** JSDoc */ - BaseTransport.prototype._sendWithModule = function (httpModule, event) { - return tslib_1.__awaiter(this, void 0, void 0, function () { - var _this = this; - return tslib_1.__generator(this, function (_a) { - if (new Date(Date.now()) < this._disabledUntil) { - return [2 /*return*/, Promise.reject(new SentryError("Transport locked till " + this._disabledUntil + " due to too many requests."))]; - } - if (!this._buffer.isReady()) { - return [2 /*return*/, Promise.reject(new SentryError('Not adding Promise due to buffer limit reached.'))]; - } - return [2 /*return*/, this._buffer.add(new Promise(function (resolve, reject) { - var req = httpModule.request(_this._getRequestOptions(), function (res) { - var statusCode = res.statusCode || 500; - var status = Status.fromHttpCode(statusCode); - res.setEncoding('utf8'); - if (status === Status.Success) { - resolve({ status: status }); - } - else { - if (status === Status.RateLimit) { - var now = Date.now(); - var header = res.headers ? res.headers['Retry-After'] : ''; - header = Array.isArray(header) ? header[0] : header; - _this._disabledUntil = new Date(now + parseRetryAfterHeader(now, header)); - logger.warn("Too many requests, backing off till: " + _this._disabledUntil); - } - var rejectionMessage = "HTTP Error (" + statusCode + ")"; - if (res.headers && res.headers['x-sentry-error']) { - rejectionMessage += ": " + res.headers['x-sentry-error']; - } - reject(new SentryError(rejectionMessage)); - } - // Force the socket to drain - res.on('data', function () { - // Drain - }); - res.on('end', function () { - // Drain - }); - }); - req.on('error', reject); - req.end(JSON.stringify(event)); - }))]; - }); - }); - }; - /** - * @inheritDoc - */ - BaseTransport.prototype.sendEvent = function (_) { - throw new SentryError('Transport Class has to implement `sendEvent` method.'); - }; - /** - * @inheritDoc - */ - BaseTransport.prototype.close = function (timeout) { - return this._buffer.drain(timeout); - }; - return BaseTransport; -}()); -export { BaseTransport }; -//# sourceMappingURL=base.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/base.js.map b/node_modules/@sentry/node/esm/transports/base.js.map deleted file mode 100644 index 8199dd7..0000000 --- a/node_modules/@sentry/node/esm/transports/base.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/transports/base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAmB,MAAM,EAA+B,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAKzB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAkBnD,0CAA0C;AAC1C;IAgBE,uCAAuC;IACvC,uBAA0B,OAAyB;QAAzB,YAAO,GAAP,OAAO,CAAkB;QAPnD,4CAA4C;QACzB,YAAO,GAA4B,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;QAE5E,mDAAmD;QAC3C,mBAAc,GAAS,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAIlD,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IAED,4DAA4D;IAClD,0CAAkB,GAA5B;QACE,IAAM,OAAO,wBACR,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,EAClD,IAAI,CAAC,OAAO,CAA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C,CAAC,CAAC;wBACL,CAAC,CAAC,CAAC;wBACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;wBACxB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;oBACjC,CAAC,CAAC,CACH,EAAC;;;KACH;IAED;;OAEG;IACI,iCAAS,GAAhB,UAAiB,CAAQ;QACvB,MAAM,IAAI,WAAW,CAAC,sDAAsD,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACI,6BAAK,GAAZ,UAAa,OAAgB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IACH,oBAAC;AAAD,CAAC,AA/GD,IA+GC","sourcesContent":["import { API } from '@sentry/core';\nimport { Event, Response, Status, Transport, TransportOptions } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, PromiseBuffer, SentryError } from '@sentry/utils';\nimport * as fs from 'fs';\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as url from 'url';\n\nimport { SDK_NAME, SDK_VERSION } from '../version';\n\n/**\n * Internal used interface for typescript.\n * @hidden\n */\nexport interface HTTPRequest {\n /**\n * Request wrapper\n * @param options These are {@see TransportOptions}\n * @param callback Callback when request is finished\n */\n request(\n options: http.RequestOptions | https.RequestOptions | string | url.URL,\n callback?: (res: http.IncomingMessage) => void,\n ): http.ClientRequest;\n}\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /** API object */\n protected _api: API;\n\n /** The Agent used for corresponding transport */\n public module?: HTTPRequest;\n\n /** The Agent used for corresponding transport */\n public client?: http.Agent | https.Agent;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n /** Locks transport after receiving 429 response */\n private _disabledUntil: Date = new Date(Date.now());\n\n /** Create instance and set this.dsn */\n public constructor(public options: TransportOptions) {\n this._api = new API(options.dsn);\n }\n\n /** Returns a build request option object used by request */\n protected _getRequestOptions(): http.RequestOptions | https.RequestOptions {\n const headers = {\n ...this._api.getRequestHeaders(SDK_NAME, SDK_VERSION),\n ...this.options.headers,\n };\n const dsn = this._api.getDsn();\n\n const options: {\n [key: string]: any;\n } = {\n agent: this.client,\n headers,\n hostname: dsn.host,\n method: 'POST',\n path: this._api.getStoreEndpointPath(),\n port: dsn.port,\n protocol: `${dsn.protocol}:`,\n };\n\n if (this.options.caCerts) {\n options.ca = fs.readFileSync(this.options.caCerts);\n }\n\n return options;\n }\n\n /** JSDoc */\n protected async _sendWithModule(httpModule: HTTPRequest, event: Event): Promise {\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject(new SentryError(`Transport locked till ${this._disabledUntil} due to too many requests.`));\n }\n\n if (!this._buffer.isReady()) {\n return Promise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n return this._buffer.add(\n new Promise((resolve, reject) => {\n const req = httpModule.request(this._getRequestOptions(), (res: http.IncomingMessage) => {\n const statusCode = res.statusCode || 500;\n const status = Status.fromHttpCode(statusCode);\n\n res.setEncoding('utf8');\n\n if (status === Status.Success) {\n resolve({ status });\n } else {\n if (status === Status.RateLimit) {\n const now = Date.now();\n let header = res.headers ? res.headers['Retry-After'] : '';\n header = Array.isArray(header) ? header[0] : header;\n this._disabledUntil = new Date(now + parseRetryAfterHeader(now, header));\n logger.warn(`Too many requests, backing off till: ${this._disabledUntil}`);\n }\n\n let rejectionMessage = `HTTP Error (${statusCode})`;\n if (res.headers && res.headers['x-sentry-error']) {\n rejectionMessage += `: ${res.headers['x-sentry-error']}`;\n }\n\n reject(new SentryError(rejectionMessage));\n }\n\n // Force the socket to drain\n res.on('data', () => {\n // Drain\n });\n res.on('end', () => {\n // Drain\n });\n });\n req.on('error', reject);\n req.end(JSON.stringify(event));\n }),\n );\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method.');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/http.d.ts b/node_modules/@sentry/node/esm/transports/http.d.ts deleted file mode 100644 index 5cb1e5e..0000000 --- a/node_modules/@sentry/node/esm/transports/http.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Event, Response, TransportOptions } from '@sentry/types'; -import { BaseTransport } from './base'; -/** Node http module transport */ -export declare class HTTPTransport extends BaseTransport { - options: TransportOptions; - /** Create a new instance and set this.agent */ - constructor(options: TransportOptions); - /** - * @inheritDoc - */ - sendEvent(event: Event): Promise; -} -//# sourceMappingURL=http.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/http.d.ts.map b/node_modules/@sentry/node/esm/transports/http.d.ts.map deleted file mode 100644 index 3772aed..0000000 --- a/node_modules/@sentry/node/esm/transports/http.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIlE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,iCAAiC;AACjC,qBAAa,aAAc,SAAQ,aAAa;IAEpB,OAAO,EAAE,gBAAgB;IADnD,+CAA+C;gBACrB,OAAO,EAAE,gBAAgB;IASnD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;CAMlD"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/http.js b/node_modules/@sentry/node/esm/transports/http.js index a81e96e..767210f 100644 --- a/node_modules/@sentry/node/esm/transports/http.js +++ b/node_modules/@sentry/node/esm/transports/http.js @@ -1,31 +1,153 @@ -import * as tslib_1 from "tslib"; -import { SentryError } from '@sentry/utils'; +import { _nullishCoalesce } from '@sentry/utils/esm/buildPolyfills'; +import { createTransport } from '@sentry/core'; import * as http from 'http'; -import { BaseTransport } from './base'; -/** Node http module transport */ -var HTTPTransport = /** @class */ (function (_super) { - tslib_1.__extends(HTTPTransport, _super); - /** Create a new instance and set this.agent */ - function HTTPTransport(options) { - var _this = _super.call(this, options) || this; - _this.options = options; - var proxy = options.httpProxy || process.env.http_proxy; - _this.module = http; - _this.client = proxy - ? new (require('https-proxy-agent'))(proxy) // tslint:disable-line:no-unsafe-any - : new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 }); - return _this; - } - /** - * @inheritDoc - */ - HTTPTransport.prototype.sendEvent = function (event) { - if (!this.module) { - throw new SentryError('No module available in HTTPTransport'); - } - return this._sendWithModule(this.module, event); - }; - return HTTPTransport; -}(BaseTransport)); -export { HTTPTransport }; -//# sourceMappingURL=http.js.map \ No newline at end of file +import * as https from 'https'; +import { Readable } from 'stream'; +import { URL } from 'url'; +import { createGzip } from 'zlib'; + +// Estimated maximum size for reasonable standalone event +const GZIP_THRESHOLD = 1024 * 32; + +/** + * Gets a stream from a Uint8Array or string + * Readable.from is ideal but was added in node.js v12.3.0 and v10.17.0 + */ +function streamFromBody(body) { + return new Readable({ + read() { + this.push(body); + this.push(null); + }, + }); +} + +/** + * Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry. + */ +function makeNodeTransport(options) { + let urlSegments; + + try { + urlSegments = new URL(options.url); + } catch (e) { + // eslint-disable-next-line no-console + console.warn( + '[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.', + ); + return createTransport(options, () => Promise.resolve({})); + } + + const isHttps = urlSegments.protocol === 'https:'; + + // Proxy prioritization: http => `options.proxy` | `process.env.http_proxy` + // Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy` + const proxy = applyNoProxyOption( + urlSegments, + options.proxy || (isHttps ? process.env.https_proxy : undefined) || process.env.http_proxy, + ); + + const nativeHttpModule = isHttps ? https : http; + const keepAlive = options.keepAlive === undefined ? false : options.keepAlive; + + // TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node + // versions(>= 8) as they had memory leaks when using it: #2555 + const agent = proxy + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + (new (require('https-proxy-agent'))(proxy) ) + : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 }); + + const requestExecutor = createRequestExecutor(options, _nullishCoalesce(options.httpModule, () => ( nativeHttpModule)), agent); + return createTransport(options, requestExecutor); +} + +/** + * Honors the `no_proxy` env variable with the highest priority to allow for hosts exclusion. + * + * @param transportUrl The URL the transport intends to send events to. + * @param proxy The client configured proxy. + * @returns A proxy the transport should use. + */ +function applyNoProxyOption(transportUrlSegments, proxy) { + const { no_proxy } = process.env; + + const urlIsExemptFromProxy = + no_proxy && + no_proxy + .split(',') + .some( + exemption => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption), + ); + + if (urlIsExemptFromProxy) { + return undefined; + } else { + return proxy; + } +} + +/** + * Creates a RequestExecutor to be used with `createTransport`. + */ +function createRequestExecutor( + options, + httpModule, + agent, +) { + const { hostname, pathname, port, protocol, search } = new URL(options.url); + return function makeRequest(request) { + return new Promise((resolve, reject) => { + let body = streamFromBody(request.body); + + const headers = { ...options.headers }; + + if (request.body.length > GZIP_THRESHOLD) { + headers['content-encoding'] = 'gzip'; + body = body.pipe(createGzip()); + } + + const req = httpModule.request( + { + method: 'POST', + agent, + headers, + hostname, + path: `${pathname}${search}`, + port, + protocol, + ca: options.caCerts, + }, + res => { + res.on('data', () => { + // Drain socket + }); + + res.on('end', () => { + // Drain socket + }); + + res.setEncoding('utf8'); + + // "Key-value pairs of header names and values. Header names are lower-cased." + // https://nodejs.org/api/http.html#http_message_headers + const retryAfterHeader = _nullishCoalesce(res.headers['retry-after'], () => ( null)); + const rateLimitsHeader = _nullishCoalesce(res.headers['x-sentry-rate-limits'], () => ( null)); + + resolve({ + statusCode: res.statusCode, + headers: { + 'retry-after': retryAfterHeader, + 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader, + }, + }); + }, + ); + + req.on('error', reject); + body.pipe(req); + }); + }; +} + +export { makeNodeTransport }; +//# sourceMappingURL=http.js.map diff --git a/node_modules/@sentry/node/esm/transports/http.js.map b/node_modules/@sentry/node/esm/transports/http.js.map index f1960d4..0a19fd1 100644 --- a/node_modules/@sentry/node/esm/transports/http.js.map +++ b/node_modules/@sentry/node/esm/transports/http.js.map @@ -1 +1 @@ -{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,iCAAiC;AACjC;IAAmC,yCAAa;IAC9C,+CAA+C;IAC/C,uBAA0B,OAAyB;QAAnD,YACE,kBAAM,OAAO,CAAC,SAMf;QAPyB,aAAO,GAAP,OAAO,CAAkB;QAEjD,IAAM,KAAK,GAAG,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QAC1D,KAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,KAAI,CAAC,MAAM,GAAG,KAAK;YACjB,CAAC,CAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAgB,CAAC,oCAAoC;YAChG,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;;IAC1E,CAAC;IAED;;OAEG;IACI,iCAAS,GAAhB,UAAiB,KAAY;QAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,WAAW,CAAC,sCAAsC,CAAC,CAAC;SAC/D;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IACH,oBAAC;AAAD,CAAC,AApBD,CAAmC,aAAa,GAoB/C","sourcesContent":["import { Event, Response, TransportOptions } from '@sentry/types';\nimport { SentryError } from '@sentry/utils';\nimport * as http from 'http';\n\nimport { BaseTransport } from './base';\n\n/** Node http module transport */\nexport class HTTPTransport extends BaseTransport {\n /** Create a new instance and set this.agent */\n public constructor(public options: TransportOptions) {\n super(options);\n const proxy = options.httpProxy || process.env.http_proxy;\n this.module = http;\n this.client = proxy\n ? (new (require('https-proxy-agent'))(proxy) as http.Agent) // tslint:disable-line:no-unsafe-any\n : new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 });\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): Promise {\n if (!this.module) {\n throw new SentryError('No module available in HTTPTransport');\n }\n return this._sendWithModule(this.module, event);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"http.js","sources":["../../../src/transports/http.ts"],"sourcesContent":["import { createTransport } from '@sentry/core';\nimport type {\n BaseTransportOptions,\n Transport,\n TransportMakeRequestResponse,\n TransportRequest,\n TransportRequestExecutor,\n} from '@sentry/types';\nimport * as http from 'http';\nimport * as https from 'https';\nimport { Readable } from 'stream';\nimport { URL } from 'url';\nimport { createGzip } from 'zlib';\n\nimport type { HTTPModule } from './http-module';\n\nexport interface NodeTransportOptions extends BaseTransportOptions {\n /** Define custom headers */\n headers?: Record;\n /** Set a proxy that should be used for outbound requests. */\n proxy?: string;\n /** HTTPS proxy CA certificates */\n caCerts?: string | Buffer | Array;\n /** Custom HTTP module. Defaults to the native 'http' and 'https' modules. */\n httpModule?: HTTPModule;\n /** Allow overriding connection keepAlive, defaults to false */\n keepAlive?: boolean;\n}\n\n// Estimated maximum size for reasonable standalone event\nconst GZIP_THRESHOLD = 1024 * 32;\n\n/**\n * Gets a stream from a Uint8Array or string\n * Readable.from is ideal but was added in node.js v12.3.0 and v10.17.0\n */\nfunction streamFromBody(body: Uint8Array | string): Readable {\n return new Readable({\n read() {\n this.push(body);\n this.push(null);\n },\n });\n}\n\n/**\n * Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry.\n */\nexport function makeNodeTransport(options: NodeTransportOptions): Transport {\n let urlSegments: URL;\n\n try {\n urlSegments = new URL(options.url);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.',\n );\n return createTransport(options, () => Promise.resolve({}));\n }\n\n const isHttps = urlSegments.protocol === 'https:';\n\n // Proxy prioritization: http => `options.proxy` | `process.env.http_proxy`\n // Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy`\n const proxy = applyNoProxyOption(\n urlSegments,\n options.proxy || (isHttps ? process.env.https_proxy : undefined) || process.env.http_proxy,\n );\n\n const nativeHttpModule = isHttps ? https : http;\n const keepAlive = options.keepAlive === undefined ? false : options.keepAlive;\n\n // TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node\n // versions(>= 8) as they had memory leaks when using it: #2555\n const agent = proxy\n ? // eslint-disable-next-line @typescript-eslint/no-var-requires\n (new (require('https-proxy-agent'))(proxy) as http.Agent)\n : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 });\n\n const requestExecutor = createRequestExecutor(options, options.httpModule ?? nativeHttpModule, agent);\n return createTransport(options, requestExecutor);\n}\n\n/**\n * Honors the `no_proxy` env variable with the highest priority to allow for hosts exclusion.\n *\n * @param transportUrl The URL the transport intends to send events to.\n * @param proxy The client configured proxy.\n * @returns A proxy the transport should use.\n */\nfunction applyNoProxyOption(transportUrlSegments: URL, proxy: string | undefined): string | undefined {\n const { no_proxy } = process.env;\n\n const urlIsExemptFromProxy =\n no_proxy &&\n no_proxy\n .split(',')\n .some(\n exemption => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption),\n );\n\n if (urlIsExemptFromProxy) {\n return undefined;\n } else {\n return proxy;\n }\n}\n\n/**\n * Creates a RequestExecutor to be used with `createTransport`.\n */\nfunction createRequestExecutor(\n options: NodeTransportOptions,\n httpModule: HTTPModule,\n agent: http.Agent,\n): TransportRequestExecutor {\n const { hostname, pathname, port, protocol, search } = new URL(options.url);\n return function makeRequest(request: TransportRequest): Promise {\n return new Promise((resolve, reject) => {\n let body = streamFromBody(request.body);\n\n const headers: Record = { ...options.headers };\n\n if (request.body.length > GZIP_THRESHOLD) {\n headers['content-encoding'] = 'gzip';\n body = body.pipe(createGzip());\n }\n\n const req = httpModule.request(\n {\n method: 'POST',\n agent,\n headers,\n hostname,\n path: `${pathname}${search}`,\n port,\n protocol,\n ca: options.caCerts,\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n\n res.setEncoding('utf8');\n\n // \"Key-value pairs of header names and values. Header names are lower-cased.\"\n // https://nodejs.org/api/http.html#http_message_headers\n const retryAfterHeader = res.headers['retry-after'] ?? null;\n const rateLimitsHeader = res.headers['x-sentry-rate-limits'] ?? null;\n\n resolve({\n statusCode: res.statusCode,\n headers: {\n 'retry-after': retryAfterHeader,\n 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader,\n },\n });\n },\n );\n\n req.on('error', reject);\n body.pipe(req);\n });\n };\n}\n"],"names":[],"mappings":";;;;;;;;AA6BA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA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sentry/node/esm/transports/https.d.ts b/node_modules/@sentry/node/esm/transports/https.d.ts deleted file mode 100644 index a8ec6b7..0000000 --- a/node_modules/@sentry/node/esm/transports/https.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Event, Response, TransportOptions } from '@sentry/types'; -import { BaseTransport } from './base'; -/** Node https module transport */ -export declare class HTTPSTransport extends BaseTransport { - options: TransportOptions; - /** Create a new instance and set this.agent */ - constructor(options: TransportOptions); - /** - * @inheritDoc - */ - sendEvent(event: Event): Promise; -} -//# sourceMappingURL=https.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/https.d.ts.map b/node_modules/@sentry/node/esm/transports/https.d.ts.map deleted file mode 100644 index d9c0cbe..0000000 --- a/node_modules/@sentry/node/esm/transports/https.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"https.d.ts","sourceRoot":"","sources":["../../src/transports/https.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIlE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,kCAAkC;AAClC,qBAAa,cAAe,SAAQ,aAAa;IAErB,OAAO,EAAE,gBAAgB;IADnD,+CAA+C;gBACrB,OAAO,EAAE,gBAAgB;IASnD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;CAMlD"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/https.js b/node_modules/@sentry/node/esm/transports/https.js deleted file mode 100644 index c630d26..0000000 --- a/node_modules/@sentry/node/esm/transports/https.js +++ /dev/null @@ -1,31 +0,0 @@ -import * as tslib_1 from "tslib"; -import { SentryError } from '@sentry/utils'; -import * as https from 'https'; -import { BaseTransport } from './base'; -/** Node https module transport */ -var HTTPSTransport = /** @class */ (function (_super) { - tslib_1.__extends(HTTPSTransport, _super); - /** Create a new instance and set this.agent */ - function HTTPSTransport(options) { - var _this = _super.call(this, options) || this; - _this.options = options; - var proxy = options.httpsProxy || options.httpProxy || process.env.https_proxy || process.env.http_proxy; - _this.module = https; - _this.client = proxy - ? new (require('https-proxy-agent'))(proxy) // tslint:disable-line:no-unsafe-any - : new https.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 }); - return _this; - } - /** - * @inheritDoc - */ - HTTPSTransport.prototype.sendEvent = function (event) { - if (!this.module) { - throw new SentryError('No module available in HTTPSTransport'); - } - return this._sendWithModule(this.module, event); - }; - return HTTPSTransport; -}(BaseTransport)); -export { HTTPSTransport }; -//# sourceMappingURL=https.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/https.js.map b/node_modules/@sentry/node/esm/transports/https.js.map deleted file mode 100644 index 974f972..0000000 --- a/node_modules/@sentry/node/esm/transports/https.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"https.js","sourceRoot":"","sources":["../../src/transports/https.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,kCAAkC;AAClC;IAAoC,0CAAa;IAC/C,+CAA+C;IAC/C,wBAA0B,OAAyB;QAAnD,YACE,kBAAM,OAAO,CAAC,SAMf;QAPyB,aAAO,GAAP,OAAO,CAAkB;QAEjD,IAAM,KAAK,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QAC3G,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,KAAI,CAAC,MAAM,GAAG,KAAK;YACjB,CAAC,CAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAiB,CAAC,oCAAoC;YACjG,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;;IAC3E,CAAC;IAED;;OAEG;IACI,kCAAS,GAAhB,UAAiB,KAAY;QAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,WAAW,CAAC,uCAAuC,CAAC,CAAC;SAChE;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IACH,qBAAC;AAAD,CAAC,AApBD,CAAoC,aAAa,GAoBhD","sourcesContent":["import { Event, Response, TransportOptions } from '@sentry/types';\nimport { SentryError } from '@sentry/utils';\nimport * as https from 'https';\n\nimport { BaseTransport } from './base';\n\n/** Node https module transport */\nexport class HTTPSTransport extends BaseTransport {\n /** Create a new instance and set this.agent */\n public constructor(public options: TransportOptions) {\n super(options);\n const proxy = options.httpsProxy || options.httpProxy || process.env.https_proxy || process.env.http_proxy;\n this.module = https;\n this.client = proxy\n ? (new (require('https-proxy-agent'))(proxy) as https.Agent) // tslint:disable-line:no-unsafe-any\n : new https.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 });\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): Promise {\n if (!this.module) {\n throw new SentryError('No module available in HTTPSTransport');\n }\n return this._sendWithModule(this.module, event);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/index.d.ts b/node_modules/@sentry/node/esm/transports/index.d.ts deleted file mode 100644 index 827c079..0000000 --- a/node_modules/@sentry/node/esm/transports/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { BaseTransport } from './base'; -export { HTTPTransport } from './http'; -export { HTTPSTransport } from './https'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/index.d.ts.map b/node_modules/@sentry/node/esm/transports/index.d.ts.map deleted file mode 100644 index 25b90b3..0000000 --- a/node_modules/@sentry/node/esm/transports/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/index.js b/node_modules/@sentry/node/esm/transports/index.js index f4aed0b..4e98499 100644 --- a/node_modules/@sentry/node/esm/transports/index.js +++ b/node_modules/@sentry/node/esm/transports/index.js @@ -1,4 +1,4 @@ -export { BaseTransport } from './base'; -export { HTTPTransport } from './http'; -export { HTTPSTransport } from './https'; -//# sourceMappingURL=index.js.map \ No newline at end of file +export { makeNodeTransport } from './http.js'; + +; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/node/esm/transports/index.js.map b/node_modules/@sentry/node/esm/transports/index.js.map index c625f95..8777c06 100644 --- a/node_modules/@sentry/node/esm/transports/index.js.map +++ b/node_modules/@sentry/node/esm/transports/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC","sourcesContent":["export { BaseTransport } from './base';\nexport { HTTPTransport } from './http';\nexport { HTTPSTransport } from './https';\n"]} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../../src/transports/index.ts"],"sourcesContent":["export type { NodeTransportOptions } from './http';\n\nexport { makeNodeTransport } from './http';\n"],"names":[],"mappings":";;AAAA"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/version.d.ts b/node_modules/@sentry/node/esm/version.d.ts deleted file mode 100644 index b14d8f8..0000000 --- a/node_modules/@sentry/node/esm/version.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const SDK_NAME = "sentry.javascript.node"; -export declare const SDK_VERSION = "5.14.1"; -//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/version.d.ts.map b/node_modules/@sentry/node/esm/version.d.ts.map deleted file mode 100644 index 51c3f03..0000000 --- a/node_modules/@sentry/node/esm/version.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,2BAA2B,CAAC;AACjD,eAAO,MAAM,WAAW,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/version.js b/node_modules/@sentry/node/esm/version.js deleted file mode 100644 index 0804109..0000000 --- a/node_modules/@sentry/node/esm/version.js +++ /dev/null @@ -1,3 +0,0 @@ -export var SDK_NAME = 'sentry.javascript.node'; -export var SDK_VERSION = '5.14.1'; -//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/version.js.map b/node_modules/@sentry/node/esm/version.js.map deleted file mode 100644 index 7fa7d88..0000000 --- a/node_modules/@sentry/node/esm/version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,QAAQ,GAAG,wBAAwB,CAAC;AACjD,MAAM,CAAC,IAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_NAME = 'sentry.javascript.node';\nexport const SDK_VERSION = '5.14.1';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/node/package.json b/node_modules/@sentry/node/package.json index 57833f3..86412be 100644 --- a/node_modules/@sentry/node/package.json +++ b/node_modules/@sentry/node/package.json @@ -1,91 +1,61 @@ { - "_args": [ - [ - "@sentry/node@5.14.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "@sentry/node@5.14.1", - "_id": "@sentry/node@5.14.1", + "_from": "@sentry/node@7.31.1", + "_id": "@sentry/node@7.31.1", "_inBundle": false, - "_integrity": "sha1-66w4vVA21/7voLRFaecxtZRBzic=", + "_integrity": "sha512-4VzfOU1YHeoGkBQmkVXlXoXITf+1NkZEREKhdzgpVAkVjb2Tk3sMoFov4wOKWnNTTj4ka50xyaw/ZmqApgQ4Pw==", "_location": "/@sentry/node", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "@sentry/node@5.14.1", + "raw": "@sentry/node@7.31.1", "name": "@sentry/node", "escapedName": "@sentry%2fnode", "scope": "@sentry", - "rawSpec": "5.14.1", + "rawSpec": "7.31.1", "saveSpec": null, - "fetchSpec": "5.14.1" + "fetchSpec": "7.31.1" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/node/-/node-5.14.1.tgz", - "_spec": "5.14.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.31.1.tgz", + "_shasum": "cba1eaa5664fc7e6dc07bb5a378f7dbe42f63457", + "_spec": "@sentry/node@7.31.1", + "_where": "C:\\code\\com.mill", "author": { "name": "Sentry" }, "bugs": { "url": "https://github.com/getsentry/sentry-javascript/issues" }, + "bundleDependencies": false, "dependencies": { - "@sentry/apm": "5.14.1", - "@sentry/core": "5.14.1", - "@sentry/hub": "5.14.1", - "@sentry/types": "5.14.1", - "@sentry/utils": "5.14.1", - "cookie": "^0.3.1", - "https-proxy-agent": "^4.0.0", + "@sentry/core": "7.31.1", + "@sentry/types": "7.31.1", + "@sentry/utils": "7.31.1", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", "lru_map": "^0.3.3", "tslib": "^1.9.3" }, - "description": "Offical Sentry SDK for Node.js", + "deprecated": false, + "description": "Official Sentry SDK for Node.js", "devDependencies": { "@types/cookie": "0.3.2", - "@types/express": "^4.17.2", + "@types/express": "^4.17.14", "@types/lru-cache": "^5.1.0", - "@types/node": "^11.13.7", + "@types/node": "~10.17.0", "express": "^4.17.1", - "jest": "^24.7.1", - "npm-run-all": "^4.1.2", - "prettier": "^1.17.0", - "prettier-check": "^2.0.0", - "rimraf": "^2.6.3", - "tslint": "^5.16.0", - "typescript": "^3.4.5" + "nock": "^13.0.5" }, "engines": { - "node": ">=6" + "node": ">=8" }, "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node", - "jest": { - "collectCoverage": true, - "transform": { - "^.+\\.ts$": "ts-jest" - }, - "moduleFileExtensions": [ - "js", - "ts" - ], - "testEnvironment": "node", - "testMatch": [ - "**/*.test.ts" - ], - "globals": { - "ts-jest": { - "tsConfig": "./tsconfig.json", - "diagnostics": false - } - } - }, - "license": "BSD-3-Clause", - "main": "dist/index.js", + "license": "MIT", + "main": "cjs/index.js", "module": "esm/index.js", "name": "@sentry/node", "publishConfig": { @@ -95,28 +65,6 @@ "type": "git", "url": "git://github.com/getsentry/sentry-javascript.git" }, - "scripts": { - "build": "run-p build:es5 build:esm", - "build:es5": "tsc -p tsconfig.build.json", - "build:esm": "tsc -p tsconfig.esm.json", - "build:watch": "run-p build:watch:es5 build:watch:esm", - "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", - "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", - "clean": "rimraf dist coverage", - "fix": "run-s fix:tslint fix:prettier", - "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", - "fix:tslint": "tslint --fix -t stylish -p .", - "link:yarn": "yarn link", - "lint": "run-s lint:prettier lint:tslint", - "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", - "lint:tslint": "tslint -t stylish -p .", - "lint:tslint:json": "tslint --format json -p . | tee lint-results.json", - "test": "run-s test:jest test:express", - "test:express": "node test/manual/express-scope-separation/start.js", - "test:jest": "jest", - "test:watch": "jest --watch", - "version": "node ../../scripts/versionbump.js src/version.ts" - }, - "types": "dist/index.d.ts", - "version": "5.14.1" + "types": "types/index.d.ts", + "version": "7.31.1" } diff --git a/node_modules/@sentry/types/LICENSE b/node_modules/@sentry/types/LICENSE index 8b42db8..535ef05 100644 --- a/node_modules/@sentry/types/LICENSE +++ b/node_modules/@sentry/types/LICENSE @@ -1,29 +1,14 @@ -BSD 3-Clause License +Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. -Copyright (c) 2019, Sentry -All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. -* 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. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@sentry/types/README.md b/node_modules/@sentry/types/README.md index 6d0a132..4c0e2d9 100644 --- a/node_modules/@sentry/types/README.md +++ b/node_modules/@sentry/types/README.md @@ -1,8 +1,7 @@

- - + + Sentry -

# Sentry JavaScript SDK Types @@ -10,7 +9,6 @@ [![npm version](https://img.shields.io/npm/v/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types) [![npm dm](https://img.shields.io/npm/dm/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types) [![npm dt](https://img.shields.io/npm/dt/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types) -[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/) ## Links diff --git a/node_modules/@sentry/types/dist/breadcrumb.d.ts b/node_modules/@sentry/types/dist/breadcrumb.d.ts deleted file mode 100644 index 23b1357..0000000 --- a/node_modules/@sentry/types/dist/breadcrumb.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Severity } from './severity'; -/** JSDoc */ -export interface Breadcrumb { - type?: string; - level?: Severity; - event_id?: string; - category?: string; - message?: string; - data?: { - [key: string]: any; - }; - timestamp?: number; -} -/** JSDoc */ -export interface BreadcrumbHint { - [key: string]: any; -} -//# sourceMappingURL=breadcrumb.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/breadcrumb.d.ts.map b/node_modules/@sentry/types/dist/breadcrumb.d.ts.map deleted file mode 100644 index 5fac027..0000000 --- a/node_modules/@sentry/types/dist/breadcrumb.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../src/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,YAAY;AACZ,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/breadcrumb.js b/node_modules/@sentry/types/dist/breadcrumb.js deleted file mode 100644 index 6abd867..0000000 --- a/node_modules/@sentry/types/dist/breadcrumb.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=breadcrumb.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/breadcrumb.js.map b/node_modules/@sentry/types/dist/breadcrumb.js.map deleted file mode 100644 index 7a7e0e1..0000000 --- a/node_modules/@sentry/types/dist/breadcrumb.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../src/breadcrumb.ts"],"names":[],"mappings":"","sourcesContent":["import { Severity } from './severity';\n\n/** JSDoc */\nexport interface Breadcrumb {\n type?: string;\n level?: Severity;\n event_id?: string;\n category?: string;\n message?: string;\n data?: { [key: string]: any };\n timestamp?: number;\n}\n\n/** JSDoc */\nexport interface BreadcrumbHint {\n [key: string]: any;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/client.d.ts b/node_modules/@sentry/types/dist/client.d.ts deleted file mode 100644 index 400ca05..0000000 --- a/node_modules/@sentry/types/dist/client.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Dsn } from './dsn'; -import { Event, EventHint } from './event'; -import { Integration, IntegrationClass } from './integration'; -import { Options } from './options'; -import { Scope } from './scope'; -import { Severity } from './severity'; -/** - * User-Facing Sentry SDK Client. - * - * This interface contains all methods to interface with the SDK once it has - * been installed. It allows to send events to Sentry, record breadcrumbs and - * set a context included in every event. Since the SDK mutates its environment, - * there will only be one instance during runtime. - * - */ -export interface Client { - /** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @param hint May contain additional information about the original exception. - * @param scope An optional scope containing event metadata. - * @returns The event id - */ - captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined; - /** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @param hint May contain additional information about the original exception. - * @param scope An optional scope containing event metadata. - * @returns The event id - */ - captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined; - /** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @param hint May contain additional information about the original exception. - * @param scope An optional scope containing event metadata. - * @returns The event id - */ - captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined; - /** Returns the current Dsn. */ - getDsn(): Dsn | undefined; - /** Returns the current options. */ - getOptions(): O; - /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ - close(timeout?: number): PromiseLike; - /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ - flush(timeout?: number): PromiseLike; - /** Returns an array of installed integrations on the client. */ - getIntegration(integartion: IntegrationClass): T | null; -} -//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/client.d.ts.map b/node_modules/@sentry/types/dist/client.d.ts.map deleted file mode 100644 index 98d9c68..0000000 --- a/node_modules/@sentry/types/dist/client.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IACjD;;;;;;;OAOG;IACH,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEtF;;;;;;;;OAQG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEvG;;;;;;;OAOG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEhF,+BAA+B;IAC/B,MAAM,IAAI,GAAG,GAAG,SAAS,CAAC;IAE1B,mCAAmC;IACnC,UAAU,IAAI,CAAC,CAAC;IAEhB;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C,gEAAgE;IAChE,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACnF"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/client.js b/node_modules/@sentry/types/dist/client.js deleted file mode 100644 index 8e65382..0000000 --- a/node_modules/@sentry/types/dist/client.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/client.js.map b/node_modules/@sentry/types/dist/client.js.map deleted file mode 100644 index 5868813..0000000 --- a/node_modules/@sentry/types/dist/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"","sourcesContent":["import { Dsn } from './dsn';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Options } from './options';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\n\n/**\n * User-Facing Sentry SDK Client.\n *\n * This interface contains all methods to interface with the SDK once it has\n * been installed. It allows to send events to Sentry, record breadcrumbs and\n * set a context included in every event. Since the SDK mutates its environment,\n * there will only be one instance during runtime.\n *\n */\nexport interface Client {\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;\n\n /** Returns the current Dsn. */\n getDsn(): Dsn | undefined;\n\n /** Returns the current options. */\n getOptions(): O;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n close(timeout?: number): PromiseLike;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n flush(timeout?: number): PromiseLike;\n\n /** Returns an array of installed integrations on the client. */\n getIntegration(integartion: IntegrationClass): T | null;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/dsn.d.ts b/node_modules/@sentry/types/dist/dsn.d.ts deleted file mode 100644 index ae5b8fe..0000000 --- a/node_modules/@sentry/types/dist/dsn.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** Supported Sentry transport protocols in a Dsn. */ -export declare type DsnProtocol = 'http' | 'https'; -/** Primitive components of a Dsn. */ -export interface DsnComponents { - /** Protocol used to connect to Sentry. */ - protocol: DsnProtocol; - /** Public authorization key. */ - user: string; - /** private _authorization key (deprecated, optional). */ - pass?: string; - /** Hostname of the Sentry instance. */ - host: string; - /** Port of the Sentry instance. */ - port?: string; - /** Sub path/ */ - path?: string; - /** Project ID */ - projectId: string; -} -/** Anything that can be parsed into a Dsn. */ -export declare type DsnLike = string | DsnComponents; -/** The Sentry Dsn, identifying a Sentry instance and project. */ -export interface Dsn extends DsnComponents { - /** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private _representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ - toString(withPassword: boolean): string; -} -//# sourceMappingURL=dsn.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/dsn.d.ts.map b/node_modules/@sentry/types/dist/dsn.d.ts.map deleted file mode 100644 index 0c6f538..0000000 --- a/node_modules/@sentry/types/dist/dsn.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,oBAAY,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3C,qCAAqC;AACrC,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,QAAQ,EAAE,WAAW,CAAC;IACtB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,8CAA8C;AAC9C,oBAAY,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;AAE7C,iEAAiE;AACjE,MAAM,WAAW,GAAI,SAAQ,aAAa;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,CAAC;CACzC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/dsn.js b/node_modules/@sentry/types/dist/dsn.js deleted file mode 100644 index 209d472..0000000 --- a/node_modules/@sentry/types/dist/dsn.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=dsn.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/dsn.js.map b/node_modules/@sentry/types/dist/dsn.js.map deleted file mode 100644 index 10f679d..0000000 --- a/node_modules/@sentry/types/dist/dsn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key. */\n user: string;\n /** private _authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport interface Dsn extends DsnComponents {\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n toString(withPassword: boolean): string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/error.d.ts b/node_modules/@sentry/types/dist/error.d.ts deleted file mode 100644 index c213b07..0000000 --- a/node_modules/@sentry/types/dist/error.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Just an Error object with arbitrary attributes attached to it. - */ -export interface ExtendedError extends Error { - [key: string]: any; -} -//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/error.d.ts.map b/node_modules/@sentry/types/dist/error.d.ts.map deleted file mode 100644 index 81a7b2a..0000000 --- a/node_modules/@sentry/types/dist/error.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/error.js b/node_modules/@sentry/types/dist/error.js deleted file mode 100644 index 349746a..0000000 --- a/node_modules/@sentry/types/dist/error.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/error.js.map b/node_modules/@sentry/types/dist/error.js.map deleted file mode 100644 index 3d6064c..0000000 --- a/node_modules/@sentry/types/dist/error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Just an Error object with arbitrary attributes attached to it.\n */\nexport interface ExtendedError extends Error {\n [key: string]: any;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/event.d.ts b/node_modules/@sentry/types/dist/event.d.ts deleted file mode 100644 index 1dd2645..0000000 --- a/node_modules/@sentry/types/dist/event.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Breadcrumb } from './breadcrumb'; -import { Exception } from './exception'; -import { Request } from './request'; -import { SdkInfo } from './sdkinfo'; -import { Severity } from './severity'; -import { Span } from './span'; -import { Stacktrace } from './stacktrace'; -import { User } from './user'; -/** JSDoc */ -export interface Event { - event_id?: string; - message?: string; - timestamp?: number; - start_timestamp?: number; - level?: Severity; - platform?: string; - logger?: string; - server_name?: string; - release?: string; - dist?: string; - environment?: string; - sdk?: SdkInfo; - request?: Request; - transaction?: string; - modules?: { - [key: string]: string; - }; - fingerprint?: string[]; - exception?: { - values?: Exception[]; - }; - stacktrace?: Stacktrace; - breadcrumbs?: Breadcrumb[]; - contexts?: { - [key: string]: object; - }; - tags?: { - [key: string]: string; - }; - extra?: { - [key: string]: any; - }; - user?: User; - type?: EventType; - spans?: Span[]; -} -/** JSDoc */ -export declare type EventType = 'transaction'; -/** JSDoc */ -export interface EventHint { - event_id?: string; - syntheticException?: Error | null; - originalException?: Error | string | null; - data?: any; -} -//# sourceMappingURL=event.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/event.d.ts.map b/node_modules/@sentry/types/dist/event.d.ts.map deleted file mode 100644 index fedf182..0000000 --- a/node_modules/@sentry/types/dist/event.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,YAAY;AACZ,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,QAAQ,C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,CAAC;CACZ"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/event.js b/node_modules/@sentry/types/dist/event.js deleted file mode 100644 index 80e514d..0000000 --- a/node_modules/@sentry/types/dist/event.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=event.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/event.js.map b/node_modules/@sentry/types/dist/event.js.map deleted file mode 100644 index d1642ad..0000000 --- a/node_modules/@sentry/types/dist/event.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Exception } from './exception';\nimport { Request } from './request';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n start_timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: { [key: string]: object };\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n user?: User;\n type?: EventType;\n spans?: Span[];\n}\n\n/** JSDoc */\nexport type EventType = 'transaction';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n syntheticException?: Error | null;\n originalException?: Error | string | null;\n data?: any;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/eventprocessor.d.ts b/node_modules/@sentry/types/dist/eventprocessor.d.ts deleted file mode 100644 index 06cfda5..0000000 --- a/node_modules/@sentry/types/dist/eventprocessor.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Event, EventHint } from './event'; -/** - * Event processors are used to change the event before it will be send. - * We strongly advise to make this function sync. - * Returning a PromiseLike will work just fine, but better be sure that you know what you are doing. - * Event processing will be deferred until your Promise is resolved. - */ -export declare type EventProcessor = (event: Event, hint?: EventHint) => PromiseLike | Event | null; -//# sourceMappingURL=eventprocessor.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/eventprocessor.d.ts.map b/node_modules/@sentry/types/dist/eventprocessor.d.ts.map deleted file mode 100644 index d8f5371..0000000 --- a/node_modules/@sentry/types/dist/eventprocessor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventprocessor.d.ts","sourceRoot":"","sources":["../src/eventprocessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;GAKG;AACH,oBAAY,cAAc,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/eventprocessor.js b/node_modules/@sentry/types/dist/eventprocessor.js deleted file mode 100644 index 8662ebe..0000000 --- a/node_modules/@sentry/types/dist/eventprocessor.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=eventprocessor.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/eventprocessor.js.map b/node_modules/@sentry/types/dist/eventprocessor.js.map deleted file mode 100644 index b13cbc6..0000000 --- a/node_modules/@sentry/types/dist/eventprocessor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventprocessor.js","sourceRoot":"","sources":["../src/eventprocessor.ts"],"names":[],"mappings":"","sourcesContent":["import { Event, EventHint } from './event';\n\n/**\n * Event processors are used to change the event before it will be send.\n * We strongly advise to make this function sync.\n * Returning a PromiseLike will work just fine, but better be sure that you know what you are doing.\n * Event processing will be deferred until your Promise is resolved.\n */\nexport type EventProcessor = (event: Event, hint?: EventHint) => PromiseLike | Event | null;\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/exception.d.ts b/node_modules/@sentry/types/dist/exception.d.ts deleted file mode 100644 index 3a16b7f..0000000 --- a/node_modules/@sentry/types/dist/exception.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Mechanism } from './mechanism'; -import { Stacktrace } from './stacktrace'; -/** JSDoc */ -export interface Exception { - type?: string; - value?: string; - mechanism?: Mechanism; - module?: string; - thread_id?: number; - stacktrace?: Stacktrace; -} -//# sourceMappingURL=exception.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/exception.d.ts.map b/node_modules/@sentry/types/dist/exception.d.ts.map deleted file mode 100644 index f6f55c2..0000000 --- a/node_modules/@sentry/types/dist/exception.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exception.d.ts","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY;AACZ,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/exception.js b/node_modules/@sentry/types/dist/exception.js deleted file mode 100644 index 5ff6ac1..0000000 --- a/node_modules/@sentry/types/dist/exception.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=exception.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/exception.js.map b/node_modules/@sentry/types/dist/exception.js.map deleted file mode 100644 index 3ab750e..0000000 --- a/node_modules/@sentry/types/dist/exception.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exception.js","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"","sourcesContent":["import { Mechanism } from './mechanism';\nimport { Stacktrace } from './stacktrace';\n\n/** JSDoc */\nexport interface Exception {\n type?: string;\n value?: string;\n mechanism?: Mechanism;\n module?: string;\n thread_id?: number;\n stacktrace?: Stacktrace;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/hub.d.ts b/node_modules/@sentry/types/dist/hub.d.ts deleted file mode 100644 index eac0ba8..0000000 --- a/node_modules/@sentry/types/dist/hub.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { Breadcrumb, BreadcrumbHint } from './breadcrumb'; -import { Client } from './client'; -import { Event, EventHint } from './event'; -import { Integration, IntegrationClass } from './integration'; -import { Scope } from './scope'; -import { Severity } from './severity'; -import { Span, SpanContext } from './span'; -import { User } from './user'; -/** - * Internal class used to make sure we always have the latest internal functions - * working in case we have a version conflict. - */ -export interface Hub { - /** - * Checks if this hub's version is older than the given version. - * - * @param version A version number to compare to. - * @return True if the given version is newer; otherwise false. - * - * @hidden - */ - isOlderThan(version: number): boolean; - /** - * This binds the given client to the current scope. - * @param client An SDK client (client) instance. - */ - bindClient(client?: Client): void; - /** - * Create a new scope to store context information. - * - * The scope will be layered on top of the current one. It is isolated, i.e. all - * breadcrumbs and context information added to this scope will be removed once - * the scope ends. Be sure to always remove this scope with {@link this.popScope} - * when the operation finishes or throws. - * - * @returns Scope, the new cloned scope - */ - pushScope(): Scope; - /** - * Removes a previously pushed scope from the stack. - * - * This restores the state before the scope was pushed. All breadcrumbs and - * context information added since the last call to {@link this.pushScope} are - * discarded. - */ - popScope(): boolean; - /** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - * - * @param callback that will be enclosed into push/popScope. - */ - withScope(callback: (scope: Scope) => void): void; - /** Returns the client of the top stack. */ - getClient(): Client | undefined; - /** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @param hint May contain additional information about the original exception. - * @returns The generated eventId. - */ - captureException(exception: any, hint?: EventHint): string; - /** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @param hint May contain additional information about the original exception. - * @returns The generated eventId. - */ - captureMessage(message: string, level?: Severity, hint?: EventHint): string; - /** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @param hint May contain additional information about the original exception. - */ - captureEvent(event: Event, hint?: EventHint): string; - /** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ - lastEventId(): string | undefined; - /** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - * @param hint May contain additional information about the original breadcrumb. - */ - addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void; - /** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ - setUser(user: User | null): void; - /** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ - setTags(tags: { - [key: string]: string; - }): void; - /** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ - setTag(key: string, value: string): void; - /** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ - setExtra(key: string, extra: any): void; - /** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ - setExtras(extras: { - [key: string]: any; - }): void; - /** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ - setContext(name: string, context: { - [key: string]: any; - } | null): void; - /** - * Callback to set context information onto the scope. - * - * @param callback Callback function that receives Scope. - */ - configureScope(callback: (scope: Scope) => void): void; - /** - * For the duraction of the callback, this hub will be set as the global current Hub. - * This function is useful if you want to run your own client and hook into an already initialized one - * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration. - */ - run(callback: (hub: Hub) => void): void; - /** Returns the integration if installed on the current client. */ - getIntegration(integration: IntegrationClass): T | null; - /** Returns all trace headers that are currently on the top scope. */ - traceHeaders(): { - [key: string]: string; - }; - /** - * This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured - * and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope, - * the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`. - * - * @param span Already constructed span which should be started or properties with which the span should be created - */ - startSpan(span?: Span | SpanContext, forceNoChild?: boolean): Span; -} -//# sourceMappingURL=hub.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/hub.d.ts.map b/node_modules/@sentry/types/dist/hub.d.ts.map deleted file mode 100644 index fab267d..0000000 --- a/node_modules/@sentry/types/dist/hub.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;G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C;IAEzC;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC;IAExC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,CAAC;IAEhD;;;;OAIG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,IAAI,CAAC;IAEvE;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;IAEvD;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IAExC,kEAAkE;IAClE,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAElF,qEAAqE;IACrE,YAAY,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,WAAW,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACpE"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/hub.js b/node_modules/@sentry/types/dist/hub.js deleted file mode 100644 index f996830..0000000 --- a/node_modules/@sentry/types/dist/hub.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=hub.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/hub.js.map b/node_modules/@sentry/types/dist/hub.js.map deleted file mode 100644 index 80994c9..0000000 --- a/node_modules/@sentry/types/dist/hub.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Client } from './client';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\nimport { Span, SpanContext } from './span';\nimport { User } from './user';\n\n/**\n * Internal class used to make sure we always have the latest internal functions\n * working in case we have a version conflict.\n */\nexport interface Hub {\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @hidden\n */\n isOlderThan(version: number): boolean;\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n */\n bindClient(client?: Client): void;\n\n /**\n * Create a new scope to store context information.\n *\n * The scope will be layered on top of the current one. It is isolated, i.e. all\n * breadcrumbs and context information added to this scope will be removed once\n * the scope ends. Be sure to always remove this scope with {@link this.popScope}\n * when the operation finishes or throws.\n *\n * @returns Scope, the new cloned scope\n */\n pushScope(): Scope;\n\n /**\n * Removes a previously pushed scope from the stack.\n *\n * This restores the state before the scope was pushed. All breadcrumbs and\n * context information added since the last call to {@link this.pushScope} are\n * discarded.\n */\n popScope(): boolean;\n\n /**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\n withScope(callback: (scope: Scope) => void): void;\n\n /** Returns the client of the top stack. */\n getClient(): Client | undefined;\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureException(exception: any, hint?: EventHint): string;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint): string;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n */\n captureEvent(event: Event, hint?: EventHint): string;\n\n /**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\n lastEventId(): string | undefined;\n\n /**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n * @param hint May contain additional information about the original breadcrumb.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): void;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): void;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): void;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n setExtra(key: string, extra: any): void;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: { [key: string]: any }): void;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\n setContext(name: string, context: { [key: string]: any } | null): void;\n\n /**\n * Callback to set context information onto the scope.\n *\n * @param callback Callback function that receives Scope.\n */\n configureScope(callback: (scope: Scope) => void): void;\n\n /**\n * For the duraction of the callback, this hub will be set as the global current Hub.\n * This function is useful if you want to run your own client and hook into an already initialized one\n * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.\n */\n run(callback: (hub: Hub) => void): void;\n\n /** Returns the integration if installed on the current client. */\n getIntegration(integration: IntegrationClass): T | null;\n\n /** Returns all trace headers that are currently on the top scope. */\n traceHeaders(): { [key: string]: string };\n\n /**\n * This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured\n * and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope,\n * the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`.\n *\n * @param span Already constructed span which should be started or properties with which the span should be created\n */\n startSpan(span?: Span | SpanContext, forceNoChild?: boolean): Span;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/index.d.ts b/node_modules/@sentry/types/dist/index.d.ts deleted file mode 100644 index 921957f..0000000 --- a/node_modules/@sentry/types/dist/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export { Breadcrumb, BreadcrumbHint } from './breadcrumb'; -export { Client } from './client'; -export { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn'; -export { ExtendedError } from './error'; -export { Event, EventHint } from './event'; -export { EventProcessor } from './eventprocessor'; -export { Exception } from './exception'; -export { Hub } from './hub'; -export { Integration, IntegrationClass } from './integration'; -export { LogLevel } from './loglevel'; -export { Mechanism } from './mechanism'; -export { Options } from './options'; -export { Package } from './package'; -export { Request } from './request'; -export { Response } from './response'; -export { Scope } from './scope'; -export { SdkInfo } from './sdkinfo'; -export { Severity } from './severity'; -export { Span, SpanContext, SpanStatus } from './span'; -export { StackFrame } from './stackframe'; -export { Stacktrace } from './stacktrace'; -export { Status } from './status'; -export { Thread } from './thread'; -export { Transport, TransportOptions, TransportClass } from './transport'; -export { User } from './user'; -export { WrappedFunction } from './wrappedfunction'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/index.d.ts.map b/node_modules/@sentry/types/dist/index.d.ts.map deleted file mode 100644 index f8ca1e8..0000000 --- a/node_modules/@sentry/types/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"A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AAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/index.js b/node_modules/@sentry/types/dist/index.js deleted file mode 100644 index 426a87e..0000000 --- a/node_modules/@sentry/types/dist/index.js +++ /dev/null @@ -1,10 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var loglevel_1 = require("./loglevel"); -exports.LogLevel = loglevel_1.LogLevel; -var severity_1 = require("./severity"); -exports.Severity = severity_1.Severity; -var span_1 = require("./span"); -exports.SpanStatus = span_1.SpanStatus; -var status_1 = require("./status"); -exports.Status = status_1.Status; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/index.js.map b/node_modules/@sentry/types/dist/index.js.map deleted file mode 100644 index 49094d3..0000000 --- a/node_modules/@sentry/types/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AASA,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAQjB,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AACjB,+BAAuD;AAA3B,4BAAA,UAAU,CAAA;AAGtC,mCAAkC;AAAzB,0BAAA,MAAM,CAAA","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Scope } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span, SpanContext, SpanStatus } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/integration.d.ts b/node_modules/@sentry/types/dist/integration.d.ts deleted file mode 100644 index fa42f9f..0000000 --- a/node_modules/@sentry/types/dist/integration.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { EventProcessor } from './eventprocessor'; -import { Hub } from './hub'; -/** Integration Class Interface */ -export interface IntegrationClass { - new (...args: any[]): T; - /** - * Property that holds the integration name - */ - id: string; -} -/** Integration interface */ -export interface Integration { - /** - * Returns {@link IntegrationClass.id} - */ - name: string; - /** - * Sets the integration up only once. - * This takes no options on purpose, options should be passed in the constructor - */ - setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; -} -//# sourceMappingURL=integration.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/integration.d.ts.map b/node_modules/@sentry/types/dist/integration.d.ts.map deleted file mode 100644 index 779b70c..0000000 --- a/node_modules/@sentry/types/dist/integration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,kCAAkC;AAClC,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,4BAA4B;AAC5B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,SAAS,CAAC,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI,CAAC;CACxG"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/integration.js b/node_modules/@sentry/types/dist/integration.js deleted file mode 100644 index 748b448..0000000 --- a/node_modules/@sentry/types/dist/integration.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=integration.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/integration.js.map b/node_modules/@sentry/types/dist/integration.js.map deleted file mode 100644 index ccae34f..0000000 --- a/node_modules/@sentry/types/dist/integration.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"","sourcesContent":["import { EventProcessor } from './eventprocessor';\nimport { Hub } from './hub';\n\n/** Integration Class Interface */\nexport interface IntegrationClass {\n new (...args: any[]): T;\n /**\n * Property that holds the integration name\n */\n id: string;\n}\n\n/** Integration interface */\nexport interface Integration {\n /**\n * Returns {@link IntegrationClass.id}\n */\n name: string;\n\n /**\n * Sets the integration up only once.\n * This takes no options on purpose, options should be passed in the constructor\n */\n setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/loglevel.d.ts b/node_modules/@sentry/types/dist/loglevel.d.ts deleted file mode 100644 index d3c345e..0000000 --- a/node_modules/@sentry/types/dist/loglevel.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** Console logging verbosity for the SDK. */ -export declare enum LogLevel { - /** No logs will be generated. */ - None = 0, - /** Only SDK internal errors will be logged. */ - Error = 1, - /** Information useful for debugging the SDK will be logged. */ - Debug = 2, - /** All SDK actions will be logged. */ - Verbose = 3 -} -//# sourceMappingURL=loglevel.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/loglevel.d.ts.map b/node_modules/@sentry/types/dist/loglevel.d.ts.map deleted file mode 100644 index c931c75..0000000 --- a/node_modules/@sentry/types/dist/loglevel.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"loglevel.d.ts","sourceRoot":"","sources":["../src/loglevel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,oBAAY,QAAQ;IAClB,iCAAiC;IACjC,IAAI,IAAI;IACR,+CAA+C;IAC/C,KAAK,IAAI;IACT,+DAA+D;IAC/D,KAAK,IAAI;IACT,sCAAsC;IACtC,OAAO,IAAI;CACZ"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/loglevel.js b/node_modules/@sentry/types/dist/loglevel.js deleted file mode 100644 index 6f7d647..0000000 --- a/node_modules/@sentry/types/dist/loglevel.js +++ /dev/null @@ -1,14 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -/** Console logging verbosity for the SDK. */ -var LogLevel; -(function (LogLevel) { - /** No logs will be generated. */ - LogLevel[LogLevel["None"] = 0] = "None"; - /** Only SDK internal errors will be logged. */ - LogLevel[LogLevel["Error"] = 1] = "Error"; - /** Information useful for debugging the SDK will be logged. */ - LogLevel[LogLevel["Debug"] = 2] = "Debug"; - /** All SDK actions will be logged. */ - LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; -})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); -//# sourceMappingURL=loglevel.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/loglevel.js.map b/node_modules/@sentry/types/dist/loglevel.js.map deleted file mode 100644 index bccecf4..0000000 --- a/node_modules/@sentry/types/dist/loglevel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"loglevel.js","sourceRoot":"","sources":["../src/loglevel.ts"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,iCAAiC;IACjC,uCAAQ,CAAA;IACR,+CAA+C;IAC/C,yCAAS,CAAA;IACT,+DAA+D;IAC/D,yCAAS,CAAA;IACT,sCAAsC;IACtC,6CAAW,CAAA;AACb,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB","sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n /** No logs will be generated. */\n None = 0,\n /** Only SDK internal errors will be logged. */\n Error = 1,\n /** Information useful for debugging the SDK will be logged. */\n Debug = 2,\n /** All SDK actions will be logged. */\n Verbose = 3,\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/mechanism.d.ts b/node_modules/@sentry/types/dist/mechanism.d.ts deleted file mode 100644 index 0ff1a28..0000000 --- a/node_modules/@sentry/types/dist/mechanism.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** JSDoc */ -export interface Mechanism { - type: string; - handled: boolean; - data?: { - [key: string]: string | boolean; - }; - synthetic?: boolean; -} -//# sourceMappingURL=mechanism.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/mechanism.d.ts.map b/node_modules/@sentry/types/dist/mechanism.d.ts.map deleted file mode 100644 index 69f13a7..0000000 --- a/node_modules/@sentry/types/dist/mechanism.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mechanism.d.ts","sourceRoot":"","sources":["../src/mechanism.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;KACjC,CAAC;IACF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/mechanism.js b/node_modules/@sentry/types/dist/mechanism.js deleted file mode 100644 index 06b02a5..0000000 --- a/node_modules/@sentry/types/dist/mechanism.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=mechanism.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/mechanism.js.map b/node_modules/@sentry/types/dist/mechanism.js.map deleted file mode 100644 index 015adea..0000000 --- a/node_modules/@sentry/types/dist/mechanism.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mechanism.js","sourceRoot":"","sources":["../src/mechanism.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Mechanism {\n type: string;\n handled: boolean;\n data?: {\n [key: string]: string | boolean;\n };\n synthetic?: boolean;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/options.d.ts b/node_modules/@sentry/types/dist/options.d.ts deleted file mode 100644 index 9dd2687..0000000 --- a/node_modules/@sentry/types/dist/options.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { Breadcrumb, BreadcrumbHint } from './breadcrumb'; -import { Event, EventHint } from './event'; -import { Integration } from './integration'; -import { LogLevel } from './loglevel'; -import { Transport, TransportClass, TransportOptions } from './transport'; -/** Base configuration options for every SDK. */ -export interface Options { - /** - * Enable debug functionality in the SDK itself - */ - debug?: boolean; - /** - * Specifies whether this SDK should activate and send events to Sentry. - * Disabling the SDK reduces all overhead from instrumentation, collecting - * breadcrumbs and capturing events. Defaults to true. - */ - enabled?: boolean; - /** - * The Dsn used to connect to Sentry and identify the project. If omitted, the - * SDK will not send any data to Sentry. - */ - dsn?: string; - /** - * If this is set to false, default integrations will not be added, otherwise this will internally be set to the - * recommended default integrations. - */ - defaultIntegrations?: false | Integration[]; - /** - * List of integrations that should be installed after SDK was initialized. - * Accepts either a list of integrations or a function that receives - * default integrations and returns a new, updated list. - */ - integrations?: Integration[] | ((integrations: Integration[]) => Integration[]); - /** - * A pattern for error messages which should not be sent to Sentry. - * By default, all errors will be sent. - */ - ignoreErrors?: Array; - /** - * Transport object that should be used to send events to Sentry - */ - transport?: TransportClass; - /** - * Options for the default transport that the SDK uses. - */ - transportOptions?: TransportOptions; - /** - * The release identifier used when uploading respective source maps. Specify - * this value to allow Sentry to resolve the correct source maps when - * processing events. - */ - release?: string; - /** The current environment of your application (e.g. "production"). */ - environment?: string; - /** Sets the distribution for all events */ - dist?: string; - /** - * The maximum number of breadcrumbs sent with events. Defaults to 30. - * Values over 100 will be ignored and 100 used instead. - */ - maxBreadcrumbs?: number; - /** Console logging verbosity for the SDK Client. */ - logLevel?: LogLevel; - /** A global sample rate to apply to all events (0 - 1). */ - sampleRate?: number; - /** A global sample rate to apply to all transactions (0 - 1). */ - tracesSampleRate?: number; - /** Attaches stacktraces to pure capture message / log integrations */ - attachStacktrace?: boolean; - /** Maxium number of chars a single value can have before it will be truncated. */ - maxValueLength?: number; - /** - * Maximum number of levels that normalization algorithm will traverse in objects and arrays. - * Used when normalizing an event before sending, on all of the listed attributes: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * Defaults to `3`. Set to `0` to disable. - */ - normalizeDepth?: number; - /** - * A callback invoked during event submission, allowing to optionally modify - * the event before it is sent to Sentry. - * - * Note that you must return a valid event from this callback. If you do not - * wish to modify the event, simply return it at the end. - * Returning null will case the event to be dropped. - * - * @param event The error or message event generated by the SDK. - * @param hint May contain additional information about the original exception. - * @returns A new event that will be sent | null. - */ - beforeSend?(event: Event, hint?: EventHint): PromiseLike | Event | null; - /** - * A callback invoked when adding a breadcrumb, allowing to optionally modify - * it before adding it to future events. - * - * Note that you must return a valid breadcrumb from this callback. If you do - * not wish to modify the breadcrumb, simply return it at the end. - * Returning null will case the breadcrumb to be dropped. - * - * @param breadcrumb The breadcrumb as created by the SDK. - * @returns The breadcrumb that will be added | null. - */ - beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null; - _experiments?: { - [key: string]: any; - }; -} -//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/options.d.ts.map b/node_modules/@sentry/types/dist/options.d.ts.map deleted file mode 100644 index caa4880..0000000 --- a/node_modules/@sentry/types/dist/options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1E,gDAAgD;AAChD,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,mBAAmB,CAAC,EAAE,KAAK,GAAG,WAAW,EAAE,CAAC;IAE5C;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC,YAAY,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,CAAC,CAAC;IAEhF;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IAEtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC;IAEtF;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC;IAEpF,YAAY,CAAC,EAAE;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/options.js b/node_modules/@sentry/types/dist/options.js deleted file mode 100644 index f428ff3..0000000 --- a/node_modules/@sentry/types/dist/options.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/options.js.map b/node_modules/@sentry/types/dist/options.js.map deleted file mode 100644 index a6fe985..0000000 --- a/node_modules/@sentry/types/dist/options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Event, EventHint } from './event';\nimport { Integration } from './integration';\nimport { LogLevel } from './loglevel';\nimport { Transport, TransportClass, TransportOptions } from './transport';\n\n/** Base configuration options for every SDK. */\nexport interface Options {\n /**\n * Enable debug functionality in the SDK itself\n */\n debug?: boolean;\n\n /**\n * Specifies whether this SDK should activate and send events to Sentry.\n * Disabling the SDK reduces all overhead from instrumentation, collecting\n * breadcrumbs and capturing events. Defaults to true.\n */\n enabled?: boolean;\n\n /**\n * The Dsn used to connect to Sentry and identify the project. If omitted, the\n * SDK will not send any data to Sentry.\n */\n dsn?: string;\n\n /**\n * If this is set to false, default integrations will not be added, otherwise this will internally be set to the\n * recommended default integrations.\n */\n defaultIntegrations?: false | Integration[];\n\n /**\n * List of integrations that should be installed after SDK was initialized.\n * Accepts either a list of integrations or a function that receives\n * default integrations and returns a new, updated list.\n */\n integrations?: Integration[] | ((integrations: Integration[]) => Integration[]);\n\n /**\n * A pattern for error messages which should not be sent to Sentry.\n * By default, all errors will be sent.\n */\n ignoreErrors?: Array;\n\n /**\n * Transport object that should be used to send events to Sentry\n */\n transport?: TransportClass;\n\n /**\n * Options for the default transport that the SDK uses.\n */\n transportOptions?: TransportOptions;\n\n /**\n * The release identifier used when uploading respective source maps. Specify\n * this value to allow Sentry to resolve the correct source maps when\n * processing events.\n */\n release?: string;\n\n /** The current environment of your application (e.g. \"production\"). */\n environment?: string;\n\n /** Sets the distribution for all events */\n dist?: string;\n\n /**\n * The maximum number of breadcrumbs sent with events. Defaults to 30.\n * Values over 100 will be ignored and 100 used instead.\n */\n maxBreadcrumbs?: number;\n\n /** Console logging verbosity for the SDK Client. */\n logLevel?: LogLevel;\n\n /** A global sample rate to apply to all events (0 - 1). */\n sampleRate?: number;\n\n /** A global sample rate to apply to all transactions (0 - 1). */\n tracesSampleRate?: number;\n\n /** Attaches stacktraces to pure capture message / log integrations */\n attachStacktrace?: boolean;\n\n /** Maxium number of chars a single value can have before it will be truncated. */\n maxValueLength?: number;\n\n /**\n * Maximum number of levels that normalization algorithm will traverse in objects and arrays.\n * Used when normalizing an event before sending, on all of the listed attributes:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * Defaults to `3`. Set to `0` to disable.\n */\n normalizeDepth?: number;\n\n /**\n * A callback invoked during event submission, allowing to optionally modify\n * the event before it is sent to Sentry.\n *\n * Note that you must return a valid event from this callback. If you do not\n * wish to modify the event, simply return it at the end.\n * Returning null will case the event to be dropped.\n *\n * @param event The error or message event generated by the SDK.\n * @param hint May contain additional information about the original exception.\n * @returns A new event that will be sent | null.\n */\n beforeSend?(event: Event, hint?: EventHint): PromiseLike | Event | null;\n\n /**\n * A callback invoked when adding a breadcrumb, allowing to optionally modify\n * it before adding it to future events.\n *\n * Note that you must return a valid breadcrumb from this callback. If you do\n * not wish to modify the breadcrumb, simply return it at the end.\n * Returning null will case the breadcrumb to be dropped.\n *\n * @param breadcrumb The breadcrumb as created by the SDK.\n * @returns The breadcrumb that will be added | null.\n */\n beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null;\n\n _experiments?: {\n [key: string]: any;\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/package.d.ts b/node_modules/@sentry/types/dist/package.d.ts deleted file mode 100644 index 80d9d0b..0000000 --- a/node_modules/@sentry/types/dist/package.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** JSDoc */ -export interface Package { - name: string; - version: string; -} -//# sourceMappingURL=package.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/package.d.ts.map b/node_modules/@sentry/types/dist/package.d.ts.map deleted file mode 100644 index bd6b6d2..0000000 --- a/node_modules/@sentry/types/dist/package.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../src/package.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/package.js b/node_modules/@sentry/types/dist/package.js deleted file mode 100644 index e92264f..0000000 --- a/node_modules/@sentry/types/dist/package.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=package.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/package.js.map b/node_modules/@sentry/types/dist/package.js.map deleted file mode 100644 index 7a5faee..0000000 --- a/node_modules/@sentry/types/dist/package.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package.js","sourceRoot":"","sources":["../src/package.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Package {\n name: string;\n version: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/request.d.ts b/node_modules/@sentry/types/dist/request.d.ts deleted file mode 100644 index 7e43f5b..0000000 --- a/node_modules/@sentry/types/dist/request.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** JSDoc */ -export interface Request { - url?: string; - method?: string; - data?: any; - query_string?: string; - cookies?: { - [key: string]: string; - }; - env?: { - [key: string]: string; - }; - headers?: { - [key: string]: string; - }; -} -//# sourceMappingURL=request.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/request.d.ts.map b/node_modules/@sentry/types/dist/request.d.ts.map deleted file mode 100644 index 1bb586f..0000000 --- a/node_modules/@sentry/types/dist/request.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,OAAO;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,GAAG,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAChC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACrC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/request.js b/node_modules/@sentry/types/dist/request.js deleted file mode 100644 index 5bd28d3..0000000 --- a/node_modules/@sentry/types/dist/request.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=request.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/request.js.map b/node_modules/@sentry/types/dist/request.js.map deleted file mode 100644 index acd0f6d..0000000 --- a/node_modules/@sentry/types/dist/request.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Request {\n url?: string;\n method?: string;\n data?: any;\n query_string?: string;\n cookies?: { [key: string]: string };\n env?: { [key: string]: string };\n headers?: { [key: string]: string };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/response.d.ts b/node_modules/@sentry/types/dist/response.d.ts deleted file mode 100644 index 72750b8..0000000 --- a/node_modules/@sentry/types/dist/response.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Event } from './event'; -import { Status } from './status'; -/** JSDoc */ -export interface Response { - status: Status; - event?: Event; - reason?: string; -} -//# sourceMappingURL=response.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/response.d.ts.map b/node_modules/@sentry/types/dist/response.d.ts.map deleted file mode 100644 index 2205cc6..0000000 --- a/node_modules/@sentry/types/dist/response.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,YAAY;AACZ,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/response.js b/node_modules/@sentry/types/dist/response.js deleted file mode 100644 index 75f9e17..0000000 --- a/node_modules/@sentry/types/dist/response.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=response.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/response.js.map b/node_modules/@sentry/types/dist/response.js.map deleted file mode 100644 index 893e80e..0000000 --- a/node_modules/@sentry/types/dist/response.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"response.js","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"","sourcesContent":["import { Event } from './event';\nimport { Status } from './status';\n\n/** JSDoc */\nexport interface Response {\n status: Status;\n event?: Event;\n reason?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/scope.d.ts b/node_modules/@sentry/types/dist/scope.d.ts deleted file mode 100644 index 84bcfb2..0000000 --- a/node_modules/@sentry/types/dist/scope.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Breadcrumb } from './breadcrumb'; -import { EventProcessor } from './eventprocessor'; -import { Severity } from './severity'; -import { Span } from './span'; -import { User } from './user'; -/** - * Holds additional event information. {@link Scope.applyToEvent} will be - * called by the client before an event will be sent. - */ -export interface Scope { - /** Add new event processor that will be called after {@link applyToEvent}. */ - addEventProcessor(callback: EventProcessor): this; - /** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ - setUser(user: User | null): this; - /** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ - setTags(tags: { - [key: string]: string; - }): this; - /** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ - setTag(key: string, value: string): this; - /** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ - setExtras(extras: { - [key: string]: any; - }): this; - /** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ - setExtra(key: string, extra: any): this; - /** - * Sets the fingerprint on the scope to send with the events. - * @param fingerprint string[] to group events in Sentry. - */ - setFingerprint(fingerprint: string[]): this; - /** - * Sets the level on the scope for future events. - * @param level string {@link Severity} - */ - setLevel(level: Severity): this; - /** - * Sets the transaction on the scope for future events. - * @param transaction string This will be converted in a tag in Sentry - */ - setTransaction(transaction?: string): this; - /** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ - setContext(name: string, context: { - [key: string]: any; - } | null): this; - /** - * Sets the Span on the scope. - * @param span Span - */ - setSpan(span?: Span): this; - /** Clears the current scope and resets its properties. */ - clear(): this; - /** - * Sets the breadcrumbs in the scope - * @param breadcrumbs Breadcrumb - * @param maxBreadcrumbs number of max breadcrumbs to merged into event. - */ - addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this; - /** - * Clears all currently set Breadcrumbs. - */ - clearBreadcrumbs(): this; -} -//# sourceMappingURL=scope.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/scope.d.ts.map b/node_modules/@sentry/types/dist/scope.d.ts.map deleted file mode 100644 index cdd0392..0000000 --- a/node_modules/@sentry/types/dist/scope.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAA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cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;CAC1B"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/scope.js b/node_modules/@sentry/types/dist/scope.js deleted file mode 100644 index c79756f..0000000 --- a/node_modules/@sentry/types/dist/scope.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=scope.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/scope.js.map b/node_modules/@sentry/types/dist/scope.js.map deleted file mode 100644 index eff53ca..0000000 --- a/node_modules/@sentry/types/dist/scope.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { EventProcessor } from './eventprocessor';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { User } from './user';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: { [key: string]: any }): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n setExtra(key: string, extra: any): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /**\n * Sets the transaction on the scope for future events.\n * @param transaction string This will be converted in a tag in Sentry\n */\n setTransaction(transaction?: string): this;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\n setContext(name: string, context: { [key: string]: any } | null): this;\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n */\n setSpan(span?: Span): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/sdkinfo.d.ts b/node_modules/@sentry/types/dist/sdkinfo.d.ts deleted file mode 100644 index 6ea5745..0000000 --- a/node_modules/@sentry/types/dist/sdkinfo.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Package } from './package'; -/** JSDoc */ -export interface SdkInfo { - name: string; - version: string; - integrations?: string[]; - packages?: Package[]; -} -//# sourceMappingURL=sdkinfo.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/sdkinfo.d.ts.map b/node_modules/@sentry/types/dist/sdkinfo.d.ts.map deleted file mode 100644 index cf36226..0000000 --- a/node_modules/@sentry/types/dist/sdkinfo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdkinfo.d.ts","sourceRoot":"","sources":["../src/sdkinfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,YAAY;AACZ,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/sdkinfo.js b/node_modules/@sentry/types/dist/sdkinfo.js deleted file mode 100644 index 34448db..0000000 --- a/node_modules/@sentry/types/dist/sdkinfo.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=sdkinfo.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/sdkinfo.js.map b/node_modules/@sentry/types/dist/sdkinfo.js.map deleted file mode 100644 index 1ebe804..0000000 --- a/node_modules/@sentry/types/dist/sdkinfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdkinfo.js","sourceRoot":"","sources":["../src/sdkinfo.ts"],"names":[],"mappings":"","sourcesContent":["import { Package } from './package';\n\n/** JSDoc */\nexport interface SdkInfo {\n name: string;\n version: string;\n integrations?: string[];\n packages?: Package[];\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/severity.d.ts b/node_modules/@sentry/types/dist/severity.d.ts deleted file mode 100644 index 868d285..0000000 --- a/node_modules/@sentry/types/dist/severity.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** JSDoc */ -export declare enum Severity { - /** JSDoc */ - Fatal = "fatal", - /** JSDoc */ - Error = "error", - /** JSDoc */ - Warning = "warning", - /** JSDoc */ - Log = "log", - /** JSDoc */ - Info = "info", - /** JSDoc */ - Debug = "debug", - /** JSDoc */ - Critical = "critical" -} -export declare namespace Severity { - /** - * Converts a string-based level into a {@link Severity}. - * - * @param level string representation of Severity - * @returns Severity - */ - function fromString(level: string): Severity; -} -//# sourceMappingURL=severity.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/severity.d.ts.map b/node_modules/@sentry/types/dist/severity.d.ts.map deleted file mode 100644 index 5a5fa94..0000000 --- a/node_modules/@sentry/types/dist/severity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../src/severity.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,oBAAY,QAAQ;IAClB,YAAY;IACZ,KAAK,UAAU;IACf,YAAY;IACZ,KAAK,UAAU;IACf,YAAY;IACZ,OAAO,YAAY;IACnB,YAAY;IACZ,GAAG,QAAQ;IACX,YAAY;IACZ,IAAI,SAAS;IACb,YAAY;IACZ,KAAK,UAAU;IACf,YAAY;IACZ,QAAQ,aAAa;CACtB;AAGD,yBAAiB,QAAQ,CAAC;IACxB;;;;;OAKG;IACH,SAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAmBlD;CACF"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/severity.js b/node_modules/@sentry/types/dist/severity.js deleted file mode 100644 index 8ab9f33..0000000 --- a/node_modules/@sentry/types/dist/severity.js +++ /dev/null @@ -1,51 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -/** JSDoc */ -var Severity; -(function (Severity) { - /** JSDoc */ - Severity["Fatal"] = "fatal"; - /** JSDoc */ - Severity["Error"] = "error"; - /** JSDoc */ - Severity["Warning"] = "warning"; - /** JSDoc */ - Severity["Log"] = "log"; - /** JSDoc */ - Severity["Info"] = "info"; - /** JSDoc */ - Severity["Debug"] = "debug"; - /** JSDoc */ - Severity["Critical"] = "critical"; -})(Severity = exports.Severity || (exports.Severity = {})); -// tslint:disable:completed-docs -// tslint:disable:no-unnecessary-qualifier no-namespace -(function (Severity) { - /** - * Converts a string-based level into a {@link Severity}. - * - * @param level string representation of Severity - * @returns Severity - */ - function fromString(level) { - switch (level) { - case 'debug': - return Severity.Debug; - case 'info': - return Severity.Info; - case 'warn': - case 'warning': - return Severity.Warning; - case 'error': - return Severity.Error; - case 'fatal': - return Severity.Fatal; - case 'critical': - return Severity.Critical; - case 'log': - default: - return Severity.Log; - } - } - Severity.fromString = fromString; -})(Severity = exports.Severity || (exports.Severity = {})); -//# sourceMappingURL=severity.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/severity.js.map b/node_modules/@sentry/types/dist/severity.js.map deleted file mode 100644 index 151f2de..0000000 --- a/node_modules/@sentry/types/dist/severity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"severity.js","sourceRoot":"","sources":["../src/severity.ts"],"names":[],"mappings":";AAAA,YAAY;AACZ,IAAY,QAeX;AAfD,WAAY,QAAQ;IAClB,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,+BAAmB,CAAA;IACnB,YAAY;IACZ,uBAAW,CAAA;IACX,YAAY;IACZ,yBAAa,CAAA;IACb,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,iCAAqB,CAAA;AACvB,CAAC,EAfW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAenB;AACD,gCAAgC;AAChC,uDAAuD;AACvD,WAAiB,QAAQ;IACvB;;;;;OAKG;IACH,SAAgB,UAAU,CAAC,KAAa;QACtC,QAAQ,KAAK,EAAE;YACb,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,MAAM;gBACT,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,KAAK,MAAM,CAAC;YACZ,KAAK,SAAS;gBACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC1B,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,UAAU;gBACb,OAAO,QAAQ,CAAC,QAAQ,CAAC;YAC3B,KAAK,KAAK,CAAC;YACX;gBACE,OAAO,QAAQ,CAAC,GAAG,CAAC;SACvB;IACH,CAAC;IAnBe,mBAAU,aAmBzB,CAAA;AACH,CAAC,EA3BgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA2BxB","sourcesContent":["/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/span.d.ts b/node_modules/@sentry/types/dist/span.d.ts deleted file mode 100644 index cd6019c..0000000 --- a/node_modules/@sentry/types/dist/span.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -/** Span holding trace_id, span_id */ -export interface Span { - /** Sets the finish timestamp on the current span and sends it if it was a transaction */ - finish(useLastSpanTimestamp?: boolean): string | undefined; - /** Return a traceparent compatible header string */ - toTraceparent(): string; - /** Convert the object to JSON for w. spans array info only */ - getTraceContext(): object; - /** Convert the object to JSON */ - toJSON(): object; - /** - * Sets the tag attribute on the current span - * @param key Tag key - * @param value Tag value - */ - setTag(key: string, value: string): this; - /** - * Sets the data attribute on the current span - * @param key Data key - * @param value Data value - */ - setData(key: string, value: any): this; - /** - * Sets the status attribute on the current span - * @param status http code used to set the status - */ - setStatus(status: SpanStatus): this; - /** - * Sets the status attribute on the current span based on the http code - * @param httpStatus http code used to set the status - */ - setHttpStatus(httpStatus: number): this; - /** - * Determines whether span was successful (HTTP200) - */ - isSuccess(): boolean; -} -/** Interface holder all properties that can be set on a Span on creation. */ -export interface SpanContext { - /** - * Description of the Span. - */ - description?: string; - /** - * Operation of the Span. - */ - op?: string; - /** - * Completion status of the Span. - */ - status?: SpanStatus; - /** - * Parent Span ID - */ - parentSpanId?: string; - /** - * Has the sampling decision been made? - */ - sampled?: boolean; - /** - * Span ID - */ - spanId?: string; - /** - * Trace ID - */ - traceId?: string; - /** - * Transaction of the Span. - */ - transaction?: string; - /** - * Tags of the Span. - */ - tags?: { - [key: string]: string; - }; - /** - * Data of the Span. - */ - data?: { - [key: string]: any; - }; -} -/** The status of an Span. */ -export declare enum SpanStatus { - /** The operation completed successfully. */ - Ok = "ok", - /** Deadline expired before operation could complete. */ - DeadlineExceeded = "deadline_exceeded", - /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ - Unauthenticated = "unauthenticated", - /** 403 Forbidden */ - PermissionDenied = "permission_denied", - /** 404 Not Found. Some requested entity (file or directory) was not found. */ - NotFound = "not_found", - /** 429 Too Many Requests */ - ResourceExhausted = "resource_exhausted", - /** Client specified an invalid argument. 4xx. */ - InvalidArgument = "invalid_argument", - /** 501 Not Implemented */ - Unimplemented = "unimplemented", - /** 503 Service Unavailable */ - Unavailable = "unavailable", - /** Other/generic 5xx. */ - InternalError = "internal_error", - /** Unknown. Any non-standard HTTP status code. */ - UnknownError = "unknown_error", - /** The operation was cancelled (typically by the user). */ - Cancelled = "cancelled", - /** Already exists (409) */ - AlreadyExists = "already_exists", - /** Operation was rejected because the system is not in a state required for the operation's */ - FailedPrecondition = "failed_precondition", - /** The operation was aborted, typically due to a concurrency issue. */ - Aborted = "aborted", - /** Operation was attempted past the valid range. */ - OutOfRange = "out_of_range", - /** Unrecoverable data loss or corruption */ - DataLoss = "data_loss" -} -export declare namespace SpanStatus { - /** - * Converts a HTTP status code into a {@link SpanStatus}. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or {@link SpanStatus.UnknownError}. - */ - function fromHttpCode(httpStatus: number): SpanStatus; -} -//# sourceMappingURL=span.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/span.d.ts.map b/node_modules/@sentry/types/dist/span.d.ts.map deleted file mode 100644 index de43cf2..0000000 --- a/node_modules/@sentry/types/dist/span.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,MAAM,WAAW,IAAI;IACnB,yFAAyF;IACzF,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3D,oDAAoD;IACpD,aAAa,IAAI,MAAM,CAAC;IACxB,8DAA8D;IAC9D,eAAe,IAAI,MAAM,CAAC;IAC1B,iCAAiC;IACjC,MAAM,IAAI,MAAM,CAAC;IAEjB;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC;CACtB;AAED,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEjC;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC/B;AAED,6BAA6B;AAC7B,oBAAY,UAAU;IACpB,4CAA4C;IAC5C,EAAE,OAAO;IACT,wDAAwD;IACxD,gBAAgB,sBAAsB;IACtC,kFAAkF;IAClF,eAAe,oBAAoB;IACnC,oBAAoB;IACpB,gBAAgB,sBAAsB;IACtC,8EAA8E;IAC9E,QAAQ,cAAc;IACtB,4BAA4B;IAC5B,iBAAiB,uBAAuB;IACxC,iDAAiD;IACjD,eAAe,qBAAqB;IACpC,0BAA0B;IAC1B,aAAa,kBAAkB;IAC/B,8BAA8B;IAC9B,WAAW,gBAAgB;IAC3B,yBAAyB;IACzB,aAAa,mBAAmB;IAChC,kDAAkD;IAClD,YAAY,kBAAkB;IAC9B,2DAA2D;IAC3D,SAAS,cAAc;IACvB,2BAA2B;IAC3B,aAAa,mBAAmB;IAChC,+FAA+F;IAC/F,kBAAkB,wBAAwB;IAC1C,uEAAuE;IACvE,OAAO,YAAY;IACnB,oDAAoD;IACpD,UAAU,iBAAiB;IAC3B,4CAA4C;IAC5C,QAAQ,cAAc;CACvB;AAGD,yBAAiB,UAAU,CAAC;IAC1B;;;;;OAKG;IAEH,SAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAsC3D;CACF"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/span.js b/node_modules/@sentry/types/dist/span.js deleted file mode 100644 index 0562355..0000000 --- a/node_modules/@sentry/types/dist/span.js +++ /dev/null @@ -1,87 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -/** The status of an Span. */ -var SpanStatus; -(function (SpanStatus) { - /** The operation completed successfully. */ - SpanStatus["Ok"] = "ok"; - /** Deadline expired before operation could complete. */ - SpanStatus["DeadlineExceeded"] = "deadline_exceeded"; - /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ - SpanStatus["Unauthenticated"] = "unauthenticated"; - /** 403 Forbidden */ - SpanStatus["PermissionDenied"] = "permission_denied"; - /** 404 Not Found. Some requested entity (file or directory) was not found. */ - SpanStatus["NotFound"] = "not_found"; - /** 429 Too Many Requests */ - SpanStatus["ResourceExhausted"] = "resource_exhausted"; - /** Client specified an invalid argument. 4xx. */ - SpanStatus["InvalidArgument"] = "invalid_argument"; - /** 501 Not Implemented */ - SpanStatus["Unimplemented"] = "unimplemented"; - /** 503 Service Unavailable */ - SpanStatus["Unavailable"] = "unavailable"; - /** Other/generic 5xx. */ - SpanStatus["InternalError"] = "internal_error"; - /** Unknown. Any non-standard HTTP status code. */ - SpanStatus["UnknownError"] = "unknown_error"; - /** The operation was cancelled (typically by the user). */ - SpanStatus["Cancelled"] = "cancelled"; - /** Already exists (409) */ - SpanStatus["AlreadyExists"] = "already_exists"; - /** Operation was rejected because the system is not in a state required for the operation's */ - SpanStatus["FailedPrecondition"] = "failed_precondition"; - /** The operation was aborted, typically due to a concurrency issue. */ - SpanStatus["Aborted"] = "aborted"; - /** Operation was attempted past the valid range. */ - SpanStatus["OutOfRange"] = "out_of_range"; - /** Unrecoverable data loss or corruption */ - SpanStatus["DataLoss"] = "data_loss"; -})(SpanStatus = exports.SpanStatus || (exports.SpanStatus = {})); -// tslint:disable:no-unnecessary-qualifier no-namespace -(function (SpanStatus) { - /** - * Converts a HTTP status code into a {@link SpanStatus}. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or {@link SpanStatus.UnknownError}. - */ - // tslint:disable-next-line:completed-docs - function fromHttpCode(httpStatus) { - if (httpStatus < 400) { - return SpanStatus.Ok; - } - if (httpStatus >= 400 && httpStatus < 500) { - switch (httpStatus) { - case 401: - return SpanStatus.Unauthenticated; - case 403: - return SpanStatus.PermissionDenied; - case 404: - return SpanStatus.NotFound; - case 409: - return SpanStatus.AlreadyExists; - case 413: - return SpanStatus.FailedPrecondition; - case 429: - return SpanStatus.ResourceExhausted; - default: - return SpanStatus.InvalidArgument; - } - } - if (httpStatus >= 500 && httpStatus < 600) { - switch (httpStatus) { - case 501: - return SpanStatus.Unimplemented; - case 503: - return SpanStatus.Unavailable; - case 504: - return SpanStatus.DeadlineExceeded; - default: - return SpanStatus.InternalError; - } - } - return SpanStatus.UnknownError; - } - SpanStatus.fromHttpCode = fromHttpCode; -})(SpanStatus = exports.SpanStatus || (exports.SpanStatus = {})); -//# sourceMappingURL=span.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/span.js.map b/node_modules/@sentry/types/dist/span.js.map deleted file mode 100644 index 1bd2710..0000000 --- a/node_modules/@sentry/types/dist/span.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":";AAwFA,6BAA6B;AAC7B,IAAY,UAmCX;AAnCD,WAAY,UAAU;IACpB,4CAA4C;IAC5C,uBAAS,CAAA;IACT,wDAAwD;IACxD,oDAAsC,CAAA;IACtC,kFAAkF;IAClF,iDAAmC,CAAA;IACnC,oBAAoB;IACpB,oDAAsC,CAAA;IACtC,8EAA8E;IAC9E,oCAAsB,CAAA;IACtB,4BAA4B;IAC5B,sDAAwC,CAAA;IACxC,iDAAiD;IACjD,kDAAoC,CAAA;IACpC,0BAA0B;IAC1B,6CAA+B,CAAA;IAC/B,8BAA8B;IAC9B,yCAA2B,CAAA;IAC3B,yBAAyB;IACzB,8CAAgC,CAAA;IAChC,kDAAkD;IAClD,4CAA8B,CAAA;IAC9B,2DAA2D;IAC3D,qCAAuB,CAAA;IACvB,2BAA2B;IAC3B,8CAAgC,CAAA;IAChC,+FAA+F;IAC/F,wDAA0C,CAAA;IAC1C,uEAAuE;IACvE,iCAAmB,CAAA;IACnB,oDAAoD;I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trace_id, span_id */\nexport interface Span {\n /** Sets the finish timestamp on the current span and sends it if it was a transaction */\n finish(useLastSpanTimestamp?: boolean): string | undefined;\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): object;\n /** Convert the object to JSON */\n toJSON(): object;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * @param status http code used to set the status\n */\n setStatus(status: SpanStatus): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n}\n\n/** Interface holder all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n /**\n * Operation of the Span.\n */\n op?: string;\n /**\n * Completion status of the Span.\n */\n status?: SpanStatus;\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n /**\n * Has the sampling decision been made?\n */\n sampled?: boolean;\n /**\n * Span ID\n */\n spanId?: string;\n /**\n * Trace ID\n */\n traceId?: string;\n /**\n * Transaction of the Span.\n */\n transaction?: string;\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n}\n\n/** The status of an Span. */\nexport enum SpanStatus {\n /** The operation completed successfully. */\n Ok = 'ok',\n /** Deadline expired before operation could complete. */\n DeadlineExceeded = 'deadline_exceeded',\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n Unauthenticated = 'unauthenticated',\n /** 403 Forbidden */\n PermissionDenied = 'permission_denied',\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n NotFound = 'not_found',\n /** 429 Too Many Requests */\n ResourceExhausted = 'resource_exhausted',\n /** Client specified an invalid argument. 4xx. */\n InvalidArgument = 'invalid_argument',\n /** 501 Not Implemented */\n Unimplemented = 'unimplemented',\n /** 503 Service Unavailable */\n Unavailable = 'unavailable',\n /** Other/generic 5xx. */\n InternalError = 'internal_error',\n /** Unknown. Any non-standard HTTP status code. */\n UnknownError = 'unknown_error',\n /** The operation was cancelled (typically by the user). */\n Cancelled = 'cancelled',\n /** Already exists (409) */\n AlreadyExists = 'already_exists',\n /** Operation was rejected because the system is not in a state required for the operation's */\n FailedPrecondition = 'failed_precondition',\n /** The operation was aborted, typically due to a concurrency issue. */\n Aborted = 'aborted',\n /** Operation was attempted past the valid range. */\n OutOfRange = 'out_of_range',\n /** Unrecoverable data loss or corruption */\n DataLoss = 'data_loss',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace SpanStatus {\n /**\n * Converts a HTTP status code into a {@link SpanStatus}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or {@link SpanStatus.UnknownError}.\n */\n // tslint:disable-next-line:completed-docs\n export function fromHttpCode(httpStatus: number): SpanStatus {\n if (httpStatus < 400) {\n return SpanStatus.Ok;\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return SpanStatus.Unauthenticated;\n case 403:\n return SpanStatus.PermissionDenied;\n case 404:\n return SpanStatus.NotFound;\n case 409:\n return SpanStatus.AlreadyExists;\n case 413:\n return SpanStatus.FailedPrecondition;\n case 429:\n return SpanStatus.ResourceExhausted;\n default:\n return SpanStatus.InvalidArgument;\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return SpanStatus.Unimplemented;\n case 503:\n return SpanStatus.Unavailable;\n case 504:\n return SpanStatus.DeadlineExceeded;\n default:\n return SpanStatus.InternalError;\n }\n }\n\n return SpanStatus.UnknownError;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/stackframe.d.ts b/node_modules/@sentry/types/dist/stackframe.d.ts deleted file mode 100644 index e148f48..0000000 --- a/node_modules/@sentry/types/dist/stackframe.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** JSDoc */ -export interface StackFrame { - filename?: string; - function?: string; - module?: string; - platform?: string; - lineno?: number; - colno?: number; - abs_path?: string; - context_line?: string; - pre_context?: string[]; - post_context?: string[]; - in_app?: boolean; - vars?: { - [key: string]: any; - }; -} -//# sourceMappingURL=stackframe.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/stackframe.d.ts.map b/node_modules/@sentry/types/dist/stackframe.d.ts.map deleted file mode 100644 index 8f45c69..0000000 --- a/node_modules/@sentry/types/dist/stackframe.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stackframe.d.ts","sourceRoot":"","sources":["../src/stackframe.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC/B"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/stackframe.js b/node_modules/@sentry/types/dist/stackframe.js deleted file mode 100644 index 85dd696..0000000 --- a/node_modules/@sentry/types/dist/stackframe.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=stackframe.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/stackframe.js.map b/node_modules/@sentry/types/dist/stackframe.js.map deleted file mode 100644 index c654646..0000000 --- a/node_modules/@sentry/types/dist/stackframe.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stackframe.js","sourceRoot":"","sources":["../src/stackframe.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface StackFrame {\n filename?: string;\n function?: string;\n module?: string;\n platform?: string;\n lineno?: number;\n colno?: number;\n abs_path?: string;\n context_line?: string;\n pre_context?: string[];\n post_context?: string[];\n in_app?: boolean;\n vars?: { [key: string]: any };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/stacktrace.d.ts b/node_modules/@sentry/types/dist/stacktrace.d.ts deleted file mode 100644 index b2cc3b4..0000000 --- a/node_modules/@sentry/types/dist/stacktrace.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { StackFrame } from './stackframe'; -/** JSDoc */ -export interface Stacktrace { - frames?: StackFrame[]; - frames_omitted?: [number, number]; -} -//# sourceMappingURL=stacktrace.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/stacktrace.d.ts.map b/node_modules/@sentry/types/dist/stacktrace.d.ts.map deleted file mode 100644 index efa7c3f..0000000 --- a/node_modules/@sentry/types/dist/stacktrace.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/stacktrace.js b/node_modules/@sentry/types/dist/stacktrace.js deleted file mode 100644 index b5d5e52..0000000 --- a/node_modules/@sentry/types/dist/stacktrace.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=stacktrace.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/stacktrace.js.map b/node_modules/@sentry/types/dist/stacktrace.js.map deleted file mode 100644 index 11a62ec..0000000 --- a/node_modules/@sentry/types/dist/stacktrace.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stacktrace.js","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"","sourcesContent":["import { StackFrame } from './stackframe';\n\n/** JSDoc */\nexport interface Stacktrace {\n frames?: StackFrame[];\n frames_omitted?: [number, number];\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/status.d.ts b/node_modules/@sentry/types/dist/status.d.ts deleted file mode 100644 index 6360b35..0000000 --- a/node_modules/@sentry/types/dist/status.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** The status of an event. */ -export declare enum Status { - /** The status could not be determined. */ - Unknown = "unknown", - /** The event was skipped due to configuration or callbacks. */ - Skipped = "skipped", - /** The event was sent to Sentry successfully. */ - Success = "success", - /** The client is currently rate limited and will try again later. */ - RateLimit = "rate_limit", - /** The event could not be processed. */ - Invalid = "invalid", - /** A server-side error ocurred during submission. */ - Failed = "failed" -} -export declare namespace Status { - /** - * Converts a HTTP status code into a {@link Status}. - * - * @param code The HTTP response status code. - * @returns The send status or {@link Status.Unknown}. - */ - function fromHttpCode(code: number): Status; -} -//# sourceMappingURL=status.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/status.d.ts.map b/node_modules/@sentry/types/dist/status.d.ts.map deleted file mode 100644 index ae65e0d..0000000 --- a/node_modules/@sentry/types/dist/status.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,oBAAY,MAAM;IAChB,0CAA0C;IAC1C,OAAO,YAAY;IACnB,+DAA+D;IAC/D,OAAO,YAAY;IACnB,iDAAiD;IACjD,OAAO,YAAY;IACnB,qEAAqE;IACrE,SAAS,eAAe;IACxB,wCAAwC;IACxC,OAAO,YAAY;IACnB,qDAAqD;IACrD,MAAM,WAAW;CAClB;AAGD,yBAAiB,MAAM,CAAC;IACtB;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkBjD;CACF"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/status.js b/node_modules/@sentry/types/dist/status.js deleted file mode 100644 index e6b4acd..0000000 --- a/node_modules/@sentry/types/dist/status.js +++ /dev/null @@ -1,44 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -/** The status of an event. */ -var Status; -(function (Status) { - /** The status could not be determined. */ - Status["Unknown"] = "unknown"; - /** The event was skipped due to configuration or callbacks. */ - Status["Skipped"] = "skipped"; - /** The event was sent to Sentry successfully. */ - Status["Success"] = "success"; - /** The client is currently rate limited and will try again later. */ - Status["RateLimit"] = "rate_limit"; - /** The event could not be processed. */ - Status["Invalid"] = "invalid"; - /** A server-side error ocurred during submission. */ - Status["Failed"] = "failed"; -})(Status = exports.Status || (exports.Status = {})); -// tslint:disable:completed-docs -// tslint:disable:no-unnecessary-qualifier no-namespace -(function (Status) { - /** - * Converts a HTTP status code into a {@link Status}. - * - * @param code The HTTP response status code. - * @returns The send status or {@link Status.Unknown}. - */ - function fromHttpCode(code) { - if (code >= 200 && code < 300) { - return Status.Success; - } - if (code === 429) { - return Status.RateLimit; - } - if (code >= 400 && code < 500) { - return Status.Invalid; - } - if (code >= 500) { - return Status.Failed; - } - return Status.Unknown; - } - Status.fromHttpCode = fromHttpCode; -})(Status = exports.Status || (exports.Status = {})); -//# sourceMappingURL=status.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/status.js.map b/node_modules/@sentry/types/dist/status.js.map deleted file mode 100644 index fdbeb94..0000000 --- a/node_modules/@sentry/types/dist/status.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,0CAA0C;IAC1C,6BAAmB,CAAA;IACnB,+DAA+D;IAC/D,6BAAmB,CAAA;IACnB,iDAAiD;IACjD,6BAAmB,CAAA;IACnB,qEAAqE;IACrE,kCAAwB,CAAA;IACxB,wCAAwC;IACxC,6BAAmB,CAAA;IACnB,qDAAqD;IACrD,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,GAAN,cAAM,KAAN,cAAM,QAajB;AACD,gCAAgC;AAChC,uDAAuD;AACvD,WAAiB,MAAM;IACrB;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,IAAY;QACvC,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,KAAK,GAAG,EAAE;YAChB,OAAO,MAAM,CAAC,SAAS,CAAC;SACzB;QAED,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,IAAI,GAAG,EAAE;YACf,OAAO,MAAM,CAAC,MAAM,CAAC;SACtB;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAlBe,mBAAY,eAkB3B,CAAA;AACH,CAAC,EA1BgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA0BtB","sourcesContent":["/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/thread.d.ts b/node_modules/@sentry/types/dist/thread.d.ts deleted file mode 100644 index f5edc35..0000000 --- a/node_modules/@sentry/types/dist/thread.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Stacktrace } from './stacktrace'; -/** JSDoc */ -export interface Thread { - id?: number; - name?: string; - stacktrace?: Stacktrace; - crashed?: boolean; - current?: boolean; -} -//# sourceMappingURL=thread.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/thread.d.ts.map b/node_modules/@sentry/types/dist/thread.d.ts.map deleted file mode 100644 index dd8b77d..0000000 --- a/node_modules/@sentry/types/dist/thread.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../src/thread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY;AACZ,MAAM,WAAW,MAAM;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/thread.js b/node_modules/@sentry/types/dist/thread.js deleted file mode 100644 index 3ed8361..0000000 --- a/node_modules/@sentry/types/dist/thread.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=thread.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/thread.js.map b/node_modules/@sentry/types/dist/thread.js.map deleted file mode 100644 index d7cc09a..0000000 --- a/node_modules/@sentry/types/dist/thread.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"thread.js","sourceRoot":"","sources":["../src/thread.ts"],"names":[],"mappings":"","sourcesContent":["import { Stacktrace } from './stacktrace';\n\n/** JSDoc */\nexport interface Thread {\n id?: number;\n name?: string;\n stacktrace?: Stacktrace;\n crashed?: boolean;\n current?: boolean;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/transport.d.ts b/node_modules/@sentry/types/dist/transport.d.ts deleted file mode 100644 index 654c4fc..0000000 --- a/node_modules/@sentry/types/dist/transport.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { DsnLike } from './dsn'; -import { Event } from './event'; -import { Response } from './response'; -/** Transport used sending data to Sentry */ -export interface Transport { - /** - * Sends the body to the Store endpoint in Sentry. - * - * @param body String body that should be sent to Sentry. - */ - sendEvent(event: Event): PromiseLike; - /** - * Call this function to wait until all pending requests have been sent. - * - * @param timeout Number time in ms to wait until the buffer is drained. - */ - close(timeout?: number): PromiseLike; -} -/** JSDoc */ -export declare type TransportClass = new (options: TransportOptions) => T; -/** JSDoc */ -export interface TransportOptions { - /** Sentry DSN */ - dsn: DsnLike; - /** Define custom headers */ - headers?: { - [key: string]: string; - }; - /** Set a HTTP proxy that should be used for outbound requests. */ - httpProxy?: string; - /** Set a HTTPS proxy that should be used for outbound requests. */ - httpsProxy?: string; - /** HTTPS proxy certificates path */ - caCerts?: string; -} -//# sourceMappingURL=transport.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/transport.d.ts.map b/node_modules/@sentry/types/dist/transport.d.ts.map deleted file mode 100644 index 33cb2a2..0000000 --- a/node_modules/@sentry/types/dist/transport.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE/C;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,YAAY;AACZ,oBAAY,cAAc,CAAC,CAAC,SAAS,SAAS,IAAI,KAAK,OAAO,EAAE,gBAAgB,KAAK,CAAC,CAAC;AAEvF,YAAY;AACZ,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,4BAA4B;IAC5B,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/transport.js b/node_modules/@sentry/types/dist/transport.js deleted file mode 100644 index ff686ae..0000000 --- a/node_modules/@sentry/types/dist/transport.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=transport.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/transport.js.map b/node_modules/@sentry/types/dist/transport.js.map deleted file mode 100644 index 38630da..0000000 --- a/node_modules/@sentry/types/dist/transport.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"","sourcesContent":["import { DsnLike } from './dsn';\nimport { Event } from './event';\nimport { Response } from './response';\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the body to the Store endpoint in Sentry.\n *\n * @param body String body that should be sent to Sentry.\n */\n sendEvent(event: Event): PromiseLike;\n\n /**\n * Call this function to wait until all pending requests have been sent.\n *\n * @param timeout Number time in ms to wait until the buffer is drained.\n */\n close(timeout?: number): PromiseLike;\n}\n\n/** JSDoc */\nexport type TransportClass = new (options: TransportOptions) => T;\n\n/** JSDoc */\nexport interface TransportOptions {\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: { [key: string]: string };\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/user.d.ts b/node_modules/@sentry/types/dist/user.d.ts deleted file mode 100644 index 2f24df3..0000000 --- a/node_modules/@sentry/types/dist/user.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** JSDoc */ -export interface User { - [key: string]: any; - id?: string; - ip_address?: string; - email?: string; - username?: string; -} -//# sourceMappingURL=user.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/user.d.ts.map b/node_modules/@sentry/types/dist/user.d.ts.map deleted file mode 100644 index 6f833ed..0000000 --- a/node_modules/@sentry/types/dist/user.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,IAAI;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/user.js b/node_modules/@sentry/types/dist/user.js deleted file mode 100644 index a756c8d..0000000 --- a/node_modules/@sentry/types/dist/user.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=user.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/user.js.map b/node_modules/@sentry/types/dist/user.js.map deleted file mode 100644 index c7e4a43..0000000 --- a/node_modules/@sentry/types/dist/user.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"user.js","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface User {\n [key: string]: any;\n id?: string;\n ip_address?: string;\n email?: string;\n username?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/wrappedfunction.d.ts b/node_modules/@sentry/types/dist/wrappedfunction.d.ts deleted file mode 100644 index 1ca8016..0000000 --- a/node_modules/@sentry/types/dist/wrappedfunction.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** JSDoc */ -export interface WrappedFunction extends Function { - [key: string]: any; - __sentry__?: boolean; - __sentry_wrapped__?: WrappedFunction; - __sentry_original__?: WrappedFunction; -} -//# sourceMappingURL=wrappedfunction.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/wrappedfunction.d.ts.map b/node_modules/@sentry/types/dist/wrappedfunction.d.ts.map deleted file mode 100644 index aa35c95..0000000 --- a/node_modules/@sentry/types/dist/wrappedfunction.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wrappedfunction.d.ts","sourceRoot":"","sources":["../src/wrappedfunction.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,eAAe,CAAC;IACrC,mBAAmB,CAAC,EAAE,eAAe,CAAC;CACvC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/wrappedfunction.js b/node_modules/@sentry/types/dist/wrappedfunction.js deleted file mode 100644 index d1941b3..0000000 --- a/node_modules/@sentry/types/dist/wrappedfunction.js +++ /dev/null @@ -1,2 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=wrappedfunction.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/dist/wrappedfunction.js.map b/node_modules/@sentry/types/dist/wrappedfunction.js.map deleted file mode 100644 index 6d7147b..0000000 --- a/node_modules/@sentry/types/dist/wrappedfunction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wrappedfunction.js","sourceRoot":"","sources":["../src/wrappedfunction.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface WrappedFunction extends Function {\n [key: string]: any;\n __sentry__?: boolean;\n __sentry_wrapped__?: WrappedFunction;\n __sentry_original__?: WrappedFunction;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/breadcrumb.d.ts b/node_modules/@sentry/types/esm/breadcrumb.d.ts deleted file mode 100644 index 23b1357..0000000 --- a/node_modules/@sentry/types/esm/breadcrumb.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Severity } from './severity'; -/** JSDoc */ -export interface Breadcrumb { - type?: string; - level?: Severity; - event_id?: string; - category?: string; - message?: string; - data?: { - [key: string]: any; - }; - timestamp?: number; -} -/** JSDoc */ -export interface BreadcrumbHint { - [key: string]: any; -} -//# sourceMappingURL=breadcrumb.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/breadcrumb.d.ts.map b/node_modules/@sentry/types/esm/breadcrumb.d.ts.map deleted file mode 100644 index 5fac027..0000000 --- a/node_modules/@sentry/types/esm/breadcrumb.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../src/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,YAAY;AACZ,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/breadcrumb.js b/node_modules/@sentry/types/esm/breadcrumb.js deleted file mode 100644 index f750e73..0000000 --- a/node_modules/@sentry/types/esm/breadcrumb.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=breadcrumb.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/breadcrumb.js.map b/node_modules/@sentry/types/esm/breadcrumb.js.map deleted file mode 100644 index 7a7e0e1..0000000 --- a/node_modules/@sentry/types/esm/breadcrumb.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../src/breadcrumb.ts"],"names":[],"mappings":"","sourcesContent":["import { Severity } from './severity';\n\n/** JSDoc */\nexport interface Breadcrumb {\n type?: string;\n level?: Severity;\n event_id?: string;\n category?: string;\n message?: string;\n data?: { [key: string]: any };\n timestamp?: number;\n}\n\n/** JSDoc */\nexport interface BreadcrumbHint {\n [key: string]: any;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/client.d.ts b/node_modules/@sentry/types/esm/client.d.ts deleted file mode 100644 index 400ca05..0000000 --- a/node_modules/@sentry/types/esm/client.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Dsn } from './dsn'; -import { Event, EventHint } from './event'; -import { Integration, IntegrationClass } from './integration'; -import { Options } from './options'; -import { Scope } from './scope'; -import { Severity } from './severity'; -/** - * User-Facing Sentry SDK Client. - * - * This interface contains all methods to interface with the SDK once it has - * been installed. It allows to send events to Sentry, record breadcrumbs and - * set a context included in every event. Since the SDK mutates its environment, - * there will only be one instance during runtime. - * - */ -export interface Client { - /** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @param hint May contain additional information about the original exception. - * @param scope An optional scope containing event metadata. - * @returns The event id - */ - captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined; - /** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @param hint May contain additional information about the original exception. - * @param scope An optional scope containing event metadata. - * @returns The event id - */ - captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined; - /** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @param hint May contain additional information about the original exception. - * @param scope An optional scope containing event metadata. - * @returns The event id - */ - captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined; - /** Returns the current Dsn. */ - getDsn(): Dsn | undefined; - /** Returns the current options. */ - getOptions(): O; - /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ - close(timeout?: number): PromiseLike; - /** - * A promise that resolves when all current events have been sent. - * If you provide a timeout and the queue takes longer to drain the promise returns false. - * - * @param timeout Maximum time in ms the client should wait. - */ - flush(timeout?: number): PromiseLike; - /** Returns an array of installed integrations on the client. */ - getIntegration(integartion: IntegrationClass): T | null; -} -//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/client.d.ts.map b/node_modules/@sentry/types/esm/client.d.ts.map deleted file mode 100644 index 98d9c68..0000000 --- a/node_modules/@sentry/types/esm/client.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IACjD;;;;;;;OAOG;IACH,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEtF;;;;;;;;OAQG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEvG;;;;;;;OAOG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEhF,+BAA+B;IAC/B,MAAM,IAAI,GAAG,GAAG,SAAS,CAAC;IAE1B,mCAAmC;IACnC,UAAU,IAAI,CAAC,CAAC;IAEhB;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C,gEAAgE;IAChE,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACnF"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/client.js b/node_modules/@sentry/types/esm/client.js deleted file mode 100644 index d58c584..0000000 --- a/node_modules/@sentry/types/esm/client.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/client.js.map b/node_modules/@sentry/types/esm/client.js.map deleted file mode 100644 index 5868813..0000000 --- a/node_modules/@sentry/types/esm/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"","sourcesContent":["import { Dsn } from './dsn';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Options } from './options';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\n\n/**\n * User-Facing Sentry SDK Client.\n *\n * This interface contains all methods to interface with the SDK once it has\n * been installed. It allows to send events to Sentry, record breadcrumbs and\n * set a context included in every event. Since the SDK mutates its environment,\n * there will only be one instance during runtime.\n *\n */\nexport interface Client {\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;\n\n /** Returns the current Dsn. */\n getDsn(): Dsn | undefined;\n\n /** Returns the current options. */\n getOptions(): O;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n close(timeout?: number): PromiseLike;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n flush(timeout?: number): PromiseLike;\n\n /** Returns an array of installed integrations on the client. */\n getIntegration(integartion: IntegrationClass): T | null;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/dsn.d.ts b/node_modules/@sentry/types/esm/dsn.d.ts deleted file mode 100644 index ae5b8fe..0000000 --- a/node_modules/@sentry/types/esm/dsn.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** Supported Sentry transport protocols in a Dsn. */ -export declare type DsnProtocol = 'http' | 'https'; -/** Primitive components of a Dsn. */ -export interface DsnComponents { - /** Protocol used to connect to Sentry. */ - protocol: DsnProtocol; - /** Public authorization key. */ - user: string; - /** private _authorization key (deprecated, optional). */ - pass?: string; - /** Hostname of the Sentry instance. */ - host: string; - /** Port of the Sentry instance. */ - port?: string; - /** Sub path/ */ - path?: string; - /** Project ID */ - projectId: string; -} -/** Anything that can be parsed into a Dsn. */ -export declare type DsnLike = string | DsnComponents; -/** The Sentry Dsn, identifying a Sentry instance and project. */ -export interface Dsn extends DsnComponents { - /** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private _representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ - toString(withPassword: boolean): string; -} -//# sourceMappingURL=dsn.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/dsn.d.ts.map b/node_modules/@sentry/types/esm/dsn.d.ts.map deleted file mode 100644 index 0c6f538..0000000 --- a/node_modules/@sentry/types/esm/dsn.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,oBAAY,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3C,qCAAqC;AACrC,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,QAAQ,EAAE,WAAW,CAAC;IACtB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,8CAA8C;AAC9C,oBAAY,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;AAE7C,iEAAiE;AACjE,MAAM,WAAW,GAAI,SAAQ,aAAa;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,CAAC;CACzC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/dsn.js b/node_modules/@sentry/types/esm/dsn.js deleted file mode 100644 index e54d61d..0000000 --- a/node_modules/@sentry/types/esm/dsn.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=dsn.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/dsn.js.map b/node_modules/@sentry/types/esm/dsn.js.map deleted file mode 100644 index 10f679d..0000000 --- a/node_modules/@sentry/types/esm/dsn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key. */\n user: string;\n /** private _authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport interface Dsn extends DsnComponents {\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n toString(withPassword: boolean): string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/error.d.ts b/node_modules/@sentry/types/esm/error.d.ts deleted file mode 100644 index c213b07..0000000 --- a/node_modules/@sentry/types/esm/error.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Just an Error object with arbitrary attributes attached to it. - */ -export interface ExtendedError extends Error { - [key: string]: any; -} -//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/error.d.ts.map b/node_modules/@sentry/types/esm/error.d.ts.map deleted file mode 100644 index 81a7b2a..0000000 --- a/node_modules/@sentry/types/esm/error.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/error.js b/node_modules/@sentry/types/esm/error.js deleted file mode 100644 index 2677915..0000000 --- a/node_modules/@sentry/types/esm/error.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/error.js.map b/node_modules/@sentry/types/esm/error.js.map deleted file mode 100644 index 3d6064c..0000000 --- a/node_modules/@sentry/types/esm/error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Just an Error object with arbitrary attributes attached to it.\n */\nexport interface ExtendedError extends Error {\n [key: string]: any;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/event.d.ts b/node_modules/@sentry/types/esm/event.d.ts deleted file mode 100644 index 1dd2645..0000000 --- a/node_modules/@sentry/types/esm/event.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Breadcrumb } from './breadcrumb'; -import { Exception } from './exception'; -import { Request } from './request'; -import { SdkInfo } from './sdkinfo'; -import { Severity } from './severity'; -import { Span } from './span'; -import { Stacktrace } from './stacktrace'; -import { User } from './user'; -/** JSDoc */ -export interface Event { - event_id?: string; - message?: string; - timestamp?: number; - start_timestamp?: number; - level?: Severity; - platform?: string; - logger?: string; - server_name?: string; - release?: string; - dist?: string; - environment?: string; - sdk?: SdkInfo; - request?: Request; - transaction?: string; - modules?: { - [key: string]: string; - }; - fingerprint?: string[]; - exception?: { - values?: Exception[]; - }; - stacktrace?: Stacktrace; - breadcrumbs?: Breadcrumb[]; - contexts?: { - [key: string]: object; - }; - tags?: { - [key: string]: string; - }; - extra?: { - [key: string]: any; - }; - user?: User; - type?: EventType; - spans?: Span[]; -} -/** JSDoc */ -export declare type EventType = 'transaction'; -/** JSDoc */ -export interface EventHint { - event_id?: string; - syntheticException?: Error | null; - originalException?: Error | string | null; - data?: any; -} -//# sourceMappingURL=event.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/event.d.ts.map b/node_modules/@sentry/types/esm/event.d.ts.map deleted file mode 100644 index fedf182..0000000 --- a/node_modules/@sentry/types/esm/event.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,YAAY;AACZ,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE;QACV,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;KACtB,CAAC;IACF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACrC,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB;AAED,YAAY;AACZ,oBAAY,SAAS,GAAG,aAAa,CAAC;AAEtC,YAAY;AACZ,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAClC,iBAAiB,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/event.js b/node_modules/@sentry/types/esm/event.js deleted file mode 100644 index 77ea486..0000000 --- a/node_modules/@sentry/types/esm/event.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=event.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/event.js.map b/node_modules/@sentry/types/esm/event.js.map deleted file mode 100644 index d1642ad..0000000 --- a/node_modules/@sentry/types/esm/event.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Exception } from './exception';\nimport { Request } from './request';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n start_timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: { [key: string]: object };\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n user?: User;\n type?: EventType;\n spans?: Span[];\n}\n\n/** JSDoc */\nexport type EventType = 'transaction';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n syntheticException?: Error | null;\n originalException?: Error | string | null;\n data?: any;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/eventprocessor.d.ts b/node_modules/@sentry/types/esm/eventprocessor.d.ts deleted file mode 100644 index 06cfda5..0000000 --- a/node_modules/@sentry/types/esm/eventprocessor.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Event, EventHint } from './event'; -/** - * Event processors are used to change the event before it will be send. - * We strongly advise to make this function sync. - * Returning a PromiseLike will work just fine, but better be sure that you know what you are doing. - * Event processing will be deferred until your Promise is resolved. - */ -export declare type EventProcessor = (event: Event, hint?: EventHint) => PromiseLike | Event | null; -//# sourceMappingURL=eventprocessor.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/eventprocessor.d.ts.map b/node_modules/@sentry/types/esm/eventprocessor.d.ts.map deleted file mode 100644 index d8f5371..0000000 --- a/node_modules/@sentry/types/esm/eventprocessor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventprocessor.d.ts","sourceRoot":"","sources":["../src/eventprocessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;GAKG;AACH,oBAAY,cAAc,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/eventprocessor.js b/node_modules/@sentry/types/esm/eventprocessor.js deleted file mode 100644 index 4a5555e..0000000 --- a/node_modules/@sentry/types/esm/eventprocessor.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=eventprocessor.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/eventprocessor.js.map b/node_modules/@sentry/types/esm/eventprocessor.js.map deleted file mode 100644 index b13cbc6..0000000 --- a/node_modules/@sentry/types/esm/eventprocessor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventprocessor.js","sourceRoot":"","sources":["../src/eventprocessor.ts"],"names":[],"mappings":"","sourcesContent":["import { Event, EventHint } from './event';\n\n/**\n * Event processors are used to change the event before it will be send.\n * We strongly advise to make this function sync.\n * Returning a PromiseLike will work just fine, but better be sure that you know what you are doing.\n * Event processing will be deferred until your Promise is resolved.\n */\nexport type EventProcessor = (event: Event, hint?: EventHint) => PromiseLike | Event | null;\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/exception.d.ts b/node_modules/@sentry/types/esm/exception.d.ts deleted file mode 100644 index 3a16b7f..0000000 --- a/node_modules/@sentry/types/esm/exception.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Mechanism } from './mechanism'; -import { Stacktrace } from './stacktrace'; -/** JSDoc */ -export interface Exception { - type?: string; - value?: string; - mechanism?: Mechanism; - module?: string; - thread_id?: number; - stacktrace?: Stacktrace; -} -//# sourceMappingURL=exception.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/exception.d.ts.map b/node_modules/@sentry/types/esm/exception.d.ts.map deleted file mode 100644 index f6f55c2..0000000 --- a/node_modules/@sentry/types/esm/exception.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exception.d.ts","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY;AACZ,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/exception.js b/node_modules/@sentry/types/esm/exception.js deleted file mode 100644 index 9a7caaf..0000000 --- a/node_modules/@sentry/types/esm/exception.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=exception.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/exception.js.map b/node_modules/@sentry/types/esm/exception.js.map deleted file mode 100644 index 3ab750e..0000000 --- a/node_modules/@sentry/types/esm/exception.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exception.js","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"","sourcesContent":["import { Mechanism } from './mechanism';\nimport { Stacktrace } from './stacktrace';\n\n/** JSDoc */\nexport interface Exception {\n type?: string;\n value?: string;\n mechanism?: Mechanism;\n module?: string;\n thread_id?: number;\n stacktrace?: Stacktrace;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/hub.d.ts b/node_modules/@sentry/types/esm/hub.d.ts deleted file mode 100644 index eac0ba8..0000000 --- a/node_modules/@sentry/types/esm/hub.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { Breadcrumb, BreadcrumbHint } from './breadcrumb'; -import { Client } from './client'; -import { Event, EventHint } from './event'; -import { Integration, IntegrationClass } from './integration'; -import { Scope } from './scope'; -import { Severity } from './severity'; -import { Span, SpanContext } from './span'; -import { User } from './user'; -/** - * Internal class used to make sure we always have the latest internal functions - * working in case we have a version conflict. - */ -export interface Hub { - /** - * Checks if this hub's version is older than the given version. - * - * @param version A version number to compare to. - * @return True if the given version is newer; otherwise false. - * - * @hidden - */ - isOlderThan(version: number): boolean; - /** - * This binds the given client to the current scope. - * @param client An SDK client (client) instance. - */ - bindClient(client?: Client): void; - /** - * Create a new scope to store context information. - * - * The scope will be layered on top of the current one. It is isolated, i.e. all - * breadcrumbs and context information added to this scope will be removed once - * the scope ends. Be sure to always remove this scope with {@link this.popScope} - * when the operation finishes or throws. - * - * @returns Scope, the new cloned scope - */ - pushScope(): Scope; - /** - * Removes a previously pushed scope from the stack. - * - * This restores the state before the scope was pushed. All breadcrumbs and - * context information added since the last call to {@link this.pushScope} are - * discarded. - */ - popScope(): boolean; - /** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - * - * @param callback that will be enclosed into push/popScope. - */ - withScope(callback: (scope: Scope) => void): void; - /** Returns the client of the top stack. */ - getClient(): Client | undefined; - /** - * Captures an exception event and sends it to Sentry. - * - * @param exception An exception-like object. - * @param hint May contain additional information about the original exception. - * @returns The generated eventId. - */ - captureException(exception: any, hint?: EventHint): string; - /** - * Captures a message event and sends it to Sentry. - * - * @param message The message to send to Sentry. - * @param level Define the level of the message. - * @param hint May contain additional information about the original exception. - * @returns The generated eventId. - */ - captureMessage(message: string, level?: Severity, hint?: EventHint): string; - /** - * Captures a manually created event and sends it to Sentry. - * - * @param event The event to send to Sentry. - * @param hint May contain additional information about the original exception. - */ - captureEvent(event: Event, hint?: EventHint): string; - /** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ - lastEventId(): string | undefined; - /** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - * @param hint May contain additional information about the original breadcrumb. - */ - addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void; - /** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ - setUser(user: User | null): void; - /** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ - setTags(tags: { - [key: string]: string; - }): void; - /** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ - setTag(key: string, value: string): void; - /** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ - setExtra(key: string, extra: any): void; - /** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ - setExtras(extras: { - [key: string]: any; - }): void; - /** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ - setContext(name: string, context: { - [key: string]: any; - } | null): void; - /** - * Callback to set context information onto the scope. - * - * @param callback Callback function that receives Scope. - */ - configureScope(callback: (scope: Scope) => void): void; - /** - * For the duraction of the callback, this hub will be set as the global current Hub. - * This function is useful if you want to run your own client and hook into an already initialized one - * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration. - */ - run(callback: (hub: Hub) => void): void; - /** Returns the integration if installed on the current client. */ - getIntegration(integration: IntegrationClass): T | null; - /** Returns all trace headers that are currently on the top scope. */ - traceHeaders(): { - [key: string]: string; - }; - /** - * This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured - * and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope, - * the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`. - * - * @param span Already constructed span which should be started or properties with which the span should be created - */ - startSpan(span?: Span | SpanContext, forceNoChild?: boolean): Span; -} -//# sourceMappingURL=hub.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/hub.d.ts.map b/node_modules/@sentry/types/esm/hub.d.ts.map deleted file mode 100644 index fab267d..0000000 --- a/node_modules/@sentry/types/esm/hub.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAEtC;;;OAGG;IACH,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;;;;;;;;OASG;IACH,SAAS,IAAI,KAAK,CAAC;IAEnB;;;;;;OAMG;IACH,QAAQ,IAAI,OAAO,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;IAElD,2CAA2C;IAC3C,SAAS,IAAI,MAAM,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K,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;IAEvD;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IAExC,kEAAkE;IAClE,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAElF,qEAAqE;IACrE,YAAY,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,WAAW,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACpE"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/hub.js b/node_modules/@sentry/types/esm/hub.js deleted file mode 100644 index 15f7e63..0000000 --- a/node_modules/@sentry/types/esm/hub.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=hub.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/hub.js.map b/node_modules/@sentry/types/esm/hub.js.map deleted file mode 100644 index 80994c9..0000000 --- a/node_modules/@sentry/types/esm/hub.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Client } from './client';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\nimport { Span, SpanContext } from './span';\nimport { User } from './user';\n\n/**\n * Internal class used to make sure we always have the latest internal functions\n * working in case we have a version conflict.\n */\nexport interface Hub {\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @hidden\n */\n isOlderThan(version: number): boolean;\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n */\n bindClient(client?: Client): void;\n\n /**\n * Create a new scope to store context information.\n *\n * The scope will be layered on top of the current one. It is isolated, i.e. all\n * breadcrumbs and context information added to this scope will be removed once\n * the scope ends. Be sure to always remove this scope with {@link this.popScope}\n * when the operation finishes or throws.\n *\n * @returns Scope, the new cloned scope\n */\n pushScope(): Scope;\n\n /**\n * Removes a previously pushed scope from the stack.\n *\n * This restores the state before the scope was pushed. All breadcrumbs and\n * context information added since the last call to {@link this.pushScope} are\n * discarded.\n */\n popScope(): boolean;\n\n /**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\n withScope(callback: (scope: Scope) => void): void;\n\n /** Returns the client of the top stack. */\n getClient(): Client | undefined;\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureException(exception: any, hint?: EventHint): string;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint): string;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n */\n captureEvent(event: Event, hint?: EventHint): string;\n\n /**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\n lastEventId(): string | undefined;\n\n /**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n * @param hint May contain additional information about the original breadcrumb.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): void;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): void;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): void;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n setExtra(key: string, extra: any): void;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: { [key: string]: any }): void;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\n setContext(name: string, context: { [key: string]: any } | null): void;\n\n /**\n * Callback to set context information onto the scope.\n *\n * @param callback Callback function that receives Scope.\n */\n configureScope(callback: (scope: Scope) => void): void;\n\n /**\n * For the duraction of the callback, this hub will be set as the global current Hub.\n * This function is useful if you want to run your own client and hook into an already initialized one\n * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.\n */\n run(callback: (hub: Hub) => void): void;\n\n /** Returns the integration if installed on the current client. */\n getIntegration(integration: IntegrationClass): T | null;\n\n /** Returns all trace headers that are currently on the top scope. */\n traceHeaders(): { [key: string]: string };\n\n /**\n * This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured\n * and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope,\n * the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`.\n *\n * @param span Already constructed span which should be started or properties with which the span should be created\n */\n startSpan(span?: Span | SpanContext, forceNoChild?: boolean): Span;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/index.d.ts b/node_modules/@sentry/types/esm/index.d.ts deleted file mode 100644 index 921957f..0000000 --- a/node_modules/@sentry/types/esm/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export { Breadcrumb, BreadcrumbHint } from './breadcrumb'; -export { Client } from './client'; -export { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn'; -export { ExtendedError } from './error'; -export { Event, EventHint } from './event'; -export { EventProcessor } from './eventprocessor'; -export { Exception } from './exception'; -export { Hub } from './hub'; -export { Integration, IntegrationClass } from './integration'; -export { LogLevel } from './loglevel'; -export { Mechanism } from './mechanism'; -export { Options } from './options'; -export { Package } from './package'; -export { Request } from './request'; -export { Response } from './response'; -export { Scope } from './scope'; -export { SdkInfo } from './sdkinfo'; -export { Severity } from './severity'; -export { Span, SpanContext, SpanStatus } from './span'; -export { StackFrame } from './stackframe'; -export { Stacktrace } from './stacktrace'; -export { Status } from './status'; -export { Thread } from './thread'; -export { Transport, TransportOptions, TransportClass } from './transport'; -export { User } from './user'; -export { WrappedFunction } from './wrappedfunction'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/index.d.ts.map b/node_modules/@sentry/types/esm/index.d.ts.map deleted file mode 100644 index f8ca1e8..0000000 --- a/node_modules/@sentry/types/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/index.js b/node_modules/@sentry/types/esm/index.js index b18a0b5..5f5093b 100644 --- a/node_modules/@sentry/types/esm/index.js +++ b/node_modules/@sentry/types/esm/index.js @@ -1,5 +1,55 @@ -export { LogLevel } from './loglevel'; -export { Severity } from './severity'; -export { SpanStatus } from './span'; -export { Status } from './status'; -//# sourceMappingURL=index.js.map \ No newline at end of file +; +; +; +; +; +; +; +; + +; +; +; +; +; +; +// This is a dummy export, purely for the purpose of loading `globals.ts`, in order to take advantage of its side effect +// of putting variables into the global namespace. See +// https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html. +; +; +; +; +; +; +; +; +; +; +; +; +; +; + +; + +// eslint-disable-next-line deprecation/deprecation +; +; +; +; +; +; + +; + +; +; + +; +; +; +; + +; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/types/esm/index.js.map b/node_modules/@sentry/types/esm/index.js.map index 9a82d02..d2f656d 100644 --- a/node_modules/@sentry/types/esm/index.js.map +++ b/node_modules/@sentry/types/esm/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAqB,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Scope } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span, SpanContext, SpanStatus } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["export type { Attachment } from './attachment';\nexport type { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport type { Client } from './client';\nexport type { ClientReport, Outcome, EventDropReason } from './clientreport';\nexport type { Context, Contexts, DeviceContext, OsContext, AppContext, CultureContext, TraceContext } from './context';\nexport type { DataCategory } from './datacategory';\nexport type { DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport type { DebugImage, DebugImageType, DebugMeta } from './debugMeta';\nexport type {\n AttachmentItem,\n BaseEnvelopeHeaders,\n BaseEnvelopeItemHeaders,\n ClientReportEnvelope,\n ClientReportItem,\n DynamicSamplingContext,\n Envelope,\n EnvelopeItemType,\n EnvelopeItem,\n EventEnvelope,\n EventEnvelopeHeaders,\n EventItem,\n ReplayEnvelope,\n SessionEnvelope,\n SessionItem,\n UserFeedbackItem,\n} from './envelope';\nexport type { ExtendedError } from './error';\nexport type { Event, EventHint, EventType, ErrorEvent, TransactionEvent } from './event';\nexport type { EventProcessor } from './eventprocessor';\nexport type { Exception } from './exception';\nexport type { Extra, Extras } from './extra';\n// This is a dummy export, purely for the purpose of loading `globals.ts`, in order to take advantage of its side effect\n// of putting variables into the global namespace. See\n// https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html.\nexport type {} from './globals';\nexport type { Hub } from './hub';\nexport type { Integration, IntegrationClass } from './integration';\nexport type { Mechanism } from './mechanism';\nexport type { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocation } from './misc';\nexport type { ClientOptions, Options } from './options';\nexport type { Package } from './package';\nexport type { PolymorphicEvent, PolymorphicRequest } from './polymorphics';\nexport type { ReplayEvent, ReplayRecordingData, ReplayRecordingMode } from './replay';\nexport type { QueryParams, Request } from './request';\nexport type { Runtime } from './runtime';\nexport type { CaptureContext, Scope, ScopeContext } from './scope';\nexport type { SdkInfo } from './sdkinfo';\nexport type { SdkMetadata } from './sdkmetadata';\nexport type {\n SessionAggregates,\n AggregationCounts,\n Session,\n SessionContext,\n SessionStatus,\n RequestSession,\n RequestSessionStatus,\n SessionFlusherLike,\n SerializedSession,\n} from './session';\n\n// eslint-disable-next-line deprecation/deprecation\nexport type { Severity, SeverityLevel } from './severity';\nexport type { Span, SpanContext } from './span';\nexport type { StackFrame } from './stackframe';\nexport type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace';\nexport type { TextEncoderInternal } from './textencoder';\nexport type { TracePropagationTargets } from './tracing';\nexport type {\n CustomSamplingContext,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n TransactionMetadata,\n TransactionSource,\n TransactionNameChange,\n} from './transaction';\nexport type {\n DurationUnit,\n InformationUnit,\n FractionUnit,\n MeasurementUnit,\n NoneUnit,\n Measurements,\n} from './measurement';\nexport type { Thread } from './thread';\nexport type {\n Transport,\n TransportRequest,\n TransportMakeRequestResponse,\n InternalBaseTransportOptions,\n BaseTransportOptions,\n TransportRequestExecutor,\n} from './transport';\nexport type { User, UserFeedback } from './user';\nexport type { WrappedFunction } from './wrappedfunction';\nexport type { Instrumenter } from './instrumenter';\n\nexport type { BrowserClientReplayOptions } from './browseroptions';\n"],"names":[],"mappings":"AAAA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;;AAkBA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;;AAWA,CAAA;AACA;AACA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;;AAUA,CAAA;;AAQA,CAAA;AACA,CAAA;;AAQA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA;AACA"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/integration.d.ts b/node_modules/@sentry/types/esm/integration.d.ts deleted file mode 100644 index fa42f9f..0000000 --- a/node_modules/@sentry/types/esm/integration.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { EventProcessor } from './eventprocessor'; -import { Hub } from './hub'; -/** Integration Class Interface */ -export interface IntegrationClass { - new (...args: any[]): T; - /** - * Property that holds the integration name - */ - id: string; -} -/** Integration interface */ -export interface Integration { - /** - * Returns {@link IntegrationClass.id} - */ - name: string; - /** - * Sets the integration up only once. - * This takes no options on purpose, options should be passed in the constructor - */ - setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; -} -//# sourceMappingURL=integration.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/integration.d.ts.map b/node_modules/@sentry/types/esm/integration.d.ts.map deleted file mode 100644 index 779b70c..0000000 --- a/node_modules/@sentry/types/esm/integration.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,kCAAkC;AAClC,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,4BAA4B;AAC5B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,SAAS,CAAC,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI,CAAC;CACxG"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/integration.js b/node_modules/@sentry/types/esm/integration.js deleted file mode 100644 index 2a8db85..0000000 --- a/node_modules/@sentry/types/esm/integration.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=integration.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/integration.js.map b/node_modules/@sentry/types/esm/integration.js.map deleted file mode 100644 index ccae34f..0000000 --- a/node_modules/@sentry/types/esm/integration.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"","sourcesContent":["import { EventProcessor } from './eventprocessor';\nimport { Hub } from './hub';\n\n/** Integration Class Interface */\nexport interface IntegrationClass {\n new (...args: any[]): T;\n /**\n * Property that holds the integration name\n */\n id: string;\n}\n\n/** Integration interface */\nexport interface Integration {\n /**\n * Returns {@link IntegrationClass.id}\n */\n name: string;\n\n /**\n * Sets the integration up only once.\n * This takes no options on purpose, options should be passed in the constructor\n */\n setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/loglevel.d.ts b/node_modules/@sentry/types/esm/loglevel.d.ts deleted file mode 100644 index d3c345e..0000000 --- a/node_modules/@sentry/types/esm/loglevel.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** Console logging verbosity for the SDK. */ -export declare enum LogLevel { - /** No logs will be generated. */ - None = 0, - /** Only SDK internal errors will be logged. */ - Error = 1, - /** Information useful for debugging the SDK will be logged. */ - Debug = 2, - /** All SDK actions will be logged. */ - Verbose = 3 -} -//# sourceMappingURL=loglevel.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/loglevel.d.ts.map b/node_modules/@sentry/types/esm/loglevel.d.ts.map deleted file mode 100644 index c931c75..0000000 --- a/node_modules/@sentry/types/esm/loglevel.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"loglevel.d.ts","sourceRoot":"","sources":["../src/loglevel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,oBAAY,QAAQ;IAClB,iCAAiC;IACjC,IAAI,IAAI;IACR,+CAA+C;IAC/C,KAAK,IAAI;IACT,+DAA+D;IAC/D,KAAK,IAAI;IACT,sCAAsC;IACtC,OAAO,IAAI;CACZ"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/loglevel.js b/node_modules/@sentry/types/esm/loglevel.js deleted file mode 100644 index b76965d..0000000 --- a/node_modules/@sentry/types/esm/loglevel.js +++ /dev/null @@ -1,13 +0,0 @@ -/** Console logging verbosity for the SDK. */ -export var LogLevel; -(function (LogLevel) { - /** No logs will be generated. */ - LogLevel[LogLevel["None"] = 0] = "None"; - /** Only SDK internal errors will be logged. */ - LogLevel[LogLevel["Error"] = 1] = "Error"; - /** Information useful for debugging the SDK will be logged. */ - LogLevel[LogLevel["Debug"] = 2] = "Debug"; - /** All SDK actions will be logged. */ - LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; -})(LogLevel || (LogLevel = {})); -//# sourceMappingURL=loglevel.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/loglevel.js.map b/node_modules/@sentry/types/esm/loglevel.js.map deleted file mode 100644 index 63f4e71..0000000 --- a/node_modules/@sentry/types/esm/loglevel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"loglevel.js","sourceRoot":"","sources":["../src/loglevel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,CAAN,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,iCAAiC;IACjC,uCAAQ,CAAA;IACR,+CAA+C;IAC/C,yCAAS,CAAA;IACT,+DAA+D;IAC/D,yCAAS,CAAA;IACT,sCAAsC;IACtC,6CAAW,CAAA;AACb,CAAC,EATW,QAAQ,KAAR,QAAQ,QASnB","sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n /** No logs will be generated. */\n None = 0,\n /** Only SDK internal errors will be logged. */\n Error = 1,\n /** Information useful for debugging the SDK will be logged. */\n Debug = 2,\n /** All SDK actions will be logged. */\n Verbose = 3,\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/mechanism.d.ts b/node_modules/@sentry/types/esm/mechanism.d.ts deleted file mode 100644 index 0ff1a28..0000000 --- a/node_modules/@sentry/types/esm/mechanism.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** JSDoc */ -export interface Mechanism { - type: string; - handled: boolean; - data?: { - [key: string]: string | boolean; - }; - synthetic?: boolean; -} -//# sourceMappingURL=mechanism.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/mechanism.d.ts.map b/node_modules/@sentry/types/esm/mechanism.d.ts.map deleted file mode 100644 index 69f13a7..0000000 --- a/node_modules/@sentry/types/esm/mechanism.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mechanism.d.ts","sourceRoot":"","sources":["../src/mechanism.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;KACjC,CAAC;IACF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/mechanism.js b/node_modules/@sentry/types/esm/mechanism.js deleted file mode 100644 index 4f59563..0000000 --- a/node_modules/@sentry/types/esm/mechanism.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=mechanism.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/mechanism.js.map b/node_modules/@sentry/types/esm/mechanism.js.map deleted file mode 100644 index 015adea..0000000 --- a/node_modules/@sentry/types/esm/mechanism.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mechanism.js","sourceRoot":"","sources":["../src/mechanism.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Mechanism {\n type: string;\n handled: boolean;\n data?: {\n [key: string]: string | boolean;\n };\n synthetic?: boolean;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/options.d.ts b/node_modules/@sentry/types/esm/options.d.ts deleted file mode 100644 index 9dd2687..0000000 --- a/node_modules/@sentry/types/esm/options.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { Breadcrumb, BreadcrumbHint } from './breadcrumb'; -import { Event, EventHint } from './event'; -import { Integration } from './integration'; -import { LogLevel } from './loglevel'; -import { Transport, TransportClass, TransportOptions } from './transport'; -/** Base configuration options for every SDK. */ -export interface Options { - /** - * Enable debug functionality in the SDK itself - */ - debug?: boolean; - /** - * Specifies whether this SDK should activate and send events to Sentry. - * Disabling the SDK reduces all overhead from instrumentation, collecting - * breadcrumbs and capturing events. Defaults to true. - */ - enabled?: boolean; - /** - * The Dsn used to connect to Sentry and identify the project. If omitted, the - * SDK will not send any data to Sentry. - */ - dsn?: string; - /** - * If this is set to false, default integrations will not be added, otherwise this will internally be set to the - * recommended default integrations. - */ - defaultIntegrations?: false | Integration[]; - /** - * List of integrations that should be installed after SDK was initialized. - * Accepts either a list of integrations or a function that receives - * default integrations and returns a new, updated list. - */ - integrations?: Integration[] | ((integrations: Integration[]) => Integration[]); - /** - * A pattern for error messages which should not be sent to Sentry. - * By default, all errors will be sent. - */ - ignoreErrors?: Array; - /** - * Transport object that should be used to send events to Sentry - */ - transport?: TransportClass; - /** - * Options for the default transport that the SDK uses. - */ - transportOptions?: TransportOptions; - /** - * The release identifier used when uploading respective source maps. Specify - * this value to allow Sentry to resolve the correct source maps when - * processing events. - */ - release?: string; - /** The current environment of your application (e.g. "production"). */ - environment?: string; - /** Sets the distribution for all events */ - dist?: string; - /** - * The maximum number of breadcrumbs sent with events. Defaults to 30. - * Values over 100 will be ignored and 100 used instead. - */ - maxBreadcrumbs?: number; - /** Console logging verbosity for the SDK Client. */ - logLevel?: LogLevel; - /** A global sample rate to apply to all events (0 - 1). */ - sampleRate?: number; - /** A global sample rate to apply to all transactions (0 - 1). */ - tracesSampleRate?: number; - /** Attaches stacktraces to pure capture message / log integrations */ - attachStacktrace?: boolean; - /** Maxium number of chars a single value can have before it will be truncated. */ - maxValueLength?: number; - /** - * Maximum number of levels that normalization algorithm will traverse in objects and arrays. - * Used when normalizing an event before sending, on all of the listed attributes: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * Defaults to `3`. Set to `0` to disable. - */ - normalizeDepth?: number; - /** - * A callback invoked during event submission, allowing to optionally modify - * the event before it is sent to Sentry. - * - * Note that you must return a valid event from this callback. If you do not - * wish to modify the event, simply return it at the end. - * Returning null will case the event to be dropped. - * - * @param event The error or message event generated by the SDK. - * @param hint May contain additional information about the original exception. - * @returns A new event that will be sent | null. - */ - beforeSend?(event: Event, hint?: EventHint): PromiseLike | Event | null; - /** - * A callback invoked when adding a breadcrumb, allowing to optionally modify - * it before adding it to future events. - * - * Note that you must return a valid breadcrumb from this callback. If you do - * not wish to modify the breadcrumb, simply return it at the end. - * Returning null will case the breadcrumb to be dropped. - * - * @param breadcrumb The breadcrumb as created by the SDK. - * @returns The breadcrumb that will be added | null. - */ - beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null; - _experiments?: { - [key: string]: any; - }; -} -//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/options.d.ts.map b/node_modules/@sentry/types/esm/options.d.ts.map deleted file mode 100644 index caa4880..0000000 --- a/node_modules/@sentry/types/esm/options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EA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G;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC;IAEtF;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC;IAEpF,YAAY,CAAC,EAAE;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/options.js b/node_modules/@sentry/types/esm/options.js deleted file mode 100644 index 0d3d56a..0000000 --- a/node_modules/@sentry/types/esm/options.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/options.js.map b/node_modules/@sentry/types/esm/options.js.map deleted file mode 100644 index a6fe985..0000000 --- a/node_modules/@sentry/types/esm/options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Event, EventHint } from './event';\nimport { Integration } from './integration';\nimport { LogLevel } from './loglevel';\nimport { Transport, TransportClass, TransportOptions } from './transport';\n\n/** Base configuration options for every SDK. */\nexport interface Options {\n /**\n * Enable debug functionality in the SDK itself\n */\n debug?: boolean;\n\n /**\n * Specifies whether this SDK should activate and send events to Sentry.\n * Disabling the SDK reduces all overhead from instrumentation, collecting\n * breadcrumbs and capturing events. Defaults to true.\n */\n enabled?: boolean;\n\n /**\n * The Dsn used to connect to Sentry and identify the project. If omitted, the\n * SDK will not send any data to Sentry.\n */\n dsn?: string;\n\n /**\n * If this is set to false, default integrations will not be added, otherwise this will internally be set to the\n * recommended default integrations.\n */\n defaultIntegrations?: false | Integration[];\n\n /**\n * List of integrations that should be installed after SDK was initialized.\n * Accepts either a list of integrations or a function that receives\n * default integrations and returns a new, updated list.\n */\n integrations?: Integration[] | ((integrations: Integration[]) => Integration[]);\n\n /**\n * A pattern for error messages which should not be sent to Sentry.\n * By default, all errors will be sent.\n */\n ignoreErrors?: Array;\n\n /**\n * Transport object that should be used to send events to Sentry\n */\n transport?: TransportClass;\n\n /**\n * Options for the default transport that the SDK uses.\n */\n transportOptions?: TransportOptions;\n\n /**\n * The release identifier used when uploading respective source maps. Specify\n * this value to allow Sentry to resolve the correct source maps when\n * processing events.\n */\n release?: string;\n\n /** The current environment of your application (e.g. \"production\"). */\n environment?: string;\n\n /** Sets the distribution for all events */\n dist?: string;\n\n /**\n * The maximum number of breadcrumbs sent with events. Defaults to 30.\n * Values over 100 will be ignored and 100 used instead.\n */\n maxBreadcrumbs?: number;\n\n /** Console logging verbosity for the SDK Client. */\n logLevel?: LogLevel;\n\n /** A global sample rate to apply to all events (0 - 1). */\n sampleRate?: number;\n\n /** A global sample rate to apply to all transactions (0 - 1). */\n tracesSampleRate?: number;\n\n /** Attaches stacktraces to pure capture message / log integrations */\n attachStacktrace?: boolean;\n\n /** Maxium number of chars a single value can have before it will be truncated. */\n maxValueLength?: number;\n\n /**\n * Maximum number of levels that normalization algorithm will traverse in objects and arrays.\n * Used when normalizing an event before sending, on all of the listed attributes:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * Defaults to `3`. Set to `0` to disable.\n */\n normalizeDepth?: number;\n\n /**\n * A callback invoked during event submission, allowing to optionally modify\n * the event before it is sent to Sentry.\n *\n * Note that you must return a valid event from this callback. If you do not\n * wish to modify the event, simply return it at the end.\n * Returning null will case the event to be dropped.\n *\n * @param event The error or message event generated by the SDK.\n * @param hint May contain additional information about the original exception.\n * @returns A new event that will be sent | null.\n */\n beforeSend?(event: Event, hint?: EventHint): PromiseLike | Event | null;\n\n /**\n * A callback invoked when adding a breadcrumb, allowing to optionally modify\n * it before adding it to future events.\n *\n * Note that you must return a valid breadcrumb from this callback. If you do\n * not wish to modify the breadcrumb, simply return it at the end.\n * Returning null will case the breadcrumb to be dropped.\n *\n * @param breadcrumb The breadcrumb as created by the SDK.\n * @returns The breadcrumb that will be added | null.\n */\n beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null;\n\n _experiments?: {\n [key: string]: any;\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/package.d.ts b/node_modules/@sentry/types/esm/package.d.ts deleted file mode 100644 index 80d9d0b..0000000 --- a/node_modules/@sentry/types/esm/package.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** JSDoc */ -export interface Package { - name: string; - version: string; -} -//# sourceMappingURL=package.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/package.d.ts.map b/node_modules/@sentry/types/esm/package.d.ts.map deleted file mode 100644 index bd6b6d2..0000000 --- a/node_modules/@sentry/types/esm/package.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../src/package.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/package.js b/node_modules/@sentry/types/esm/package.js deleted file mode 100644 index 690786e..0000000 --- a/node_modules/@sentry/types/esm/package.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=package.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/package.js.map b/node_modules/@sentry/types/esm/package.js.map deleted file mode 100644 index 7a5faee..0000000 --- a/node_modules/@sentry/types/esm/package.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package.js","sourceRoot":"","sources":["../src/package.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Package {\n name: string;\n version: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/request.d.ts b/node_modules/@sentry/types/esm/request.d.ts deleted file mode 100644 index 7e43f5b..0000000 --- a/node_modules/@sentry/types/esm/request.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** JSDoc */ -export interface Request { - url?: string; - method?: string; - data?: any; - query_string?: string; - cookies?: { - [key: string]: string; - }; - env?: { - [key: string]: string; - }; - headers?: { - [key: string]: string; - }; -} -//# sourceMappingURL=request.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/request.d.ts.map b/node_modules/@sentry/types/esm/request.d.ts.map deleted file mode 100644 index 1bb586f..0000000 --- a/node_modules/@sentry/types/esm/request.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,OAAO;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,GAAG,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAChC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACrC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/request.js b/node_modules/@sentry/types/esm/request.js deleted file mode 100644 index 8737d4f..0000000 --- a/node_modules/@sentry/types/esm/request.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=request.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/request.js.map b/node_modules/@sentry/types/esm/request.js.map deleted file mode 100644 index acd0f6d..0000000 --- a/node_modules/@sentry/types/esm/request.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Request {\n url?: string;\n method?: string;\n data?: any;\n query_string?: string;\n cookies?: { [key: string]: string };\n env?: { [key: string]: string };\n headers?: { [key: string]: string };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/response.d.ts b/node_modules/@sentry/types/esm/response.d.ts deleted file mode 100644 index 72750b8..0000000 --- a/node_modules/@sentry/types/esm/response.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Event } from './event'; -import { Status } from './status'; -/** JSDoc */ -export interface Response { - status: Status; - event?: Event; - reason?: string; -} -//# sourceMappingURL=response.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/response.d.ts.map b/node_modules/@sentry/types/esm/response.d.ts.map deleted file mode 100644 index 2205cc6..0000000 --- a/node_modules/@sentry/types/esm/response.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,YAAY;AACZ,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/response.js b/node_modules/@sentry/types/esm/response.js deleted file mode 100644 index 56a72b2..0000000 --- a/node_modules/@sentry/types/esm/response.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=response.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/response.js.map b/node_modules/@sentry/types/esm/response.js.map deleted file mode 100644 index 893e80e..0000000 --- a/node_modules/@sentry/types/esm/response.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"response.js","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"","sourcesContent":["import { Event } from './event';\nimport { Status } from './status';\n\n/** JSDoc */\nexport interface Response {\n status: Status;\n event?: Event;\n reason?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/scope.d.ts b/node_modules/@sentry/types/esm/scope.d.ts deleted file mode 100644 index 84bcfb2..0000000 --- a/node_modules/@sentry/types/esm/scope.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Breadcrumb } from './breadcrumb'; -import { EventProcessor } from './eventprocessor'; -import { Severity } from './severity'; -import { Span } from './span'; -import { User } from './user'; -/** - * Holds additional event information. {@link Scope.applyToEvent} will be - * called by the client before an event will be sent. - */ -export interface Scope { - /** Add new event processor that will be called after {@link applyToEvent}. */ - addEventProcessor(callback: EventProcessor): this; - /** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ - setUser(user: User | null): this; - /** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ - setTags(tags: { - [key: string]: string; - }): this; - /** - * Set key:value that will be sent as tags data with the event. - * @param key String key of tag - * @param value String value of tag - */ - setTag(key: string, value: string): this; - /** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ - setExtras(extras: { - [key: string]: any; - }): this; - /** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normailzed. - */ - setExtra(key: string, extra: any): this; - /** - * Sets the fingerprint on the scope to send with the events. - * @param fingerprint string[] to group events in Sentry. - */ - setFingerprint(fingerprint: string[]): this; - /** - * Sets the level on the scope for future events. - * @param level string {@link Severity} - */ - setLevel(level: Severity): this; - /** - * Sets the transaction on the scope for future events. - * @param transaction string This will be converted in a tag in Sentry - */ - setTransaction(transaction?: string): this; - /** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normailzed. - */ - setContext(name: string, context: { - [key: string]: any; - } | null): this; - /** - * Sets the Span on the scope. - * @param span Span - */ - setSpan(span?: Span): this; - /** Clears the current scope and resets its properties. */ - clear(): this; - /** - * Sets the breadcrumbs in the scope - * @param breadcrumbs Breadcrumb - * @param maxBreadcrumbs number of max breadcrumbs to merged into event. - */ - addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this; - /** - * Clears all currently set Breadcrumbs. - */ - clearBreadcrumbs(): this; -} -//# sourceMappingURL=scope.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/scope.d.ts.map b/node_modules/@sentry/types/esm/scope.d.ts.map deleted file mode 100644 index cdd0392..0000000 --- a/node_modules/@sentry/types/esm/scope.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,8EAA8E;IAC9E,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAElD;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE/C;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,CAAC;IAEhD;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC;IAExC;;;OAGG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE5C;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3C;;;;OAIG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,IAAI,CAAC;IAEvE;;;OAGG;IACH,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAE3B,0DAA0D;IAC1D,KAAK,IAAI,IAAI,CAAC;IAEd;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;CAC1B"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/scope.js b/node_modules/@sentry/types/esm/scope.js deleted file mode 100644 index 02fab88..0000000 --- a/node_modules/@sentry/types/esm/scope.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=scope.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/scope.js.map b/node_modules/@sentry/types/esm/scope.js.map deleted file mode 100644 index eff53ca..0000000 --- a/node_modules/@sentry/types/esm/scope.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { EventProcessor } from './eventprocessor';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { User } from './user';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: { [key: string]: any }): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n setExtra(key: string, extra: any): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /**\n * Sets the transaction on the scope for future events.\n * @param transaction string This will be converted in a tag in Sentry\n */\n setTransaction(transaction?: string): this;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\n setContext(name: string, context: { [key: string]: any } | null): this;\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n */\n setSpan(span?: Span): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/sdkinfo.d.ts b/node_modules/@sentry/types/esm/sdkinfo.d.ts deleted file mode 100644 index 6ea5745..0000000 --- a/node_modules/@sentry/types/esm/sdkinfo.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Package } from './package'; -/** JSDoc */ -export interface SdkInfo { - name: string; - version: string; - integrations?: string[]; - packages?: Package[]; -} -//# sourceMappingURL=sdkinfo.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/sdkinfo.d.ts.map b/node_modules/@sentry/types/esm/sdkinfo.d.ts.map deleted file mode 100644 index cf36226..0000000 --- a/node_modules/@sentry/types/esm/sdkinfo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdkinfo.d.ts","sourceRoot":"","sources":["../src/sdkinfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,YAAY;AACZ,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/sdkinfo.js b/node_modules/@sentry/types/esm/sdkinfo.js deleted file mode 100644 index fa9bec2..0000000 --- a/node_modules/@sentry/types/esm/sdkinfo.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=sdkinfo.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/sdkinfo.js.map b/node_modules/@sentry/types/esm/sdkinfo.js.map deleted file mode 100644 index 1ebe804..0000000 --- a/node_modules/@sentry/types/esm/sdkinfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdkinfo.js","sourceRoot":"","sources":["../src/sdkinfo.ts"],"names":[],"mappings":"","sourcesContent":["import { Package } from './package';\n\n/** JSDoc */\nexport interface SdkInfo {\n name: string;\n version: string;\n integrations?: string[];\n packages?: Package[];\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/severity.d.ts b/node_modules/@sentry/types/esm/severity.d.ts deleted file mode 100644 index 868d285..0000000 --- a/node_modules/@sentry/types/esm/severity.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** JSDoc */ -export declare enum Severity { - /** JSDoc */ - Fatal = "fatal", - /** JSDoc */ - Error = "error", - /** JSDoc */ - Warning = "warning", - /** JSDoc */ - Log = "log", - /** JSDoc */ - Info = "info", - /** JSDoc */ - Debug = "debug", - /** JSDoc */ - Critical = "critical" -} -export declare namespace Severity { - /** - * Converts a string-based level into a {@link Severity}. - * - * @param level string representation of Severity - * @returns Severity - */ - function fromString(level: string): Severity; -} -//# sourceMappingURL=severity.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/severity.d.ts.map b/node_modules/@sentry/types/esm/severity.d.ts.map deleted file mode 100644 index 5a5fa94..0000000 --- a/node_modules/@sentry/types/esm/severity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../src/severity.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,oBAAY,QAAQ;IAClB,YAAY;IACZ,KAAK,UAAU;IACf,YAAY;IACZ,KAAK,UAAU;IACf,YAAY;IACZ,OAAO,YAAY;IACnB,YAAY;IACZ,GAAG,QAAQ;IACX,YAAY;IACZ,IAAI,SAAS;IACb,YAAY;IACZ,KAAK,UAAU;IACf,YAAY;IACZ,QAAQ,aAAa;CACtB;AAGD,yBAAiB,QAAQ,CAAC;IACxB;;;;;OAKG;IACH,SAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAmBlD;CACF"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/severity.js b/node_modules/@sentry/types/esm/severity.js deleted file mode 100644 index b9a9c3b..0000000 --- a/node_modules/@sentry/types/esm/severity.js +++ /dev/null @@ -1,50 +0,0 @@ -/** JSDoc */ -export var Severity; -(function (Severity) { - /** JSDoc */ - Severity["Fatal"] = "fatal"; - /** JSDoc */ - Severity["Error"] = "error"; - /** JSDoc */ - Severity["Warning"] = "warning"; - /** JSDoc */ - Severity["Log"] = "log"; - /** JSDoc */ - Severity["Info"] = "info"; - /** JSDoc */ - Severity["Debug"] = "debug"; - /** JSDoc */ - Severity["Critical"] = "critical"; -})(Severity || (Severity = {})); -// tslint:disable:completed-docs -// tslint:disable:no-unnecessary-qualifier no-namespace -(function (Severity) { - /** - * Converts a string-based level into a {@link Severity}. - * - * @param level string representation of Severity - * @returns Severity - */ - function fromString(level) { - switch (level) { - case 'debug': - return Severity.Debug; - case 'info': - return Severity.Info; - case 'warn': - case 'warning': - return Severity.Warning; - case 'error': - return Severity.Error; - case 'fatal': - return Severity.Fatal; - case 'critical': - return Severity.Critical; - case 'log': - default: - return Severity.Log; - } - } - Severity.fromString = fromString; -})(Severity || (Severity = {})); -//# sourceMappingURL=severity.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/severity.js.map b/node_modules/@sentry/types/esm/severity.js.map deleted file mode 100644 index bd2cf7c..0000000 --- a/node_modules/@sentry/types/esm/severity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"severity.js","sourceRoot":"","sources":["../src/severity.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,CAAN,IAAY,QAeX;AAfD,WAAY,QAAQ;IAClB,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,+BAAmB,CAAA;IACnB,YAAY;IACZ,uBAAW,CAAA;IACX,YAAY;IACZ,yBAAa,CAAA;IACb,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,iCAAqB,CAAA;AACvB,CAAC,EAfW,QAAQ,KAAR,QAAQ,QAenB;AACD,gCAAgC;AAChC,uDAAuD;AACvD,WAAiB,QAAQ;IACvB;;;;;OAKG;IACH,SAAgB,UAAU,CAAC,KAAa;QACtC,QAAQ,KAAK,EAAE;YACb,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,MAAM;gBACT,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,KAAK,MAAM,CAAC;YACZ,KAAK,SAAS;gBACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC1B,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,UAAU;gBACb,OAAO,QAAQ,CAAC,QAAQ,CAAC;YAC3B,KAAK,KAAK,CAAC;YACX;gBACE,OAAO,QAAQ,CAAC,GAAG,CAAC;SACvB;IACH,CAAC;IAnBe,mBAAU,aAmBzB,CAAA;AACH,CAAC,EA3BgB,QAAQ,KAAR,QAAQ,QA2BxB","sourcesContent":["/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/span.d.ts b/node_modules/@sentry/types/esm/span.d.ts deleted file mode 100644 index cd6019c..0000000 --- a/node_modules/@sentry/types/esm/span.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -/** Span holding trace_id, span_id */ -export interface Span { - /** Sets the finish timestamp on the current span and sends it if it was a transaction */ - finish(useLastSpanTimestamp?: boolean): string | undefined; - /** Return a traceparent compatible header string */ - toTraceparent(): string; - /** Convert the object to JSON for w. spans array info only */ - getTraceContext(): object; - /** Convert the object to JSON */ - toJSON(): object; - /** - * Sets the tag attribute on the current span - * @param key Tag key - * @param value Tag value - */ - setTag(key: string, value: string): this; - /** - * Sets the data attribute on the current span - * @param key Data key - * @param value Data value - */ - setData(key: string, value: any): this; - /** - * Sets the status attribute on the current span - * @param status http code used to set the status - */ - setStatus(status: SpanStatus): this; - /** - * Sets the status attribute on the current span based on the http code - * @param httpStatus http code used to set the status - */ - setHttpStatus(httpStatus: number): this; - /** - * Determines whether span was successful (HTTP200) - */ - isSuccess(): boolean; -} -/** Interface holder all properties that can be set on a Span on creation. */ -export interface SpanContext { - /** - * Description of the Span. - */ - description?: string; - /** - * Operation of the Span. - */ - op?: string; - /** - * Completion status of the Span. - */ - status?: SpanStatus; - /** - * Parent Span ID - */ - parentSpanId?: string; - /** - * Has the sampling decision been made? - */ - sampled?: boolean; - /** - * Span ID - */ - spanId?: string; - /** - * Trace ID - */ - traceId?: string; - /** - * Transaction of the Span. - */ - transaction?: string; - /** - * Tags of the Span. - */ - tags?: { - [key: string]: string; - }; - /** - * Data of the Span. - */ - data?: { - [key: string]: any; - }; -} -/** The status of an Span. */ -export declare enum SpanStatus { - /** The operation completed successfully. */ - Ok = "ok", - /** Deadline expired before operation could complete. */ - DeadlineExceeded = "deadline_exceeded", - /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ - Unauthenticated = "unauthenticated", - /** 403 Forbidden */ - PermissionDenied = "permission_denied", - /** 404 Not Found. Some requested entity (file or directory) was not found. */ - NotFound = "not_found", - /** 429 Too Many Requests */ - ResourceExhausted = "resource_exhausted", - /** Client specified an invalid argument. 4xx. */ - InvalidArgument = "invalid_argument", - /** 501 Not Implemented */ - Unimplemented = "unimplemented", - /** 503 Service Unavailable */ - Unavailable = "unavailable", - /** Other/generic 5xx. */ - InternalError = "internal_error", - /** Unknown. Any non-standard HTTP status code. */ - UnknownError = "unknown_error", - /** The operation was cancelled (typically by the user). */ - Cancelled = "cancelled", - /** Already exists (409) */ - AlreadyExists = "already_exists", - /** Operation was rejected because the system is not in a state required for the operation's */ - FailedPrecondition = "failed_precondition", - /** The operation was aborted, typically due to a concurrency issue. */ - Aborted = "aborted", - /** Operation was attempted past the valid range. */ - OutOfRange = "out_of_range", - /** Unrecoverable data loss or corruption */ - DataLoss = "data_loss" -} -export declare namespace SpanStatus { - /** - * Converts a HTTP status code into a {@link SpanStatus}. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or {@link SpanStatus.UnknownError}. - */ - function fromHttpCode(httpStatus: number): SpanStatus; -} -//# sourceMappingURL=span.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/span.d.ts.map b/node_modules/@sentry/types/esm/span.d.ts.map deleted file mode 100644 index de43cf2..0000000 --- a/node_modules/@sentry/types/esm/span.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,MAAM,WAAW,IAAI;IACnB,yFAAyF;IACzF,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3D,oDAAoD;IACpD,aAAa,IAAI,MAAM,CAAC;IACxB,8DAA8D;IAC9D,eAAe,IAAI,MAAM,CAAC;IAC1B,iCAAiC;IACjC,MAAM,IAAI,MAAM,CAAC;IAEjB;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAA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;IAC/B,8BAA8B;IAC9B,WAAW,gBAAgB;IAC3B,yBAAyB;IACzB,aAAa,mBAAmB;IAChC,kDAAkD;IAClD,YAAY,kBAAkB;IAC9B,2DAA2D;IAC3D,SAAS,cAAc;IACvB,2BAA2B;IAC3B,aAAa,mBAAmB;IAChC,+FAA+F;IAC/F,kBAAkB,wBAAwB;IAC1C,uEAAuE;IACvE,OAAO,YAAY;IACnB,oDAAoD;IACpD,UAAU,iBAAiB;IAC3B,4CAA4C;IAC5C,QAAQ,cAAc;CACvB;AAGD,yBAAiB,UAAU,CAAC;IAC1B;;;;;OAKG;IAEH,SAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAsC3D;CACF"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/span.js b/node_modules/@sentry/types/esm/span.js deleted file mode 100644 index 58723ae..0000000 --- a/node_modules/@sentry/types/esm/span.js +++ /dev/null @@ -1,86 +0,0 @@ -/** The status of an Span. */ -export var SpanStatus; -(function (SpanStatus) { - /** The operation completed successfully. */ - SpanStatus["Ok"] = "ok"; - /** Deadline expired before operation could complete. */ - SpanStatus["DeadlineExceeded"] = "deadline_exceeded"; - /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ - SpanStatus["Unauthenticated"] = "unauthenticated"; - /** 403 Forbidden */ - SpanStatus["PermissionDenied"] = "permission_denied"; - /** 404 Not Found. Some requested entity (file or directory) was not found. */ - SpanStatus["NotFound"] = "not_found"; - /** 429 Too Many Requests */ - SpanStatus["ResourceExhausted"] = "resource_exhausted"; - /** Client specified an invalid argument. 4xx. */ - SpanStatus["InvalidArgument"] = "invalid_argument"; - /** 501 Not Implemented */ - SpanStatus["Unimplemented"] = "unimplemented"; - /** 503 Service Unavailable */ - SpanStatus["Unavailable"] = "unavailable"; - /** Other/generic 5xx. */ - SpanStatus["InternalError"] = "internal_error"; - /** Unknown. Any non-standard HTTP status code. */ - SpanStatus["UnknownError"] = "unknown_error"; - /** The operation was cancelled (typically by the user). */ - SpanStatus["Cancelled"] = "cancelled"; - /** Already exists (409) */ - SpanStatus["AlreadyExists"] = "already_exists"; - /** Operation was rejected because the system is not in a state required for the operation's */ - SpanStatus["FailedPrecondition"] = "failed_precondition"; - /** The operation was aborted, typically due to a concurrency issue. */ - SpanStatus["Aborted"] = "aborted"; - /** Operation was attempted past the valid range. */ - SpanStatus["OutOfRange"] = "out_of_range"; - /** Unrecoverable data loss or corruption */ - SpanStatus["DataLoss"] = "data_loss"; -})(SpanStatus || (SpanStatus = {})); -// tslint:disable:no-unnecessary-qualifier no-namespace -(function (SpanStatus) { - /** - * Converts a HTTP status code into a {@link SpanStatus}. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or {@link SpanStatus.UnknownError}. - */ - // tslint:disable-next-line:completed-docs - function fromHttpCode(httpStatus) { - if (httpStatus < 400) { - return SpanStatus.Ok; - } - if (httpStatus >= 400 && httpStatus < 500) { - switch (httpStatus) { - case 401: - return SpanStatus.Unauthenticated; - case 403: - return SpanStatus.PermissionDenied; - case 404: - return SpanStatus.NotFound; - case 409: - return SpanStatus.AlreadyExists; - case 413: - return SpanStatus.FailedPrecondition; - case 429: - return SpanStatus.ResourceExhausted; - default: - return SpanStatus.InvalidArgument; - } - } - if (httpStatus >= 500 && httpStatus < 600) { - switch (httpStatus) { - case 501: - return SpanStatus.Unimplemented; - case 503: - return SpanStatus.Unavailable; - case 504: - return SpanStatus.DeadlineExceeded; - default: - return SpanStatus.InternalError; - } - } - return SpanStatus.UnknownError; - } - SpanStatus.fromHttpCode = fromHttpCode; -})(SpanStatus || (SpanStatus = {})); -//# sourceMappingURL=span.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/span.js.map b/node_modules/@sentry/types/esm/span.js.map deleted file mode 100644 index fb77b8f..0000000 --- a/node_modules/@sentry/types/esm/span.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAwFA,6BAA6B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AC,kBAAkB,CAAC;gBACvC,KAAK,GAAG;oBACN,OAAO,UAAU,CAAC,iBAAiB,CAAC;gBACtC;oBACE,OAAO,UAAU,CAAC,eAAe,CAAC;aACrC;SACF;QAED,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,EAAE;YACzC,QAAQ,UAAU,EAAE;gBAClB,KAAK,GAAG;oBACN,OAAO,UAAU,CAAC,aAAa,CAAC;gBAClC,KAAK,GAAG;oBACN,OAAO,UAAU,CAAC,WAAW,CAAC;gBAChC,KAAK,GAAG;oBACN,OAAO,UAAU,CAAC,gBAAgB,CAAC;gBACrC;oBACE,OAAO,UAAU,CAAC,aAAa,CAAC;aACnC;SACF;QAED,OAAO,UAAU,CAAC,YAAY,CAAC;IACjC,CAAC;IAtCe,uBAAY,eAsC3B,CAAA;AACH,CAAC,EA/CgB,UAAU,KAAV,UAAU,QA+C1B","sourcesContent":["/** Span holding trace_id, span_id */\nexport interface Span {\n /** Sets the finish timestamp on the current span and sends it if it was a transaction */\n finish(useLastSpanTimestamp?: boolean): string | undefined;\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): object;\n /** Convert the object to JSON */\n toJSON(): object;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * @param status http code used to set the status\n */\n setStatus(status: SpanStatus): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n}\n\n/** Interface holder all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n /**\n * Operation of the Span.\n */\n op?: string;\n /**\n * Completion status of the Span.\n */\n status?: SpanStatus;\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n /**\n * Has the sampling decision been made?\n */\n sampled?: boolean;\n /**\n * Span ID\n */\n spanId?: string;\n /**\n * Trace ID\n */\n traceId?: string;\n /**\n * Transaction of the Span.\n */\n transaction?: string;\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n}\n\n/** The status of an Span. */\nexport enum SpanStatus {\n /** The operation completed successfully. */\n Ok = 'ok',\n /** Deadline expired before operation could complete. */\n DeadlineExceeded = 'deadline_exceeded',\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n Unauthenticated = 'unauthenticated',\n /** 403 Forbidden */\n PermissionDenied = 'permission_denied',\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n NotFound = 'not_found',\n /** 429 Too Many Requests */\n ResourceExhausted = 'resource_exhausted',\n /** Client specified an invalid argument. 4xx. */\n InvalidArgument = 'invalid_argument',\n /** 501 Not Implemented */\n Unimplemented = 'unimplemented',\n /** 503 Service Unavailable */\n Unavailable = 'unavailable',\n /** Other/generic 5xx. */\n InternalError = 'internal_error',\n /** Unknown. Any non-standard HTTP status code. */\n UnknownError = 'unknown_error',\n /** The operation was cancelled (typically by the user). */\n Cancelled = 'cancelled',\n /** Already exists (409) */\n AlreadyExists = 'already_exists',\n /** Operation was rejected because the system is not in a state required for the operation's */\n FailedPrecondition = 'failed_precondition',\n /** The operation was aborted, typically due to a concurrency issue. */\n Aborted = 'aborted',\n /** Operation was attempted past the valid range. */\n OutOfRange = 'out_of_range',\n /** Unrecoverable data loss or corruption */\n DataLoss = 'data_loss',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace SpanStatus {\n /**\n * Converts a HTTP status code into a {@link SpanStatus}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or {@link SpanStatus.UnknownError}.\n */\n // tslint:disable-next-line:completed-docs\n export function fromHttpCode(httpStatus: number): SpanStatus {\n if (httpStatus < 400) {\n return SpanStatus.Ok;\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return SpanStatus.Unauthenticated;\n case 403:\n return SpanStatus.PermissionDenied;\n case 404:\n return SpanStatus.NotFound;\n case 409:\n return SpanStatus.AlreadyExists;\n case 413:\n return SpanStatus.FailedPrecondition;\n case 429:\n return SpanStatus.ResourceExhausted;\n default:\n return SpanStatus.InvalidArgument;\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return SpanStatus.Unimplemented;\n case 503:\n return SpanStatus.Unavailable;\n case 504:\n return SpanStatus.DeadlineExceeded;\n default:\n return SpanStatus.InternalError;\n }\n }\n\n return SpanStatus.UnknownError;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/stackframe.d.ts b/node_modules/@sentry/types/esm/stackframe.d.ts deleted file mode 100644 index e148f48..0000000 --- a/node_modules/@sentry/types/esm/stackframe.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** JSDoc */ -export interface StackFrame { - filename?: string; - function?: string; - module?: string; - platform?: string; - lineno?: number; - colno?: number; - abs_path?: string; - context_line?: string; - pre_context?: string[]; - post_context?: string[]; - in_app?: boolean; - vars?: { - [key: string]: any; - }; -} -//# sourceMappingURL=stackframe.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/stackframe.d.ts.map b/node_modules/@sentry/types/esm/stackframe.d.ts.map deleted file mode 100644 index 8f45c69..0000000 --- a/node_modules/@sentry/types/esm/stackframe.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stackframe.d.ts","sourceRoot":"","sources":["../src/stackframe.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC/B"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/stackframe.js b/node_modules/@sentry/types/esm/stackframe.js deleted file mode 100644 index 61f6490..0000000 --- a/node_modules/@sentry/types/esm/stackframe.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=stackframe.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/stackframe.js.map b/node_modules/@sentry/types/esm/stackframe.js.map deleted file mode 100644 index c654646..0000000 --- a/node_modules/@sentry/types/esm/stackframe.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stackframe.js","sourceRoot":"","sources":["../src/stackframe.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface StackFrame {\n filename?: string;\n function?: string;\n module?: string;\n platform?: string;\n lineno?: number;\n colno?: number;\n abs_path?: string;\n context_line?: string;\n pre_context?: string[];\n post_context?: string[];\n in_app?: boolean;\n vars?: { [key: string]: any };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/stacktrace.d.ts b/node_modules/@sentry/types/esm/stacktrace.d.ts deleted file mode 100644 index b2cc3b4..0000000 --- a/node_modules/@sentry/types/esm/stacktrace.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { StackFrame } from './stackframe'; -/** JSDoc */ -export interface Stacktrace { - frames?: StackFrame[]; - frames_omitted?: [number, number]; -} -//# sourceMappingURL=stacktrace.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/stacktrace.d.ts.map b/node_modules/@sentry/types/esm/stacktrace.d.ts.map deleted file mode 100644 index efa7c3f..0000000 --- a/node_modules/@sentry/types/esm/stacktrace.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/stacktrace.js b/node_modules/@sentry/types/esm/stacktrace.js deleted file mode 100644 index a3698f5..0000000 --- a/node_modules/@sentry/types/esm/stacktrace.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=stacktrace.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/stacktrace.js.map b/node_modules/@sentry/types/esm/stacktrace.js.map deleted file mode 100644 index 11a62ec..0000000 --- a/node_modules/@sentry/types/esm/stacktrace.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stacktrace.js","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"","sourcesContent":["import { StackFrame } from './stackframe';\n\n/** JSDoc */\nexport interface Stacktrace {\n frames?: StackFrame[];\n frames_omitted?: [number, number];\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/status.d.ts b/node_modules/@sentry/types/esm/status.d.ts deleted file mode 100644 index 6360b35..0000000 --- a/node_modules/@sentry/types/esm/status.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** The status of an event. */ -export declare enum Status { - /** The status could not be determined. */ - Unknown = "unknown", - /** The event was skipped due to configuration or callbacks. */ - Skipped = "skipped", - /** The event was sent to Sentry successfully. */ - Success = "success", - /** The client is currently rate limited and will try again later. */ - RateLimit = "rate_limit", - /** The event could not be processed. */ - Invalid = "invalid", - /** A server-side error ocurred during submission. */ - Failed = "failed" -} -export declare namespace Status { - /** - * Converts a HTTP status code into a {@link Status}. - * - * @param code The HTTP response status code. - * @returns The send status or {@link Status.Unknown}. - */ - function fromHttpCode(code: number): Status; -} -//# sourceMappingURL=status.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/status.d.ts.map b/node_modules/@sentry/types/esm/status.d.ts.map deleted file mode 100644 index ae65e0d..0000000 --- a/node_modules/@sentry/types/esm/status.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,oBAAY,MAAM;IAChB,0CAA0C;IAC1C,OAAO,YAAY;IACnB,+DAA+D;IAC/D,OAAO,YAAY;IACnB,iDAAiD;IACjD,OAAO,YAAY;IACnB,qEAAqE;IACrE,SAAS,eAAe;IACxB,wCAAwC;IACxC,OAAO,YAAY;IACnB,qDAAqD;IACrD,MAAM,WAAW;CAClB;AAGD,yBAAiB,MAAM,CAAC;IACtB;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkBjD;CACF"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/status.js b/node_modules/@sentry/types/esm/status.js deleted file mode 100644 index b92cb0a..0000000 --- a/node_modules/@sentry/types/esm/status.js +++ /dev/null @@ -1,43 +0,0 @@ -/** The status of an event. */ -export var Status; -(function (Status) { - /** The status could not be determined. */ - Status["Unknown"] = "unknown"; - /** The event was skipped due to configuration or callbacks. */ - Status["Skipped"] = "skipped"; - /** The event was sent to Sentry successfully. */ - Status["Success"] = "success"; - /** The client is currently rate limited and will try again later. */ - Status["RateLimit"] = "rate_limit"; - /** The event could not be processed. */ - Status["Invalid"] = "invalid"; - /** A server-side error ocurred during submission. */ - Status["Failed"] = "failed"; -})(Status || (Status = {})); -// tslint:disable:completed-docs -// tslint:disable:no-unnecessary-qualifier no-namespace -(function (Status) { - /** - * Converts a HTTP status code into a {@link Status}. - * - * @param code The HTTP response status code. - * @returns The send status or {@link Status.Unknown}. - */ - function fromHttpCode(code) { - if (code >= 200 && code < 300) { - return Status.Success; - } - if (code === 429) { - return Status.RateLimit; - } - if (code >= 400 && code < 500) { - return Status.Invalid; - } - if (code >= 500) { - return Status.Failed; - } - return Status.Unknown; - } - Status.fromHttpCode = fromHttpCode; -})(Status || (Status = {})); -//# sourceMappingURL=status.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/status.js.map b/node_modules/@sentry/types/esm/status.js.map deleted file mode 100644 index 184ff9a..0000000 --- a/node_modules/@sentry/types/esm/status.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,MAAM,CAAN,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,0CAA0C;IAC1C,6BAAmB,CAAA;IACnB,+DAA+D;IAC/D,6BAAmB,CAAA;IACnB,iDAAiD;IACjD,6BAAmB,CAAA;IACnB,qEAAqE;IACrE,kCAAwB,CAAA;IACxB,wCAAwC;IACxC,6BAAmB,CAAA;IACnB,qDAAqD;IACrD,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,KAAN,MAAM,QAajB;AACD,gCAAgC;AAChC,uDAAuD;AACvD,WAAiB,MAAM;IACrB;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,IAAY;QACvC,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,KAAK,GAAG,EAAE;YAChB,OAAO,MAAM,CAAC,SAAS,CAAC;SACzB;QAED,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,IAAI,GAAG,EAAE;YACf,OAAO,MAAM,CAAC,MAAM,CAAC;SACtB;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAlBe,mBAAY,eAkB3B,CAAA;AACH,CAAC,EA1BgB,MAAM,KAAN,MAAM,QA0BtB","sourcesContent":["/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/thread.d.ts b/node_modules/@sentry/types/esm/thread.d.ts deleted file mode 100644 index f5edc35..0000000 --- a/node_modules/@sentry/types/esm/thread.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Stacktrace } from './stacktrace'; -/** JSDoc */ -export interface Thread { - id?: number; - name?: string; - stacktrace?: Stacktrace; - crashed?: boolean; - current?: boolean; -} -//# sourceMappingURL=thread.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/thread.d.ts.map b/node_modules/@sentry/types/esm/thread.d.ts.map deleted file mode 100644 index dd8b77d..0000000 --- a/node_modules/@sentry/types/esm/thread.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../src/thread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY;AACZ,MAAM,WAAW,MAAM;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/thread.js b/node_modules/@sentry/types/esm/thread.js deleted file mode 100644 index cd59fae..0000000 --- a/node_modules/@sentry/types/esm/thread.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=thread.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/thread.js.map b/node_modules/@sentry/types/esm/thread.js.map deleted file mode 100644 index d7cc09a..0000000 --- a/node_modules/@sentry/types/esm/thread.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"thread.js","sourceRoot":"","sources":["../src/thread.ts"],"names":[],"mappings":"","sourcesContent":["import { Stacktrace } from './stacktrace';\n\n/** JSDoc */\nexport interface Thread {\n id?: number;\n name?: string;\n stacktrace?: Stacktrace;\n crashed?: boolean;\n current?: boolean;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/transport.d.ts b/node_modules/@sentry/types/esm/transport.d.ts deleted file mode 100644 index 654c4fc..0000000 --- a/node_modules/@sentry/types/esm/transport.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { DsnLike } from './dsn'; -import { Event } from './event'; -import { Response } from './response'; -/** Transport used sending data to Sentry */ -export interface Transport { - /** - * Sends the body to the Store endpoint in Sentry. - * - * @param body String body that should be sent to Sentry. - */ - sendEvent(event: Event): PromiseLike; - /** - * Call this function to wait until all pending requests have been sent. - * - * @param timeout Number time in ms to wait until the buffer is drained. - */ - close(timeout?: number): PromiseLike; -} -/** JSDoc */ -export declare type TransportClass = new (options: TransportOptions) => T; -/** JSDoc */ -export interface TransportOptions { - /** Sentry DSN */ - dsn: DsnLike; - /** Define custom headers */ - headers?: { - [key: string]: string; - }; - /** Set a HTTP proxy that should be used for outbound requests. */ - httpProxy?: string; - /** Set a HTTPS proxy that should be used for outbound requests. */ - httpsProxy?: string; - /** HTTPS proxy certificates path */ - caCerts?: string; -} -//# sourceMappingURL=transport.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/transport.d.ts.map b/node_modules/@sentry/types/esm/transport.d.ts.map deleted file mode 100644 index 33cb2a2..0000000 --- a/node_modules/@sentry/types/esm/transport.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE/C;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,YAAY;AACZ,oBAAY,cAAc,CAAC,CAAC,SAAS,SAAS,IAAI,KAAK,OAAO,EAAE,gBAAgB,KAAK,CAAC,CAAC;AAEvF,YAAY;AACZ,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,4BAA4B;IAC5B,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/transport.js b/node_modules/@sentry/types/esm/transport.js deleted file mode 100644 index 2fade24..0000000 --- a/node_modules/@sentry/types/esm/transport.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=transport.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/transport.js.map b/node_modules/@sentry/types/esm/transport.js.map deleted file mode 100644 index 38630da..0000000 --- a/node_modules/@sentry/types/esm/transport.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"","sourcesContent":["import { DsnLike } from './dsn';\nimport { Event } from './event';\nimport { Response } from './response';\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the body to the Store endpoint in Sentry.\n *\n * @param body String body that should be sent to Sentry.\n */\n sendEvent(event: Event): PromiseLike;\n\n /**\n * Call this function to wait until all pending requests have been sent.\n *\n * @param timeout Number time in ms to wait until the buffer is drained.\n */\n close(timeout?: number): PromiseLike;\n}\n\n/** JSDoc */\nexport type TransportClass = new (options: TransportOptions) => T;\n\n/** JSDoc */\nexport interface TransportOptions {\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: { [key: string]: string };\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/user.d.ts b/node_modules/@sentry/types/esm/user.d.ts deleted file mode 100644 index 2f24df3..0000000 --- a/node_modules/@sentry/types/esm/user.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** JSDoc */ -export interface User { - [key: string]: any; - id?: string; - ip_address?: string; - email?: string; - username?: string; -} -//# sourceMappingURL=user.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/user.d.ts.map b/node_modules/@sentry/types/esm/user.d.ts.map deleted file mode 100644 index 6f833ed..0000000 --- a/node_modules/@sentry/types/esm/user.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,IAAI;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/user.js b/node_modules/@sentry/types/esm/user.js deleted file mode 100644 index d0948fc..0000000 --- a/node_modules/@sentry/types/esm/user.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=user.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/user.js.map b/node_modules/@sentry/types/esm/user.js.map deleted file mode 100644 index c7e4a43..0000000 --- a/node_modules/@sentry/types/esm/user.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"user.js","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface User {\n [key: string]: any;\n id?: string;\n ip_address?: string;\n email?: string;\n username?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/wrappedfunction.d.ts b/node_modules/@sentry/types/esm/wrappedfunction.d.ts deleted file mode 100644 index 1ca8016..0000000 --- a/node_modules/@sentry/types/esm/wrappedfunction.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** JSDoc */ -export interface WrappedFunction extends Function { - [key: string]: any; - __sentry__?: boolean; - __sentry_wrapped__?: WrappedFunction; - __sentry_original__?: WrappedFunction; -} -//# sourceMappingURL=wrappedfunction.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/wrappedfunction.d.ts.map b/node_modules/@sentry/types/esm/wrappedfunction.d.ts.map deleted file mode 100644 index aa35c95..0000000 --- a/node_modules/@sentry/types/esm/wrappedfunction.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wrappedfunction.d.ts","sourceRoot":"","sources":["../src/wrappedfunction.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,eAAe,CAAC;IACrC,mBAAmB,CAAC,EAAE,eAAe,CAAC;CACvC"} \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/wrappedfunction.js b/node_modules/@sentry/types/esm/wrappedfunction.js deleted file mode 100644 index 58233be..0000000 --- a/node_modules/@sentry/types/esm/wrappedfunction.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=wrappedfunction.js.map \ No newline at end of file diff --git a/node_modules/@sentry/types/esm/wrappedfunction.js.map b/node_modules/@sentry/types/esm/wrappedfunction.js.map deleted file mode 100644 index 6d7147b..0000000 --- a/node_modules/@sentry/types/esm/wrappedfunction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wrappedfunction.js","sourceRoot":"","sources":["../src/wrappedfunction.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface WrappedFunction extends Function {\n [key: string]: any;\n __sentry__?: boolean;\n __sentry_wrapped__?: WrappedFunction;\n __sentry_original__?: WrappedFunction;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/types/package.json b/node_modules/@sentry/types/package.json index 6c83801..76965ae 100644 --- a/node_modules/@sentry/types/package.json +++ b/node_modules/@sentry/types/package.json @@ -1,59 +1,45 @@ { - "_args": [ - [ - "@sentry/types@5.14.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "@sentry/types@5.14.1", - "_id": "@sentry/types@5.14.1", + "_from": "@sentry/types@7.31.1", + "_id": "@sentry/types@7.31.1", "_inBundle": false, - "_integrity": "sha1-Vk+bcDwGwql+dW9go8hzuXeyu9I=", + "_integrity": "sha512-1uzr2l0AxEnxUX/S0EdmXUQ15/kDsam8Nbdw4Gai8SU764XwQgA/TTjoewVP597CDI/AHKan67Y630/Ylmkx9w==", "_location": "/@sentry/types", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "@sentry/types@5.14.1", + "raw": "@sentry/types@7.31.1", "name": "@sentry/types", "escapedName": "@sentry%2ftypes", "scope": "@sentry", - "rawSpec": "5.14.1", + "rawSpec": "7.31.1", "saveSpec": null, - "fetchSpec": "5.14.1" + "fetchSpec": "7.31.1" }, "_requiredBy": [ - "/@sentry/apm", - "/@sentry/browser", "/@sentry/core", - "/@sentry/hub", - "/@sentry/minimal", "/@sentry/node", "/@sentry/utils" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/types/-/types-5.14.1.tgz", - "_spec": "5.14.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.31.1.tgz", + "_shasum": "920fc10b289ac1f99f277033b4d26625028a1f9f", + "_spec": "@sentry/types@7.31.1", + "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", "author": { "name": "Sentry" }, "bugs": { "url": "https://github.com/getsentry/sentry-javascript/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Types for all Sentry JavaScript SDKs", - "devDependencies": { - "npm-run-all": "^4.1.2", - "prettier": "^1.17.0", - "prettier-check": "^2.0.0", - "tslint": "^5.16.0", - "typescript": "^3.4.5" - }, "engines": { - "node": ">=6" + "node": ">=8" }, "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/types", - "license": "BSD-3-Clause", - "main": "dist/index.js", + "license": "MIT", + "main": "cjs/index.js", "module": "esm/index.js", "name": "@sentry/types", "publishConfig": { @@ -63,23 +49,7 @@ "type": "git", "url": "git://github.com/getsentry/sentry-javascript.git" }, - "scripts": { - "build": "run-p build:es5 build:esm", - "build:es5": "tsc -p tsconfig.build.json", - "build:esm": "tsc -p tsconfig.esm.json", - "build:watch": "run-p build:watch:es5 build:watch:esm", - "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", - "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", - "fix": "run-s fix:tslint fix:prettier", - "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", - "fix:tslint": "tslint --fix -t stylish -p .", - "link:yarn": "yarn link", - "lint": "run-s lint:prettier lint:tslint", - "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", - "lint:tslint": "tslint -t stylish -p .", - "lint:tslint:json": "tslint --format json -p . | tee lint-results.json" - }, "sideEffects": false, - "types": "dist/index.d.ts", - "version": "5.14.1" + "types": "types/index.d.ts", + "version": "7.31.1" } diff --git a/node_modules/@sentry/utils/LICENSE b/node_modules/@sentry/utils/LICENSE index 8b42db8..535ef05 100644 --- a/node_modules/@sentry/utils/LICENSE +++ b/node_modules/@sentry/utils/LICENSE @@ -1,29 +1,14 @@ -BSD 3-Clause License +Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. -Copyright (c) 2019, Sentry -All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. -* 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. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@sentry/utils/README.md b/node_modules/@sentry/utils/README.md index 185fc37..afa5082 100644 --- a/node_modules/@sentry/utils/README.md +++ b/node_modules/@sentry/utils/README.md @@ -1,8 +1,7 @@

- - + + Sentry -

# Sentry JavaScript SDK Utilities @@ -10,7 +9,6 @@ [![npm version](https://img.shields.io/npm/v/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils) [![npm dm](https://img.shields.io/npm/dm/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils) [![npm dt](https://img.shields.io/npm/dt/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils) -[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/) ## Links @@ -19,6 +17,6 @@ ## General -Common utilities used by the Sentry JavaScript SDKs. **Warning, only submodule imports are allowed here.** Also note, -this function shouldn't be used externally, we will break them from time to time. This package is not part of our public -API contract, we use them only internally. +Common utilities used by the Sentry JavaScript SDKs. + +Note: This package is only meant to be used internally, and as such is not part of our public API contract and does not follow semver. diff --git a/node_modules/@sentry/utils/dist/async.d.ts b/node_modules/@sentry/utils/dist/async.d.ts deleted file mode 100644 index f46660e..0000000 --- a/node_modules/@sentry/utils/dist/async.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Consumes the promise and logs the error when it rejects. - * @param promise A promise to forget. - */ -export declare function forget(promise: PromiseLike): void; -//# sourceMappingURL=async.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/async.js b/node_modules/@sentry/utils/dist/async.js deleted file mode 100644 index 8aeeadd..0000000 --- a/node_modules/@sentry/utils/dist/async.js +++ /dev/null @@ -1,13 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Consumes the promise and logs the error when it rejects. - * @param promise A promise to forget. - */ -function forget(promise) { - promise.then(null, function (e) { - // TODO: Use a better logging mechanism - console.error(e); - }); -} -exports.forget = forget; -//# sourceMappingURL=async.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/async.js.map b/node_modules/@sentry/utils/dist/async.js.map deleted file mode 100644 index 4b1a545..0000000 --- a/node_modules/@sentry/utils/dist/async.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async.js","sourceRoot":"","sources":["../src/async.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,SAAgB,MAAM,CAAC,OAAyB;IAC9C,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,UAAA,CAAC;QAClB,uCAAuC;QACvC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC;AALD,wBAKC","sourcesContent":["/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\nexport function forget(promise: PromiseLike): void {\n promise.then(null, e => {\n // TODO: Use a better logging mechanism\n console.error(e);\n });\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/dsn.d.ts b/node_modules/@sentry/utils/dist/dsn.d.ts deleted file mode 100644 index 31e2e1f..0000000 --- a/node_modules/@sentry/utils/dist/dsn.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types'; -/** The Sentry Dsn, identifying a Sentry instance and project. */ -export declare class Dsn implements DsnComponents { - /** Protocol used to connect to Sentry. */ - protocol: DsnProtocol; - /** Public authorization key. */ - user: string; - /** private _authorization key (deprecated, optional). */ - pass: string; - /** Hostname of the Sentry instance. */ - host: string; - /** Port of the Sentry instance. */ - port: string; - /** Path */ - path: string; - /** Project ID */ - projectId: string; - /** Creates a new Dsn component */ - constructor(from: DsnLike); - /** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private _representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ - toString(withPassword?: boolean): string; - /** Parses a string into this Dsn. */ - private _fromString; - /** Maps Dsn components into this instance. */ - private _fromComponents; - /** Validates this Dsn and throws on error. */ - private _validate; -} -//# sourceMappingURL=dsn.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/dsn.js b/node_modules/@sentry/utils/dist/dsn.js deleted file mode 100644 index e8b043b..0000000 --- a/node_modules/@sentry/utils/dist/dsn.js +++ /dev/null @@ -1,80 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var error_1 = require("./error"); -/** Regular expression used to parse a Dsn. */ -var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/; -/** Error message */ -var ERROR_MESSAGE = 'Invalid Dsn'; -/** The Sentry Dsn, identifying a Sentry instance and project. */ -var Dsn = /** @class */ (function () { - /** Creates a new Dsn component */ - function Dsn(from) { - if (typeof from === 'string') { - this._fromString(from); - } - else { - this._fromComponents(from); - } - this._validate(); - } - /** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private _representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ - Dsn.prototype.toString = function (withPassword) { - if (withPassword === void 0) { withPassword = false; } - // tslint:disable-next-line:no-this-assignment - var _a = this, host = _a.host, path = _a.path, pass = _a.pass, port = _a.port, projectId = _a.projectId, protocol = _a.protocol, user = _a.user; - return (protocol + "://" + user + (withPassword && pass ? ":" + pass : '') + - ("@" + host + (port ? ":" + port : '') + "/" + (path ? path + "/" : path) + projectId)); - }; - /** Parses a string into this Dsn. */ - Dsn.prototype._fromString = function (str) { - var match = DSN_REGEX.exec(str); - if (!match) { - throw new error_1.SentryError(ERROR_MESSAGE); - } - var _a = tslib_1.__read(match.slice(1), 6), protocol = _a[0], user = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5]; - var path = ''; - var projectId = lastPath; - var split = projectId.split('/'); - if (split.length > 1) { - path = split.slice(0, -1).join('/'); - projectId = split.pop(); - } - this._fromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, user: user }); - }; - /** Maps Dsn components into this instance. */ - Dsn.prototype._fromComponents = function (components) { - this.protocol = components.protocol; - this.user = components.user; - this.pass = components.pass || ''; - this.host = components.host; - this.port = components.port || ''; - this.path = components.path || ''; - this.projectId = components.projectId; - }; - /** Validates this Dsn and throws on error. */ - Dsn.prototype._validate = function () { - var _this = this; - ['protocol', 'user', 'host', 'projectId'].forEach(function (component) { - if (!_this[component]) { - throw new error_1.SentryError(ERROR_MESSAGE); - } - }); - if (this.protocol !== 'http' && this.protocol !== 'https') { - throw new error_1.SentryError(ERROR_MESSAGE); - } - if (this.port && isNaN(parseInt(this.port, 10))) { - throw new error_1.SentryError(ERROR_MESSAGE); - } - }; - return Dsn; -}()); -exports.Dsn = Dsn; -//# sourceMappingURL=dsn.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/dsn.js.map b/node_modules/@sentry/utils/dist/dsn.js.map deleted file mode 100644 index b4484d7..0000000 --- a/node_modules/@sentry/utils/dist/dsn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":";;AAEA,iCAAsC;AAEtC,8CAA8C;AAC9C,IAAM,SAAS,GAAG,iEAAiE,CAAC;AAEpF,oBAAoB;AACpB,IAAM,aAAa,GAAG,aAAa,CAAC;AAEpC,iEAAiE;AACjE;IAgBE,kCAAkC;IAClC,aAAmB,IAAa;QAC9B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACxB;aAAM;YACL,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;SAC5B;QAED,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED;;;;;;;;OAQG;IACI,sBAAQ,GAAf,UAAgB,YAA6B;QAA7B,6BAAA,EAAA,oBAA6B;QAC3C,8CAA8C;QACxC,IAAA,SAA4D,EAA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error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w\\.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n /** Protocol used to connect to Sentry. */\n public protocol!: DsnProtocol;\n /** Public authorization key. */\n public user!: string;\n /** private _authorization key (deprecated, optional). */\n public pass!: string;\n /** Hostname of the Sentry instance. */\n public host!: string;\n /** Port of the Sentry instance. */\n public port!: string;\n /** Path */\n public path!: string;\n /** Project ID */\n public projectId!: string;\n\n /** Creates a new Dsn component */\n public constructor(from: DsnLike) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n public toString(withPassword: boolean = false): string {\n // tslint:disable-next-line:no-this-assignment\n const { host, path, pass, port, projectId, protocol, user } = this;\n return (\n `${protocol}://${user}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }\n\n /** Parses a string into this Dsn. */\n private _fromString(str: string): void {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, user });\n }\n\n /** Maps Dsn components into this instance. */\n private _fromComponents(components: DsnComponents): void {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n }\n\n /** Validates this Dsn and throws on error. */\n private _validate(): void {\n ['protocol', 'user', 'host', 'projectId'].forEach(component => {\n if (!this[component as keyof DsnComponents]) {\n throw new SentryError(ERROR_MESSAGE);\n }\n });\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/error.d.ts b/node_modules/@sentry/utils/dist/error.d.ts deleted file mode 100644 index 4f3e56c..0000000 --- a/node_modules/@sentry/utils/dist/error.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** An error emitted by Sentry SDKs and related utilities. */ -export declare class SentryError extends Error { - message: string; - /** Display name of this error instance. */ - name: string; - constructor(message: string); -} -//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/error.js b/node_modules/@sentry/utils/dist/error.js deleted file mode 100644 index 0805d26..0000000 --- a/node_modules/@sentry/utils/dist/error.js +++ /dev/null @@ -1,19 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var polyfill_1 = require("./polyfill"); -/** An error emitted by Sentry SDKs and related utilities. */ -var SentryError = /** @class */ (function (_super) { - tslib_1.__extends(SentryError, _super); - function SentryError(message) { - var _newTarget = this.constructor; - var _this = _super.call(this, message) || this; - _this.message = message; - // tslint:disable:no-unsafe-any - _this.name = _newTarget.prototype.constructor.name; - polyfill_1.setPrototypeOf(_this, _newTarget.prototype); - return _this; - } - return SentryError; -}(Error)); -exports.SentryError = SentryError; -//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/error.js.map b/node_modules/@sentry/utils/dist/error.js.map deleted file mode 100644 index 52ef132..0000000 --- a/node_modules/@sentry/utils/dist/error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";;AAAA,uCAA4C;AAE5C,6DAA6D;AAC7D;IAAiC,uCAAK;IAIpC,qBAA0B,OAAe;;QAAzC,YACE,kBAAM,OAAO,CAAC,SAKf;QANyB,aAAO,GAAP,OAAO,CAAQ;QAGvC,+BAA+B;QAC/B,KAAI,CAAC,IAAI,GAAG,WAAW,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;QAClD,yBAAc,CAAC,KAAI,EAAE,WAAW,SAAS,CAAC,CAAC;;IAC7C,CAAC;IACH,kBAAC;AAAD,CAAC,AAXD,CAAiC,KAAK,GAWrC;AAXY,kCAAW","sourcesContent":["import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n // tslint:disable:no-unsafe-any\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/index.d.ts b/node_modules/@sentry/utils/dist/index.d.ts deleted file mode 100644 index 3fa9ec4..0000000 --- a/node_modules/@sentry/utils/dist/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from './async'; -export * from './error'; -export * from './is'; -export * from './logger'; -export * from './memo'; -export * from './misc'; -export * from './object'; -export * from './path'; -export * from './promisebuffer'; -export * from './string'; -export * from './supports'; -export * from './syncpromise'; -export * from './instrument'; -export * from './dsn'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/index.js b/node_modules/@sentry/utils/dist/index.js deleted file mode 100644 index 867e88d..0000000 --- a/node_modules/@sentry/utils/dist/index.js +++ /dev/null @@ -1,17 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./async"), exports); -tslib_1.__exportStar(require("./error"), exports); -tslib_1.__exportStar(require("./is"), exports); -tslib_1.__exportStar(require("./logger"), exports); -tslib_1.__exportStar(require("./memo"), exports); -tslib_1.__exportStar(require("./misc"), exports); -tslib_1.__exportStar(require("./object"), exports); -tslib_1.__exportStar(require("./path"), exports); -tslib_1.__exportStar(require("./promisebuffer"), exports); -tslib_1.__exportStar(require("./string"), exports); -tslib_1.__exportStar(require("./supports"), exports); -tslib_1.__exportStar(require("./syncpromise"), exports); -tslib_1.__exportStar(require("./instrument"), exports); -tslib_1.__exportStar(require("./dsn"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/index.js.map b/node_modules/@sentry/utils/dist/index.js.map deleted file mode 100644 index 3e92e8b..0000000 --- a/node_modules/@sentry/utils/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,kDAAwB;AACxB,kDAAwB;AACxB,+CAAqB;AACrB,mDAAyB;AACzB,iDAAuB;AACvB,iDAAuB;AACvB,mDAAyB;AACzB,iDAAuB;AACvB,0DAAgC;AAChC,mDAAyB;AACzB,qDAA2B;AAC3B,wDAA8B;AAC9B,uDAA6B;AAC7B,gDAAsB","sourcesContent":["export * from './async';\nexport * from './error';\nexport * from './is';\nexport * from './logger';\nexport * from './memo';\nexport * from './misc';\nexport * from './object';\nexport * from './path';\nexport * from './promisebuffer';\nexport * from './string';\nexport * from './supports';\nexport * from './syncpromise';\nexport * from './instrument';\nexport * from './dsn';\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/instrument.d.ts b/node_modules/@sentry/utils/dist/instrument.d.ts deleted file mode 100644 index 336d741..0000000 --- a/node_modules/@sentry/utils/dist/instrument.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** Object describing handler that will be triggered for a given `type` of instrumentation */ -interface InstrumentHandler { - type: InstrumentHandlerType; - callback: InstrumentHandlerCallback; -} -declare type InstrumentHandlerType = 'console' | 'dom' | 'fetch' | 'history' | 'sentry' | 'xhr' | 'error' | 'unhandledrejection'; -declare type InstrumentHandlerCallback = (data: any) => void; -/** - * Add handler that will be called when given type of instrumentation triggers. - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -export declare function addInstrumentationHandler(handler: InstrumentHandler): void; -export {}; -//# sourceMappingURL=instrument.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/instrument.js b/node_modules/@sentry/utils/dist/instrument.js deleted file mode 100644 index 6d10190..0000000 --- a/node_modules/@sentry/utils/dist/instrument.js +++ /dev/null @@ -1,442 +0,0 @@ -/* tslint:disable:only-arrow-functions no-unsafe-any */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var is_1 = require("./is"); -var logger_1 = require("./logger"); -var misc_1 = require("./misc"); -var object_1 = require("./object"); -var supports_1 = require("./supports"); -var global = misc_1.getGlobalObject(); -/** - * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc. - * - Console API - * - Fetch API - * - XHR API - * - History API - * - DOM API (click/typing) - * - Error API - * - UnhandledRejection API - */ -var handlers = {}; -var instrumented = {}; -/** Instruments given API */ -function instrument(type) { - if (instrumented[type]) { - return; - } - instrumented[type] = true; - switch (type) { - case 'console': - instrumentConsole(); - break; - case 'dom': - instrumentDOM(); - break; - case 'xhr': - instrumentXHR(); - break; - case 'fetch': - instrumentFetch(); - break; - case 'history': - instrumentHistory(); - break; - case 'error': - instrumentError(); - break; - case 'unhandledrejection': - instrumentUnhandledRejection(); - break; - default: - logger_1.logger.warn('unknown instrumentation type:', type); - } -} -/** - * Add handler that will be called when given type of instrumentation triggers. - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addInstrumentationHandler(handler) { - // tslint:disable-next-line:strict-type-predicates - if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') { - return; - } - handlers[handler.type] = handlers[handler.type] || []; - handlers[handler.type].push(handler.callback); - instrument(handler.type); -} -exports.addInstrumentationHandler = addInstrumentationHandler; -/** JSDoc */ -function triggerHandlers(type, data) { - var e_1, _a; - if (!type || !handlers[type]) { - return; - } - try { - for (var _b = tslib_1.__values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) { - var handler = _c.value; - try { - handler(data); - } - catch (e) { - logger_1.logger.error("Error while triggering instrumentation handler.\nType: " + type + "\nName: " + misc_1.getFunctionName(handler) + "\nError: " + e); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } -} -/** JSDoc */ -function instrumentConsole() { - if (!('console' in global)) { - return; - } - ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) { - if (!(level in global.console)) { - return; - } - object_1.fill(global.console, level, function (originalConsoleLevel) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - triggerHandlers('console', { args: args, level: level }); - // this fails for some browsers. :( - if (originalConsoleLevel) { - Function.prototype.apply.call(originalConsoleLevel, global.console, args); - } - }; - }); - }); -} -/** JSDoc */ -function instrumentFetch() { - if (!supports_1.supportsNativeFetch()) { - return; - } - object_1.fill(global, 'fetch', function (originalFetch) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var commonHandlerData = { - args: args, - fetchData: { - method: getFetchMethod(args), - url: getFetchUrl(args), - }, - startTimestamp: Date.now(), - }; - triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData)); - return originalFetch.apply(global, args).then(function (response) { - triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData, { endTimestamp: Date.now(), response: response })); - return response; - }, function (error) { - triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData, { endTimestamp: Date.now(), error: error })); - throw error; - }); - }; - }); -} -/** Extract `method` from fetch call arguments */ -function getFetchMethod(fetchArgs) { - if (fetchArgs === void 0) { fetchArgs = []; } - if ('Request' in global && is_1.isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) { - return String(fetchArgs[0].method).toUpperCase(); - } - if (fetchArgs[1] && fetchArgs[1].method) { - return String(fetchArgs[1].method).toUpperCase(); - } - return 'GET'; -} -/** Extract `url` from fetch call arguments */ -function getFetchUrl(fetchArgs) { - if (fetchArgs === void 0) { fetchArgs = []; } - if (typeof fetchArgs[0] === 'string') { - return fetchArgs[0]; - } - if ('Request' in global && is_1.isInstanceOf(fetchArgs[0], Request)) { - return fetchArgs[0].url; - } - return String(fetchArgs[0]); -} -/** JSDoc */ -function instrumentXHR() { - if (!('XMLHttpRequest' in global)) { - return; - } - var xhrproto = XMLHttpRequest.prototype; - object_1.fill(xhrproto, 'open', function (originalOpen) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var url = args[1]; - this.__sentry_xhr__ = { - method: is_1.isString(args[0]) ? args[0].toUpperCase() : args[0], - url: args[1], - }; - // if Sentry key appears in URL, don't capture it as a request - if (is_1.isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) { - this.__sentry_own_request__ = true; - } - return originalOpen.apply(this, args); - }; - }); - object_1.fill(xhrproto, 'send', function (originalSend) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var xhr = this; // tslint:disable-line:no-this-assignment - var commonHandlerData = { - args: args, - startTimestamp: Date.now(), - xhr: xhr, - }; - triggerHandlers('xhr', tslib_1.__assign({}, commonHandlerData)); - xhr.addEventListener('readystatechange', function () { - if (xhr.readyState === 4) { - try { - // touching statusCode in some platforms throws - // an exception - if (xhr.__sentry_xhr__) { - xhr.__sentry_xhr__.status_code = xhr.status; - } - } - catch (e) { - /* do nothing */ - } - triggerHandlers('xhr', tslib_1.__assign({}, commonHandlerData, { endTimestamp: Date.now() })); - } - }); - return originalSend.apply(this, args); - }; - }); -} -var lastHref; -/** JSDoc */ -function instrumentHistory() { - if (!supports_1.supportsHistory()) { - return; - } - var oldOnPopState = global.onpopstate; - global.onpopstate = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var to = global.location.href; - // keep track of the current URL state, as we always receive only the updated state - var from = lastHref; - lastHref = to; - triggerHandlers('history', { - from: from, - to: to, - }); - if (oldOnPopState) { - return oldOnPopState.apply(this, args); - } - }; - /** @hidden */ - function historyReplacementFunction(originalHistoryFunction) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var url = args.length > 2 ? args[2] : undefined; - if (url) { - // coerce to string (this is what pushState does) - var from = lastHref; - var to = String(url); - // keep track of the current URL state, as we always receive only the updated state - lastHref = to; - triggerHandlers('history', { - from: from, - to: to, - }); - } - return originalHistoryFunction.apply(this, args); - }; - } - object_1.fill(global.history, 'pushState', historyReplacementFunction); - object_1.fill(global.history, 'replaceState', historyReplacementFunction); -} -/** JSDoc */ -function instrumentDOM() { - if (!('document' in global)) { - return; - } - // Capture breadcrumbs from any click that is unhandled / bubbled up all the way - // to the document. Do this before we instrument addEventListener. - global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false); - global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false); - // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses. - ['EventTarget', 'Node'].forEach(function (target) { - var proto = global[target] && global[target].prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - object_1.fill(proto, 'addEventListener', function (original) { - return function (eventName, fn, options) { - if (fn && fn.handleEvent) { - if (eventName === 'click') { - object_1.fill(fn, 'handleEvent', function (innerOriginal) { - return function (event) { - domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event); - return innerOriginal.call(this, event); - }; - }); - } - if (eventName === 'keypress') { - object_1.fill(fn, 'handleEvent', function (innerOriginal) { - return function (event) { - keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event); - return innerOriginal.call(this, event); - }; - }); - } - } - else { - if (eventName === 'click') { - domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this); - } - if (eventName === 'keypress') { - keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this); - } - } - return original.call(this, eventName, fn, options); - }; - }); - object_1.fill(proto, 'removeEventListener', function (original) { - return function (eventName, fn, options) { - var callback = fn; - try { - callback = callback && (callback.__sentry_wrapped__ || callback); - } - catch (e) { - // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments - } - return original.call(this, eventName, callback, options); - }; - }); - }); -} -var debounceDuration = 1000; -var debounceTimer = 0; -var keypressTimeout; -var lastCapturedEvent; -/** - * Wraps addEventListener to capture UI breadcrumbs - * @param name the event name (e.g. "click") - * @param handler function that will be triggered - * @param debounce decides whether it should wait till another event loop - * @returns wrapped breadcrumb events handler - * @hidden - */ -function domEventHandler(name, handler, debounce) { - if (debounce === void 0) { debounce = false; } - return function (event) { - // reset keypress timeout; e.g. triggering a 'click' after - // a 'keypress' will reset the keypress debounce so that a new - // set of keypresses can be recorded - keypressTimeout = undefined; - // It's possible this handler might trigger multiple times for the same - // event (e.g. event propagation through node ancestors). Ignore if we've - // already captured the event. - if (!event || lastCapturedEvent === event) { - return; - } - lastCapturedEvent = event; - if (debounceTimer) { - clearTimeout(debounceTimer); - } - if (debounce) { - debounceTimer = setTimeout(function () { - handler({ event: event, name: name }); - }); - } - else { - handler({ event: event, name: name }); - } - }; -} -/** - * Wraps addEventListener to capture keypress UI events - * @param handler function that will be triggered - * @returns wrapped keypress events handler - * @hidden - */ -function keypressEventHandler(handler) { - // TODO: if somehow user switches keypress target before - // debounce timeout is triggered, we will only capture - // a single breadcrumb from the FIRST target (acceptable?) - return function (event) { - var target; - try { - target = event.target; - } - catch (e) { - // just accessing event properties can throw an exception in some rare circumstances - // see: https://github.com/getsentry/raven-js/issues/838 - return; - } - var tagName = target && target.tagName; - // only consider keypress events on actual input elements - // this will disregard keypresses targeting body (e.g. tabbing - // through elements, hotkeys, etc) - if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)) { - return; - } - // record first keypress in a series, but ignore subsequent - // keypresses until debounce clears - if (!keypressTimeout) { - domEventHandler('input', handler)(event); - } - clearTimeout(keypressTimeout); - keypressTimeout = setTimeout(function () { - keypressTimeout = undefined; - }, debounceDuration); - }; -} -var _oldOnErrorHandler = null; -/** JSDoc */ -function instrumentError() { - _oldOnErrorHandler = global.onerror; - global.onerror = function (msg, url, line, column, error) { - triggerHandlers('error', { - column: column, - error: error, - line: line, - msg: msg, - url: url, - }); - if (_oldOnErrorHandler) { - return _oldOnErrorHandler.apply(this, arguments); - } - return false; - }; -} -var _oldOnUnhandledRejectionHandler = null; -/** JSDoc */ -function instrumentUnhandledRejection() { - _oldOnUnhandledRejectionHandler = global.onunhandledrejection; - global.onunhandledrejection = function (e) { - triggerHandlers('unhandledrejection', e); - if (_oldOnUnhandledRejectionHandler) { - return _oldOnUnhandledRejectionHandler.apply(this, arguments); - } - return true; - }; -} -//# sourceMappingURL=instrument.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/instrument.js.map b/node_modules/@sentry/utils/dist/instrument.js.map deleted file mode 100644 index 75a62d7..0000000 --- a/node_modules/@sentry/utils/dist/instrument.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"instrument.js","sourceRoot":"","sources":["../src/instrument.ts"],"names":[],"mappings":"AAAA,uDAAuD;;;AAIvD,2BAA8C;AAC9C,mCAAkC;AAClC,+BAA0D;AAC1D,mCAAgC;AAChC,uCAAkE;AAElE,IAAM,MAAM,GAAG,sBAAe,EAAU,CAAC;AAkBzC;;;;;;;;;GASG;AAEH,IAAM,QAAQ,GAAqE,EAAE,CAAC;AACtF,IAAM,YAAY,GAAiD,EAAE,CAAC;AAEtE,4BAA4B;AAC5B,SAAS,UAAU,CAAC,IAA2B;I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K,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;SAC/D;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/* tslint:disable:only-arrow-functions no-unsafe-any */\n\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getFunctionName, getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n type: InstrumentHandlerType;\n callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n // tslint:disable-next-line:strict-type-predicates\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n return function(...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function(originalFetch: () => void): () => void {\n return function(...args: any[]): void {\n const commonHandlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...commonHandlerData,\n });\n\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n error,\n });\n throw error;\n },\n );\n };\n });\n}\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const url = args[1];\n this.__sentry_xhr__ = {\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const commonHandlerData = {\n args,\n startTimestamp: Date.now(),\n xhr,\n };\n\n triggerHandlers('xhr', {\n ...commonHandlerData,\n });\n\n xhr.addEventListener('readystatechange', function(): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function(this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n\n // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n ['EventTarget', 'Node'].forEach((target: string) => {\n const proto = (global as any)[target] && (global as any)[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerOrEventListenerObject, capture?: boolean, secure?: boolean) => void {\n if (fn && (fn as EventListenerObject).handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n } else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = fn as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n });\n}\n\nconst debounceDuration: number = 1000;\nlet debounceTimer: number = 0;\nlet keypressTimeout: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name: string, handler: Function, debounce: boolean = false): (event: Event) => void {\n return (event: Event) => {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined;\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n lastCapturedEvent = event;\n\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n if (debounce) {\n debounceTimer = setTimeout(() => {\n handler({ event, name });\n });\n } else {\n handler({ event, name });\n }\n };\n}\n\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler: Function): (event: Event) => void {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return (event: Event) => {\n let target;\n\n try {\n target = event.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n\n const tagName = target && (target as HTMLElement).tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !(target as HTMLElement).isContentEditable)) {\n return;\n }\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n clearTimeout(keypressTimeout);\n\n keypressTimeout = (setTimeout(() => {\n keypressTimeout = undefined;\n }, debounceDuration) as any) as number;\n };\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function(e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/is.d.ts b/node_modules/@sentry/utils/dist/is.d.ts deleted file mode 100644 index dc534ed..0000000 --- a/node_modules/@sentry/utils/dist/is.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Checks whether given value's type is one of a few Error or Error-like - * {@link isError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isError(wat: any): boolean; -/** - * Checks whether given value's type is ErrorEvent - * {@link isErrorEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isErrorEvent(wat: any): boolean; -/** - * Checks whether given value's type is DOMError - * {@link isDOMError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isDOMError(wat: any): boolean; -/** - * Checks whether given value's type is DOMException - * {@link isDOMException}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isDOMException(wat: any): boolean; -/** - * Checks whether given value's type is a string - * {@link isString}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isString(wat: any): boolean; -/** - * Checks whether given value's is a primitive (undefined, null, number, boolean, string) - * {@link isPrimitive}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isPrimitive(wat: any): boolean; -/** - * Checks whether given value's type is an object literal - * {@link isPlainObject}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isPlainObject(wat: any): boolean; -/** - * Checks whether given value's type is an Event instance - * {@link isEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isEvent(wat: any): boolean; -/** - * Checks whether given value's type is an Element instance - * {@link isElement}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isElement(wat: any): boolean; -/** - * Checks whether given value's type is an regexp - * {@link isRegExp}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isRegExp(wat: any): boolean; -/** - * Checks whether given value has a then function. - * @param wat A value to be checked. - */ -export declare function isThenable(wat: any): boolean; -/** - * Checks whether given value's type is a SyntheticEvent - * {@link isSyntheticEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isSyntheticEvent(wat: any): boolean; -/** - * Checks whether given value's type is an instance of provided constructor. - * {@link isInstanceOf}. - * - * @param wat A value to be checked. - * @param base A constructor to be used in a check. - * @returns A boolean representing the result. - */ -export declare function isInstanceOf(wat: any, base: any): boolean; -//# sourceMappingURL=is.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/is.js b/node_modules/@sentry/utils/dist/is.js deleted file mode 100644 index 4e5e60d..0000000 --- a/node_modules/@sentry/utils/dist/is.js +++ /dev/null @@ -1,163 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Checks whether given value's type is one of a few Error or Error-like - * {@link isError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isError(wat) { - switch (Object.prototype.toString.call(wat)) { - case '[object Error]': - return true; - case '[object Exception]': - return true; - case '[object DOMException]': - return true; - default: - return isInstanceOf(wat, Error); - } -} -exports.isError = isError; -/** - * Checks whether given value's type is ErrorEvent - * {@link isErrorEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isErrorEvent(wat) { - return Object.prototype.toString.call(wat) === '[object ErrorEvent]'; -} -exports.isErrorEvent = isErrorEvent; -/** - * Checks whether given value's type is DOMError - * {@link isDOMError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isDOMError(wat) { - return Object.prototype.toString.call(wat) === '[object DOMError]'; -} -exports.isDOMError = isDOMError; -/** - * Checks whether given value's type is DOMException - * {@link isDOMException}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isDOMException(wat) { - return Object.prototype.toString.call(wat) === '[object DOMException]'; -} -exports.isDOMException = isDOMException; -/** - * Checks whether given value's type is a string - * {@link isString}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isString(wat) { - return Object.prototype.toString.call(wat) === '[object String]'; -} -exports.isString = isString; -/** - * Checks whether given value's is a primitive (undefined, null, number, boolean, string) - * {@link isPrimitive}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isPrimitive(wat) { - return wat === null || (typeof wat !== 'object' && typeof wat !== 'function'); -} -exports.isPrimitive = isPrimitive; -/** - * Checks whether given value's type is an object literal - * {@link isPlainObject}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isPlainObject(wat) { - return Object.prototype.toString.call(wat) === '[object Object]'; -} -exports.isPlainObject = isPlainObject; -/** - * Checks whether given value's type is an Event instance - * {@link isEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isEvent(wat) { - // tslint:disable-next-line:strict-type-predicates - return typeof Event !== 'undefined' && isInstanceOf(wat, Event); -} -exports.isEvent = isEvent; -/** - * Checks whether given value's type is an Element instance - * {@link isElement}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isElement(wat) { - // tslint:disable-next-line:strict-type-predicates - return typeof Element !== 'undefined' && isInstanceOf(wat, Element); -} -exports.isElement = isElement; -/** - * Checks whether given value's type is an regexp - * {@link isRegExp}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isRegExp(wat) { - return Object.prototype.toString.call(wat) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; -/** - * Checks whether given value has a then function. - * @param wat A value to be checked. - */ -function isThenable(wat) { - // tslint:disable:no-unsafe-any - return Boolean(wat && wat.then && typeof wat.then === 'function'); - // tslint:enable:no-unsafe-any -} -exports.isThenable = isThenable; -/** - * Checks whether given value's type is a SyntheticEvent - * {@link isSyntheticEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isSyntheticEvent(wat) { - // tslint:disable-next-line:no-unsafe-any - return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; -} -exports.isSyntheticEvent = isSyntheticEvent; -/** - * Checks whether given value's type is an instance of provided constructor. - * {@link isInstanceOf}. - * - * @param wat A value to be checked. - * @param base A constructor to be used in a check. - * @returns A boolean representing the result. - */ -function isInstanceOf(wat, base) { - try { - // tslint:disable-next-line:no-unsafe-any - return wat instanceof base; - } - catch (_e) { - return false; - } -} -exports.isInstanceOf = isInstanceOf; -//# sourceMappingURL=is.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/is.js.map b/node_modules/@sentry/utils/dist/is.js.map deleted file mode 100644 index e8457c6..0000000 --- a/node_modules/@sentry/utils/dist/is.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is.js","sourceRoot":"","sources":["../src/is.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,SAAgB,OAAO,CAAC,GAAQ;IAC9B,QAAQ,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAC3C,KAAK,gBAAgB;YACnB,OAAO,IAAI,CAAC;QACd,KAAK,oBAAoB;YACvB,OAAO,IAAI,CAAC;QACd,KAAK,uBAAuB;YAC1B,OAAO,IAAI,CAAC;QACd;YACE,OAAO,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KACnC;AACH,CAAC;AAXD,0BAWC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,GAAQ;IACnC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,qBAAqB,CAAC;AACvE,CAAC;AAFD,oCAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,GAAQ;IACjC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC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,iBAAiB,CAAC;AACnE,CAAC;AAFD,4BAEC;AAED;;;GAGG;AACH,SAAgB,UAAU,CAAC,GAAQ;IACjC,+BAA+B;IAC/B,OAAO,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;IAClE,8BAA8B;AAChC,CAAC;AAJD,gCAIC;AAED;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,GAAQ;IACvC,yCAAyC;IACzC,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,aAAa,IAAI,GAAG,IAAI,gBAAgB,IAAI,GAAG,IAAI,iBAAiB,IAAI,GAAG,CAAC;AAC3G,CAAC;AAHD,4CAGC;AACD;;;;;;;GAOG;AACH,SAAgB,YAAY,CAAC,GAAQ,EAAE,IAAS;IAC9C,IAAI;QACF,yCAAyC;QACzC,OAAO,GAAG,YAAY,IAAI,CAAC;KAC5B;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAPD,oCAOC","sourcesContent":["/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: any): boolean {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: any): boolean {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): boolean {\n // tslint:disable:no-unsafe-any\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n // tslint:enable:no-unsafe-any\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: any): boolean {\n // tslint:disable-next-line:no-unsafe-any\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/logger.d.ts b/node_modules/@sentry/utils/dist/logger.d.ts deleted file mode 100644 index 9805078..0000000 --- a/node_modules/@sentry/utils/dist/logger.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** JSDoc */ -declare class Logger { - /** JSDoc */ - private _enabled; - /** JSDoc */ - constructor(); - /** JSDoc */ - disable(): void; - /** JSDoc */ - enable(): void; - /** JSDoc */ - log(...args: any[]): void; - /** JSDoc */ - warn(...args: any[]): void; - /** JSDoc */ - error(...args: any[]): void; -} -declare const logger: Logger; -export { logger }; -//# sourceMappingURL=logger.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/logger.js b/node_modules/@sentry/utils/dist/logger.js deleted file mode 100644 index cb4e68c..0000000 --- a/node_modules/@sentry/utils/dist/logger.js +++ /dev/null @@ -1,66 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var misc_1 = require("./misc"); -// TODO: Implement different loggers for different environments -var global = misc_1.getGlobalObject(); -/** Prefix for logging strings */ -var PREFIX = 'Sentry Logger '; -/** JSDoc */ -var Logger = /** @class */ (function () { - /** JSDoc */ - function Logger() { - this._enabled = false; - } - /** JSDoc */ - Logger.prototype.disable = function () { - this._enabled = false; - }; - /** JSDoc */ - Logger.prototype.enable = function () { - this._enabled = true; - }; - /** JSDoc */ - Logger.prototype.log = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._enabled) { - return; - } - misc_1.consoleSandbox(function () { - global.console.log(PREFIX + "[Log]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - /** JSDoc */ - Logger.prototype.warn = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._enabled) { - return; - } - misc_1.consoleSandbox(function () { - global.console.warn(PREFIX + "[Warn]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - /** JSDoc */ - Logger.prototype.error = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._enabled) { - return; - } - misc_1.consoleSandbox(function () { - global.console.error(PREFIX + "[Error]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - return Logger; -}()); -// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used -global.__SENTRY__ = global.__SENTRY__ || {}; -var logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger()); -exports.logger = logger; -//# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/logger.js.map b/node_modules/@sentry/utils/dist/logger.js.map deleted file mode 100644 index 65448bd..0000000 --- a/node_modules/@sentry/utils/dist/logger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA,+BAAyD;AAEzD,+DAA+D;AAC/D,IAAM,MAAM,GAAG,sBAAe,EAA0B,CAAC;AAEzD,iCAAiC;AACjC,IAAM,MAAM,GAAG,gBAAgB,CAAC;AAEhC,YAAY;AACZ;IAIE,YAAY;IACZ;QACE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,YAAY;IACL,wBAAO,GAAd;QACE,IAAI,CAAC,QAAQ,GAAG,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UAAU,CAAC,MAAiB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC,CAAC;AAExF,wBAAM","sourcesContent":["import { consoleSandbox, getGlobalObject } from './misc';\n\n// TODO: Implement different loggers for different environments\nconst global = getGlobalObject();\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** JSDoc */\nclass Logger {\n /** JSDoc */\n private _enabled: boolean;\n\n /** JSDoc */\n public constructor() {\n this._enabled = false;\n }\n\n /** JSDoc */\n public disable(): void {\n this._enabled = false;\n }\n\n /** JSDoc */\n public enable(): void {\n this._enabled = true;\n }\n\n /** JSDoc */\n public log(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.log(`${PREFIX}[Log]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public warn(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public error(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.error(`${PREFIX}[Error]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nconst logger = (global.__SENTRY__.logger as Logger) || (global.__SENTRY__.logger = new Logger());\n\nexport { logger };\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/memo.d.ts b/node_modules/@sentry/utils/dist/memo.d.ts deleted file mode 100644 index 39d621e..0000000 --- a/node_modules/@sentry/utils/dist/memo.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Memo class used for decycle json objects. Uses WeakSet if available otherwise array. - */ -export declare class Memo { - /** Determines if WeakSet is available */ - private readonly _hasWeakSet; - /** Either WeakSet or Array */ - private readonly _inner; - constructor(); - /** - * Sets obj to remember. - * @param obj Object to remember - */ - memoize(obj: any): boolean; - /** - * Removes object from internal storage. - * @param obj Object to forget - */ - unmemoize(obj: any): void; -} -//# sourceMappingURL=memo.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/memo.js b/node_modules/@sentry/utils/dist/memo.js deleted file mode 100644 index 69d9568..0000000 --- a/node_modules/@sentry/utils/dist/memo.js +++ /dev/null @@ -1,54 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -// tslint:disable:no-unsafe-any -/** - * Memo class used for decycle json objects. Uses WeakSet if available otherwise array. - */ -var Memo = /** @class */ (function () { - function Memo() { - // tslint:disable-next-line - this._hasWeakSet = typeof WeakSet === 'function'; - this._inner = this._hasWeakSet ? new WeakSet() : []; - } - /** - * Sets obj to remember. - * @param obj Object to remember - */ - Memo.prototype.memoize = function (obj) { - if (this._hasWeakSet) { - if (this._inner.has(obj)) { - return true; - } - this._inner.add(obj); - return false; - } - // tslint:disable-next-line:prefer-for-of - for (var i = 0; i < this._inner.length; i++) { - var value = this._inner[i]; - if (value === obj) { - return true; - } - } - this._inner.push(obj); - return false; - }; - /** - * Removes object from internal storage. - * @param obj Object to forget - */ - Memo.prototype.unmemoize = function (obj) { - if (this._hasWeakSet) { - this._inner.delete(obj); - } - else { - for (var i = 0; i < this._inner.length; i++) { - if (this._inner[i] === obj) { - this._inner.splice(i, 1); - break; - } - } - } - }; - return Memo; -}()); -exports.Memo = Memo; -//# sourceMappingURL=memo.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/memo.js.map b/node_modules/@sentry/utils/dist/memo.js.map deleted file mode 100644 index 9b5c1f9..0000000 --- a/node_modules/@sentry/utils/dist/memo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"memo.js","sourceRoot":"","sources":["../src/memo.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B;;GAEG;AACH;IAME;QACE,2BAA2B;QAC3B,IAA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ACH,CAAC;IACH,WAAC;AAAD,CAAC,AAnDD,IAmDC;AAnDY,oBAAI","sourcesContent":["// tslint:disable:no-unsafe-any\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n /** Determines if WeakSet is available */\n private readonly _hasWeakSet: boolean;\n /** Either WeakSet or Array */\n private readonly _inner: any;\n\n public constructor() {\n // tslint:disable-next-line\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n public memoize(obj: any): boolean {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < this._inner.length; i++) {\n const value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n }\n\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n public unmemoize(obj: any): void {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (let i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/misc.d.ts b/node_modules/@sentry/utils/dist/misc.d.ts deleted file mode 100644 index 9811ac3..0000000 --- a/node_modules/@sentry/utils/dist/misc.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Event, Integration, StackFrame } from '@sentry/types'; -/** Internal */ -interface SentryGlobal { - Sentry?: { - Integrations?: Integration[]; - }; - SENTRY_ENVIRONMENT?: string; - SENTRY_DSN?: string; - SENTRY_RELEASE?: { - id?: string; - }; - __SENTRY__: { - globalEventProcessors: any; - hub: any; - logger: any; - }; -} -/** - * Requires a module which is protected _against bundler minification. - * - * @param request The module path to resolve - */ -export declare function dynamicRequire(mod: any, request: string): any; -/** - * Checks whether we're in the Node.js or Browser environment - * - * @returns Answer to given question - */ -export declare function isNodeEnv(): boolean; -/** - * Safely get global scope object - * - * @returns Global scope object - */ -export declare function getGlobalObject(): T & SentryGlobal; -/** - * UUID4 generator - * - * @returns string Generated UUID4. - */ -export declare function uuid4(): string; -/** - * Parses string form of URL into an object - * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B - * // intentionally using regex and not href parsing trick because React Native and other - * // environments where DOM might not be available - * @returns parsed URL object - */ -export declare function parseUrl(url: string): { - host?: string; - path?: string; - protocol?: string; - relative?: string; -}; -/** - * Extracts either message or type+value from an event that can be used for user-facing logs - * @returns event's description - */ -export declare function getEventDescription(event: Event): string; -/** JSDoc */ -export declare function consoleSandbox(callback: () => any): any; -/** - * Adds exception values, type and value to an synthetic Exception. - * @param event The event to modify. - * @param value Value of the exception. - * @param type Type of the exception. - * @hidden - */ -export declare function addExceptionTypeValue(event: Event, value?: string, type?: string): void; -/** - * Adds exception mechanism to a given event. - * @param event The event to modify. - * @param mechanism Mechanism of the mechanism. - * @hidden - */ -export declare function addExceptionMechanism(event: Event, mechanism?: { - [key: string]: any; -}): void; -/** - * A safe form of location.href - */ -export declare function getLocationHref(): string; -/** - * Given a child DOM element, returns a query-selector statement describing that - * and its ancestors - * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] - * @returns generated DOM path - */ -export declare function htmlTreeAsString(elem: unknown): string; -export declare const crossPlatformPerformance: Pick; -/** - * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock. - */ -export declare function timestampWithMs(): number; -/** - * Represents Semantic Versioning object - */ -interface SemVer { - major?: number; - minor?: number; - patch?: number; - prerelease?: string; - buildmetadata?: string; -} -/** - * Parses input into a SemVer interface - * @param input string representation of a semver version - */ -export declare function parseSemver(input: string): SemVer; -/** - * Extracts Retry-After value from the request header or returns default value - * @param now current unix timestamp - * @param header string representation of 'Retry-After' header - */ -export declare function parseRetryAfterHeader(now: number, header?: string | number | null): number; -/** - * Safely extract function name from itself - */ -export declare function getFunctionName(fn: unknown): string; -/** - * This function adds context (pre/post/line) lines to the provided frame - * - * @param lines string[] containing all lines - * @param frame StackFrame that will be mutated - * @param linesOfContext number of context lines we want to add pre/post - */ -export declare function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext?: number): void; -export {}; -//# sourceMappingURL=misc.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/misc.js b/node_modules/@sentry/utils/dist/misc.js deleted file mode 100644 index 81cea00..0000000 --- a/node_modules/@sentry/utils/dist/misc.js +++ /dev/null @@ -1,407 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var is_1 = require("./is"); -var string_1 = require("./string"); -/** - * Requires a module which is protected _against bundler minification. - * - * @param request The module path to resolve - */ -function dynamicRequire(mod, request) { - // tslint:disable-next-line: no-unsafe-any - return mod.require(request); -} -exports.dynamicRequire = dynamicRequire; -/** - * Checks whether we're in the Node.js or Browser environment - * - * @returns Answer to given question - */ -function isNodeEnv() { - // tslint:disable:strict-type-predicates - return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'; -} -exports.isNodeEnv = isNodeEnv; -var fallbackGlobalObject = {}; -/** - * Safely get global scope object - * - * @returns Global scope object - */ -function getGlobalObject() { - return (isNodeEnv() - ? global - : typeof window !== 'undefined' - ? window - : typeof self !== 'undefined' - ? self - : fallbackGlobalObject); -} -exports.getGlobalObject = getGlobalObject; -/** - * UUID4 generator - * - * @returns string Generated UUID4. - */ -function uuid4() { - var global = getGlobalObject(); - var crypto = global.crypto || global.msCrypto; - if (!(crypto === void 0) && crypto.getRandomValues) { - // Use window.crypto API if available - var arr = new Uint16Array(8); - crypto.getRandomValues(arr); - // set 4 in byte 7 - // tslint:disable-next-line:no-bitwise - arr[3] = (arr[3] & 0xfff) | 0x4000; - // set 2 most significant bits of byte 9 to '10' - // tslint:disable-next-line:no-bitwise - arr[4] = (arr[4] & 0x3fff) | 0x8000; - var pad = function (num) { - var v = num.toString(16); - while (v.length < 4) { - v = "0" + v; - } - return v; - }; - return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])); - } - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 - return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - // tslint:disable-next-line:no-bitwise - var r = (Math.random() * 16) | 0; - // tslint:disable-next-line:no-bitwise - var v = c === 'x' ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); -} -exports.uuid4 = uuid4; -/** - * Parses string form of URL into an object - * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B - * // intentionally using regex and not href parsing trick because React Native and other - * // environments where DOM might not be available - * @returns parsed URL object - */ -function parseUrl(url) { - if (!url) { - return {}; - } - var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); - if (!match) { - return {}; - } - // coerce to undefined values to empty string so we don't get 'undefined' - var query = match[6] || ''; - var fragment = match[8] || ''; - return { - host: match[4], - path: match[5], - protocol: match[2], - relative: match[5] + query + fragment, - }; -} -exports.parseUrl = parseUrl; -/** - * Extracts either message or type+value from an event that can be used for user-facing logs - * @returns event's description - */ -function getEventDescription(event) { - if (event.message) { - return event.message; - } - if (event.exception && event.exception.values && event.exception.values[0]) { - var exception = event.exception.values[0]; - if (exception.type && exception.value) { - return exception.type + ": " + exception.value; - } - return exception.type || exception.value || event.event_id || ''; - } - return event.event_id || ''; -} -exports.getEventDescription = getEventDescription; -/** JSDoc */ -function consoleSandbox(callback) { - var global = getGlobalObject(); - var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert']; - if (!('console' in global)) { - return callback(); - } - var originalConsole = global.console; - var wrappedLevels = {}; - // Restore all wrapped console methods - levels.forEach(function (level) { - if (level in global.console && originalConsole[level].__sentry_original__) { - wrappedLevels[level] = originalConsole[level]; - originalConsole[level] = originalConsole[level].__sentry_original__; - } - }); - // Perform callback manipulations - var result = callback(); - // Revert restoration to wrapped state - Object.keys(wrappedLevels).forEach(function (level) { - originalConsole[level] = wrappedLevels[level]; - }); - return result; -} -exports.consoleSandbox = consoleSandbox; -/** - * Adds exception values, type and value to an synthetic Exception. - * @param event The event to modify. - * @param value Value of the exception. - * @param type Type of the exception. - * @hidden - */ -function addExceptionTypeValue(event, value, type) { - event.exception = event.exception || {}; - event.exception.values = event.exception.values || []; - event.exception.values[0] = event.exception.values[0] || {}; - event.exception.values[0].value = event.exception.values[0].value || value || ''; - event.exception.values[0].type = event.exception.values[0].type || type || 'Error'; -} -exports.addExceptionTypeValue = addExceptionTypeValue; -/** - * Adds exception mechanism to a given event. - * @param event The event to modify. - * @param mechanism Mechanism of the mechanism. - * @hidden - */ -function addExceptionMechanism(event, mechanism) { - if (mechanism === void 0) { mechanism = {}; } - // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better? - try { - // @ts-ignore - // tslint:disable:no-non-null-assertion - event.exception.values[0].mechanism = event.exception.values[0].mechanism || {}; - Object.keys(mechanism).forEach(function (key) { - // @ts-ignore - event.exception.values[0].mechanism[key] = mechanism[key]; - }); - } - catch (_oO) { - // no-empty - } -} -exports.addExceptionMechanism = addExceptionMechanism; -/** - * A safe form of location.href - */ -function getLocationHref() { - try { - return document.location.href; - } - catch (oO) { - return ''; - } -} -exports.getLocationHref = getLocationHref; -/** - * Given a child DOM element, returns a query-selector statement describing that - * and its ancestors - * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] - * @returns generated DOM path - */ -function htmlTreeAsString(elem) { - // try/catch both: - // - accessing event.target (see getsentry/raven-js#838, #768) - // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly - // - can throw an exception in some circumstances. - try { - var currentElem = elem; - var MAX_TRAVERSE_HEIGHT = 5; - var MAX_OUTPUT_LEN = 80; - var out = []; - var height = 0; - var len = 0; - var separator = ' > '; - var sepLength = separator.length; - var nextStr = void 0; - while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { - nextStr = _htmlElementAsString(currentElem); - // bail out if - // - nextStr is the 'html' element - // - the length of the string that would be created exceeds MAX_OUTPUT_LEN - // (ignore this limit if we are on the first iteration) - if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) { - break; - } - out.push(nextStr); - len += nextStr.length; - currentElem = currentElem.parentNode; - } - return out.reverse().join(separator); - } - catch (_oO) { - return ''; - } -} -exports.htmlTreeAsString = htmlTreeAsString; -/** - * Returns a simple, query-selector representation of a DOM element - * e.g. [HTMLElement] => input#foo.btn[name=baz] - * @returns generated DOM path - */ -function _htmlElementAsString(el) { - var elem = el; - var out = []; - var className; - var classes; - var key; - var attr; - var i; - if (!elem || !elem.tagName) { - return ''; - } - out.push(elem.tagName.toLowerCase()); - if (elem.id) { - out.push("#" + elem.id); - } - className = elem.className; - if (className && is_1.isString(className)) { - classes = className.split(/\s+/); - for (i = 0; i < classes.length; i++) { - out.push("." + classes[i]); - } - } - var attrWhitelist = ['type', 'name', 'title', 'alt']; - for (i = 0; i < attrWhitelist.length; i++) { - key = attrWhitelist[i]; - attr = elem.getAttribute(key); - if (attr) { - out.push("[" + key + "=\"" + attr + "\"]"); - } - } - return out.join(''); -} -var INITIAL_TIME = Date.now(); -var prevNow = 0; -var performanceFallback = { - now: function () { - var now = Date.now() - INITIAL_TIME; - if (now < prevNow) { - now = prevNow; - } - prevNow = now; - return now; - }, - timeOrigin: INITIAL_TIME, -}; -exports.crossPlatformPerformance = (function () { - if (isNodeEnv()) { - try { - var perfHooks = dynamicRequire(module, 'perf_hooks'); - return perfHooks.performance; - } - catch (_) { - return performanceFallback; - } - } - if (getGlobalObject().performance) { - // Polyfill for performance.timeOrigin. - // - // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin - // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing. - // tslint:disable-next-line:strict-type-predicates - if (performance.timeOrigin === undefined) { - // For webworkers it could mean we don't have performance.timing then we fallback - // tslint:disable-next-line:deprecation - if (!performance.timing) { - return performanceFallback; - } - // tslint:disable-next-line:deprecation - if (!performance.timing.navigationStart) { - return performanceFallback; - } - // @ts-ignore - // tslint:disable-next-line:deprecation - performance.timeOrigin = performance.timing.navigationStart; - } - } - return getGlobalObject().performance || performanceFallback; -})(); -/** - * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock. - */ -function timestampWithMs() { - return (exports.crossPlatformPerformance.timeOrigin + exports.crossPlatformPerformance.now()) / 1000; -} -exports.timestampWithMs = timestampWithMs; -// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string -var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; -/** - * Parses input into a SemVer interface - * @param input string representation of a semver version - */ -function parseSemver(input) { - var match = input.match(SEMVER_REGEXP) || []; - var major = parseInt(match[1], 10); - var minor = parseInt(match[2], 10); - var patch = parseInt(match[3], 10); - return { - buildmetadata: match[5], - major: isNaN(major) ? undefined : major, - minor: isNaN(minor) ? undefined : minor, - patch: isNaN(patch) ? undefined : patch, - prerelease: match[4], - }; -} -exports.parseSemver = parseSemver; -var defaultRetryAfter = 60 * 1000; // 60 seconds -/** - * Extracts Retry-After value from the request header or returns default value - * @param now current unix timestamp - * @param header string representation of 'Retry-After' header - */ -function parseRetryAfterHeader(now, header) { - if (!header) { - return defaultRetryAfter; - } - var headerDelay = parseInt("" + header, 10); - if (!isNaN(headerDelay)) { - return headerDelay * 1000; - } - var headerDate = Date.parse("" + header); - if (!isNaN(headerDate)) { - return headerDate - now; - } - return defaultRetryAfter; -} -exports.parseRetryAfterHeader = parseRetryAfterHeader; -var defaultFunctionName = ''; -/** - * Safely extract function name from itself - */ -function getFunctionName(fn) { - try { - if (!fn || typeof fn !== 'function') { - return defaultFunctionName; - } - return fn.name || defaultFunctionName; - } - catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - return defaultFunctionName; - } -} -exports.getFunctionName = getFunctionName; -/** - * This function adds context (pre/post/line) lines to the provided frame - * - * @param lines string[] containing all lines - * @param frame StackFrame that will be mutated - * @param linesOfContext number of context lines we want to add pre/post - */ -function addContextToFrame(lines, frame, linesOfContext) { - if (linesOfContext === void 0) { linesOfContext = 5; } - var lineno = frame.lineno || 0; - var maxLines = lines.length; - var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0); - frame.pre_context = lines - .slice(Math.max(0, sourceLine - linesOfContext), sourceLine) - .map(function (line) { return string_1.snipLine(line, 0); }); - frame.context_line = string_1.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); - frame.post_context = lines - .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext) - .map(function (line) { return string_1.snipLine(line, 0); }); -} -exports.addContextToFrame = addContextToFrame; -//# sourceMappingURL=misc.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/misc.js.map b/node_modules/@sentry/utils/dist/misc.js.map deleted file mode 100644 index e09fbaf..0000000 --- a/node_modules/@sentry/utils/dist/misc.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"misc.js","sourceRoot":"","sources":["../src/misc.ts"],"names":[],"mappings":";AAEA,2BAAgC;AAChC,mCAAoC;AAmBpC;;;;GAIG;AACH,SAAgB,cAAc,CAAC,GAAQ,EAAE,OAAe;IACtD,0CAA0C;IAC1C,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAHD,wCAGC;AAED;;;;GAIG;AACH,SAAgB,SAAS;IACvB,wCAAwC;IACxC,OAAO,MAAM,CAAC,SAAS,CAAC,QAA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Y,IAAK,OAAA,iBAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAjB,CAAiB,CAAC,CAAC;AAC9C,CAAC;AAdD,8CAcC","sourcesContent":["import { Event, Integration, StackFrame, WrappedFunction } from '@sentry/types';\n\nimport { isString } from './is';\nimport { snipLine } from './string';\n\n/** Internal */\ninterface SentryGlobal {\n Sentry?: {\n Integrations?: Integration[];\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n };\n}\n\n/**\n * Requires a module which is protected _against bundler minification.\n *\n * @param request The module path to resolve\n */\nexport function dynamicRequire(mod: any, request: string): any {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // tslint:disable:strict-type-predicates\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n\nconst fallbackGlobalObject = {};\n\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject(): T & SentryGlobal {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject) as T & SentryGlobal;\n}\n// tslint:enable:strict-type-predicates\n\n/**\n * Extended Window interface that allows for Crypto API usage in IE browsers\n */\ninterface MsCryptoWindow extends Window {\n msCrypto?: Crypto;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const global = getGlobalObject() as MsCryptoWindow;\n const crypto = global.crypto || global.msCrypto;\n\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n const arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n // tslint:disable-next-line:no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // tslint:disable-next-line:no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n const pad = (num: number): string => {\n let v = num.toString(16);\n while (v.length < 4) {\n v = `0${v}`;\n }\n return v;\n };\n\n return (\n pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])\n );\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n // tslint:disable-next-line:no-bitwise\n const r = (Math.random() * 16) | 0;\n // tslint:disable-next-line:no-bitwise\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(\n url: string,\n): {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n} {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n const exception = event.exception.values[0];\n\n if (exception.type && exception.value) {\n return `${exception.type}: ${exception.value}`;\n }\n return exception.type || exception.value || event.event_id || '';\n }\n return event.event_id || '';\n}\n\n/** JSDoc */\ninterface ExtensibleConsole extends Console {\n [key: string]: any;\n}\n\n/** JSDoc */\nexport function consoleSandbox(callback: () => any): any {\n const global = getGlobalObject();\n const levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n if (!('console' in global)) {\n return callback();\n }\n\n const originalConsole = global.console as ExtensibleConsole;\n const wrappedLevels: { [key: string]: any } = {};\n\n // Restore all wrapped console methods\n levels.forEach(level => {\n if (level in global.console && (originalConsole[level] as WrappedFunction).__sentry_original__) {\n wrappedLevels[level] = originalConsole[level] as WrappedFunction;\n originalConsole[level] = (originalConsole[level] as WrappedFunction).__sentry_original__;\n }\n });\n\n // Perform callback manipulations\n const result = callback();\n\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level];\n });\n\n return result;\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(\n event: Event,\n mechanism: {\n [key: string]: any;\n } = {},\n): void {\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception!.values![0].mechanism = event.exception!.values![0].mechanism || {};\n Object.keys(mechanism).forEach(key => {\n // @ts-ignore\n event.exception!.values![0].mechanism[key] = mechanism[key];\n });\n } catch (_oO) {\n // no-empty\n }\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown): string {\n const elem = el as {\n getAttribute(key: string): string; // tslint:disable-line:completed-docs\n tagName?: string;\n id?: string;\n className?: string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n const attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\nconst INITIAL_TIME = Date.now();\nlet prevNow = 0;\n\nconst performanceFallback: Pick = {\n now(): number {\n let now = Date.now() - INITIAL_TIME;\n if (now < prevNow) {\n now = prevNow;\n }\n prevNow = now;\n return now;\n },\n timeOrigin: INITIAL_TIME,\n};\n\nexport const crossPlatformPerformance: Pick = (() => {\n if (isNodeEnv()) {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: Performance };\n return perfHooks.performance;\n } catch (_) {\n return performanceFallback;\n }\n }\n\n if (getGlobalObject().performance) {\n // Polyfill for performance.timeOrigin.\n //\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // tslint:disable-next-line:strict-type-predicates\n if (performance.timeOrigin === undefined) {\n // For webworkers it could mean we don't have performance.timing then we fallback\n // tslint:disable-next-line:deprecation\n if (!performance.timing) {\n return performanceFallback;\n }\n // tslint:disable-next-line:deprecation\n if (!performance.timing.navigationStart) {\n return performanceFallback;\n }\n\n // @ts-ignore\n // tslint:disable-next-line:deprecation\n performance.timeOrigin = performance.timing.navigationStart;\n }\n }\n\n return getGlobalObject().performance || performanceFallback;\n})();\n\n/**\n * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock.\n */\nexport function timestampWithMs(): number {\n return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000;\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\nconst defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now: number, header?: string | number | null): number {\n if (!header) {\n return defaultRetryAfter;\n }\n\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return defaultRetryAfter;\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n const lineno = frame.lineno || 0;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/object.d.ts b/node_modules/@sentry/utils/dist/object.d.ts deleted file mode 100644 index 42f8f24..0000000 --- a/node_modules/@sentry/utils/dist/object.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Memo } from './memo'; -/** - * Wrap a given object method with a higher-order function - * - * @param source An object that contains a method to be wrapped. - * @param name A name of method to be wrapped. - * @param replacement A function that should be used to wrap a given method. - * @returns void - */ -export declare function fill(source: { - [key: string]: any; -}, name: string, replacement: (...args: any[]) => any): void; -/** - * Encodes given object into url-friendly format - * - * @param object An object that contains serializable values - * @returns string Encoded - */ -export declare function urlEncode(object: { - [key: string]: any; -}): string; -/** JSDoc */ -export declare function normalizeToSize(object: { - [key: string]: any; -}, depth?: number, maxSize?: number): T; -/** - * Walks an object to perform a normalization on it - * - * @param key of object that's walked in current iteration - * @param value object to be walked - * @param depth Optional number indicating how deep should walking be performed - * @param memo Optional Memo class handling decycling - */ -export declare function walk(key: string, value: any, depth?: number, memo?: Memo): any; -/** - * normalize() - * - * - Creates a copy to prevent original input mutation - * - Skip non-enumerablers - * - Calls `toJSON` if implemented - * - Removes circular references - * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format - * - Translates known global objects/Classes to a string representations - * - Takes care of Error objects serialization - * - Optionally limit depth of final output - */ -export declare function normalize(input: any, depth?: number): any; -/** - * Given any captured exception, extract its keys and create a sorted - * and truncated list that will be used inside the event message. - * eg. `Non-error exception captured with keys: foo, bar, baz` - */ -export declare function extractExceptionKeysForMessage(exception: any, maxLength?: number): string; -/** - * Given any object, return the new object with removed keys that value was `undefined`. - * Works recursively on objects and arrays. - */ -export declare function dropUndefinedKeys(val: T): T; -//# sourceMappingURL=object.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/object.js b/node_modules/@sentry/utils/dist/object.js deleted file mode 100644 index 289bcf3..0000000 --- a/node_modules/@sentry/utils/dist/object.js +++ /dev/null @@ -1,325 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var is_1 = require("./is"); -var memo_1 = require("./memo"); -var misc_1 = require("./misc"); -var string_1 = require("./string"); -/** - * Wrap a given object method with a higher-order function - * - * @param source An object that contains a method to be wrapped. - * @param name A name of method to be wrapped. - * @param replacement A function that should be used to wrap a given method. - * @returns void - */ -function fill(source, name, replacement) { - if (!(name in source)) { - return; - } - var original = source[name]; - var wrapped = replacement(original); - // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work - // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" - // tslint:disable-next-line:strict-type-predicates - if (typeof wrapped === 'function') { - try { - wrapped.prototype = wrapped.prototype || {}; - Object.defineProperties(wrapped, { - __sentry_original__: { - enumerable: false, - value: original, - }, - }); - } - catch (_Oo) { - // This can throw if multiple fill happens on a global object like XMLHttpRequest - // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 - } - } - source[name] = wrapped; -} -exports.fill = fill; -/** - * Encodes given object into url-friendly format - * - * @param object An object that contains serializable values - * @returns string Encoded - */ -function urlEncode(object) { - return Object.keys(object) - .map( - // tslint:disable-next-line:no-unsafe-any - function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); }) - .join('&'); -} -exports.urlEncode = urlEncode; -/** - * Transforms any object into an object literal with all it's attributes - * attached to it. - * - * @param value Initial source that we have to transform in order to be usable by the serializer - */ -function getWalkSource(value) { - if (is_1.isError(value)) { - var error = value; - var err = { - message: error.message, - name: error.name, - stack: error.stack, - }; - for (var i in error) { - if (Object.prototype.hasOwnProperty.call(error, i)) { - err[i] = error[i]; - } - } - return err; - } - if (is_1.isEvent(value)) { - var event_1 = value; - var source = {}; - source.type = event_1.type; - // Accessing event.target can throw (see getsentry/raven-js#838, #768) - try { - source.target = is_1.isElement(event_1.target) - ? misc_1.htmlTreeAsString(event_1.target) - : Object.prototype.toString.call(event_1.target); - } - catch (_oO) { - source.target = ''; - } - try { - source.currentTarget = is_1.isElement(event_1.currentTarget) - ? misc_1.htmlTreeAsString(event_1.currentTarget) - : Object.prototype.toString.call(event_1.currentTarget); - } - catch (_oO) { - source.currentTarget = ''; - } - // tslint:disable-next-line:strict-type-predicates - if (typeof CustomEvent !== 'undefined' && is_1.isInstanceOf(value, CustomEvent)) { - source.detail = event_1.detail; - } - for (var i in event_1) { - if (Object.prototype.hasOwnProperty.call(event_1, i)) { - source[i] = event_1; - } - } - return source; - } - return value; -} -/** Calculates bytes size of input string */ -function utf8Length(value) { - // tslint:disable-next-line:no-bitwise - return ~-encodeURI(value).split(/%..|./).length; -} -/** Calculates bytes size of input object */ -function jsonSize(value) { - return utf8Length(JSON.stringify(value)); -} -/** JSDoc */ -function normalizeToSize(object, -// Default Node.js REPL depth -depth, -// 100kB, as 200kB is max payload size, so half sounds reasonable -maxSize) { - if (depth === void 0) { depth = 3; } - if (maxSize === void 0) { maxSize = 100 * 1024; } - var serialized = normalize(object, depth); - if (jsonSize(serialized) > maxSize) { - return normalizeToSize(object, depth - 1, maxSize); - } - return serialized; -} -exports.normalizeToSize = normalizeToSize; -/** Transforms any input value into a string form, either primitive value or a type of the input */ -function serializeValue(value) { - var type = Object.prototype.toString.call(value); - // Node.js REPL notation - if (typeof value === 'string') { - return value; - } - if (type === '[object Object]') { - return '[Object]'; - } - if (type === '[object Array]') { - return '[Array]'; - } - var normalized = normalizeValue(value); - return is_1.isPrimitive(normalized) ? normalized : type; -} -/** - * normalizeValue() - * - * Takes unserializable input and make it serializable friendly - * - * - translates undefined/NaN values to "[undefined]"/"[NaN]" respectively, - * - serializes Error objects - * - filter global objects - */ -// tslint:disable-next-line:cyclomatic-complexity -function normalizeValue(value, key) { - if (key === 'domain' && value && typeof value === 'object' && value._events) { - return '[Domain]'; - } - if (key === 'domainEmitter') { - return '[DomainEmitter]'; - } - if (typeof global !== 'undefined' && value === global) { - return '[Global]'; - } - if (typeof window !== 'undefined' && value === window) { - return '[Window]'; - } - if (typeof document !== 'undefined' && value === document) { - return '[Document]'; - } - // React's SyntheticEvent thingy - if (is_1.isSyntheticEvent(value)) { - return '[SyntheticEvent]'; - } - // tslint:disable-next-line:no-tautology-expression - if (typeof value === 'number' && value !== value) { - return '[NaN]'; - } - if (value === void 0) { - return '[undefined]'; - } - if (typeof value === 'function') { - return "[Function: " + misc_1.getFunctionName(value) + "]"; - } - return value; -} -/** - * Walks an object to perform a normalization on it - * - * @param key of object that's walked in current iteration - * @param value object to be walked - * @param depth Optional number indicating how deep should walking be performed - * @param memo Optional Memo class handling decycling - */ -function walk(key, value, depth, memo) { - if (depth === void 0) { depth = +Infinity; } - if (memo === void 0) { memo = new memo_1.Memo(); } - // If we reach the maximum depth, serialize whatever has left - if (depth === 0) { - return serializeValue(value); - } - // If value implements `toJSON` method, call it and return early - // tslint:disable:no-unsafe-any - if (value !== null && value !== undefined && typeof value.toJSON === 'function') { - return value.toJSON(); - } - // tslint:enable:no-unsafe-any - // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further - var normalized = normalizeValue(value, key); - if (is_1.isPrimitive(normalized)) { - return normalized; - } - // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself - var source = getWalkSource(value); - // Create an accumulator that will act as a parent for all future itterations of that branch - var acc = Array.isArray(value) ? [] : {}; - // If we already walked that branch, bail out, as it's circular reference - if (memo.memoize(value)) { - return '[Circular ~]'; - } - // Walk all keys of the source - for (var innerKey in source) { - // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration. - if (!Object.prototype.hasOwnProperty.call(source, innerKey)) { - continue; - } - // Recursively walk through all the child nodes - acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo); - } - // Once walked through all the branches, remove the parent from memo storage - memo.unmemoize(value); - // Return accumulated values - return acc; -} -exports.walk = walk; -/** - * normalize() - * - * - Creates a copy to prevent original input mutation - * - Skip non-enumerablers - * - Calls `toJSON` if implemented - * - Removes circular references - * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format - * - Translates known global objects/Classes to a string representations - * - Takes care of Error objects serialization - * - Optionally limit depth of final output - */ -function normalize(input, depth) { - try { - // tslint:disable-next-line:no-unsafe-any - return JSON.parse(JSON.stringify(input, function (key, value) { return walk(key, value, depth); })); - } - catch (_oO) { - return '**non-serializable**'; - } -} -exports.normalize = normalize; -/** - * Given any captured exception, extract its keys and create a sorted - * and truncated list that will be used inside the event message. - * eg. `Non-error exception captured with keys: foo, bar, baz` - */ -function extractExceptionKeysForMessage(exception, maxLength) { - if (maxLength === void 0) { maxLength = 40; } - // tslint:disable:strict-type-predicates - var keys = Object.keys(getWalkSource(exception)); - keys.sort(); - if (!keys.length) { - return '[object has no keys]'; - } - if (keys[0].length >= maxLength) { - return string_1.truncate(keys[0], maxLength); - } - for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) { - var serialized = keys.slice(0, includedKeys).join(', '); - if (serialized.length > maxLength) { - continue; - } - if (includedKeys === keys.length) { - return serialized; - } - return string_1.truncate(serialized, maxLength); - } - return ''; -} -exports.extractExceptionKeysForMessage = extractExceptionKeysForMessage; -/** - * Given any object, return the new object with removed keys that value was `undefined`. - * Works recursively on objects and arrays. - */ -function dropUndefinedKeys(val) { - var e_1, _a; - if (is_1.isPlainObject(val)) { - var obj = val; - var rv = {}; - try { - for (var _b = tslib_1.__values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - if (typeof obj[key] !== 'undefined') { - rv[key] = dropUndefinedKeys(obj[key]); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - return rv; - } - if (Array.isArray(val)) { - return val.map(dropUndefinedKeys); - } - return val; -} -exports.dropUndefinedKeys = dropUndefinedKeys; -//# sourceMappingURL=object.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/object.js.map b/node_modules/@sentry/utils/dist/object.js.map deleted file mode 100644 index d0a0711..0000000 --- a/node_modules/@sentry/utils/dist/object.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.js","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":";;AAEA,2BAA+G;AAC/G,+BAA8B;AAC9B,+BAA2D;AAC3D,mCAAoC;AAEpC;;;;;;;GAOG;AACH,SAAgB,IAAI,CAAC,MAA8B,EAAE,IAAY,EAAE,WAAoC;IACrG,IAAI,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE;QACrB,OAAO;KACR;IAED,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAc,CAAC;IAC3C,IAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAoB,CAAC;IAEzD,0GAA0G;IAC1G,kFAAkF;IAClF,kDAAkD;IAClD,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;QACjC,IAAI;YACF,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;YAC5C,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBAC/B,mBAAmB,EAAE;oBACnB,UAAU,EAAE,KAAK;oBACjB,KAAK,EAAE,QAAQ;iBAChB;aACF,CAAC,CAAC;SACJ;QAAC,OAAO,GAAG,EAAE;YACZ,iFAAiF;YACjF,mEAAmE;SACpE;KACF;IAED,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;AACzB,CAAC;AA3BD,oBA2BC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,MAA8B;IACtD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;SACvB,GA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AAG,CAAC,GAAG,CAAC,iBAAiB,CAAQ,CAAC;KAC1C;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAjBD,8CAiBC","sourcesContent":["import { ExtendedError, WrappedFunction } from '@sentry/types';\n\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName, htmlTreeAsString } from './misc';\nimport { truncate } from './string';\n\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacement: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacement(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n // tslint:disable-next-line:strict-type-predicates\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`,\n )\n .join('&');\n}\n\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\nfunction getWalkSource(\n value: any,\n): {\n [key: string]: any;\n} {\n if (isError(value)) {\n const error = value as ExtendedError;\n const err: {\n stack: string | undefined;\n message: string;\n name: string;\n [key: string]: any;\n } = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n\n for (const i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n\n return err;\n }\n\n if (isEvent(value)) {\n /**\n * Event-like interface that's usable in browser and node\n */\n interface SimpleEvent {\n [key: string]: unknown;\n type: string;\n target?: unknown;\n currentTarget?: unknown;\n }\n\n const event = value as SimpleEvent;\n\n const source: {\n [key: string]: any;\n } = {};\n\n source.type = event.type;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n source.target = isElement(event.target)\n ? htmlTreeAsString(event.target)\n : Object.prototype.toString.call(event.target);\n } catch (_oO) {\n source.target = '';\n }\n\n try {\n source.currentTarget = isElement(event.currentTarget)\n ? htmlTreeAsString(event.currentTarget)\n : Object.prototype.toString.call(event.currentTarget);\n } catch (_oO) {\n source.currentTarget = '';\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event.detail;\n }\n\n for (const i in event) {\n if (Object.prototype.hasOwnProperty.call(event, i)) {\n source[i] = event;\n }\n }\n\n return source;\n }\n\n return value as {\n [key: string]: any;\n };\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // tslint:disable-next-line:no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n\n/** JSDoc */\nexport function normalizeToSize(\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const serialized = normalize(object, depth);\n\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return serialized as T;\n}\n\n/** Transforms any input value into a string form, either primitive value or a type of the input */\nfunction serializeValue(value: any): any {\n const type = Object.prototype.toString.call(value);\n\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n\n const normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction normalizeValue(value: T, key?: any): T | string {\n if (key === 'domain' && value && typeof value === 'object' && ((value as unknown) as { _events: any })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n if (typeof (global as any) !== 'undefined' && (value as unknown) === global) {\n return '[Global]';\n }\n\n if (typeof (window as any) !== 'undefined' && (value as unknown) === window) {\n return '[Window]';\n }\n\n if (typeof (document as any) !== 'undefined' && (value as unknown) === document) {\n return '[Document]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n // tslint:disable-next-line:no-tautology-expression\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n return value;\n}\n\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key: string, value: any, depth: number = +Infinity, memo: Memo = new Memo()): any {\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n\n // If value implements `toJSON` method, call it and return early\n // tslint:disable:no-unsafe-any\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // tslint:enable:no-unsafe-any\n\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n const normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n const source = getWalkSource(value);\n\n // Create an accumulator that will act as a parent for all future itterations of that branch\n const acc = Array.isArray(value) ? [] : {};\n\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n\n // Walk all keys of the source\n for (const innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n (acc as { [key: string]: any })[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n\n // Return accumulated values\n return acc;\n}\n\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\nexport function normalize(input: any, depth?: number): any {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return JSON.parse(JSON.stringify(input, (key: string, value: any) => walk(key, value, depth)));\n } catch (_oO) {\n return '**non-serializable**';\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: any, maxLength: number = 40): string {\n // tslint:disable:strict-type-predicates\n const keys = Object.keys(getWalkSource(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val: T): T {\n if (isPlainObject(val)) {\n const obj = val as { [key: string]: any };\n const rv: { [key: string]: any } = {};\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n return rv as T;\n }\n\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys) as any;\n }\n\n return val;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/path.d.ts b/node_modules/@sentry/utils/dist/path.d.ts deleted file mode 100644 index 74faee9..0000000 --- a/node_modules/@sentry/utils/dist/path.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** JSDoc */ -export declare function resolve(...args: string[]): string; -/** JSDoc */ -export declare function relative(from: string, to: string): string; -/** JSDoc */ -export declare function normalizePath(path: string): string; -/** JSDoc */ -export declare function isAbsolute(path: string): boolean; -/** JSDoc */ -export declare function join(...args: string[]): string; -/** JSDoc */ -export declare function dirname(path: string): string; -/** JSDoc */ -export declare function basename(path: string, ext?: string): string; -//# sourceMappingURL=path.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/path.js b/node_modules/@sentry/utils/dist/path.js deleted file mode 100644 index 369976d..0000000 --- a/node_modules/@sentry/utils/dist/path.js +++ /dev/null @@ -1,166 +0,0 @@ -// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript -// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js -Object.defineProperty(exports, "__esModule", { value: true }); -/** JSDoc */ -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } - else if (last === '..') { - parts.splice(i, 1); - up++; - } - else if (up) { - parts.splice(i, 1); - up--; - } - } - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - return parts; -} -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -/** JSDoc */ -function splitPath(filename) { - var parts = splitPathRe.exec(filename); - return parts ? parts.slice(1) : []; -} -// path.resolve([from ...], to) -// posix version -/** JSDoc */ -function resolve() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resolvedPath = ''; - var resolvedAbsolute = false; - for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = i >= 0 ? args[i] : '/'; - // Skip empty entries - if (!path) { - continue; - } - resolvedPath = path + "/" + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - // Normalize the path - resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/'); - return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; -} -exports.resolve = resolve; -/** JSDoc */ -function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') { - break; - } - } - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') { - break; - } - } - if (start > end) { - return []; - } - return arr.slice(start, end - start + 1); -} -// path.relative(from, to) -// posix version -/** JSDoc */ -function relative(from, to) { - // tslint:disable:no-parameter-reassignment - from = resolve(from).substr(1); - to = resolve(to).substr(1); - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - return outputParts.join('/'); -} -exports.relative = relative; -// path.normalize(path) -// posix version -/** JSDoc */ -function normalizePath(path) { - var isPathAbsolute = isAbsolute(path); - var trailingSlash = path.substr(-1) === '/'; - // Normalize the path - var normalizedPath = normalizeArray(path.split('/').filter(function (p) { return !!p; }), !isPathAbsolute).join('/'); - if (!normalizedPath && !isPathAbsolute) { - normalizedPath = '.'; - } - if (normalizedPath && trailingSlash) { - normalizedPath += '/'; - } - return (isPathAbsolute ? '/' : '') + normalizedPath; -} -exports.normalizePath = normalizePath; -// posix version -/** JSDoc */ -function isAbsolute(path) { - return path.charAt(0) === '/'; -} -exports.isAbsolute = isAbsolute; -// posix version -/** JSDoc */ -function join() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return normalizePath(args.join('/')); -} -exports.join = join; -/** JSDoc */ -function dirname(path) { - var result = splitPath(path); - var root = result[0]; - var dir = result[1]; - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - return root + dir; -} -exports.dirname = dirname; -/** JSDoc */ -function basename(path, ext) { - var f = splitPath(path)[2]; - if (ext && f.substr(ext.length * -1) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -} -exports.basename = basename; -//# sourceMappingURL=path.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/path.js.map b/node_modules/@sentry/utils/dist/path.js.map deleted file mode 100644 index c887742..0000000 --- a/node_modules/@sentry/utils/dist/path.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,qGAAqG;;AAErG,YAAY;AACZ,SAAS,cAAc,CAAC,KAAe,EAAE,cAAwB;IA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AAC,CAAC;IAC/B,IAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAEpB,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE;QACjB,wBAAwB;QACxB,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,GAAG,EAAE;QACP,yCAAyC;QACzC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KACrC;IAED,OAAO,IAAI,GAAG,GAAG,CAAC;AACpB,CAAC;AAhBD,0BAgBC;AAED,YAAY;AACZ,SAAgB,QAAQ,CAAC,IAAY,EAAE,GAAY;IACjD,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QAC5C,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;KACxC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAND,4BAMC","sourcesContent":["// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(p => !!p), !resolvedAbsolute).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n // tslint:disable:no-parameter-reassignment\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(path.split('/').filter(p => !!p), !isPathAbsolute).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/polyfill.d.ts b/node_modules/@sentry/utils/dist/polyfill.d.ts deleted file mode 100644 index 80e2f3c..0000000 --- a/node_modules/@sentry/utils/dist/polyfill.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const setPrototypeOf: (o: any, proto: object | null) => any; -//# sourceMappingURL=polyfill.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/polyfill.js b/node_modules/@sentry/utils/dist/polyfill.js deleted file mode 100644 index 857aa17..0000000 --- a/node_modules/@sentry/utils/dist/polyfill.js +++ /dev/null @@ -1,23 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method -/** - * setPrototypeOf polyfill using __proto__ - */ -function setProtoOf(obj, proto) { - // @ts-ignore - obj.__proto__ = proto; - return obj; -} -/** - * setPrototypeOf polyfill using mixin - */ -function mixinProperties(obj, proto) { - for (var prop in proto) { - if (!obj.hasOwnProperty(prop)) { - // @ts-ignore - obj[prop] = proto[prop]; - } - } - return obj; -} -//# sourceMappingURL=polyfill.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/polyfill.js.map b/node_modules/@sentry/utils/dist/polyfill.js.map deleted file mode 100644 index 4d4edf2..0000000 --- a/node_modules/@sentry/utils/dist/polyfill.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"polyfill.js","sourceRoot":"","sources":["../src/polyfill.ts"],"names":[],"mappings":";AAAa,QAAA,cAAc,GACzB,MAAM,CAAC,cAAc,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,wCAAwC;AAExI;;GAEG;AACH,SAAS,UAAU,CAAiC,GAAY,EAAE,KAAa;IAC7E,aAAa;IACb,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC;IACtB,OAAO,GAAuB,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAiC,GAAY,EAAE,KAAa;IAClF,KAAK,IAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;YAC7B,aAAa;YACb,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;SACzB;KACF;IAED,OAAO,GAAuB,CAAC;AACjC,CAAC","sourcesContent":["export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/promisebuffer.d.ts b/node_modules/@sentry/utils/dist/promisebuffer.d.ts deleted file mode 100644 index 202b46c..0000000 --- a/node_modules/@sentry/utils/dist/promisebuffer.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** A simple queue that holds promises. */ -export declare class PromiseBuffer { - protected _limit?: number | undefined; - constructor(_limit?: number | undefined); - /** Internal set of queued Promises */ - private readonly _buffer; - /** - * Says if the buffer is ready to take more requests - */ - isReady(): boolean; - /** - * Add a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns The original promise. - */ - add(task: PromiseLike): PromiseLike; - /** - * Remove a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns Removed promise. - */ - remove(task: PromiseLike): PromiseLike; - /** - * This function returns the number of unresolved promises in the queue. - */ - length(): number; - /** - * This will drain the whole queue, returns true if queue is empty or drained. - * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false. - * - * @param timeout Number in ms to wait until it resolves with false. - */ - drain(timeout?: number): PromiseLike; -} -//# sourceMappingURL=promisebuffer.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/promisebuffer.js b/node_modules/@sentry/utils/dist/promisebuffer.js deleted file mode 100644 index 3166134..0000000 --- a/node_modules/@sentry/utils/dist/promisebuffer.js +++ /dev/null @@ -1,84 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var error_1 = require("./error"); -var syncpromise_1 = require("./syncpromise"); -/** A simple queue that holds promises. */ -var PromiseBuffer = /** @class */ (function () { - function PromiseBuffer(_limit) { - this._limit = _limit; - /** Internal set of queued Promises */ - this._buffer = []; - } - /** - * Says if the buffer is ready to take more requests - */ - PromiseBuffer.prototype.isReady = function () { - return this._limit === undefined || this.length() < this._limit; - }; - /** - * Add a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns The original promise. - */ - PromiseBuffer.prototype.add = function (task) { - var _this = this; - if (!this.isReady()) { - return syncpromise_1.SyncPromise.reject(new error_1.SentryError('Not adding Promise due to buffer limit reached.')); - } - if (this._buffer.indexOf(task) === -1) { - this._buffer.push(task); - } - task - .then(function () { return _this.remove(task); }) - .then(null, function () { - return _this.remove(task).then(null, function () { - // We have to add this catch here otherwise we have an unhandledPromiseRejection - // because it's a new Promise chain. - }); - }); - return task; - }; - /** - * Remove a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns Removed promise. - */ - PromiseBuffer.prototype.remove = function (task) { - var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0]; - return removedTask; - }; - /** - * This function returns the number of unresolved promises in the queue. - */ - PromiseBuffer.prototype.length = function () { - return this._buffer.length; - }; - /** - * This will drain the whole queue, returns true if queue is empty or drained. - * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false. - * - * @param timeout Number in ms to wait until it resolves with false. - */ - PromiseBuffer.prototype.drain = function (timeout) { - var _this = this; - return new syncpromise_1.SyncPromise(function (resolve) { - var capturedSetTimeout = setTimeout(function () { - if (timeout && timeout > 0) { - resolve(false); - } - }, timeout); - syncpromise_1.SyncPromise.all(_this._buffer) - .then(function () { - clearTimeout(capturedSetTimeout); - resolve(true); - }) - .then(null, function () { - resolve(true); - }); - }); - }; - return PromiseBuffer; -}()); -exports.PromiseBuffer = PromiseBuffer; -//# sourceMappingURL=promisebuffer.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/promisebuffer.js.map b/node_modules/@sentry/utils/dist/promisebuffer.js.map deleted file mode 100644 index f33e190..0000000 --- a/node_modules/@sentry/utils/dist/promisebuffer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promisebuffer.js","sourceRoot":"","sources":["../src/promisebuffer.ts"],"names":[],"mappings":";AAAA,iCAAsC;AACtC,6CAA4C;AAE5C,0CAA0C;AAC1C;IACE,uBAA6B,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;QAE5C,sCAAsC;QACrB,YAAO,GAA0B,EAAE,CAAC;IAHN,CAAC;IAKhD;;OAEG;IACI,+BAAO,GAAd;QACE,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACI,2BAAG,GAAV,UAAW,IAAoB;QAA/B,iBAgBC;QAfC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE;YACnB,OAAO,yBAAW,CAAC,MAAM,CAAC,IAAI,mBAAW,CAAC,iDAAiD,CAAC,CAAC,CAAC;SAC/F;QACD,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;YACrC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACzB;QACD,IAAI;aACD,IAAI,CAAC,cAAM,OAAA,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAjB,CAAiB,CAAC;aAC7B,IAAI,CAAC,IAAI,EAAE;YACV,OAAA,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE;gBAC3B,gFAAgF;gBAChF,oCAAoC;YACtC,CAAC,CAAC;QAHF,CAGE,CACH,CAAC;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,8BAAM,GAAb,UAAc,IAAoB;QAChC,IAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;OAEG;IACI,8BAAM,GAAb;QACE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACI,6BAAK,GAAZ,UAAa,OAAgB;QAA7B,iBAgBC;QAfC,OAAO,IAAI,yBAAW,CAAU,UAAA,OAAO;YACrC,IAAM,kBAAkB,GAAG,UAAU,CAAC;gBACpC,IAAI,OAAO,IAAI,OAAO,GAAG,CAAC,EAAE;oBAC1B,OAAO,CAAC,KAAK,CAAC,CAAC;iBAChB;YACH,CAAC,EAAE,OAAO,CAAC,CAAC;YACZ,yBAAW,CAAC,GAAG,CAAC,KAAI,CAAC,OAAO,CAAC;iBAC1B,IAAI,CAAC;gBACJ,YAAY,CAAC,kBAAkB,CAAC,CAAC;gBACjC,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,EAAE;gBACV,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;IACH,oBAAC;AAAD,CAAC,AA9ED,IA8EC;AA9EY,sCAAa","sourcesContent":["import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer {\n public constructor(protected _limit?: number) {}\n\n /** Internal set of queued Promises */\n private readonly _buffer: Array> = [];\n\n /**\n * Says if the buffer is ready to take more requests\n */\n public isReady(): boolean {\n return this._limit === undefined || this.length() < this._limit;\n }\n\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns The original promise.\n */\n public add(task: PromiseLike): PromiseLike {\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n task\n .then(() => this.remove(task))\n .then(null, () =>\n this.remove(task).then(null, () => {\n // We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n public remove(task: PromiseLike): PromiseLike {\n const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n }\n\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n public length(): number {\n return this._buffer.length;\n }\n\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n public drain(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(this._buffer)\n .then(() => {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, () => {\n resolve(true);\n });\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/string.d.ts b/node_modules/@sentry/utils/dist/string.d.ts deleted file mode 100644 index fa0e504..0000000 --- a/node_modules/@sentry/utils/dist/string.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Truncates given string to the maximum characters count - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ -export declare function truncate(str: string, max?: number): string; -/** - * This is basically just `trim_line` from - * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ -export declare function snipLine(line: string, colno: number): string; -/** - * Join values in array - * @param input array of values to be joined together - * @param delimiter string to be placed in-between values - * @returns Joined values - */ -export declare function safeJoin(input: any[], delimiter?: string): string; -/** - * Checks if the value matches a regex or includes the string - * @param value The string value to be checked against - * @param pattern Either a regex or a string that must be contained in value - */ -export declare function isMatchingPattern(value: string, pattern: RegExp | string): boolean; -//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/string.js b/node_modules/@sentry/utils/dist/string.js deleted file mode 100644 index 58305af..0000000 --- a/node_modules/@sentry/utils/dist/string.js +++ /dev/null @@ -1,96 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var is_1 = require("./is"); -/** - * Truncates given string to the maximum characters count - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ -function truncate(str, max) { - if (max === void 0) { max = 0; } - // tslint:disable-next-line:strict-type-predicates - if (typeof str !== 'string' || max === 0) { - return str; - } - return str.length <= max ? str : str.substr(0, max) + "..."; -} -exports.truncate = truncate; -/** - * This is basically just `trim_line` from - * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ -function snipLine(line, colno) { - var newLine = line; - var ll = newLine.length; - if (ll <= 150) { - return newLine; - } - if (colno > ll) { - colno = ll; // tslint:disable-line:no-parameter-reassignment - } - var start = Math.max(colno - 60, 0); - if (start < 5) { - start = 0; - } - var end = Math.min(start + 140, ll); - if (end > ll - 5) { - end = ll; - } - if (end === ll) { - start = Math.max(end - 140, 0); - } - newLine = newLine.slice(start, end); - if (start > 0) { - newLine = "'{snip} " + newLine; - } - if (end < ll) { - newLine += ' {snip}'; - } - return newLine; -} -exports.snipLine = snipLine; -/** - * Join values in array - * @param input array of values to be joined together - * @param delimiter string to be placed in-between values - * @returns Joined values - */ -function safeJoin(input, delimiter) { - if (!Array.isArray(input)) { - return ''; - } - var output = []; - // tslint:disable-next-line:prefer-for-of - for (var i = 0; i < input.length; i++) { - var value = input[i]; - try { - output.push(String(value)); - } - catch (e) { - output.push('[value cannot be serialized]'); - } - } - return output.join(delimiter); -} -exports.safeJoin = safeJoin; -/** - * Checks if the value matches a regex or includes the string - * @param value The string value to be checked against - * @param pattern Either a regex or a string that must be contained in value - */ -function isMatchingPattern(value, pattern) { - if (is_1.isRegExp(pattern)) { - return pattern.test(value); - } - if (typeof pattern === 'string') { - return value.indexOf(pattern) !== -1; - } - return false; -} -exports.isMatchingPattern = isMatchingPattern; -//# sourceMappingURL=string.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/string.js.map b/node_modules/@sentry/utils/dist/string.js.map deleted file mode 100644 index 2650570..0000000 --- a/node_modules/@sentry/utils/dist/string.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":";AAAA,2BAAgC;AAEhC;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,GAAW,EAAE,GAAe;IAAf,oBAAA,EAAA,OAAe;IACnD,kDAAkD;IAClD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,CAAC,EAAE;QACxC,OAAO,GAAG,CAAC;KACZ;IACD,OAAO,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAI,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,QAAK,CAAC;AAC9D,CAAC;AAND,4BAMC;AAED;;;;;;;GAOG;AAEH,SAAgB,QAAQ,CAAC,IAAY,EAAE,KAAa;IAClD,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAC1B,IAAI,EAAE,IAAI,GAAG,EAAE;QACb,O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C,KAAK,CAAC,CAAC,CAAC;SAC5B;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;SAC7C;KACF;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAChC,CAAC;AAjBD,4BAiBC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,KAAa,EAAE,OAAwB;IACvE,IAAI,aAAQ,CAAC,OAAO,CAAC,EAAE;QACrB,OAAQ,OAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxC;IACD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;KACtC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AARD,8CAQC","sourcesContent":["import { isRegExp } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n colno = ll; // tslint:disable-line:no-parameter-reassignment\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/supports.d.ts b/node_modules/@sentry/utils/dist/supports.d.ts deleted file mode 100644 index 8ec9ea8..0000000 --- a/node_modules/@sentry/utils/dist/supports.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Tells whether current environment supports ErrorEvent objects - * {@link supportsErrorEvent}. - * - * @returns Answer to the given question. - */ -export declare function supportsErrorEvent(): boolean; -/** - * Tells whether current environment supports DOMError objects - * {@link supportsDOMError}. - * - * @returns Answer to the given question. - */ -export declare function supportsDOMError(): boolean; -/** - * Tells whether current environment supports DOMException objects - * {@link supportsDOMException}. - * - * @returns Answer to the given question. - */ -export declare function supportsDOMException(): boolean; -/** - * Tells whether current environment supports Fetch API - * {@link supportsFetch}. - * - * @returns Answer to the given question. - */ -export declare function supportsFetch(): boolean; -/** - * Tells whether current environment supports Fetch API natively - * {@link supportsNativeFetch}. - * - * @returns true if `window.fetch` is natively implemented, false otherwise - */ -export declare function supportsNativeFetch(): boolean; -/** - * Tells whether current environment supports ReportingObserver API - * {@link supportsReportingObserver}. - * - * @returns Answer to the given question. - */ -export declare function supportsReportingObserver(): boolean; -/** - * Tells whether current environment supports Referrer Policy API - * {@link supportsReferrerPolicy}. - * - * @returns Answer to the given question. - */ -export declare function supportsReferrerPolicy(): boolean; -/** - * Tells whether current environment supports History API - * {@link supportsHistory}. - * - * @returns Answer to the given question. - */ -export declare function supportsHistory(): boolean; -//# sourceMappingURL=supports.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/supports.js b/node_modules/@sentry/utils/dist/supports.js deleted file mode 100644 index 4624a98..0000000 --- a/node_modules/@sentry/utils/dist/supports.js +++ /dev/null @@ -1,182 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var logger_1 = require("./logger"); -var misc_1 = require("./misc"); -/** - * Tells whether current environment supports ErrorEvent objects - * {@link supportsErrorEvent}. - * - * @returns Answer to the given question. - */ -function supportsErrorEvent() { - try { - // tslint:disable:no-unused-expression - new ErrorEvent(''); - return true; - } - catch (e) { - return false; - } -} -exports.supportsErrorEvent = supportsErrorEvent; -/** - * Tells whether current environment supports DOMError objects - * {@link supportsDOMError}. - * - * @returns Answer to the given question. - */ -function supportsDOMError() { - try { - // It really needs 1 argument, not 0. - // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError': - // 1 argument required, but only 0 present. - // @ts-ignore - // tslint:disable:no-unused-expression - new DOMError(''); - return true; - } - catch (e) { - return false; - } -} -exports.supportsDOMError = supportsDOMError; -/** - * Tells whether current environment supports DOMException objects - * {@link supportsDOMException}. - * - * @returns Answer to the given question. - */ -function supportsDOMException() { - try { - // tslint:disable:no-unused-expression - new DOMException(''); - return true; - } - catch (e) { - return false; - } -} -exports.supportsDOMException = supportsDOMException; -/** - * Tells whether current environment supports Fetch API - * {@link supportsFetch}. - * - * @returns Answer to the given question. - */ -function supportsFetch() { - if (!('fetch' in misc_1.getGlobalObject())) { - return false; - } - try { - // tslint:disable-next-line:no-unused-expression - new Headers(); - // tslint:disable-next-line:no-unused-expression - new Request(''); - // tslint:disable-next-line:no-unused-expression - new Response(); - return true; - } - catch (e) { - return false; - } -} -exports.supportsFetch = supportsFetch; -/** - * isNativeFetch checks if the given function is a native implementation of fetch() - */ -function isNativeFetch(func) { - return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); -} -/** - * Tells whether current environment supports Fetch API natively - * {@link supportsNativeFetch}. - * - * @returns true if `window.fetch` is natively implemented, false otherwise - */ -function supportsNativeFetch() { - if (!supportsFetch()) { - return false; - } - var global = misc_1.getGlobalObject(); - // Fast path to avoid DOM I/O - // tslint:disable-next-line:no-unbound-method - if (isNativeFetch(global.fetch)) { - return true; - } - // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) - // so create a "pure" iframe to see if that has native fetch - var result = false; - var doc = global.document; - if (doc) { - try { - var sandbox = doc.createElement('iframe'); - sandbox.hidden = true; - doc.head.appendChild(sandbox); - if (sandbox.contentWindow && sandbox.contentWindow.fetch) { - // tslint:disable-next-line:no-unbound-method - result = isNativeFetch(sandbox.contentWindow.fetch); - } - doc.head.removeChild(sandbox); - } - catch (err) { - logger_1.logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); - } - } - return result; -} -exports.supportsNativeFetch = supportsNativeFetch; -/** - * Tells whether current environment supports ReportingObserver API - * {@link supportsReportingObserver}. - * - * @returns Answer to the given question. - */ -function supportsReportingObserver() { - // tslint:disable-next-line: no-unsafe-any - return 'ReportingObserver' in misc_1.getGlobalObject(); -} -exports.supportsReportingObserver = supportsReportingObserver; -/** - * Tells whether current environment supports Referrer Policy API - * {@link supportsReferrerPolicy}. - * - * @returns Answer to the given question. - */ -function supportsReferrerPolicy() { - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default - // https://caniuse.com/#feat=referrer-policy - // It doesn't. And it throw exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - if (!supportsFetch()) { - return false; - } - try { - // tslint:disable:no-unused-expression - new Request('_', { - referrerPolicy: 'origin', - }); - return true; - } - catch (e) { - return false; - } -} -exports.supportsReferrerPolicy = supportsReferrerPolicy; -/** - * Tells whether current environment supports History API - * {@link supportsHistory}. - * - * @returns Answer to the given question. - */ -function supportsHistory() { - // NOTE: in Chrome App environment, touching history.pushState, *even inside - // a try/catch block*, will cause Chrome to output an error to console.error - // borrowed from: https://github.com/angular/angular.js/pull/13945/files - var global = misc_1.getGlobalObject(); - var chrome = global.chrome; - // tslint:disable-next-line:no-unsafe-any - var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; - var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState; - return !isChromePackagedApp && hasHistoryApi; -} -exports.supportsHistory = supportsHistory; -//# sourceMappingURL=supports.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/supports.js.map b/node_modules/@sentry/utils/dist/supports.js.map deleted file mode 100644 index f3eda5f..0000000 --- a/node_modules/@sentry/utils/dist/supports.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"supports.js","sourceRoot":"","sources":["../src/supports.ts"],"names":[],"mappings":";AAAA,mCAAkC;AAClC,+BAAyC;AAEzC;;;;;GAKG;AACH,SAAgB,kBAAkB;IAChC,IAAI;QACF,sCAAsC;QACtC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC;KACb;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AARD,gDAQC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB;IAC9B,IAAI;QACF,qCAAqC;QACrC,qEAAqE;QACrE,2CAA2C;QAC3C,aAAa;QACb,sCAAsC;QACtC,IAAI,QAAQ,CAAC,EAAE,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;KACb;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAZD,4CAYC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB;IAClC,I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,IAAI,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;IAEzG,OAAO,CAAC,mBAAmB,IAAI,aAAa,CAAC;AAC/C,CAAC;AAXD,0CAWC","sourcesContent":["import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // It really needs 1 argument, not 0.\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore\n // tslint:disable:no-unused-expression\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n // tslint:disable-next-line:no-unused-expression\n new Headers();\n // tslint:disable-next-line:no-unused-expression\n new Request('');\n // tslint:disable-next-line:no-unused-expression\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\nfunction isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // tslint:disable-next-line:no-unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n if (doc) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // tslint:disable-next-line:no-unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n // tslint:disable-next-line: no-unsafe-any\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n // tslint:disable:no-unused-expression\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n const chrome = (global as any).chrome;\n // tslint:disable-next-line:no-unsafe-any\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/syncpromise.d.ts b/node_modules/@sentry/utils/dist/syncpromise.d.ts deleted file mode 100644 index d977816..0000000 --- a/node_modules/@sentry/utils/dist/syncpromise.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Thenable class that behaves like a Promise and follows it's interface - * but is not async internally - */ -declare class SyncPromise implements PromiseLike { - private _state; - private _handlers; - private _value; - constructor(executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void); - /** JSDoc */ - toString(): string; - /** JSDoc */ - static resolve(value: T | PromiseLike): PromiseLike; - /** JSDoc */ - static reject(reason?: any): PromiseLike; - /** JSDoc */ - static all(collection: Array>): PromiseLike; - /** JSDoc */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): PromiseLike; - /** JSDoc */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): PromiseLike; - /** JSDoc */ - finally(onfinally?: (() => void) | null): PromiseLike; - /** JSDoc */ - private readonly _resolve; - /** JSDoc */ - private readonly _reject; - /** JSDoc */ - private readonly _setResult; - /** JSDoc */ - private readonly _attachHandler; - /** JSDoc */ - private readonly _executeHandlers; -} -export { SyncPromise }; -//# sourceMappingURL=syncpromise.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/syncpromise.js b/node_modules/@sentry/utils/dist/syncpromise.js deleted file mode 100644 index e55f828..0000000 --- a/node_modules/@sentry/utils/dist/syncpromise.js +++ /dev/null @@ -1,194 +0,0 @@ -Object.defineProperty(exports, "__esModule", { value: true }); -var is_1 = require("./is"); -/** SyncPromise internal states */ -var States; -(function (States) { - /** Pending */ - States["PENDING"] = "PENDING"; - /** Resolved / OK */ - States["RESOLVED"] = "RESOLVED"; - /** Rejected / Error */ - States["REJECTED"] = "REJECTED"; -})(States || (States = {})); -/** - * Thenable class that behaves like a Promise and follows it's interface - * but is not async internally - */ -var SyncPromise = /** @class */ (function () { - function SyncPromise(executor) { - var _this = this; - this._state = States.PENDING; - this._handlers = []; - /** JSDoc */ - this._resolve = function (value) { - _this._setResult(States.RESOLVED, value); - }; - /** JSDoc */ - this._reject = function (reason) { - _this._setResult(States.REJECTED, reason); - }; - /** JSDoc */ - this._setResult = function (state, value) { - if (_this._state !== States.PENDING) { - return; - } - if (is_1.isThenable(value)) { - value.then(_this._resolve, _this._reject); - return; - } - _this._state = state; - _this._value = value; - _this._executeHandlers(); - }; - // TODO: FIXME - /** JSDoc */ - this._attachHandler = function (handler) { - _this._handlers = _this._handlers.concat(handler); - _this._executeHandlers(); - }; - /** JSDoc */ - this._executeHandlers = function () { - if (_this._state === States.PENDING) { - return; - } - if (_this._state === States.REJECTED) { - _this._handlers.forEach(function (handler) { - if (handler.onrejected) { - handler.onrejected(_this._value); - } - }); - } - else { - _this._handlers.forEach(function (handler) { - if (handler.onfulfilled) { - // tslint:disable-next-line:no-unsafe-any - handler.onfulfilled(_this._value); - } - }); - } - _this._handlers = []; - }; - try { - executor(this._resolve, this._reject); - } - catch (e) { - this._reject(e); - } - } - /** JSDoc */ - SyncPromise.prototype.toString = function () { - return '[object SyncPromise]'; - }; - /** JSDoc */ - SyncPromise.resolve = function (value) { - return new SyncPromise(function (resolve) { - resolve(value); - }); - }; - /** JSDoc */ - SyncPromise.reject = function (reason) { - return new SyncPromise(function (_, reject) { - reject(reason); - }); - }; - /** JSDoc */ - SyncPromise.all = function (collection) { - return new SyncPromise(function (resolve, reject) { - if (!Array.isArray(collection)) { - reject(new TypeError("Promise.all requires an array as input.")); - return; - } - if (collection.length === 0) { - resolve([]); - return; - } - var counter = collection.length; - var resolvedCollection = []; - collection.forEach(function (item, index) { - SyncPromise.resolve(item) - .then(function (value) { - resolvedCollection[index] = value; - counter -= 1; - if (counter !== 0) { - return; - } - resolve(resolvedCollection); - }) - .then(null, reject); - }); - }); - }; - /** JSDoc */ - SyncPromise.prototype.then = function (onfulfilled, onrejected) { - var _this = this; - return new SyncPromise(function (resolve, reject) { - _this._attachHandler({ - onfulfilled: function (result) { - if (!onfulfilled) { - // TODO: ¯\_(ツ)_/¯ - // TODO: FIXME - resolve(result); - return; - } - try { - resolve(onfulfilled(result)); - return; - } - catch (e) { - reject(e); - return; - } - }, - onrejected: function (reason) { - if (!onrejected) { - reject(reason); - return; - } - try { - resolve(onrejected(reason)); - return; - } - catch (e) { - reject(e); - return; - } - }, - }); - }); - }; - /** JSDoc */ - SyncPromise.prototype.catch = function (onrejected) { - return this.then(function (val) { return val; }, onrejected); - }; - /** JSDoc */ - SyncPromise.prototype.finally = function (onfinally) { - var _this = this; - return new SyncPromise(function (resolve, reject) { - var val; - var isRejected; - return _this.then(function (value) { - isRejected = false; - val = value; - if (onfinally) { - onfinally(); - } - }, function (reason) { - isRejected = true; - val = reason; - if (onfinally) { - onfinally(); - } - }).then(function () { - if (isRejected) { - reject(val); - return; - } - // tslint:disable-next-line:no-unsafe-any - resolve(val); - }); - }); - }; - return SyncPromise; -}()); -exports.SyncPromise = SyncPromise; -//# sourceMappingURL=syncpromise.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/dist/syncpromise.js.map b/node_modules/@sentry/utils/dist/syncpromise.js.map deleted file mode 100644 index 6a44b56..0000000 --- a/node_modules/@sentry/utils/dist/syncpromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"syncpromise.js","sourceRoot":"","sources":["../src/syncpromise.ts"],"names":[],"mappings":";AAAA,2BAAkC;AAElC,kCAAkC;AAClC,IAAK,MAOJ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AC;IAgEH,kBAAC;AAAD,CAAC,AAlND,IAkNC;AAEQ,kCAAW","sourcesContent":["import { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n /** Pending */\n PENDING = 'PENDING',\n /** Resolved / OK */\n RESOLVED = 'RESOLVED',\n /** Rejected / Error */\n REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<{\n onfulfilled?: ((value: T) => T | PromiseLike) | null;\n onrejected?: ((reason: any) => any) | null;\n }> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public toString(): string {\n return '[object SyncPromise]';\n }\n\n /** JSDoc */\n public static resolve(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n }\n\n /** JSDoc */\n public static reject(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n }\n\n /** JSDoc */\n public static all(collection: Array>): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n if (!Array.isArray(collection)) {\n reject(new TypeError(`Promise.all requires an array as input.`));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n let counter = collection.length;\n const resolvedCollection: U[] = [];\n\n collection.forEach((item, index) => {\n SyncPromise.resolve(item)\n .then(value => {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._attachHandler({\n onfulfilled: result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: reason => {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n // tslint:disable-next-line:no-unsafe-any\n resolve(val);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n // TODO: FIXME\n /** JSDoc */\n private readonly _attachHandler = (handler: {\n /** JSDoc */\n onfulfilled?(value: T): any;\n /** JSDoc */\n onrejected?(reason: any): any;\n }) => {\n this._handlers = this._handlers.concat(handler);\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n if (this._state === States.REJECTED) {\n this._handlers.forEach(handler => {\n if (handler.onrejected) {\n handler.onrejected(this._value);\n }\n });\n } else {\n this._handlers.forEach(handler => {\n if (handler.onfulfilled) {\n // tslint:disable-next-line:no-unsafe-any\n handler.onfulfilled(this._value);\n }\n });\n }\n\n this._handlers = [];\n };\n}\n\nexport { SyncPromise };\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/async.d.ts b/node_modules/@sentry/utils/esm/async.d.ts deleted file mode 100644 index f46660e..0000000 --- a/node_modules/@sentry/utils/esm/async.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Consumes the promise and logs the error when it rejects. - * @param promise A promise to forget. - */ -export declare function forget(promise: PromiseLike): void; -//# sourceMappingURL=async.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/async.d.ts.map b/node_modules/@sentry/utils/esm/async.d.ts.map deleted file mode 100644 index cf9fad5..0000000 --- a/node_modules/@sentry/utils/esm/async.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../src/async.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAKtD"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/async.js b/node_modules/@sentry/utils/esm/async.js deleted file mode 100644 index fdee084..0000000 --- a/node_modules/@sentry/utils/esm/async.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Consumes the promise and logs the error when it rejects. - * @param promise A promise to forget. - */ -export function forget(promise) { - promise.then(null, function (e) { - // TODO: Use a better logging mechanism - console.error(e); - }); -} -//# sourceMappingURL=async.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/async.js.map b/node_modules/@sentry/utils/esm/async.js.map deleted file mode 100644 index 993c560..0000000 --- a/node_modules/@sentry/utils/esm/async.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async.js","sourceRoot":"","sources":["../src/async.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAyB;IAC9C,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,UAAA,CAAC;QAClB,uCAAuC;QACvC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\nexport function forget(promise: PromiseLike): void {\n promise.then(null, e => {\n // TODO: Use a better logging mechanism\n console.error(e);\n });\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/dsn.d.ts b/node_modules/@sentry/utils/esm/dsn.d.ts deleted file mode 100644 index 31e2e1f..0000000 --- a/node_modules/@sentry/utils/esm/dsn.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types'; -/** The Sentry Dsn, identifying a Sentry instance and project. */ -export declare class Dsn implements DsnComponents { - /** Protocol used to connect to Sentry. */ - protocol: DsnProtocol; - /** Public authorization key. */ - user: string; - /** private _authorization key (deprecated, optional). */ - pass: string; - /** Hostname of the Sentry instance. */ - host: string; - /** Port of the Sentry instance. */ - port: string; - /** Path */ - path: string; - /** Project ID */ - projectId: string; - /** Creates a new Dsn component */ - constructor(from: DsnLike); - /** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private _representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ - toString(withPassword?: boolean): string; - /** Parses a string into this Dsn. */ - private _fromString; - /** Maps Dsn components into this instance. */ - private _fromComponents; - /** Validates this Dsn and throws on error. */ - private _validate; -} -//# sourceMappingURL=dsn.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/dsn.d.ts.map b/node_modules/@sentry/utils/esm/dsn.d.ts.map deleted file mode 100644 index 2535aea..0000000 --- a/node_modules/@sentry/utils/esm/dsn.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAUpE,iEAAiE;AACjE,qBAAa,GAAI,YAAW,aAAa;IACvC,0CAA0C;IACnC,QAAQ,EAAG,WAAW,CAAC;IAC9B,gCAAgC;IACzB,IAAI,EAAG,MAAM,CAAC;IACrB,yDAAyD;IAClD,IAAI,EAAG,MAAM,CAAC;IACrB,uCAAuC;IAChC,IAAI,EAAG,MAAM,CAAC;IACrB,mCAAmC;IAC5B,IAAI,EAAG,MAAM,CAAC;IACrB,WAAW;IACJ,IAAI,EAAG,MAAM,CAAC;IACrB,iBAAiB;IACV,SAAS,EAAG,MAAM,CAAC;IAE1B,kCAAkC;gBACf,IAAI,EAAE,OAAO;IAUhC;;;;;;;;OAQG;IACI,QAAQ,CAAC,YAAY,GAAE,OAAe,GAAG,MAAM;IAStD,qCAAqC;IACrC,OAAO,CAAC,WAAW;IAoBnB,8CAA8C;IAC9C,OAAO,CAAC,eAAe;IAUvB,8CAA8C;IAC9C,OAAO,CAAC,SAAS;CAelB"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/dsn.js b/node_modules/@sentry/utils/esm/dsn.js index 4af31c3..42de6b2 100644 --- a/node_modules/@sentry/utils/esm/dsn.js +++ b/node_modules/@sentry/utils/esm/dsn.js @@ -1,79 +1,109 @@ -import * as tslib_1 from "tslib"; -import { SentryError } from './error'; +import { SentryError } from './error.js'; + /** Regular expression used to parse a Dsn. */ -var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/; -/** Error message */ -var ERROR_MESSAGE = 'Invalid Dsn'; -/** The Sentry Dsn, identifying a Sentry instance and project. */ -var Dsn = /** @class */ (function () { - /** Creates a new Dsn component */ - function Dsn(from) { - if (typeof from === 'string') { - this._fromString(from); - } - else { - this._fromComponents(from); - } - this._validate(); +const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; + +function isValidProtocol(protocol) { + return protocol === 'http' || protocol === 'https'; +} + +/** + * Renders the string representation of this Dsn. + * + * By default, this will render the public representation without the password + * component. To get the deprecated private representation, set `withPassword` + * to true. + * + * @param withPassword When set to true, the password will be included. + */ +function dsnToString(dsn, withPassword = false) { + const { host, path, pass, port, projectId, protocol, publicKey } = dsn; + return ( + `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` + + `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}` + ); +} + +/** + * Parses a Dsn from a given string. + * + * @param str A Dsn as string + * @returns Dsn as DsnComponents + */ +function dsnFromString(str) { + const match = DSN_REGEX.exec(str); + + if (!match) { + throw new SentryError(`Invalid Sentry Dsn: ${str}`); + } + + const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1); + let path = ''; + let projectId = lastPath; + + const split = projectId.split('/'); + if (split.length > 1) { + path = split.slice(0, -1).join('/'); + projectId = split.pop() ; + } + + if (projectId) { + const projectMatch = projectId.match(/^\d+/); + if (projectMatch) { + projectId = projectMatch[0]; + } + } + + return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey }); +} + +function dsnFromComponents(components) { + return { + protocol: components.protocol, + publicKey: components.publicKey || '', + pass: components.pass || '', + host: components.host, + port: components.port || '', + path: components.path || '', + projectId: components.projectId, + }; +} + +function validateDsn(dsn) { + if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + return; + } + + const { port, projectId, protocol } = dsn; + + const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId']; + requiredComponents.forEach(component => { + if (!dsn[component]) { + throw new SentryError(`Invalid Sentry Dsn: ${component} missing`); } - /** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private _representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ - Dsn.prototype.toString = function (withPassword) { - if (withPassword === void 0) { withPassword = false; } - // tslint:disable-next-line:no-this-assignment - var _a = this, host = _a.host, path = _a.path, pass = _a.pass, port = _a.port, projectId = _a.projectId, protocol = _a.protocol, user = _a.user; - return (protocol + "://" + user + (withPassword && pass ? ":" + pass : '') + - ("@" + host + (port ? ":" + port : '') + "/" + (path ? path + "/" : path) + projectId)); - }; - /** Parses a string into this Dsn. */ - Dsn.prototype._fromString = function (str) { - var match = DSN_REGEX.exec(str); - if (!match) { - throw new SentryError(ERROR_MESSAGE); - } - var _a = tslib_1.__read(match.slice(1), 6), protocol = _a[0], user = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5]; - var path = ''; - var projectId = lastPath; - var split = projectId.split('/'); - if (split.length > 1) { - path = split.slice(0, -1).join('/'); - projectId = split.pop(); - } - this._fromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, user: user }); - }; - /** Maps Dsn components into this instance. */ - Dsn.prototype._fromComponents = function (components) { - this.protocol = components.protocol; - this.user = components.user; - this.pass = components.pass || ''; - this.host = components.host; - this.port = components.port || ''; - this.path = components.path || ''; - this.projectId = components.projectId; - }; - /** Validates this Dsn and throws on error. */ - Dsn.prototype._validate = function () { - var _this = this; - ['protocol', 'user', 'host', 'projectId'].forEach(function (component) { - if (!_this[component]) { - throw new SentryError(ERROR_MESSAGE); - } - }); - if (this.protocol !== 'http' && this.protocol !== 'https') { - throw new SentryError(ERROR_MESSAGE); - } - if (this.port && isNaN(parseInt(this.port, 10))) { - throw new SentryError(ERROR_MESSAGE); - } - }; - return Dsn; -}()); -export { Dsn }; -//# sourceMappingURL=dsn.js.map \ No newline at end of file + }); + + if (!projectId.match(/^\d+$/)) { + throw new SentryError(`Invalid Sentry Dsn: Invalid projectId ${projectId}`); + } + + if (!isValidProtocol(protocol)) { + throw new SentryError(`Invalid Sentry Dsn: Invalid protocol ${protocol}`); + } + + if (port && isNaN(parseInt(port, 10))) { + throw new SentryError(`Invalid Sentry Dsn: Invalid port ${port}`); + } + + return true; +} + +/** The Sentry Dsn, identifying a Sentry instance and project. */ +function makeDsn(from) { + const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from); + validateDsn(components); + return components; +} + +export { dsnFromString, dsnToString, makeDsn }; +//# sourceMappingURL=dsn.js.map diff --git a/node_modules/@sentry/utils/esm/dsn.js.map b/node_modules/@sentry/utils/esm/dsn.js.map index eb83fad..8aace66 100644 --- a/node_modules/@sentry/utils/esm/dsn.js.map +++ b/node_modules/@sentry/utils/esm/dsn.js.map @@ -1 +1 @@ -{"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,8CAA8C;AAC9C,IAAM,SAAS,GAAG,iEAAiE,CAAC;AAEpF,oBAAoB;AACpB,IAAM,aAAa,GAAG,aAAa,CAAC;AAEpC,iEAAiE;AACjE;IAgBE,kCAAkC;IAClC,aAAmB,IAAa;QAC9B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACxB;aAAM;YACL,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;SAC5B;QAED,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED;;;;;;;;OAQG;IACI,sBAAQ,GAAf,UAAgB,YAA6B;QAA7B,6BAAA,EAAA,oBAA6B;QAC3C,8CAA8C;QACxC,IAAA,SAA4D,EAA1D,cAAI,EAAE,cAAI,EAAE,cAAI,EAAE,cAAI,EAAE,wBAAS,EAAE,sBAAQ,EAAE,cAAa,CAAC;QACnE,OAAO,CACF,QAAQ,WAAM,IAAI,IAAG,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,MAAI,IAAM,CAAC,CAAC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AC,IAAI,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;IACxC,CAAC;IAED,8CAA8C;IACtC,uBAAS,GAAjB;QAAA,iBAcC;QAbC,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,UAAA,SAAS;YACzD,IAAI,CAAC,KAAI,CAAC,SAAgC,CAAC,EAAE;gBAC3C,MAAM,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;aACtC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,IAAI,CAAC,QAAQ,KAAK,MAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,EAAE;YACzD,MAAM,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;SACtC;QAED,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE;YAC/C,MAAM,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;SACtC;IACH,CAAC;IACH,UAAC;AAAD,CAAC,AA7FD,IA6FC","sourcesContent":["import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w\\.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n /** Protocol used to connect to Sentry. */\n public protocol!: DsnProtocol;\n /** Public authorization key. */\n public user!: string;\n /** private _authorization key (deprecated, optional). */\n public pass!: string;\n /** Hostname of the Sentry instance. */\n public host!: string;\n /** Port of the Sentry instance. */\n public port!: string;\n /** Path */\n public path!: string;\n /** Project ID */\n public projectId!: string;\n\n /** Creates a new Dsn component */\n public constructor(from: DsnLike) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n public toString(withPassword: boolean = false): string {\n // tslint:disable-next-line:no-this-assignment\n const { host, path, pass, port, projectId, protocol, user } = this;\n return (\n `${protocol}://${user}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }\n\n /** Parses a string into this Dsn. */\n private _fromString(str: string): void {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, user });\n }\n\n /** Maps Dsn components into this instance. */\n private _fromComponents(components: DsnComponents): void {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n }\n\n /** Validates this Dsn and throws on error. */\n private _validate(): void {\n ['protocol', 'user', 'host', 'projectId'].forEach(component => {\n if (!this[component as keyof DsnComponents]) {\n throw new SentryError(ERROR_MESSAGE);\n }\n });\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE);\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"dsn.js","sources":["../../src/dsn.ts"],"sourcesContent":["import type { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents\n */\nexport function dsnFromString(str: string): DsnComponents {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(`Invalid Sentry Dsn: ${str}`);\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean | void {\n if (!__DEBUG_BUILD__) {\n return;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray = ['protocol', 'publicKey', 'host', 'projectId'];\n requiredComponents.forEach(component => {\n if (!dsn[component]) {\n throw new SentryError(`Invalid Sentry Dsn: ${component} missing`);\n }\n });\n\n if (!projectId.match(/^\\d+$/)) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n }\n\n if (!isValidProtocol(protocol)) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid port ${port}`);\n }\n\n return true;\n}\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport function makeDsn(from: DsnLike): DsnComponents {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n validateDsn(components);\n return components;\n}\n"],"names":[],"mappings":";;AAIA;AACA,MAAA,SAAA,GAAA,iEAAA,CAAA;AACA;AACA,SAAA,eAAA,CAAA,QAAA,EAAA;AACA,EAAA,OAAA,QAAA,KAAA,MAAA,IAAA,QAAA,KAAA,OAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,WAAA,CAAA,GAAA,EAAA,YAAA,GAAA,KAAA,EAAA;AACA,EAAA,MAAA,EAAA,IAAA,EAAA,IAAA,EAAA,IAAA,EAAA,IAAA,EAAA,SAAA,EAAA,QAAA,EAAA,SAAA,EAAA,GAAA,GAAA,CAAA;AACA,EAAA;AACA,IAAA,CAAA,EAAA,QAAA,CAAA,GAAA,EAAA,SAAA,CAAA,EAAA,YAAA,IAAA,IAAA,GAAA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ACA;AACA,EAAA,IAAA,CAAA,SAAA,CAAA,KAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,MAAA,IAAA,WAAA,CAAA,CAAA,sCAAA,EAAA,SAAA,CAAA,CAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA,CAAA,eAAA,CAAA,QAAA,CAAA,EAAA;AACA,IAAA,MAAA,IAAA,WAAA,CAAA,CAAA,qCAAA,EAAA,QAAA,CAAA,CAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA,IAAA,IAAA,KAAA,CAAA,QAAA,CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,EAAA;AACA,IAAA,MAAA,IAAA,WAAA,CAAA,CAAA,iCAAA,EAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,IAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,OAAA,CAAA,IAAA,EAAA;AACA,EAAA,MAAA,UAAA,GAAA,OAAA,IAAA,KAAA,QAAA,GAAA,aAAA,CAAA,IAAA,CAAA,GAAA,iBAAA,CAAA,IAAA,CAAA,CAAA;AACA,EAAA,WAAA,CAAA,UAAA,CAAA,CAAA;AACA,EAAA,OAAA,UAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/error.d.ts b/node_modules/@sentry/utils/esm/error.d.ts deleted file mode 100644 index 4f3e56c..0000000 --- a/node_modules/@sentry/utils/esm/error.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** An error emitted by Sentry SDKs and related utilities. */ -export declare class SentryError extends Error { - message: string; - /** Display name of this error instance. */ - name: string; - constructor(message: string); -} -//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/error.d.ts.map b/node_modules/@sentry/utils/esm/error.d.ts.map deleted file mode 100644 index d2965ed..0000000 --- a/node_modules/@sentry/utils/esm/error.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAEA,6DAA6D;AAC7D,qBAAa,WAAY,SAAQ,KAAK;IAIV,OAAO,EAAE,MAAM;IAHzC,2CAA2C;IACpC,IAAI,EAAE,MAAM,CAAC;gBAEM,OAAO,EAAE,MAAM;CAO1C"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/error.js b/node_modules/@sentry/utils/esm/error.js index 213a3fd..216552c 100644 --- a/node_modules/@sentry/utils/esm/error.js +++ b/node_modules/@sentry/utils/esm/error.js @@ -1,18 +1,18 @@ -import * as tslib_1 from "tslib"; -import { setPrototypeOf } from './polyfill'; /** An error emitted by Sentry SDKs and related utilities. */ -var SentryError = /** @class */ (function (_super) { - tslib_1.__extends(SentryError, _super); - function SentryError(message) { - var _newTarget = this.constructor; - var _this = _super.call(this, message) || this; - _this.message = message; - // tslint:disable:no-unsafe-any - _this.name = _newTarget.prototype.constructor.name; - setPrototypeOf(_this, _newTarget.prototype); - return _this; - } - return SentryError; -}(Error)); +class SentryError extends Error { + /** Display name of this error instance. */ + + constructor( message, logLevel = 'warn') { + super(message);this.message = message;; + + this.name = new.target.prototype.constructor.name; + // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line + // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes + // instances of `SentryError` fail `obj instanceof SentryError` checks. + Object.setPrototypeOf(this, new.target.prototype); + this.logLevel = logLevel; + } +} + export { SentryError }; -//# sourceMappingURL=error.js.map \ No newline at end of file +//# sourceMappingURL=error.js.map diff --git a/node_modules/@sentry/utils/esm/error.js.map b/node_modules/@sentry/utils/esm/error.js.map index 3bcd2a7..923d38a 100644 --- a/node_modules/@sentry/utils/esm/error.js.map +++ b/node_modules/@sentry/utils/esm/error.js.map @@ -1 +1 @@ -{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,6DAA6D;AAC7D;IAAiC,uCAAK;IAIpC,qBAA0B,OAAe;;QAAzC,YACE,kBAAM,OAAO,CAAC,SAKf;QANyB,aAAO,GAAP,OAAO,CAAQ;QAGvC,+BAA+B;QAC/B,KAAI,CAAC,IAAI,GAAG,WAAW,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;QAClD,cAAc,CAAC,KAAI,EAAE,WAAW,SAAS,CAAC,CAAC;;IAC7C,CAAC;IACH,kBAAC;AAAD,CAAC,AAXD,CAAiC,KAAK,GAWrC","sourcesContent":["import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n // tslint:disable:no-unsafe-any\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"error.js","sources":["../../src/error.ts"],"sourcesContent":["import type { ConsoleLevel } from './logger';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public logLevel: ConsoleLevel;\n\n public constructor(public message: string, logLevel: ConsoleLevel = 'warn') {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n"],"names":[],"mappings":"AAEA;AACA,MAAA,WAAA,SAAA,KAAA,CAAA;AACA;;AAKA,GAAA,WAAA,EAAA,OAAA,EAAA,QAAA,GAAA,MAAA,EAAA;AACA,IAAA,KAAA,CAAA,OAAA,CAAA,CAAA,IAAA,CAAA,OAAA,GAAA,OAAA,CAAA,CAAA;AACA;AACA,IAAA,IAAA,CAAA,IAAA,GAAA,GAAA,CAAA,MAAA,CAAA,SAAA,CAAA,WAAA,CAAA,IAAA,CAAA;AACA;AACA;AACA;AACA,IAAA,MAAA,CAAA,cAAA,CAAA,IAAA,EAAA,GAAA,CAAA,MAAA,CAAA,SAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA,QAAA,CAAA;AACA,GAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/index.d.ts b/node_modules/@sentry/utils/esm/index.d.ts deleted file mode 100644 index 3fa9ec4..0000000 --- a/node_modules/@sentry/utils/esm/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from './async'; -export * from './error'; -export * from './is'; -export * from './logger'; -export * from './memo'; -export * from './misc'; -export * from './object'; -export * from './path'; -export * from './promisebuffer'; -export * from './string'; -export * from './supports'; -export * from './syncpromise'; -export * from './instrument'; -export * from './dsn'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/index.d.ts.map b/node_modules/@sentry/utils/esm/index.d.ts.map deleted file mode 100644 index fa9cfc7..0000000 --- a/node_modules/@sentry/utils/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/index.js b/node_modules/@sentry/utils/esm/index.js index bed25c4..a93206e 100644 --- a/node_modules/@sentry/utils/esm/index.js +++ b/node_modules/@sentry/utils/esm/index.js @@ -1,15 +1,29 @@ -export * from './async'; -export * from './error'; -export * from './is'; -export * from './logger'; -export * from './memo'; -export * from './misc'; -export * from './object'; -export * from './path'; -export * from './promisebuffer'; -export * from './string'; -export * from './supports'; -export * from './syncpromise'; -export * from './instrument'; -export * from './dsn'; -//# sourceMappingURL=index.js.map \ No newline at end of file +export { getDomElement, getLocationHref, htmlTreeAsString } from './browser.js'; +export { dsnFromString, dsnToString, makeDsn } from './dsn.js'; +export { SentryError } from './error.js'; +export { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton } from './worldwide.js'; +export { addInstrumentationHandler } from './instrument.js'; +export { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable } from './is.js'; +export { CONSOLE_LEVELS, consoleSandbox, logger } from './logger.js'; +export { memoBuilder } from './memo.js'; +export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 } from './misc.js'; +export { dynamicRequire, isNodeEnv, loadModule } from './node.js'; +export { normalize, normalizeToSize, walk } from './normalize.js'; +export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode } from './object.js'; +export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './path.js'; +export { makePromiseBuffer } from './promisebuffer.js'; +export { addRequestDataToEvent, addRequestDataToTransaction, extractPathForTransaction, extractRequestData } from './requestdata.js'; +export { severityFromString, severityLevelFromString, validSeverityLevels } from './severity.js'; +export { createStackParser, getFunctionName, nodeStackLineParser, stackParserFromStackParserOptions, stripSentryFramesAndReverse } from './stacktrace.js'; +export { escapeStringForRegex, isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate } from './string.js'; +export { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver } from './supports.js'; +export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './syncpromise.js'; +export { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs, usingPerformanceAPI } from './time.js'; +export { TRACEPARENT_REGEXP, extractTraceparentData } from './tracing.js'; +export { isBrowserBundle } from './env.js'; +export { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope } from './envelope.js'; +export { createClientReportEnvelope } from './clientreport.js'; +export { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits } from './ratelimit.js'; +export { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from './baggage.js'; +export { getNumberOfUrlSegments, parseUrl, stripUrlQueryAndFragment } from './url.js'; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/utils/esm/index.js.map b/node_modules/@sentry/utils/esm/index.js.map index e6f5e5d..721d3cf 100644 --- a/node_modules/@sentry/utils/esm/index.js.map +++ b/node_modules/@sentry/utils/esm/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC","sourcesContent":["export * from './async';\nexport * from './error';\nexport * from './is';\nexport * from './logger';\nexport * from './memo';\nexport * from './misc';\nexport * from './object';\nexport * from './path';\nexport * from './promisebuffer';\nexport * from './string';\nexport * from './supports';\nexport * from './syncpromise';\nexport * from './instrument';\nexport * from './dsn';\n"]} \ No newline at end of file +{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/instrument.d.ts b/node_modules/@sentry/utils/esm/instrument.d.ts deleted file mode 100644 index 336d741..0000000 --- a/node_modules/@sentry/utils/esm/instrument.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** Object describing handler that will be triggered for a given `type` of instrumentation */ -interface InstrumentHandler { - type: InstrumentHandlerType; - callback: InstrumentHandlerCallback; -} -declare type InstrumentHandlerType = 'console' | 'dom' | 'fetch' | 'history' | 'sentry' | 'xhr' | 'error' | 'unhandledrejection'; -declare type InstrumentHandlerCallback = (data: any) => void; -/** - * Add handler that will be called when given type of instrumentation triggers. - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -export declare function addInstrumentationHandler(handler: InstrumentHandler): void; -export {}; -//# sourceMappingURL=instrument.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/instrument.d.ts.map b/node_modules/@sentry/utils/esm/instrument.d.ts.map deleted file mode 100644 index 847d138..0000000 --- a/node_modules/@sentry/utils/esm/instrument.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../src/instrument.ts"],"names":[],"mappings":"AAYA,6FAA6F;AAC7F,UAAU,iBAAiB;IACzB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,EAAE,yBAAyB,CAAC;CACrC;AACD,aAAK,qBAAqB,GACtB,SAAS,GACT,KAAK,GACL,OAAO,GACP,SAAS,GACT,QAAQ,GACR,KAAK,GACL,OAAO,GACP,oBAAoB,CAAC;AACzB,aAAK,yBAAyB,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;AAmDrD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAQ1E"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/instrument.js b/node_modules/@sentry/utils/esm/instrument.js index 0ce7ffc..3a548bf 100644 --- a/node_modules/@sentry/utils/esm/instrument.js +++ b/node_modules/@sentry/utils/esm/instrument.js @@ -1,11 +1,13 @@ -/* tslint:disable:only-arrow-functions no-unsafe-any */ -import * as tslib_1 from "tslib"; -import { isInstanceOf, isString } from './is'; -import { logger } from './logger'; -import { getFunctionName, getGlobalObject } from './misc'; -import { fill } from './object'; -import { supportsHistory, supportsNativeFetch } from './supports'; -var global = getGlobalObject(); +import { isInstanceOf, isString } from './is.js'; +import { logger, CONSOLE_LEVELS } from './logger.js'; +import { fill } from './object.js'; +import { getFunctionName } from './stacktrace.js'; +import { supportsNativeFetch, supportsHistory } from './supports.js'; +import { getGlobalObject } from './worldwide.js'; + +// eslint-disable-next-line deprecation/deprecation +const WINDOW = getGlobalObject(); + /** * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc. * - Console API @@ -16,425 +18,557 @@ var global = getGlobalObject(); * - Error API * - UnhandledRejection API */ -var handlers = {}; -var instrumented = {}; + +const handlers = {}; +const instrumented = {}; + /** Instruments given API */ function instrument(type) { - if (instrumented[type]) { - return; - } - instrumented[type] = true; - switch (type) { - case 'console': - instrumentConsole(); - break; - case 'dom': - instrumentDOM(); - break; - case 'xhr': - instrumentXHR(); - break; - case 'fetch': - instrumentFetch(); - break; - case 'history': - instrumentHistory(); - break; - case 'error': - instrumentError(); - break; - case 'unhandledrejection': - instrumentUnhandledRejection(); - break; - default: - logger.warn('unknown instrumentation type:', type); - } + if (instrumented[type]) { + return; + } + + instrumented[type] = true; + + switch (type) { + case 'console': + instrumentConsole(); + break; + case 'dom': + instrumentDOM(); + break; + case 'xhr': + instrumentXHR(); + break; + case 'fetch': + instrumentFetch(); + break; + case 'history': + instrumentHistory(); + break; + case 'error': + instrumentError(); + break; + case 'unhandledrejection': + instrumentUnhandledRejection(); + break; + default: + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('unknown instrumentation type:', type); + return; + } } + /** * Add handler that will be called when given type of instrumentation triggers. * Use at your own risk, this might break without changelog notice, only used internally. * @hidden */ -export function addInstrumentationHandler(handler) { - // tslint:disable-next-line:strict-type-predicates - if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') { - return; - } - handlers[handler.type] = handlers[handler.type] || []; - handlers[handler.type].push(handler.callback); - instrument(handler.type); +function addInstrumentationHandler(type, callback) { + handlers[type] = handlers[type] || []; + (handlers[type] ).push(callback); + instrument(type); } + /** JSDoc */ function triggerHandlers(type, data) { - var e_1, _a; - if (!type || !handlers[type]) { - return; - } + if (!type || !handlers[type]) { + return; + } + + for (const handler of handlers[type] || []) { try { - for (var _b = tslib_1.__values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) { - var handler = _c.value; - try { - handler(data); - } - catch (e) { - logger.error("Error while triggering instrumentation handler.\nType: " + type + "\nName: " + getFunctionName(handler) + "\nError: " + e); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } + handler(data); + } catch (e) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.error( + `Error while triggering instrumentation handler.\nType: ${type}\nName: ${getFunctionName(handler)}\nError:`, + e, + ); } + } } + /** JSDoc */ function instrumentConsole() { - if (!('console' in global)) { - return; + if (!('console' in WINDOW)) { + return; + } + + CONSOLE_LEVELS.forEach(function (level) { + if (!(level in WINDOW.console)) { + return; } - ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) { - if (!(level in global.console)) { - return; + + fill(WINDOW.console, level, function (originalConsoleMethod) { + return function (...args) { + triggerHandlers('console', { args, level }); + + // this fails for some browsers. :( + if (originalConsoleMethod) { + originalConsoleMethod.apply(WINDOW.console, args); } - fill(global.console, level, function (originalConsoleLevel) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - triggerHandlers('console', { args: args, level: level }); - // this fails for some browsers. :( - if (originalConsoleLevel) { - Function.prototype.apply.call(originalConsoleLevel, global.console, args); - } - }; - }); + }; }); + }); } + /** JSDoc */ function instrumentFetch() { - if (!supportsNativeFetch()) { - return; - } - fill(global, 'fetch', function (originalFetch) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var commonHandlerData = { - args: args, - fetchData: { - method: getFetchMethod(args), - url: getFetchUrl(args), - }, - startTimestamp: Date.now(), - }; - triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData)); - return originalFetch.apply(global, args).then(function (response) { - triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData, { endTimestamp: Date.now(), response: response })); - return response; - }, function (error) { - triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData, { endTimestamp: Date.now(), error: error })); - throw error; - }); - }; - }); + if (!supportsNativeFetch()) { + return; + } + + fill(WINDOW, 'fetch', function (originalFetch) { + return function (...args) { + const handlerData = { + args, + fetchData: { + method: getFetchMethod(args), + url: getFetchUrl(args), + }, + startTimestamp: Date.now(), + }; + + triggerHandlers('fetch', { + ...handlerData, + }); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return originalFetch.apply(WINDOW, args).then( + (response) => { + triggerHandlers('fetch', { + ...handlerData, + endTimestamp: Date.now(), + response, + }); + return response; + }, + (error) => { + triggerHandlers('fetch', { + ...handlerData, + endTimestamp: Date.now(), + error, + }); + // NOTE: If you are a Sentry user, and you are seeing this stack frame, + // it means the sentry.javascript SDK caught an error invoking your application code. + // This is expected behavior and NOT indicative of a bug with sentry.javascript. + throw error; + }, + ); + }; + }); } + +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /** Extract `method` from fetch call arguments */ -function getFetchMethod(fetchArgs) { - if (fetchArgs === void 0) { fetchArgs = []; } - if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) { - return String(fetchArgs[0].method).toUpperCase(); - } - if (fetchArgs[1] && fetchArgs[1].method) { - return String(fetchArgs[1].method).toUpperCase(); - } - return 'GET'; +function getFetchMethod(fetchArgs = []) { + if ('Request' in WINDOW && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) { + return String(fetchArgs[0].method).toUpperCase(); + } + if (fetchArgs[1] && fetchArgs[1].method) { + return String(fetchArgs[1].method).toUpperCase(); + } + return 'GET'; } + /** Extract `url` from fetch call arguments */ -function getFetchUrl(fetchArgs) { - if (fetchArgs === void 0) { fetchArgs = []; } - if (typeof fetchArgs[0] === 'string') { - return fetchArgs[0]; - } - if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) { - return fetchArgs[0].url; - } - return String(fetchArgs[0]); +function getFetchUrl(fetchArgs = []) { + if (typeof fetchArgs[0] === 'string') { + return fetchArgs[0]; + } + if ('Request' in WINDOW && isInstanceOf(fetchArgs[0], Request)) { + return fetchArgs[0].url; + } + return String(fetchArgs[0]); } +/* eslint-enable @typescript-eslint/no-unsafe-member-access */ + /** JSDoc */ function instrumentXHR() { - if (!('XMLHttpRequest' in global)) { - return; - } - var xhrproto = XMLHttpRequest.prototype; - fill(xhrproto, 'open', function (originalOpen) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var url = args[1]; - this.__sentry_xhr__ = { - method: isString(args[0]) ? args[0].toUpperCase() : args[0], - url: args[1], - }; - // if Sentry key appears in URL, don't capture it as a request - if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) { - this.__sentry_own_request__ = true; - } - return originalOpen.apply(this, args); - }; - }); - fill(xhrproto, 'send', function (originalSend) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var xhr = this; // tslint:disable-line:no-this-assignment - var commonHandlerData = { - args: args, - startTimestamp: Date.now(), - xhr: xhr, - }; - triggerHandlers('xhr', tslib_1.__assign({}, commonHandlerData)); - xhr.addEventListener('readystatechange', function () { - if (xhr.readyState === 4) { - try { - // touching statusCode in some platforms throws - // an exception - if (xhr.__sentry_xhr__) { - xhr.__sentry_xhr__.status_code = xhr.status; - } - } - catch (e) { - /* do nothing */ - } - triggerHandlers('xhr', tslib_1.__assign({}, commonHandlerData, { endTimestamp: Date.now() })); - } - }); - return originalSend.apply(this, args); - }; - }); + if (!('XMLHttpRequest' in WINDOW)) { + return; + } + + const xhrproto = XMLHttpRequest.prototype; + + fill(xhrproto, 'open', function (originalOpen) { + return function ( ...args) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const xhr = this; + const url = args[1]; + const xhrInfo = (xhr.__sentry_xhr__ = { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + method: isString(args[0]) ? args[0].toUpperCase() : args[0], + url: args[1], + }); + + // if Sentry key appears in URL, don't capture it as a request + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) { + xhr.__sentry_own_request__ = true; + } + + const onreadystatechangeHandler = function () { + if (xhr.readyState === 4) { + try { + // touching statusCode in some platforms throws + // an exception + xhrInfo.status_code = xhr.status; + } catch (e) { + /* do nothing */ + } + + triggerHandlers('xhr', { + args, + endTimestamp: Date.now(), + startTimestamp: Date.now(), + xhr, + }); + } + }; + + if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') { + fill(xhr, 'onreadystatechange', function (original) { + return function (...readyStateArgs) { + onreadystatechangeHandler(); + return original.apply(xhr, readyStateArgs); + }; + }); + } else { + xhr.addEventListener('readystatechange', onreadystatechangeHandler); + } + + return originalOpen.apply(xhr, args); + }; + }); + + fill(xhrproto, 'send', function (originalSend) { + return function ( ...args) { + if (this.__sentry_xhr__ && args[0] !== undefined) { + this.__sentry_xhr__.body = args[0]; + } + + triggerHandlers('xhr', { + args, + startTimestamp: Date.now(), + xhr: this, + }); + + return originalSend.apply(this, args); + }; + }); } -var lastHref; + +let lastHref; + /** JSDoc */ function instrumentHistory() { - if (!supportsHistory()) { - return; + if (!supportsHistory()) { + return; + } + + const oldOnPopState = WINDOW.onpopstate; + WINDOW.onpopstate = function ( ...args) { + const to = WINDOW.location.href; + // keep track of the current URL state, as we always receive only the updated state + const from = lastHref; + lastHref = to; + triggerHandlers('history', { + from, + to, + }); + if (oldOnPopState) { + // Apparently this can throw in Firefox when incorrectly implemented plugin is installed. + // https://github.com/getsentry/sentry-javascript/issues/3344 + // https://github.com/bugsnag/bugsnag-js/issues/469 + try { + return oldOnPopState.apply(this, args); + } catch (_oO) { + // no-empty + } } - var oldOnPopState = global.onpopstate; - global.onpopstate = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var to = global.location.href; + }; + + /** @hidden */ + function historyReplacementFunction(originalHistoryFunction) { + return function ( ...args) { + const url = args.length > 2 ? args[2] : undefined; + if (url) { + // coerce to string (this is what pushState does) + const from = lastHref; + const to = String(url); // keep track of the current URL state, as we always receive only the updated state - var from = lastHref; lastHref = to; triggerHandlers('history', { - from: from, - to: to, + from, + to, }); - if (oldOnPopState) { - return oldOnPopState.apply(this, args); - } + } + return originalHistoryFunction.apply(this, args); }; - /** @hidden */ - function historyReplacementFunction(originalHistoryFunction) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var url = args.length > 2 ? args[2] : undefined; - if (url) { - // coerce to string (this is what pushState does) - var from = lastHref; - var to = String(url); - // keep track of the current URL state, as we always receive only the updated state - lastHref = to; - triggerHandlers('history', { - from: from, - to: to, - }); - } - return originalHistoryFunction.apply(this, args); - }; + } + + fill(WINDOW.history, 'pushState', historyReplacementFunction); + fill(WINDOW.history, 'replaceState', historyReplacementFunction); +} + +const debounceDuration = 1000; +let debounceTimerID; +let lastCapturedEvent; + +/** + * Decide whether the current event should finish the debounce of previously captured one. + * @param previous previously captured event + * @param current event to be captured + */ +function shouldShortcircuitPreviousDebounce(previous, current) { + // If there was no previous event, it should always be swapped for the new one. + if (!previous) { + return true; + } + + // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress. + if (previous.type !== current.type) { + return true; + } + + try { + // If both events have the same type, it's still possible that actions were performed on different targets. + // e.g. 2 clicks on different buttons. + if (previous.target !== current.target) { + return true; } - fill(global.history, 'pushState', historyReplacementFunction); - fill(global.history, 'replaceState', historyReplacementFunction); + } catch (e) { + // just accessing `target` property can throw an exception in some rare circumstances + // see: https://github.com/getsentry/sentry-javascript/issues/838 + } + + // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_ + // to which an event listener was attached), we treat them as the same action, as we want to capture + // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box. + return false; } -/** JSDoc */ -function instrumentDOM() { - if (!('document' in global)) { - return; + +/** + * Decide whether an event should be captured. + * @param event event to be captured + */ +function shouldSkipDOMEvent(event) { + // We are only interested in filtering `keypress` events for now. + if (event.type !== 'keypress') { + return false; + } + + try { + const target = event.target ; + + if (!target || !target.tagName) { + return true; } - // Capture breadcrumbs from any click that is unhandled / bubbled up all the way - // to the document. Do this before we instrument addEventListener. - global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false); - global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false); - // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses. - ['EventTarget', 'Node'].forEach(function (target) { - var proto = global[target] && global[target].prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - fill(proto, 'addEventListener', function (original) { - return function (eventName, fn, options) { - if (fn && fn.handleEvent) { - if (eventName === 'click') { - fill(fn, 'handleEvent', function (innerOriginal) { - return function (event) { - domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event); - return innerOriginal.call(this, event); - }; - }); - } - if (eventName === 'keypress') { - fill(fn, 'handleEvent', function (innerOriginal) { - return function (event) { - keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event); - return innerOriginal.call(this, event); - }; - }); - } - } - else { - if (eventName === 'click') { - domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this); - } - if (eventName === 'keypress') { - keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this); - } - } - return original.call(this, eventName, fn, options); - }; - }); - fill(proto, 'removeEventListener', function (original) { - return function (eventName, fn, options) { - var callback = fn; - try { - callback = callback && (callback.__sentry_wrapped__ || callback); - } - catch (e) { - // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments - } - return original.call(this, eventName, callback, options); - }; - }); - }); + + // Only consider keypress events on actual input elements. This will disregard keypresses targeting body + // e.g.tabbing through elements, hotkeys, etc. + if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) { + return false; + } + } catch (e) { + // just accessing `target` property can throw an exception in some rare circumstances + // see: https://github.com/getsentry/sentry-javascript/issues/838 + } + + return true; } -var debounceDuration = 1000; -var debounceTimer = 0; -var keypressTimeout; -var lastCapturedEvent; + /** * Wraps addEventListener to capture UI breadcrumbs - * @param name the event name (e.g. "click") * @param handler function that will be triggered - * @param debounce decides whether it should wait till another event loop + * @param globalListener indicates whether event was captured by the global event listener * @returns wrapped breadcrumb events handler * @hidden */ -function domEventHandler(name, handler, debounce) { - if (debounce === void 0) { debounce = false; } - return function (event) { - // reset keypress timeout; e.g. triggering a 'click' after - // a 'keypress' will reset the keypress debounce so that a new - // set of keypresses can be recorded - keypressTimeout = undefined; - // It's possible this handler might trigger multiple times for the same - // event (e.g. event propagation through node ancestors). Ignore if we've - // already captured the event. - if (!event || lastCapturedEvent === event) { - return; - } - lastCapturedEvent = event; - if (debounceTimer) { - clearTimeout(debounceTimer); - } - if (debounce) { - debounceTimer = setTimeout(function () { - handler({ event: event, name: name }); - }); - } - else { - handler({ event: event, name: name }); - } - }; +function makeDOMEventHandler(handler, globalListener = false) { + return (event) => { + // It's possible this handler might trigger multiple times for the same + // event (e.g. event propagation through node ancestors). + // Ignore if we've already captured that event. + if (!event || lastCapturedEvent === event) { + return; + } + + // We always want to skip _some_ events. + if (shouldSkipDOMEvent(event)) { + return; + } + + const name = event.type === 'keypress' ? 'input' : event.type; + + // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons. + if (debounceTimerID === undefined) { + handler({ + event: event, + name, + global: globalListener, + }); + lastCapturedEvent = event; + } + // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one. + // If that's the case, emit the previous event and store locally the newly-captured DOM event. + else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) { + handler({ + event: event, + name, + global: globalListener, + }); + lastCapturedEvent = event; + } + + // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together. + clearTimeout(debounceTimerID); + debounceTimerID = WINDOW.setTimeout(() => { + debounceTimerID = undefined; + }, debounceDuration); + }; } -/** - * Wraps addEventListener to capture keypress UI events - * @param handler function that will be triggered - * @returns wrapped keypress events handler - * @hidden - */ -function keypressEventHandler(handler) { - // TODO: if somehow user switches keypress target before - // debounce timeout is triggered, we will only capture - // a single breadcrumb from the FIRST target (acceptable?) - return function (event) { - var target; - try { - target = event.target; - } - catch (e) { - // just accessing event properties can throw an exception in some rare circumstances - // see: https://github.com/getsentry/raven-js/issues/838 - return; - } - var tagName = target && target.tagName; - // only consider keypress events on actual input elements - // this will disregard keypresses targeting body (e.g. tabbing - // through elements, hotkeys, etc) - if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)) { - return; - } - // record first keypress in a series, but ignore subsequent - // keypresses until debounce clears - if (!keypressTimeout) { - domEventHandler('input', handler)(event); + +/** JSDoc */ +function instrumentDOM() { + if (!('document' in WINDOW)) { + return; + } + + // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom + // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before + // we instrument `addEventListener` so that we don't end up attaching this handler twice. + const triggerDOMHandler = triggerHandlers.bind(null, 'dom'); + const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true); + WINDOW.document.addEventListener('click', globalDOMEventHandler, false); + WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false); + + // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled + // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That + // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler + // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still + // guaranteed to fire at least once.) + ['EventTarget', 'Node'].forEach((target) => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + const proto = (WINDOW )[target] && (WINDOW )[target].prototype; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins + if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { + return; + } + + fill(proto, 'addEventListener', function (originalAddEventListener) { + return function ( + + type, + listener, + options, + ) { + if (type === 'click' || type == 'keypress') { + try { + const el = this ; + const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {}); + const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 }); + + if (!handlerForType.handler) { + const handler = makeDOMEventHandler(triggerDOMHandler); + handlerForType.handler = handler; + originalAddEventListener.call(this, type, handler, options); + } + + handlerForType.refCount++; + } catch (e) { + // Accessing dom properties is always fragile. + // Also allows us to skip `addEventListenrs` calls with no proper `this` context. + } } - clearTimeout(keypressTimeout); - keypressTimeout = setTimeout(function () { - keypressTimeout = undefined; - }, debounceDuration); - }; + + return originalAddEventListener.call(this, type, listener, options); + }; + }); + + fill( + proto, + 'removeEventListener', + function (originalRemoveEventListener) { + return function ( + + type, + listener, + options, + ) { + if (type === 'click' || type == 'keypress') { + try { + const el = this ; + const handlers = el.__sentry_instrumentation_handlers__ || {}; + const handlerForType = handlers[type]; + + if (handlerForType) { + handlerForType.refCount--; + // If there are no longer any custom handlers of the current type on this element, we can remove ours, too. + if (handlerForType.refCount <= 0) { + originalRemoveEventListener.call(this, type, handlerForType.handler, options); + handlerForType.handler = undefined; + delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete + } + + // If there are no longer any custom handlers of any type on this element, cleanup everything. + if (Object.keys(handlers).length === 0) { + delete el.__sentry_instrumentation_handlers__; + } + } + } catch (e) { + // Accessing dom properties is always fragile. + // Also allows us to skip `addEventListenrs` calls with no proper `this` context. + } + } + + return originalRemoveEventListener.call(this, type, listener, options); + }; + }, + ); + }); } -var _oldOnErrorHandler = null; + +let _oldOnErrorHandler = null; /** JSDoc */ function instrumentError() { - _oldOnErrorHandler = global.onerror; - global.onerror = function (msg, url, line, column, error) { - triggerHandlers('error', { - column: column, - error: error, - line: line, - msg: msg, - url: url, - }); - if (_oldOnErrorHandler) { - return _oldOnErrorHandler.apply(this, arguments); - } - return false; - }; + _oldOnErrorHandler = WINDOW.onerror; + + WINDOW.onerror = function (msg, url, line, column, error) { + triggerHandlers('error', { + column, + error, + line, + msg, + url, + }); + + if (_oldOnErrorHandler) { + // eslint-disable-next-line prefer-rest-params + return _oldOnErrorHandler.apply(this, arguments); + } + + return false; + }; } -var _oldOnUnhandledRejectionHandler = null; + +let _oldOnUnhandledRejectionHandler = null; /** JSDoc */ function instrumentUnhandledRejection() { - _oldOnUnhandledRejectionHandler = global.onunhandledrejection; - global.onunhandledrejection = function (e) { - triggerHandlers('unhandledrejection', e); - if (_oldOnUnhandledRejectionHandler) { - return _oldOnUnhandledRejectionHandler.apply(this, arguments); - } - return true; - }; + _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection; + + WINDOW.onunhandledrejection = function (e) { + triggerHandlers('unhandledrejection', e); + + if (_oldOnUnhandledRejectionHandler) { + // eslint-disable-next-line prefer-rest-params + return _oldOnUnhandledRejectionHandler.apply(this, arguments); + } + + return true; + }; } -//# sourceMappingURL=instrument.js.map \ No newline at end of file + +export { addInstrumentationHandler }; +//# sourceMappingURL=instrument.js.map diff --git a/node_modules/@sentry/utils/esm/instrument.js.map b/node_modules/@sentry/utils/esm/instrument.js.map index 2bf2bd1..1f936f6 100644 --- a/node_modules/@sentry/utils/esm/instrument.js.map +++ b/node_modules/@sentry/utils/esm/instrument.js.map @@ -1 +1 @@ -{"version":3,"file":"instrument.js","sourceRoot":"","sources":["../src/instrument.ts"],"names":[],"mappings":"AAAA,uDAAuD;;AAIvD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAElE,IAAM,MAAM,GAAG,eAAe,EAAU,CAAC;AAkBzC;;;;;;;;;GASG;AAEH,IAAM,QAAQ,GAAqE,EAAE,CAAC;AACtF,IAAM,YAAY,GAAiD,EAAE,CAAC;AAEtE,4BAA4B;AAC5B,SAAS,UAAU,CAAC,IAA2B;IAC7C,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE;QACtB,OAAO;KACR;IAED,YAAY,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE1B,QAAQ,IAAI,EAAE;QACZ,KAAK,SAAS;YACZ,iBAAiB,EAAE,CAAC;YACpB,MAAM;QACR,KAAK,KAAK;YACR,aAAa,EAAE,CAAC;YAChB,MAAM;QACR,KAAK,KAAK;YACR,a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CAAC,CAAC;SAC1C;QACD,YAAY,CAAC,eAAe,CAAC,CAAC;QAE9B,eAAe,GAAI,UAAU,CAAC;YAC5B,eAAe,GAAG,SAAS,CAAC;QAC9B,CAAC,EAAE,gBAAgB,CAAmB,CAAC;IACzC,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,kBAAkB,GAAwB,IAAI,CAAC;AACnD,YAAY;AACZ,SAAS,eAAe;IACtB,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAC;IAEpC,MAAM,CAAC,OAAO,GAAG,UAAS,GAAQ,EAAE,GAAQ,EAAE,IAAS,EAAE,MAAW,EAAE,KAAU;QAC9E,eAAe,CAAC,OAAO,EAAE;YACvB,MAAM,QAAA;YACN,KAAK,OAAA;YACL,IAAI,MAAA;YACJ,GAAG,KAAA;YACH,GAAG,KAAA;SACJ,CAAC,CAAC;QAEH,IAAI,kBAAkB,EAAE;YACtB,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;SAClD;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,+BAA+B,GAA8B,IAAI,CAAC;AACtE,YAAY;AACZ,SAAS,4BAA4B;IACnC,+BAA+B,GAAG,MAAM,CAAC,oBAAoB,CAAC;IAE9D,MAAM,CAAC,oBAAoB,GAAG,UAAS,CAAM;QAC3C,eAAe,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;QAEzC,IAAI,+BAA+B,EAAE;YACnC,OAAO,+BAA+B,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;SAC/D;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/* tslint:disable:only-arrow-functions no-unsafe-any */\n\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getFunctionName, getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n type: InstrumentHandlerType;\n callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n // tslint:disable-next-line:strict-type-predicates\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n return function(...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function(originalFetch: () => void): () => void {\n return function(...args: any[]): void {\n const commonHandlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...commonHandlerData,\n });\n\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n error,\n });\n throw error;\n },\n );\n };\n });\n}\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n };\n}\n\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const url = args[1];\n this.__sentry_xhr__ = {\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (isString(url) && this.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const xhr = this; // tslint:disable-line:no-this-assignment\n const commonHandlerData = {\n args,\n startTimestamp: Date.now(),\n xhr,\n };\n\n triggerHandlers('xhr', {\n ...commonHandlerData,\n });\n\n xhr.addEventListener('readystatechange', function(): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n ...commonHandlerData,\n endTimestamp: Date.now(),\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function(this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n\n // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n ['EventTarget', 'Node'].forEach((target: string) => {\n const proto = (global as any)[target] && (global as any)[target].prototype;\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerOrEventListenerObject, capture?: boolean, secure?: boolean) => void {\n if (fn && (fn as EventListenerObject).handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {\n return function(this: any, event: Event): (event: Event) => void {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n } else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n\n fill(proto, 'removeEventListener', function(\n original: () => void,\n ): (\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ) => () => void {\n return function(\n this: any,\n eventName: string,\n fn: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n let callback = fn as WrappedFunction;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n });\n}\n\nconst debounceDuration: number = 1000;\nlet debounceTimer: number = 0;\nlet keypressTimeout: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name: string, handler: Function, debounce: boolean = false): (event: Event) => void {\n return (event: Event) => {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined;\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n lastCapturedEvent = event;\n\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n if (debounce) {\n debounceTimer = setTimeout(() => {\n handler({ event, name });\n });\n } else {\n handler({ event, name });\n }\n };\n}\n\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler: Function): (event: Event) => void {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return (event: Event) => {\n let target;\n\n try {\n target = event.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n\n const tagName = target && (target as HTMLElement).tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !(target as HTMLElement).isContentEditable)) {\n return;\n }\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n clearTimeout(keypressTimeout);\n\n keypressTimeout = (setTimeout(() => {\n keypressTimeout = undefined;\n }, debounceDuration) as any) as number;\n };\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function(e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n"]} \ No newline at end of file +{"version":3,"file":"instrument.js","sources":["../../src/instrument.ts"],"sourcesContent":["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { CONSOLE_LEVELS, logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nexport type InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\nexport type InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n __DEBUG_BUILD__ && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(callback);\n instrument(type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n __DEBUG_BUILD__ &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in WINDOW)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level: string): void {\n if (!(level in WINDOW.console)) {\n return;\n }\n\n fill(WINDOW.console, level, function (originalConsoleMethod: () => any): Function {\n return function (...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.apply(WINDOW.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(WINDOW, 'fetch', function (originalFetch: () => void): () => void {\n return function (...args: any[]): void {\n const handlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(WINDOW, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\ntype XHRSendInput = null | Blob | BufferSource | FormData | URLSearchParams | string;\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n body?: XHRSendInput;\n };\n}\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in WINDOW && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in WINDOW && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in WINDOW)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen: () => void): () => void {\n return function (this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const url = args[1];\n const xhrInfo: SentryWrappedXMLHttpRequest['__sentry_xhr__'] = (xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = function (): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhr.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr,\n });\n }\n };\n\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original: WrappedFunction): Function {\n return function (...readyStateArgs: any[]): void {\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n } else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n return originalOpen.apply(xhr, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend: () => void): () => void {\n return function (this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n if (this.__sentry_xhr__ && args[0] !== undefined) {\n this.__sentry_xhr__.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function (this: WindowEventHandlers, ...args: any[]): any {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function (this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nconst debounceDuration = 1000;\nlet debounceTimerID: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous: Event | undefined, current: Event): boolean {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event: Event): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n\n try {\n const target = event.target as HTMLElement;\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {\n return (event: Event): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: Function;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in WINDOW)) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (WINDOW as any)[target] && (WINDOW as any)[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = WINDOW.onerror;\n\n WINDOW.onerror = function (msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection;\n\n WINDOW.onunhandledrejection = function (e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n"],"names":[],"mappings":";;;;;;;AAYA;AACA,MAAA,MAAA,GAAA,eAAA,EAAA,CAAA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA,QAAA,GAAA,EAAA,CAAA;AACA,MAAA,YAAA,GAAA,EAAA,CAAA;AACA;AACA;AACA,SAAA,UAAA,CAAA,IAAA,EAAA;AACA,EAAA,IAAA,YAAA,CAAA,IAAA,C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ACA,KAAA,CAAA;AACA,GAAA,CAAA,CAAA;AACA,CAAA;AACA;AACA,IAAA,kBAAA,GAAA,IAAA,CAAA;AACA;AACA,SAAA,eAAA,GAAA;AACA,EAAA,kBAAA,GAAA,MAAA,CAAA,OAAA,CAAA;AACA;AACA,EAAA,MAAA,CAAA,OAAA,GAAA,UAAA,GAAA,EAAA,GAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA;AACA,IAAA,eAAA,CAAA,OAAA,EAAA;AACA,MAAA,MAAA;AACA,MAAA,KAAA;AACA,MAAA,IAAA;AACA,MAAA,GAAA;AACA,MAAA,GAAA;AACA,KAAA,CAAA,CAAA;AACA;AACA,IAAA,IAAA,kBAAA,EAAA;AACA;AACA,MAAA,OAAA,kBAAA,CAAA,KAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AACA,KAAA;AACA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA,CAAA;AACA,CAAA;AACA;AACA,IAAA,+BAAA,GAAA,IAAA,CAAA;AACA;AACA,SAAA,4BAAA,GAAA;AACA,EAAA,+BAAA,GAAA,MAAA,CAAA,oBAAA,CAAA;AACA;AACA,EAAA,MAAA,CAAA,oBAAA,GAAA,UAAA,CAAA,EAAA;AACA,IAAA,eAAA,CAAA,oBAAA,EAAA,CAAA,CAAA,CAAA;AACA;AACA,IAAA,IAAA,+BAAA,EAAA;AACA;AACA,MAAA,OAAA,+BAAA,CAAA,KAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AACA,KAAA;AACA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/is.d.ts b/node_modules/@sentry/utils/esm/is.d.ts deleted file mode 100644 index dc534ed..0000000 --- a/node_modules/@sentry/utils/esm/is.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Checks whether given value's type is one of a few Error or Error-like - * {@link isError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isError(wat: any): boolean; -/** - * Checks whether given value's type is ErrorEvent - * {@link isErrorEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isErrorEvent(wat: any): boolean; -/** - * Checks whether given value's type is DOMError - * {@link isDOMError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isDOMError(wat: any): boolean; -/** - * Checks whether given value's type is DOMException - * {@link isDOMException}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isDOMException(wat: any): boolean; -/** - * Checks whether given value's type is a string - * {@link isString}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isString(wat: any): boolean; -/** - * Checks whether given value's is a primitive (undefined, null, number, boolean, string) - * {@link isPrimitive}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isPrimitive(wat: any): boolean; -/** - * Checks whether given value's type is an object literal - * {@link isPlainObject}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isPlainObject(wat: any): boolean; -/** - * Checks whether given value's type is an Event instance - * {@link isEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isEvent(wat: any): boolean; -/** - * Checks whether given value's type is an Element instance - * {@link isElement}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isElement(wat: any): boolean; -/** - * Checks whether given value's type is an regexp - * {@link isRegExp}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isRegExp(wat: any): boolean; -/** - * Checks whether given value has a then function. - * @param wat A value to be checked. - */ -export declare function isThenable(wat: any): boolean; -/** - * Checks whether given value's type is a SyntheticEvent - * {@link isSyntheticEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -export declare function isSyntheticEvent(wat: any): boolean; -/** - * Checks whether given value's type is an instance of provided constructor. - * {@link isInstanceOf}. - * - * @param wat A value to be checked. - * @param base A constructor to be used in a check. - * @returns A boolean representing the result. - */ -export declare function isInstanceOf(wat: any, base: any): boolean; -//# sourceMappingURL=is.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/is.d.ts.map b/node_modules/@sentry/utils/esm/is.d.ts.map deleted file mode 100644 index 04e1ed2..0000000 --- a/node_modules/@sentry/utils/esm/is.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../src/is.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAWzC;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE5C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE1C;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE/C;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAGzC;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAG3C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE1C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAI5C;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAGlD;AACD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAOzD"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/is.js b/node_modules/@sentry/utils/esm/is.js index 10e1fe2..8b60633 100644 --- a/node_modules/@sentry/utils/esm/is.js +++ b/node_modules/@sentry/utils/esm/is.js @@ -1,3 +1,6 @@ +// eslint-disable-next-line @typescript-eslint/unbound-method +const objectToString = Object.prototype.toString; + /** * Checks whether given value's type is one of a few Error or Error-like * {@link isError}. @@ -5,18 +8,27 @@ * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isError(wat) { - switch (Object.prototype.toString.call(wat)) { - case '[object Error]': - return true; - case '[object Exception]': - return true; - case '[object DOMException]': - return true; - default: - return isInstanceOf(wat, Error); - } +function isError(wat) { + switch (objectToString.call(wat)) { + case '[object Error]': + case '[object Exception]': + case '[object DOMException]': + return true; + default: + return isInstanceOf(wat, Error); + } } +/** + * Checks whether given value is an instance of the given built-in class. + * + * @param wat The value to be checked + * @param className + * @returns A boolean representing the result. + */ +function isBuiltin(wat, className) { + return objectToString.call(wat) === `[object ${className}]`; +} + /** * Checks whether given value's type is ErrorEvent * {@link isErrorEvent}. @@ -24,9 +36,10 @@ export function isError(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isErrorEvent(wat) { - return Object.prototype.toString.call(wat) === '[object ErrorEvent]'; +function isErrorEvent(wat) { + return isBuiltin(wat, 'ErrorEvent'); } + /** * Checks whether given value's type is DOMError * {@link isDOMError}. @@ -34,9 +47,10 @@ export function isErrorEvent(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isDOMError(wat) { - return Object.prototype.toString.call(wat) === '[object DOMError]'; +function isDOMError(wat) { + return isBuiltin(wat, 'DOMError'); } + /** * Checks whether given value's type is DOMException * {@link isDOMException}. @@ -44,9 +58,10 @@ export function isDOMError(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isDOMException(wat) { - return Object.prototype.toString.call(wat) === '[object DOMException]'; +function isDOMException(wat) { + return isBuiltin(wat, 'DOMException'); } + /** * Checks whether given value's type is a string * {@link isString}. @@ -54,19 +69,21 @@ export function isDOMException(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isString(wat) { - return Object.prototype.toString.call(wat) === '[object String]'; +function isString(wat) { + return isBuiltin(wat, 'String'); } + /** - * Checks whether given value's is a primitive (undefined, null, number, boolean, string) + * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol) * {@link isPrimitive}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isPrimitive(wat) { - return wat === null || (typeof wat !== 'object' && typeof wat !== 'function'); +function isPrimitive(wat) { + return wat === null || (typeof wat !== 'object' && typeof wat !== 'function'); } + /** * Checks whether given value's type is an object literal * {@link isPlainObject}. @@ -74,9 +91,10 @@ export function isPrimitive(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isPlainObject(wat) { - return Object.prototype.toString.call(wat) === '[object Object]'; +function isPlainObject(wat) { + return isBuiltin(wat, 'Object'); } + /** * Checks whether given value's type is an Event instance * {@link isEvent}. @@ -84,10 +102,10 @@ export function isPlainObject(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isEvent(wat) { - // tslint:disable-next-line:strict-type-predicates - return typeof Event !== 'undefined' && isInstanceOf(wat, Event); +function isEvent(wat) { + return typeof Event !== 'undefined' && isInstanceOf(wat, Event); } + /** * Checks whether given value's type is an Element instance * {@link isElement}. @@ -95,10 +113,10 @@ export function isEvent(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isElement(wat) { - // tslint:disable-next-line:strict-type-predicates - return typeof Element !== 'undefined' && isInstanceOf(wat, Element); +function isElement(wat) { + return typeof Element !== 'undefined' && isInstanceOf(wat, Element); } + /** * Checks whether given value's type is an regexp * {@link isRegExp}. @@ -106,18 +124,19 @@ export function isElement(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isRegExp(wat) { - return Object.prototype.toString.call(wat) === '[object RegExp]'; +function isRegExp(wat) { + return isBuiltin(wat, 'RegExp'); } + /** * Checks whether given value has a then function. * @param wat A value to be checked. */ -export function isThenable(wat) { - // tslint:disable:no-unsafe-any - return Boolean(wat && wat.then && typeof wat.then === 'function'); - // tslint:enable:no-unsafe-any +function isThenable(wat) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return Boolean(wat && wat.then && typeof wat.then === 'function'); } + /** * Checks whether given value's type is a SyntheticEvent * {@link isSyntheticEvent}. @@ -125,10 +144,21 @@ export function isThenable(wat) { * @param wat A value to be checked. * @returns A boolean representing the result. */ -export function isSyntheticEvent(wat) { - // tslint:disable-next-line:no-unsafe-any - return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; +function isSyntheticEvent(wat) { + return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; +} + +/** + * Checks whether given value is NaN + * {@link isNaN}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isNaN(wat) { + return typeof wat === 'number' && wat !== wat; } + /** * Checks whether given value's type is an instance of provided constructor. * {@link isInstanceOf}. @@ -137,13 +167,13 @@ export function isSyntheticEvent(wat) { * @param base A constructor to be used in a check. * @returns A boolean representing the result. */ -export function isInstanceOf(wat, base) { - try { - // tslint:disable-next-line:no-unsafe-any - return wat instanceof base; - } - catch (_e) { - return false; - } +function isInstanceOf(wat, base) { + try { + return wat instanceof base; + } catch (_e) { + return false; + } } -//# sourceMappingURL=is.js.map \ No newline at end of file + +export { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable }; +//# sourceMappingURL=is.js.map diff --git a/node_modules/@sentry/utils/esm/is.js.map b/node_modules/@sentry/utils/esm/is.js.map index 38da981..321cbb5 100644 --- a/node_modules/@sentry/utils/esm/is.js.map +++ b/node_modules/@sentry/utils/esm/is.js.map @@ -1 +1 @@ -{"version":3,"file":"is.js","sourceRoot":"","sources":["../src/is.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,GAAQ;IAC9B,QAAQ,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAC3C,KAAK,gBAAgB;YACnB,OAAO,IAAI,CAAC;QACd,KAAK,oBAAoB;YACvB,OAAO,IAAI,CAAC;QACd,KAAK,uBAAuB;YAC1B,OAAO,IAAI,CAAC;QACd;YACE,OAAO,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KACnC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,GAAQ;IACnC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,qBAAqB,CAAC;AACvE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,GAAQ;IACjC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,mBAAmB,CAAC;AACrE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,GAAQ;IACrC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,uBAAuB,CAAC;AACzE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAQ;IAC/B,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,iBAAiB,CAAC;AACnE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,GAAQ;IAClC,OAAO,GAAG,KAAK,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,QAA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AAC;KAC5B;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,KAAK,CAAC;KACd;AACH,CAAC","sourcesContent":["/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: any): boolean {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: any): boolean {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: any): boolean {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: any): boolean {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): boolean {\n // tslint:disable:no-unsafe-any\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n // tslint:enable:no-unsafe-any\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: any): boolean {\n // tslint:disable-next-line:no-unsafe-any\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"is.js","sources":["../../src/is.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport type { PolymorphicEvent, Primitive } from '@sentry/types';\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: unknown): wat is Error {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat: unknown, className: string): boolean {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: unknown): boolean {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: unknown): wat is string {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: unknown): wat is Primitive {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: unknown): wat is Record {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: unknown): wat is PolymorphicEvent {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: unknown): boolean {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: unknown): wat is RegExp {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): wat is PromiseLike {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: unknown): boolean {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isNaN(wat: unknown): boolean {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n"],"names":[],"mappings":"AAKA;AACA,MAAA,cAAA,GA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AAA,QAAA,IAAA,GAAA,KAAA,GAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,YAAA,CAAA,GAAA,EAAA,IAAA,EAAA;AACA,EAAA,IAAA;AACA,IAAA,OAAA,GAAA,YAAA,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,EAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/logger.d.ts b/node_modules/@sentry/utils/esm/logger.d.ts deleted file mode 100644 index 9805078..0000000 --- a/node_modules/@sentry/utils/esm/logger.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** JSDoc */ -declare class Logger { - /** JSDoc */ - private _enabled; - /** JSDoc */ - constructor(); - /** JSDoc */ - disable(): void; - /** JSDoc */ - enable(): void; - /** JSDoc */ - log(...args: any[]): void; - /** JSDoc */ - warn(...args: any[]): void; - /** JSDoc */ - error(...args: any[]): void; -} -declare const logger: Logger; -export { logger }; -//# sourceMappingURL=logger.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/logger.d.ts.map b/node_modules/@sentry/utils/esm/logger.d.ts.map deleted file mode 100644 index 1ac867e..0000000 --- a/node_modules/@sentry/utils/esm/logger.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAQA,YAAY;AACZ,cAAM,MAAM;IACV,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAU;IAE1B,YAAY;;IAKZ,YAAY;IACL,OAAO,IAAI,IAAI;IAItB,YAAY;IACL,MAAM,IAAI,IAAI;IAIrB,YAAY;IACL,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAShC,YAAY;IACL,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IASjC,YAAY;IACL,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;CAQnC;AAID,QAAA,MAAM,MAAM,QAAoF,CAAC;AAEjG,OAAO,EAAE,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/logger.js b/node_modules/@sentry/utils/esm/logger.js index 0774e72..602b6f6 100644 --- a/node_modules/@sentry/utils/esm/logger.js +++ b/node_modules/@sentry/utils/esm/logger.js @@ -1,65 +1,83 @@ -import { consoleSandbox, getGlobalObject } from './misc'; -// TODO: Implement different loggers for different environments -var global = getGlobalObject(); +import { GLOBAL_OBJ, getGlobalSingleton } from './worldwide.js'; + /** Prefix for logging strings */ -var PREFIX = 'Sentry Logger '; -/** JSDoc */ -var Logger = /** @class */ (function () { - /** JSDoc */ - function Logger() { - this._enabled = false; +const PREFIX = 'Sentry Logger '; + +const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ; + +/** + * Temporarily disable sentry console instrumentations. + * + * @param callback The function to run against the original `console` messages + * @returns The results of the callback + */ +function consoleSandbox(callback) { + if (!('console' in GLOBAL_OBJ)) { + return callback(); + } + + const originalConsole = GLOBAL_OBJ.console ; + const wrappedLevels = {}; + + // Restore all wrapped console methods + CONSOLE_LEVELS.forEach(level => { + // TODO(v7): Remove this check as it's only needed for Node 6 + const originalWrappedFunc = + originalConsole[level] && (originalConsole[level] ).__sentry_original__; + if (level in originalConsole && originalWrappedFunc) { + wrappedLevels[level] = originalConsole[level] ; + originalConsole[level] = originalWrappedFunc ; } - /** JSDoc */ - Logger.prototype.disable = function () { - this._enabled = false; - }; - /** JSDoc */ - Logger.prototype.enable = function () { - this._enabled = true; - }; - /** JSDoc */ - Logger.prototype.log = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; + }); + + try { + return callback(); + } finally { + // Revert restoration to wrapped state + Object.keys(wrappedLevels).forEach(level => { + originalConsole[level] = wrappedLevels[level ]; + }); + } +} + +function makeLogger() { + let enabled = false; + const logger = { + enable: () => { + enabled = true; + }, + disable: () => { + enabled = false; + }, + }; + + if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + CONSOLE_LEVELS.forEach(name => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + logger[name] = (...args) => { + if (enabled) { + consoleSandbox(() => { + GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args); + }); } - if (!this._enabled) { - return; - } - consoleSandbox(function () { - global.console.log(PREFIX + "[Log]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - /** JSDoc */ - Logger.prototype.warn = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._enabled) { - return; - } - consoleSandbox(function () { - global.console.warn(PREFIX + "[Warn]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - /** JSDoc */ - Logger.prototype.error = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (!this._enabled) { - return; - } - consoleSandbox(function () { - global.console.error(PREFIX + "[Error]: " + args.join(' ')); // tslint:disable-line:no-console - }); - }; - return Logger; -}()); + }; + }); + } else { + CONSOLE_LEVELS.forEach(name => { + logger[name] = () => undefined; + }); + } + + return logger ; +} + // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used -global.__SENTRY__ = global.__SENTRY__ || {}; -var logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger()); -export { logger }; -//# sourceMappingURL=logger.js.map \ No newline at end of file +let logger; +if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + logger = getGlobalSingleton('logger', makeLogger); +} else { + logger = makeLogger(); +} + +export { CONSOLE_LEVELS, consoleSandbox, logger }; +//# sourceMappingURL=logger.js.map diff --git a/node_modules/@sentry/utils/esm/logger.js.map b/node_modules/@sentry/utils/esm/logger.js.map index 7fd0ffe..69620e8 100644 --- a/node_modules/@sentry/utils/esm/logger.js.map +++ b/node_modules/@sentry/utils/esm/logger.js.map @@ -1 +1 @@ -{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzD,+DAA+D;AAC/D,IAAM,MAAM,GAAG,eAAe,EAA0B,CAAC;AAEzD,iCAAiC;AACjC,IAAM,MAAM,GAAG,gBAAgB,CAAC;AAEhC,YAAY;AACZ;IAIE,YAAY;IACZ;QACE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,YAAY;IACL,wBAAO,GAAd;QACE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,YAAY;IACL,uBAAM,GAAb;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,YAAY;IACL,oBAAG,GAAV;QAAW,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QACvB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO;SACR;QACD,cAAc,CAAC;YACb,MAAM,CAAC,OAAO,CAAC,GAAG,CAAI,MAAM,eAAU,IAAI,CAAC,IAAI,CAAC,GAAG,CAAG,CAAC,CAAC,CAAC,iCAAiC;QAC5F,CAAC,CAAC,CAAC;IACL,CAAC;IAED,YAAY;IACL,qBAAI,GAAX;QAAY,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO;SACR;QACD,cAAc,CAAC;YACb,MAAM,CAAC,OAAO,CAAC,IAAI,CAAI,MAAM,gBAAW,IAAI,CAAC,IAAI,CAAC,GAAG,CAAG,CAAC,CAAC,CAAC,iCAAiC;QAC9F,CAAC,CAAC,CAAC;IACL,CAAC;IAED,YAAY;IACL,sBAAK,GAAZ;QAAa,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO;SACR;QACD,cAAc,CAAC;YACb,MAAM,CAAC,OAAO,CAAC,KAAK,CAAI,MAAM,iBAAY,IAAI,CAAC,IAAI,CAAC,GAAG,CAAG,CAAC,CAAC,CAAC,iCAAiC;QAChG,CAAC,CAAC,CAAC;IACL,CAAC;IACH,aAAC;AAAD,CAAC,AAhDD,IAgDC;AAED,0GAA0G;AAC1G,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;AAC5C,IAAM,MAAM,GAAI,MAAM,CAAC,UAAU,CAAC,MAAiB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC,CAAC;AAEjG,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import { consoleSandbox, getGlobalObject } from './misc';\n\n// TODO: Implement different loggers for different environments\nconst global = getGlobalObject();\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** JSDoc */\nclass Logger {\n /** JSDoc */\n private _enabled: boolean;\n\n /** JSDoc */\n public constructor() {\n this._enabled = false;\n }\n\n /** JSDoc */\n public disable(): void {\n this._enabled = false;\n }\n\n /** JSDoc */\n public enable(): void {\n this._enabled = true;\n }\n\n /** JSDoc */\n public log(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.log(`${PREFIX}[Log]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public warn(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n\n /** JSDoc */\n public error(...args: any[]): void {\n if (!this._enabled) {\n return;\n }\n consoleSandbox(() => {\n global.console.error(`${PREFIX}[Error]: ${args.join(' ')}`); // tslint:disable-line:no-console\n });\n }\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nconst logger = (global.__SENTRY__.logger as Logger) || (global.__SENTRY__.logger = new Logger());\n\nexport { logger };\n"]} \ No newline at end of file +{"version":3,"file":"logger.js","sources":["../../src/logger.ts"],"sourcesContent":["import type { WrappedFunction } from '@sentry/types';\n\nimport { getGlobalSingleton, GLOBAL_OBJ } from './worldwide';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nexport const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] as const;\nexport type ConsoleLevel = typeof CONSOLE_LEVELS[number];\n\ntype LoggerMethod = (...args: unknown[]) => void;\ntype LoggerConsoleMethods = Record;\n\n/** JSDoc */\ninterface Logger extends LoggerConsoleMethods {\n disable(): void;\n enable(): void;\n}\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox(callback: () => T): T {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const originalConsole = GLOBAL_OBJ.console as Console & Record;\n const wrappedLevels: Partial = {};\n\n // Restore all wrapped console methods\n CONSOLE_LEVELS.forEach(level => {\n // TODO(v7): Remove this check as it's only needed for Node 6\n const originalWrappedFunc =\n originalConsole[level] && (originalConsole[level] as WrappedFunction).__sentry_original__;\n if (level in originalConsole && originalWrappedFunc) {\n wrappedLevels[level] = originalConsole[level] as LoggerConsoleMethods[typeof level];\n originalConsole[level] = originalWrappedFunc as Console[typeof level];\n }\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level as typeof CONSOLE_LEVELS[number]];\n });\n }\n}\n\nfunction makeLogger(): Logger {\n let enabled = false;\n const logger: Partial = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n };\n\n if (__DEBUG_BUILD__) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args: any[]) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger as Logger;\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nlet logger: Logger;\nif (__DEBUG_BUILD__) {\n logger = getGlobalSingleton('logger', makeLogger);\n} else {\n logger = makeLogger();\n}\n\nexport { logger };\n"],"names":[],"mappings":";;AAIA;AACA,MAAA,MAAA,GAAA,gBAAA,CAAA;AACA;AACA,MAAA,cAAA,GAAA,CAAA,OAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,KAAA,EAAA,QAAA,EAAA,OAAA,CAAA,EAAA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,cAAA,CAAA,QAAA,EAAA;AACA,EAAA,IAAA,EAAA,SAAA,IAAA,UAAA,CAAA,EAAA;AACA,IAAA,OAAA,QAAA,EAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,MAAA,eAAA,GAAA,UAAA,CAAA,OAAA,EAAA;AACA,EAAA,MAAA,aAAA,GAAA,EAAA,CAAA;AACA;AACA;AACA,EAAA,cAAA,CAAA,OAAA,CAAA,KAAA,IAAA;AACA;AACA,IAAA,MAAA,mBAAA;AACA,MAAA,eAAA,CAAA,KAAA,CAAA,IAAA,CAAA,eAAA,CAAA,KAAA,CAAA,GAAA,mBAAA,CAAA;AACA,IAAA,IAAA,KAAA,IAAA,eAAA,IAAA,mBAAA,EAAA;AACA,MAAA,aAAA,CAAA,KAAA,CAAA,GAAA,eAAA,CAAA,KAAA,CAAA,EAAA;AACA,MAAA,eAAA,CAAA,KAAA,CAAA,G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;AACA,CAAA;AACA;AACA;AACA,IAAA,OAAA;AACA,KAAA,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA,GAAA;AACA,EAAA,MAAA,GAAA,kBAAA,CAAA,QAAA,EAAA,UAAA,CAAA,CAAA;AACA,CAAA,MAAA;AACA,EAAA,MAAA,GAAA,UAAA,EAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/memo.d.ts b/node_modules/@sentry/utils/esm/memo.d.ts deleted file mode 100644 index 39d621e..0000000 --- a/node_modules/@sentry/utils/esm/memo.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Memo class used for decycle json objects. Uses WeakSet if available otherwise array. - */ -export declare class Memo { - /** Determines if WeakSet is available */ - private readonly _hasWeakSet; - /** Either WeakSet or Array */ - private readonly _inner; - constructor(); - /** - * Sets obj to remember. - * @param obj Object to remember - */ - memoize(obj: any): boolean; - /** - * Removes object from internal storage. - * @param obj Object to forget - */ - unmemoize(obj: any): void; -} -//# sourceMappingURL=memo.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/memo.d.ts.map b/node_modules/@sentry/utils/esm/memo.d.ts.map deleted file mode 100644 index be86c38..0000000 --- a/node_modules/@sentry/utils/esm/memo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"memo.d.ts","sourceRoot":"","sources":["../src/memo.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,qBAAa,IAAI;IACf,yCAAyC;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAU;IACtC,8BAA8B;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAM;;IAQ7B;;;OAGG;IACI,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAmBjC;;;OAGG;IACI,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;CAYjC"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/memo.js b/node_modules/@sentry/utils/esm/memo.js index 0c52e7d..fe00c9c 100644 --- a/node_modules/@sentry/utils/esm/memo.js +++ b/node_modules/@sentry/utils/esm/memo.js @@ -1,53 +1,45 @@ -// tslint:disable:no-unsafe-any +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + /** - * Memo class used for decycle json objects. Uses WeakSet if available otherwise array. + * Helper to decycle json objects */ -var Memo = /** @class */ (function () { - function Memo() { - // tslint:disable-next-line - this._hasWeakSet = typeof WeakSet === 'function'; - this._inner = this._hasWeakSet ? new WeakSet() : []; +function memoBuilder() { + const hasWeakSet = typeof WeakSet === 'function'; + const inner = hasWeakSet ? new WeakSet() : []; + function memoize(obj) { + if (hasWeakSet) { + if (inner.has(obj)) { + return true; + } + inner.add(obj); + return false; } - /** - * Sets obj to remember. - * @param obj Object to remember - */ - Memo.prototype.memoize = function (obj) { - if (this._hasWeakSet) { - if (this._inner.has(obj)) { - return true; - } - this._inner.add(obj); - return false; - } - // tslint:disable-next-line:prefer-for-of - for (var i = 0; i < this._inner.length; i++) { - var value = this._inner[i]; - if (value === obj) { - return true; - } - } - this._inner.push(obj); - return false; - }; - /** - * Removes object from internal storage. - * @param obj Object to forget - */ - Memo.prototype.unmemoize = function (obj) { - if (this._hasWeakSet) { - this._inner.delete(obj); - } - else { - for (var i = 0; i < this._inner.length; i++) { - if (this._inner[i] === obj) { - this._inner.splice(i, 1); - break; - } - } + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let i = 0; i < inner.length; i++) { + const value = inner[i]; + if (value === obj) { + return true; + } + } + inner.push(obj); + return false; + } + + function unmemoize(obj) { + if (hasWeakSet) { + inner.delete(obj); + } else { + for (let i = 0; i < inner.length; i++) { + if (inner[i] === obj) { + inner.splice(i, 1); + break; } - }; - return Memo; -}()); -export { Memo }; -//# sourceMappingURL=memo.js.map \ No newline at end of file + } + } + } + return [memoize, unmemoize]; +} + +export { memoBuilder }; +//# sourceMappingURL=memo.js.map diff --git a/node_modules/@sentry/utils/esm/memo.js.map b/node_modules/@sentry/utils/esm/memo.js.map index 6dbb917..ef650e5 100644 --- a/node_modules/@sentry/utils/esm/memo.js.map +++ b/node_modules/@sentry/utils/esm/memo.js.map @@ -1 +1 @@ -{"version":3,"file":"memo.js","sourceRoot":"","sources":["../src/memo.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B;;GAEG;AACH;IAME;QACE,2BAA2B;QAC3B,IAAI,CAAC,WAAW,GAAG,OAAO,OAAO,KAAK,UAAU,CAAC;QACjD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtD,CAAC;IAED;;;OAGG;IACI,sBAAO,GAAd,UAAe,GAAQ;QACrB,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACxB,OAAO,IAAI,CAAC;aACb;YACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrB,OAAO,KAAK,CAAC;SACd;QACD,yCAAyC;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3C,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC7B,IAAI,KAAK,KAAK,GAAG,EAAE;gBACjB,OAAO,IAAI,CAAC;aACb;SACF;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;OAGG;IACI,wBAAS,GAAhB,UAAiB,GAAQ;QACvB,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACzB;aAAM;YACL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC3C,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;oBAC1B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACzB,MAAM;iBACP;aACF;SACF;IACH,CAAC;IACH,WAAC;AAAD,CAAC,AAnDD,IAmDC","sourcesContent":["// tslint:disable:no-unsafe-any\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n /** Determines if WeakSet is available */\n private readonly _hasWeakSet: boolean;\n /** Either WeakSet or Array */\n private readonly _inner: any;\n\n public constructor() {\n // tslint:disable-next-line\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n public memoize(obj: any): boolean {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < this._inner.length; i++) {\n const value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n }\n\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n public unmemoize(obj: any): void {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (let i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"memo.js","sources":["../../src/memo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport type MemoFunc = [\n // memoize\n (obj: any) => boolean,\n // unmemoize\n (obj: any) => void,\n];\n\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder(): MemoFunc {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner: any = hasWeakSet ? new WeakSet() : [];\n function memoize(obj: any): boolean {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj: any): void {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n"],"names":[],"mappings":"AAAA;AACA;;AASA;AACA;AACA;AACA,SAAA,WAAA,GAAA;AACA,EAAA,MAAA,UAAA,GAAA,OAAA,OAAA,KAAA,UAAA,CAAA;AACA,EAAA,MAAA,KAAA,GAAA,UAAA,GAAA,IAAA,OAAA,EAAA,GAAA,EAAA,CAAA;AACA,EAAA,SAAA,OAAA,CAAA,GAAA,EAAA;AACA,IAAA,IAAA,UAAA,EAAA;AACA,MAAA,IAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,EAAA;AACA,QAAA,OAAA,IAAA,CAAA;AACA,OAAA;AACA,MAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,CAAA;AACA,MAAA,OAAA,KAAA,CAAA;AACA,KAAA;AACA;AACA,IAAA,KAAA,IAAA,CAAA,GAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA,MAAA,EAAA,CAAA,EAAA,EAAA;AACA,MAAA,MAAA,KAAA,GAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,MAAA,IAAA,KAAA,KAAA,GAAA,EAAA;AACA,QAAA,OAAA,IAAA,CAAA;AACA,OAAA;AACA,KAAA;AACA,IAAA,KAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,SAAA,SAAA,CAAA,GAAA,EAAA;AACA,IAAA,IAAA,UAAA,EAAA;AACA,MAAA,KAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA;AACA,KAAA,MAAA;AACA,MAAA,KAAA,IAAA,CAAA,GAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA,MAAA,EAAA,CAAA,EAAA,EAAA;AACA,QAAA,IAAA,KAAA,CAAA,CAAA,CAAA,KAAA,GAAA,EAAA;AACA,UAAA,KAAA,CAAA,MAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,UAAA,MAAA;AACA,SAAA;AACA,OAAA;AACA,KAAA;AACA,GAAA;AACA,EAAA,OAAA,CAAA,OAAA,EAAA,SAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/misc.d.ts b/node_modules/@sentry/utils/esm/misc.d.ts deleted file mode 100644 index 9811ac3..0000000 --- a/node_modules/@sentry/utils/esm/misc.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Event, Integration, StackFrame } from '@sentry/types'; -/** Internal */ -interface SentryGlobal { - Sentry?: { - Integrations?: Integration[]; - }; - SENTRY_ENVIRONMENT?: string; - SENTRY_DSN?: string; - SENTRY_RELEASE?: { - id?: string; - }; - __SENTRY__: { - globalEventProcessors: any; - hub: any; - logger: any; - }; -} -/** - * Requires a module which is protected _against bundler minification. - * - * @param request The module path to resolve - */ -export declare function dynamicRequire(mod: any, request: string): any; -/** - * Checks whether we're in the Node.js or Browser environment - * - * @returns Answer to given question - */ -export declare function isNodeEnv(): boolean; -/** - * Safely get global scope object - * - * @returns Global scope object - */ -export declare function getGlobalObject(): T & SentryGlobal; -/** - * UUID4 generator - * - * @returns string Generated UUID4. - */ -export declare function uuid4(): string; -/** - * Parses string form of URL into an object - * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B - * // intentionally using regex and not href parsing trick because React Native and other - * // environments where DOM might not be available - * @returns parsed URL object - */ -export declare function parseUrl(url: string): { - host?: string; - path?: string; - protocol?: string; - relative?: string; -}; -/** - * Extracts either message or type+value from an event that can be used for user-facing logs - * @returns event's description - */ -export declare function getEventDescription(event: Event): string; -/** JSDoc */ -export declare function consoleSandbox(callback: () => any): any; -/** - * Adds exception values, type and value to an synthetic Exception. - * @param event The event to modify. - * @param value Value of the exception. - * @param type Type of the exception. - * @hidden - */ -export declare function addExceptionTypeValue(event: Event, value?: string, type?: string): void; -/** - * Adds exception mechanism to a given event. - * @param event The event to modify. - * @param mechanism Mechanism of the mechanism. - * @hidden - */ -export declare function addExceptionMechanism(event: Event, mechanism?: { - [key: string]: any; -}): void; -/** - * A safe form of location.href - */ -export declare function getLocationHref(): string; -/** - * Given a child DOM element, returns a query-selector statement describing that - * and its ancestors - * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] - * @returns generated DOM path - */ -export declare function htmlTreeAsString(elem: unknown): string; -export declare const crossPlatformPerformance: Pick; -/** - * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock. - */ -export declare function timestampWithMs(): number; -/** - * Represents Semantic Versioning object - */ -interface SemVer { - major?: number; - minor?: number; - patch?: number; - prerelease?: string; - buildmetadata?: string; -} -/** - * Parses input into a SemVer interface - * @param input string representation of a semver version - */ -export declare function parseSemver(input: string): SemVer; -/** - * Extracts Retry-After value from the request header or returns default value - * @param now current unix timestamp - * @param header string representation of 'Retry-After' header - */ -export declare function parseRetryAfterHeader(now: number, header?: string | number | null): number; -/** - * Safely extract function name from itself - */ -export declare function getFunctionName(fn: unknown): string; -/** - * This function adds context (pre/post/line) lines to the provided frame - * - * @param lines string[] containing all lines - * @param frame StackFrame that will be mutated - * @param linesOfContext number of context lines we want to add pre/post - */ -export declare function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext?: number): void; -export {}; -//# sourceMappingURL=misc.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/misc.d.ts.map b/node_modules/@sentry/utils/esm/misc.d.ts.map deleted file mode 100644 index 0d2f754..0000000 --- a/node_modules/@sentry/utils/esm/misc.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../src/misc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAC;AAKhF,eAAe;AACf,UAAU,YAAY;IACpB,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;KAC9B,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE;QACf,EAAE,CAAC,EAAE,MAAM,CAAC;KACb,CAAC;IACF,UAAU,EAAE;QACV,qBAAqB,EAAE,GAAG,CAAC;QAC3B,GAAG,EAAE,GAAG,CAAC;QACT,MAAM,EAAE,GAAG,CAAC;KACb,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,CAG7D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAGnC;AAID;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,KAAK,CAAC,GAAG,YAAY,CAQrD;AAUD;;;;GAIG;AACH,wBAAgB,KAAK,IAAI,MAAM,CAoC9B;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,GACV;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAoBA;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAaxD;AAOD,YAAY;AAC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,GAAE,MAAU,GAAG,IAAI,CActG"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/misc.js b/node_modules/@sentry/utils/esm/misc.js index 123c1c7..858f159 100644 --- a/node_modules/@sentry/utils/esm/misc.js +++ b/node_modules/@sentry/utils/esm/misc.js @@ -1,140 +1,55 @@ -import { isString } from './is'; -import { snipLine } from './string'; -/** - * Requires a module which is protected _against bundler minification. - * - * @param request The module path to resolve - */ -export function dynamicRequire(mod, request) { - // tslint:disable-next-line: no-unsafe-any - return mod.require(request); -} -/** - * Checks whether we're in the Node.js or Browser environment - * - * @returns Answer to given question - */ -export function isNodeEnv() { - // tslint:disable:strict-type-predicates - return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'; -} -var fallbackGlobalObject = {}; -/** - * Safely get global scope object - * - * @returns Global scope object - */ -export function getGlobalObject() { - return (isNodeEnv() - ? global - : typeof window !== 'undefined' - ? window - : typeof self !== 'undefined' - ? self - : fallbackGlobalObject); -} +import { addNonEnumerableProperty } from './object.js'; +import { snipLine } from './string.js'; +import { GLOBAL_OBJ } from './worldwide.js'; + /** * UUID4 generator * * @returns string Generated UUID4. */ -export function uuid4() { - var global = getGlobalObject(); - var crypto = global.crypto || global.msCrypto; - if (!(crypto === void 0) && crypto.getRandomValues) { - // Use window.crypto API if available - var arr = new Uint16Array(8); - crypto.getRandomValues(arr); - // set 4 in byte 7 - // tslint:disable-next-line:no-bitwise - arr[3] = (arr[3] & 0xfff) | 0x4000; - // set 2 most significant bits of byte 9 to '10' - // tslint:disable-next-line:no-bitwise - arr[4] = (arr[4] & 0x3fff) | 0x8000; - var pad = function (num) { - var v = num.toString(16); - while (v.length < 4) { - v = "0" + v; - } - return v; - }; - return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])); - } - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 - return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - // tslint:disable-next-line:no-bitwise - var r = (Math.random() * 16) | 0; - // tslint:disable-next-line:no-bitwise - var v = c === 'x' ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); -} -/** - * Parses string form of URL into an object - * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B - * // intentionally using regex and not href parsing trick because React Native and other - * // environments where DOM might not be available - * @returns parsed URL object - */ -export function parseUrl(url) { - if (!url) { - return {}; - } - var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); - if (!match) { - return {}; - } - // coerce to undefined values to empty string so we don't get 'undefined' - var query = match[6] || ''; - var fragment = match[8] || ''; - return { - host: match[4], - path: match[5], - protocol: match[2], - relative: match[5] + query + fragment, - }; -} +function uuid4() { + const gbl = GLOBAL_OBJ ; + const crypto = gbl.crypto || gbl.msCrypto; + + if (crypto && crypto.randomUUID) { + return crypto.randomUUID().replace(/-/g, ''); + } + + const getRandomByte = + crypto && crypto.getRandomValues ? () => crypto.getRandomValues(new Uint8Array(1))[0] : () => Math.random() * 16; + + // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 + // Concatenating the following numbers as strings results in '10000000100040008000100000000000' + return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c => + // eslint-disable-next-line no-bitwise + ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16), + ); +} + +function getFirstException(event) { + return event.exception && event.exception.values ? event.exception.values[0] : undefined; +} + /** * Extracts either message or type+value from an event that can be used for user-facing logs * @returns event's description */ -export function getEventDescription(event) { - if (event.message) { - return event.message; - } - if (event.exception && event.exception.values && event.exception.values[0]) { - var exception = event.exception.values[0]; - if (exception.type && exception.value) { - return exception.type + ": " + exception.value; - } - return exception.type || exception.value || event.event_id || ''; - } - return event.event_id || ''; -} -/** JSDoc */ -export function consoleSandbox(callback) { - var global = getGlobalObject(); - var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert']; - if (!('console' in global)) { - return callback(); +function getEventDescription(event) { + const { message, event_id: eventId } = event; + if (message) { + return message; + } + + const firstException = getFirstException(event); + if (firstException) { + if (firstException.type && firstException.value) { + return `${firstException.type}: ${firstException.value}`; } - var originalConsole = global.console; - var wrappedLevels = {}; - // Restore all wrapped console methods - levels.forEach(function (level) { - if (level in global.console && originalConsole[level].__sentry_original__) { - wrappedLevels[level] = originalConsole[level]; - originalConsole[level] = originalConsole[level].__sentry_original__; - } - }); - // Perform callback manipulations - var result = callback(); - // Revert restoration to wrapped state - Object.keys(wrappedLevels).forEach(function (level) { - originalConsole[level] = wrappedLevels[level]; - }); - return result; + return firstException.type || firstException.value || eventId || ''; + } + return eventId || ''; } + /** * Adds exception values, type and value to an synthetic Exception. * @param event The event to modify. @@ -142,231 +57,67 @@ export function consoleSandbox(callback) { * @param type Type of the exception. * @hidden */ -export function addExceptionTypeValue(event, value, type) { - event.exception = event.exception || {}; - event.exception.values = event.exception.values || []; - event.exception.values[0] = event.exception.values[0] || {}; - event.exception.values[0].value = event.exception.values[0].value || value || ''; - event.exception.values[0].type = event.exception.values[0].type || type || 'Error'; +function addExceptionTypeValue(event, value, type) { + const exception = (event.exception = event.exception || {}); + const values = (exception.values = exception.values || []); + const firstException = (values[0] = values[0] || {}); + if (!firstException.value) { + firstException.value = value || ''; + } + if (!firstException.type) { + firstException.type = type || 'Error'; + } } + /** - * Adds exception mechanism to a given event. + * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed. + * * @param event The event to modify. - * @param mechanism Mechanism of the mechanism. + * @param newMechanism Mechanism data to add to the event. * @hidden */ -export function addExceptionMechanism(event, mechanism) { - if (mechanism === void 0) { mechanism = {}; } - // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better? - try { - // @ts-ignore - // tslint:disable:no-non-null-assertion - event.exception.values[0].mechanism = event.exception.values[0].mechanism || {}; - Object.keys(mechanism).forEach(function (key) { - // @ts-ignore - event.exception.values[0].mechanism[key] = mechanism[key]; - }); - } - catch (_oO) { - // no-empty - } -} -/** - * A safe form of location.href - */ -export function getLocationHref() { - try { - return document.location.href; - } - catch (oO) { - return ''; - } -} -/** - * Given a child DOM element, returns a query-selector statement describing that - * and its ancestors - * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] - * @returns generated DOM path - */ -export function htmlTreeAsString(elem) { - // try/catch both: - // - accessing event.target (see getsentry/raven-js#838, #768) - // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly - // - can throw an exception in some circumstances. - try { - var currentElem = elem; - var MAX_TRAVERSE_HEIGHT = 5; - var MAX_OUTPUT_LEN = 80; - var out = []; - var height = 0; - var len = 0; - var separator = ' > '; - var sepLength = separator.length; - var nextStr = void 0; - while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { - nextStr = _htmlElementAsString(currentElem); - // bail out if - // - nextStr is the 'html' element - // - the length of the string that would be created exceeds MAX_OUTPUT_LEN - // (ignore this limit if we are on the first iteration) - if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) { - break; - } - out.push(nextStr); - len += nextStr.length; - currentElem = currentElem.parentNode; - } - return out.reverse().join(separator); - } - catch (_oO) { - return ''; - } -} -/** - * Returns a simple, query-selector representation of a DOM element - * e.g. [HTMLElement] => input#foo.btn[name=baz] - * @returns generated DOM path - */ -function _htmlElementAsString(el) { - var elem = el; - var out = []; - var className; - var classes; - var key; - var attr; - var i; - if (!elem || !elem.tagName) { - return ''; - } - out.push(elem.tagName.toLowerCase()); - if (elem.id) { - out.push("#" + elem.id); - } - className = elem.className; - if (className && isString(className)) { - classes = className.split(/\s+/); - for (i = 0; i < classes.length; i++) { - out.push("." + classes[i]); - } - } - var attrWhitelist = ['type', 'name', 'title', 'alt']; - for (i = 0; i < attrWhitelist.length; i++) { - key = attrWhitelist[i]; - attr = elem.getAttribute(key); - if (attr) { - out.push("[" + key + "=\"" + attr + "\"]"); - } - } - return out.join(''); -} -var INITIAL_TIME = Date.now(); -var prevNow = 0; -var performanceFallback = { - now: function () { - var now = Date.now() - INITIAL_TIME; - if (now < prevNow) { - now = prevNow; - } - prevNow = now; - return now; - }, - timeOrigin: INITIAL_TIME, -}; -export var crossPlatformPerformance = (function () { - if (isNodeEnv()) { - try { - var perfHooks = dynamicRequire(module, 'perf_hooks'); - return perfHooks.performance; - } - catch (_) { - return performanceFallback; - } - } - if (getGlobalObject().performance) { - // Polyfill for performance.timeOrigin. - // - // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin - // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing. - // tslint:disable-next-line:strict-type-predicates - if (performance.timeOrigin === undefined) { - // For webworkers it could mean we don't have performance.timing then we fallback - // tslint:disable-next-line:deprecation - if (!performance.timing) { - return performanceFallback; - } - // tslint:disable-next-line:deprecation - if (!performance.timing.navigationStart) { - return performanceFallback; - } - // @ts-ignore - // tslint:disable-next-line:deprecation - performance.timeOrigin = performance.timing.navigationStart; - } - } - return getGlobalObject().performance || performanceFallback; -})(); +function addExceptionMechanism(event, newMechanism) { + const firstException = getFirstException(event); + if (!firstException) { + return; + } + + const defaultMechanism = { type: 'generic', handled: true }; + const currentMechanism = firstException.mechanism; + firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }; + + if (newMechanism && 'data' in newMechanism) { + const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data }; + firstException.mechanism.data = mergedData; + } +} + +// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string +const SEMVER_REGEXP = + /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + /** - * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock. + * Represents Semantic Versioning object */ -export function timestampWithMs() { - return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000; -} -// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string -var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + /** * Parses input into a SemVer interface * @param input string representation of a semver version */ -export function parseSemver(input) { - var match = input.match(SEMVER_REGEXP) || []; - var major = parseInt(match[1], 10); - var minor = parseInt(match[2], 10); - var patch = parseInt(match[3], 10); - return { - buildmetadata: match[5], - major: isNaN(major) ? undefined : major, - minor: isNaN(minor) ? undefined : minor, - patch: isNaN(patch) ? undefined : patch, - prerelease: match[4], - }; -} -var defaultRetryAfter = 60 * 1000; // 60 seconds -/** - * Extracts Retry-After value from the request header or returns default value - * @param now current unix timestamp - * @param header string representation of 'Retry-After' header - */ -export function parseRetryAfterHeader(now, header) { - if (!header) { - return defaultRetryAfter; - } - var headerDelay = parseInt("" + header, 10); - if (!isNaN(headerDelay)) { - return headerDelay * 1000; - } - var headerDate = Date.parse("" + header); - if (!isNaN(headerDate)) { - return headerDate - now; - } - return defaultRetryAfter; -} -var defaultFunctionName = ''; -/** - * Safely extract function name from itself - */ -export function getFunctionName(fn) { - try { - if (!fn || typeof fn !== 'function') { - return defaultFunctionName; - } - return fn.name || defaultFunctionName; - } - catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - return defaultFunctionName; - } -} +function parseSemver(input) { + const match = input.match(SEMVER_REGEXP) || []; + const major = parseInt(match[1], 10); + const minor = parseInt(match[2], 10); + const patch = parseInt(match[3], 10); + return { + buildmetadata: match[5], + major: isNaN(major) ? undefined : major, + minor: isNaN(minor) ? undefined : minor, + patch: isNaN(patch) ? undefined : patch, + prerelease: match[4], + }; +} + /** * This function adds context (pre/post/line) lines to the provided frame * @@ -374,17 +125,73 @@ export function getFunctionName(fn) { * @param frame StackFrame that will be mutated * @param linesOfContext number of context lines we want to add pre/post */ -export function addContextToFrame(lines, frame, linesOfContext) { - if (linesOfContext === void 0) { linesOfContext = 5; } - var lineno = frame.lineno || 0; - var maxLines = lines.length; - var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0); - frame.pre_context = lines - .slice(Math.max(0, sourceLine - linesOfContext), sourceLine) - .map(function (line) { return snipLine(line, 0); }); - frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); - frame.post_context = lines - .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext) - .map(function (line) { return snipLine(line, 0); }); +function addContextToFrame(lines, frame, linesOfContext = 5) { + // When there is no line number in the frame, attaching context is nonsensical and will even break grouping + if (frame.lineno === undefined) { + return; + } + + const maxLines = lines.length; + const sourceLine = Math.max(Math.min(maxLines, frame.lineno - 1), 0); + + frame.pre_context = lines + .slice(Math.max(0, sourceLine - linesOfContext), sourceLine) + .map((line) => snipLine(line, 0)); + + frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); + + frame.post_context = lines + .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext) + .map((line) => snipLine(line, 0)); +} + +/** + * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object + * in question), and marks it captured if not. + * + * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and + * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so + * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because + * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not + * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This + * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we + * see it. + * + * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on + * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent + * object wrapper forms so that this check will always work. However, because we need to flag the exact object which + * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification + * must be done before the exception captured. + * + * @param A thrown exception to check or flag as having been seen + * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen) + */ +function checkOrSetAlreadyCaught(exception) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (exception && (exception ).__sentry_captured__) { + return true; + } + + try { + // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the + // `ExtraErrorData` integration + addNonEnumerableProperty(exception , '__sentry_captured__', true); + } catch (err) { + // `exception` is a primitive, so we can't mark it seen + } + + return false; +} + +/** + * Checks whether the given input is already an array, and if it isn't, wraps it in one. + * + * @param maybeArray Input to turn into an array, if necessary + * @returns The input, if already an array, or an array with the input as the only element, if not + */ +function arrayify(maybeArray) { + return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; } -//# sourceMappingURL=misc.js.map \ No newline at end of file + +export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 }; +//# sourceMappingURL=misc.js.map diff --git a/node_modules/@sentry/utils/esm/misc.js.map b/node_modules/@sentry/utils/esm/misc.js.map index d78a326..2090446 100644 --- a/node_modules/@sentry/utils/esm/misc.js.map +++ b/node_modules/@sentry/utils/esm/misc.js.map @@ -1 +1 @@ -{"version":3,"file":"misc.js","sourceRoot":"","sources":["../src/misc.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAmBpC;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAQ,EAAE,OAAe;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AG,CAAC,GAAG,cAAc,CAAC;SAC1E,GAAG,CAAC,UAAC,IAAY,IAAK,OAAA,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAjB,CAAiB,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["import { Event, Integration, StackFrame, WrappedFunction } from '@sentry/types';\n\nimport { isString } from './is';\nimport { snipLine } from './string';\n\n/** Internal */\ninterface SentryGlobal {\n Sentry?: {\n Integrations?: Integration[];\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n };\n}\n\n/**\n * Requires a module which is protected _against bundler minification.\n *\n * @param request The module path to resolve\n */\nexport function dynamicRequire(mod: any, request: string): any {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // tslint:disable:strict-type-predicates\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n\nconst fallbackGlobalObject = {};\n\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject(): T & SentryGlobal {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject) as T & SentryGlobal;\n}\n// tslint:enable:strict-type-predicates\n\n/**\n * Extended Window interface that allows for Crypto API usage in IE browsers\n */\ninterface MsCryptoWindow extends Window {\n msCrypto?: Crypto;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const global = getGlobalObject() as MsCryptoWindow;\n const crypto = global.crypto || global.msCrypto;\n\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n const arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n // tslint:disable-next-line:no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // tslint:disable-next-line:no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n const pad = (num: number): string => {\n let v = num.toString(16);\n while (v.length < 4) {\n v = `0${v}`;\n }\n return v;\n };\n\n return (\n pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])\n );\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {\n // tslint:disable-next-line:no-bitwise\n const r = (Math.random() * 16) | 0;\n // tslint:disable-next-line:no-bitwise\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(\n url: string,\n): {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n} {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n const exception = event.exception.values[0];\n\n if (exception.type && exception.value) {\n return `${exception.type}: ${exception.value}`;\n }\n return exception.type || exception.value || event.event_id || '';\n }\n return event.event_id || '';\n}\n\n/** JSDoc */\ninterface ExtensibleConsole extends Console {\n [key: string]: any;\n}\n\n/** JSDoc */\nexport function consoleSandbox(callback: () => any): any {\n const global = getGlobalObject();\n const levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n if (!('console' in global)) {\n return callback();\n }\n\n const originalConsole = global.console as ExtensibleConsole;\n const wrappedLevels: { [key: string]: any } = {};\n\n // Restore all wrapped console methods\n levels.forEach(level => {\n if (level in global.console && (originalConsole[level] as WrappedFunction).__sentry_original__) {\n wrappedLevels[level] = originalConsole[level] as WrappedFunction;\n originalConsole[level] = (originalConsole[level] as WrappedFunction).__sentry_original__;\n }\n });\n\n // Perform callback manipulations\n const result = callback();\n\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level];\n });\n\n return result;\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(\n event: Event,\n mechanism: {\n [key: string]: any;\n } = {},\n): void {\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception!.values![0].mechanism = event.exception!.values![0].mechanism || {};\n Object.keys(mechanism).forEach(key => {\n // @ts-ignore\n event.exception!.values![0].mechanism[key] = mechanism[key];\n });\n } catch (_oO) {\n // no-empty\n }\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown): string {\n const elem = el as {\n getAttribute(key: string): string; // tslint:disable-line:completed-docs\n tagName?: string;\n id?: string;\n className?: string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n const attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\nconst INITIAL_TIME = Date.now();\nlet prevNow = 0;\n\nconst performanceFallback: Pick = {\n now(): number {\n let now = Date.now() - INITIAL_TIME;\n if (now < prevNow) {\n now = prevNow;\n }\n prevNow = now;\n return now;\n },\n timeOrigin: INITIAL_TIME,\n};\n\nexport const crossPlatformPerformance: Pick = (() => {\n if (isNodeEnv()) {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: Performance };\n return perfHooks.performance;\n } catch (_) {\n return performanceFallback;\n }\n }\n\n if (getGlobalObject().performance) {\n // Polyfill for performance.timeOrigin.\n //\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // tslint:disable-next-line:strict-type-predicates\n if (performance.timeOrigin === undefined) {\n // For webworkers it could mean we don't have performance.timing then we fallback\n // tslint:disable-next-line:deprecation\n if (!performance.timing) {\n return performanceFallback;\n }\n // tslint:disable-next-line:deprecation\n if (!performance.timing.navigationStart) {\n return performanceFallback;\n }\n\n // @ts-ignore\n // tslint:disable-next-line:deprecation\n performance.timeOrigin = performance.timing.navigationStart;\n }\n }\n\n return getGlobalObject().performance || performanceFallback;\n})();\n\n/**\n * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock.\n */\nexport function timestampWithMs(): number {\n return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000;\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\nconst defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now: number, header?: string | number | null): number {\n if (!header) {\n return defaultRetryAfter;\n }\n\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return defaultRetryAfter;\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n const lineno = frame.lineno || 0;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n"]} \ No newline at end of file +{"version":3,"file":"misc.js","sources":["../../src/misc.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { Event, Exception, Mechanism, StackFrame } from '@sentry/types';\n\nimport { addNonEnumerableProperty } from './object';\nimport { snipLine } from './string';\nimport { GLOBAL_OBJ } from './worldwide';\n\ninterface CryptoInternal {\n getRandomValues(array: Uint8Array): Uint8Array;\n randomUUID?(): string;\n}\n\n/** An interface for common properties on global */\ninterface CryptoGlobal {\n msCrypto?: CryptoInternal;\n crypto?: CryptoInternal;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const gbl = GLOBAL_OBJ as typeof GLOBAL_OBJ & CryptoGlobal;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n\n const getRandomByte =\n crypto && crypto.getRandomValues ? () => crypto.getRandomValues(new Uint8Array(1))[0] : () => Math.random() * 16;\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] as unknown as string) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c as unknown as number) ^ ((getRandomByte() & 15) >> ((c as unknown as number) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event: Event): Exception | undefined {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event: Event, newMechanism?: Partial): void {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception: unknown): boolean {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception as any).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception as { [key: string]: unknown }, '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nexport function arrayify(maybeArray: T | T[]): T[] {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n"],"names":[],"mappings":";;;;AAkBA;AACA;AACA;AACA;AACA;AACA,SAAA,KAAA,GAAA;AACA,EAAA,MAAA,GAAA,GAAA,UAAA,EAAA;AACA,EAAA,MAAA,MAAA,GAAA,GAAA,CAAA,MAAA,IAAA,GAAA,CAAA,QAAA,CAAA;AACA;AACA,EAAA,IAAA,MAAA,IAAA,MAAA,CAAA,UAAA,EAAA;AACA,IAAA,OAAA,MAAA,CAAA,UAAA,EAAA,CAAA,OAAA,CAAA,IAAA,EAAA,EAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,MAAA,aAAA;AACA,IAAA,MAAA,IAAA,MAAA,CAAA,eAAA,GAAA,MAAA,MAAA,CAAA,eAAA,CAAA,IAAA,UAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA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AACA;AACA;AACA,SAAA,QAAA,CAAA,UAAA,EAAA;AACA,EAAA,OAAA,KAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,UAAA,GAAA,CAAA,UAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/object.d.ts b/node_modules/@sentry/utils/esm/object.d.ts deleted file mode 100644 index 42f8f24..0000000 --- a/node_modules/@sentry/utils/esm/object.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Memo } from './memo'; -/** - * Wrap a given object method with a higher-order function - * - * @param source An object that contains a method to be wrapped. - * @param name A name of method to be wrapped. - * @param replacement A function that should be used to wrap a given method. - * @returns void - */ -export declare function fill(source: { - [key: string]: any; -}, name: string, replacement: (...args: any[]) => any): void; -/** - * Encodes given object into url-friendly format - * - * @param object An object that contains serializable values - * @returns string Encoded - */ -export declare function urlEncode(object: { - [key: string]: any; -}): string; -/** JSDoc */ -export declare function normalizeToSize(object: { - [key: string]: any; -}, depth?: number, maxSize?: number): T; -/** - * Walks an object to perform a normalization on it - * - * @param key of object that's walked in current iteration - * @param value object to be walked - * @param depth Optional number indicating how deep should walking be performed - * @param memo Optional Memo class handling decycling - */ -export declare function walk(key: string, value: any, depth?: number, memo?: Memo): any; -/** - * normalize() - * - * - Creates a copy to prevent original input mutation - * - Skip non-enumerablers - * - Calls `toJSON` if implemented - * - Removes circular references - * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format - * - Translates known global objects/Classes to a string representations - * - Takes care of Error objects serialization - * - Optionally limit depth of final output - */ -export declare function normalize(input: any, depth?: number): any; -/** - * Given any captured exception, extract its keys and create a sorted - * and truncated list that will be used inside the event message. - * eg. `Non-error exception captured with keys: foo, bar, baz` - */ -export declare function extractExceptionKeysForMessage(exception: any, maxLength?: number): string; -/** - * Given any object, return the new object with removed keys that value was `undefined`. - * Works recursively on objects and arrays. - */ -export declare function dropUndefinedKeys(val: T): T; -//# sourceMappingURL=object.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/object.d.ts.map b/node_modules/@sentry/utils/esm/object.d.ts.map deleted file mode 100644 index 0cc0452..0000000 --- a/node_modules/@sentry/utils/esm/object.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CA2B7G;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,MAAM,CAOhE;AAqGD,YAAY;AACZ,wBAAgB,eAAe,CAAC,CAAC,EAC/B,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAE9B,KAAK,GAAE,MAAU,EAEjB,OAAO,GAAE,MAAmB,GAC3B,CAAC,CAQH;AAyED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,GAAE,MAAkB,EAAE,IAAI,GAAE,IAAiB,GAAG,GAAG,CA6CrG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,GAAG,CAOzD;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,GAAG,EAAE,SAAS,GAAE,MAAW,GAAG,MAAM,CAyB7F;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAiB9C"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/object.js b/node_modules/@sentry/utils/esm/object.js index b59df25..0f5c411 100644 --- a/node_modules/@sentry/utils/esm/object.js +++ b/node_modules/@sentry/utils/esm/object.js @@ -1,317 +1,279 @@ -import * as tslib_1 from "tslib"; -import { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is'; -import { Memo } from './memo'; -import { getFunctionName, htmlTreeAsString } from './misc'; -import { truncate } from './string'; +import { htmlTreeAsString } from './browser.js'; +import { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js'; +import { truncate } from './string.js'; + /** - * Wrap a given object method with a higher-order function + * Replace a method in an object with a wrapped version of itself. * * @param source An object that contains a method to be wrapped. - * @param name A name of method to be wrapped. - * @param replacement A function that should be used to wrap a given method. + * @param name The name of the method to be wrapped. + * @param replacementFactory A higher-order function that takes the original version of the given method and returns a + * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to + * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`. * @returns void */ -export function fill(source, name, replacement) { - if (!(name in source)) { - return; - } - var original = source[name]; - var wrapped = replacement(original); - // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work - // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" - // tslint:disable-next-line:strict-type-predicates - if (typeof wrapped === 'function') { - try { - wrapped.prototype = wrapped.prototype || {}; - Object.defineProperties(wrapped, { - __sentry_original__: { - enumerable: false, - value: original, - }, - }); - } - catch (_Oo) { - // This can throw if multiple fill happens on a global object like XMLHttpRequest - // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 - } +function fill(source, name, replacementFactory) { + if (!(name in source)) { + return; + } + + const original = source[name] ; + const wrapped = replacementFactory(original) ; + + // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work + // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" + if (typeof wrapped === 'function') { + try { + markFunctionWrapped(wrapped, original); + } catch (_Oo) { + // This can throw if multiple fill happens on a global object like XMLHttpRequest + // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 } - source[name] = wrapped; + } + + source[name] = wrapped; } + /** - * Encodes given object into url-friendly format + * Defines a non-enumerable property on the given object. * - * @param object An object that contains serializable values - * @returns string Encoded + * @param obj The object on which to set the property + * @param name The name of the property to be set + * @param value The value to which to set the property */ -export function urlEncode(object) { - return Object.keys(object) - .map( - // tslint:disable-next-line:no-unsafe-any - function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); }) - .join('&'); +function addNonEnumerableProperty(obj, name, value) { + Object.defineProperty(obj, name, { + // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it + value: value, + writable: true, + configurable: true, + }); } + /** - * Transforms any object into an object literal with all it's attributes - * attached to it. + * Remembers the original function on the wrapped function and + * patches up the prototype. * - * @param value Initial source that we have to transform in order to be usable by the serializer + * @param wrapped the wrapper function + * @param original the original function that gets wrapped */ -function getWalkSource(value) { - if (isError(value)) { - var error = value; - var err = { - message: error.message, - name: error.name, - stack: error.stack, - }; - for (var i in error) { - if (Object.prototype.hasOwnProperty.call(error, i)) { - err[i] = error[i]; - } - } - return err; - } - if (isEvent(value)) { - var event_1 = value; - var source = {}; - source.type = event_1.type; - // Accessing event.target can throw (see getsentry/raven-js#838, #768) - try { - source.target = isElement(event_1.target) - ? htmlTreeAsString(event_1.target) - : Object.prototype.toString.call(event_1.target); - } - catch (_oO) { - source.target = ''; - } - try { - source.currentTarget = isElement(event_1.currentTarget) - ? htmlTreeAsString(event_1.currentTarget) - : Object.prototype.toString.call(event_1.currentTarget); - } - catch (_oO) { - source.currentTarget = ''; - } - // tslint:disable-next-line:strict-type-predicates - if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) { - source.detail = event_1.detail; - } - for (var i in event_1) { - if (Object.prototype.hasOwnProperty.call(event_1, i)) { - source[i] = event_1; - } - } - return source; - } - return value; -} -/** Calculates bytes size of input string */ -function utf8Length(value) { - // tslint:disable-next-line:no-bitwise - return ~-encodeURI(value).split(/%..|./).length; -} -/** Calculates bytes size of input object */ -function jsonSize(value) { - return utf8Length(JSON.stringify(value)); -} -/** JSDoc */ -export function normalizeToSize(object, -// Default Node.js REPL depth -depth, -// 100kB, as 200kB is max payload size, so half sounds reasonable -maxSize) { - if (depth === void 0) { depth = 3; } - if (maxSize === void 0) { maxSize = 100 * 1024; } - var serialized = normalize(object, depth); - if (jsonSize(serialized) > maxSize) { - return normalizeToSize(object, depth - 1, maxSize); - } - return serialized; -} -/** Transforms any input value into a string form, either primitive value or a type of the input */ -function serializeValue(value) { - var type = Object.prototype.toString.call(value); - // Node.js REPL notation - if (typeof value === 'string') { - return value; - } - if (type === '[object Object]') { - return '[Object]'; - } - if (type === '[object Array]') { - return '[Array]'; - } - var normalized = normalizeValue(value); - return isPrimitive(normalized) ? normalized : type; +function markFunctionWrapped(wrapped, original) { + const proto = original.prototype || {}; + wrapped.prototype = original.prototype = proto; + addNonEnumerableProperty(wrapped, '__sentry_original__', original); } + /** - * normalizeValue() - * - * Takes unserializable input and make it serializable friendly + * This extracts the original function if available. See + * `markFunctionWrapped` for more information. * - * - translates undefined/NaN values to "[undefined]"/"[NaN]" respectively, - * - serializes Error objects - * - filter global objects + * @param func the function to unwrap + * @returns the unwrapped version of the function if available. */ -// tslint:disable-next-line:cyclomatic-complexity -function normalizeValue(value, key) { - if (key === 'domain' && value && typeof value === 'object' && value._events) { - return '[Domain]'; - } - if (key === 'domainEmitter') { - return '[DomainEmitter]'; - } - if (typeof global !== 'undefined' && value === global) { - return '[Global]'; - } - if (typeof window !== 'undefined' && value === window) { - return '[Window]'; - } - if (typeof document !== 'undefined' && value === document) { - return '[Document]'; - } - // React's SyntheticEvent thingy - if (isSyntheticEvent(value)) { - return '[SyntheticEvent]'; - } - // tslint:disable-next-line:no-tautology-expression - if (typeof value === 'number' && value !== value) { - return '[NaN]'; - } - if (value === void 0) { - return '[undefined]'; - } - if (typeof value === 'function') { - return "[Function: " + getFunctionName(value) + "]"; - } - return value; +function getOriginalFunction(func) { + return func.__sentry_original__; } + /** - * Walks an object to perform a normalization on it + * Encodes given object into url-friendly format * - * @param key of object that's walked in current iteration - * @param value object to be walked - * @param depth Optional number indicating how deep should walking be performed - * @param memo Optional Memo class handling decycling + * @param object An object that contains serializable values + * @returns string Encoded */ -export function walk(key, value, depth, memo) { - if (depth === void 0) { depth = +Infinity; } - if (memo === void 0) { memo = new Memo(); } - // If we reach the maximum depth, serialize whatever has left - if (depth === 0) { - return serializeValue(value); - } - // If value implements `toJSON` method, call it and return early - // tslint:disable:no-unsafe-any - if (value !== null && value !== undefined && typeof value.toJSON === 'function') { - return value.toJSON(); - } - // tslint:enable:no-unsafe-any - // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further - var normalized = normalizeValue(value, key); - if (isPrimitive(normalized)) { - return normalized; - } - // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself - var source = getWalkSource(value); - // Create an accumulator that will act as a parent for all future itterations of that branch - var acc = Array.isArray(value) ? [] : {}; - // If we already walked that branch, bail out, as it's circular reference - if (memo.memoize(value)) { - return '[Circular ~]'; - } - // Walk all keys of the source - for (var innerKey in source) { - // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration. - if (!Object.prototype.hasOwnProperty.call(source, innerKey)) { - continue; - } - // Recursively walk through all the child nodes - acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo); - } - // Once walked through all the branches, remove the parent from memo storage - memo.unmemoize(value); - // Return accumulated values - return acc; +function urlEncode(object) { + return Object.keys(object) + .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`) + .join('&'); } + /** - * normalize() + * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their + * non-enumerable properties attached. * - * - Creates a copy to prevent original input mutation - * - Skip non-enumerablers - * - Calls `toJSON` if implemented - * - Removes circular references - * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format - * - Translates known global objects/Classes to a string representations - * - Takes care of Error objects serialization - * - Optionally limit depth of final output + * @param value Initial source that we have to transform in order for it to be usable by the serializer + * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor + * an Error. */ -export function normalize(input, depth) { - try { - // tslint:disable-next-line:no-unsafe-any - return JSON.parse(JSON.stringify(input, function (key, value) { return walk(key, value, depth); })); +function convertToPlainObject(value) + + { + if (isError(value)) { + return { + message: value.message, + name: value.name, + stack: value.stack, + ...getOwnProperties(value), + }; + } else if (isEvent(value)) { + const newObj + + = { + type: value.type, + target: serializeEventTarget(value.target), + currentTarget: serializeEventTarget(value.currentTarget), + ...getOwnProperties(value), + }; + + if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) { + newObj.detail = value.detail; } - catch (_oO) { - return '**non-serializable**'; + + return newObj; + } else { + return value; + } +} + +/** Creates a string representation of the target of an `Event` object */ +function serializeEventTarget(target) { + try { + return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target); + } catch (_oO) { + return ''; + } +} + +/** Filters out all but an object's own properties */ +function getOwnProperties(obj) { + if (typeof obj === 'object' && obj !== null) { + const extractedProps = {}; + for (const property in obj) { + if (Object.prototype.hasOwnProperty.call(obj, property)) { + extractedProps[property] = (obj )[property]; + } } + return extractedProps; + } else { + return {}; + } } + /** * Given any captured exception, extract its keys and create a sorted * and truncated list that will be used inside the event message. * eg. `Non-error exception captured with keys: foo, bar, baz` */ -export function extractExceptionKeysForMessage(exception, maxLength) { - if (maxLength === void 0) { maxLength = 40; } - // tslint:disable:strict-type-predicates - var keys = Object.keys(getWalkSource(exception)); - keys.sort(); - if (!keys.length) { - return '[object has no keys]'; +function extractExceptionKeysForMessage(exception, maxLength = 40) { + const keys = Object.keys(convertToPlainObject(exception)); + keys.sort(); + + if (!keys.length) { + return '[object has no keys]'; + } + + if (keys[0].length >= maxLength) { + return truncate(keys[0], maxLength); + } + + for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { + const serialized = keys.slice(0, includedKeys).join(', '); + if (serialized.length > maxLength) { + continue; } - if (keys[0].length >= maxLength) { - return truncate(keys[0], maxLength); + if (includedKeys === keys.length) { + return serialized; } - for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) { - var serialized = keys.slice(0, includedKeys).join(', '); - if (serialized.length > maxLength) { - continue; - } - if (includedKeys === keys.length) { - return serialized; - } - return truncate(serialized, maxLength); - } - return ''; + return truncate(serialized, maxLength); + } + + return ''; } + /** - * Given any object, return the new object with removed keys that value was `undefined`. + * Given any object, return a new object having removed all fields whose value was `undefined`. * Works recursively on objects and arrays. + * + * Attention: This function keeps circular references in the returned object. */ -export function dropUndefinedKeys(val) { - var e_1, _a; - if (isPlainObject(val)) { - var obj = val; - var rv = {}; - try { - for (var _b = tslib_1.__values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - if (typeof obj[key] !== 'undefined') { - rv[key] = dropUndefinedKeys(obj[key]); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - return rv; +function dropUndefinedKeys(inputValue) { + // This map keeps track of what already visited nodes map to. + // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular + // references as the input object. + const memoizationMap = new Map(); + + // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API + return _dropUndefinedKeys(inputValue, memoizationMap); +} + +function _dropUndefinedKeys(inputValue, memoizationMap) { + if (isPlainObject(inputValue)) { + // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object + const memoVal = memoizationMap.get(inputValue); + if (memoVal !== undefined) { + return memoVal ; } - if (Array.isArray(val)) { - return val.map(dropUndefinedKeys); + + const returnValue = {}; + // Store the mapping of this value in case we visit it again, in case of circular data + memoizationMap.set(inputValue, returnValue); + + for (const key of Object.keys(inputValue)) { + if (typeof inputValue[key] !== 'undefined') { + returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap); + } } - return val; + + return returnValue ; + } + + if (Array.isArray(inputValue)) { + // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object + const memoVal = memoizationMap.get(inputValue); + if (memoVal !== undefined) { + return memoVal ; + } + + const returnValue = []; + // Store the mapping of this value in case we visit it again, in case of circular data + memoizationMap.set(inputValue, returnValue); + + inputValue.forEach((item) => { + returnValue.push(_dropUndefinedKeys(item, memoizationMap)); + }); + + return returnValue ; + } + + return inputValue; +} + +/** + * Ensure that something is an object. + * + * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper + * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives. + * + * @param wat The subject of the objectification + * @returns A version of `wat` which can safely be used with `Object` class methods + */ +function objectify(wat) { + let objectified; + switch (true) { + case wat === undefined || wat === null: + objectified = new String(wat); + break; + + // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason + // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as + // an object in order to wrap it. + case typeof wat === 'symbol' || typeof wat === 'bigint': + objectified = Object(wat); + break; + + // this will catch the remaining primitives: `String`, `Number`, and `Boolean` + case isPrimitive(wat): + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + objectified = new (wat ).constructor(wat); + break; + + // by process of elimination, at this point we know that `wat` must already be an object + default: + objectified = wat; + break; + } + return objectified; } -//# sourceMappingURL=object.js.map \ No newline at end of file + +export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode }; +//# sourceMappingURL=object.js.map diff --git a/node_modules/@sentry/utils/esm/object.js.map b/node_modules/@sentry/utils/esm/object.js.map index 4819730..f8503ee 100644 --- a/node_modules/@sentry/utils/esm/object.js.map +++ b/node_modules/@sentry/utils/esm/object.js.map @@ -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entry/types';\n\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName, htmlTreeAsString } from './misc';\nimport { truncate } from './string';\n\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacement: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacement(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n // tslint:disable-next-line:strict-type-predicates\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`,\n )\n .join('&');\n}\n\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\nfunction getWalkSource(\n value: any,\n): {\n [key: string]: any;\n} {\n if (isError(value)) {\n const error = value as ExtendedError;\n const err: {\n stack: string | undefined;\n message: string;\n name: string;\n [key: string]: any;\n } = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n\n for (const i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n\n return err;\n }\n\n if (isEvent(value)) {\n /**\n * Event-like interface that's usable in browser and node\n */\n interface SimpleEvent {\n [key: string]: unknown;\n type: string;\n target?: unknown;\n currentTarget?: unknown;\n }\n\n const event = value as SimpleEvent;\n\n const source: {\n [key: string]: any;\n } = {};\n\n source.type = event.type;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n source.target = isElement(event.target)\n ? htmlTreeAsString(event.target)\n : Object.prototype.toString.call(event.target);\n } catch (_oO) {\n source.target = '';\n }\n\n try {\n source.currentTarget = isElement(event.currentTarget)\n ? htmlTreeAsString(event.currentTarget)\n : Object.prototype.toString.call(event.currentTarget);\n } catch (_oO) {\n source.currentTarget = '';\n }\n\n // tslint:disable-next-line:strict-type-predicates\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event.detail;\n }\n\n for (const i in event) {\n if (Object.prototype.hasOwnProperty.call(event, i)) {\n source[i] = event;\n }\n }\n\n return source;\n }\n\n return value as {\n [key: string]: any;\n };\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // tslint:disable-next-line:no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n\n/** JSDoc */\nexport function normalizeToSize(\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const serialized = normalize(object, depth);\n\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return serialized as T;\n}\n\n/** Transforms any input value into a string form, either primitive value or a type of the input */\nfunction serializeValue(value: any): any {\n const type = Object.prototype.toString.call(value);\n\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n\n const normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction normalizeValue(value: T, key?: any): T | string {\n if (key === 'domain' && value && typeof value === 'object' && ((value as unknown) as { _events: any })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n if (typeof (global as any) !== 'undefined' && (value as unknown) === global) {\n return '[Global]';\n }\n\n if (typeof (window as any) !== 'undefined' && (value as unknown) === window) {\n return '[Window]';\n }\n\n if (typeof (document as any) !== 'undefined' && (value as unknown) === document) {\n return '[Document]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n // tslint:disable-next-line:no-tautology-expression\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n return value;\n}\n\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key: string, value: any, depth: number = +Infinity, memo: Memo = new Memo()): any {\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n\n // If value implements `toJSON` method, call it and return early\n // tslint:disable:no-unsafe-any\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // tslint:enable:no-unsafe-any\n\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n const normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n const source = getWalkSource(value);\n\n // Create an accumulator that will act as a parent for all future itterations of that branch\n const acc = Array.isArray(value) ? [] : {};\n\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n\n // Walk all keys of the source\n for (const innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n (acc as { [key: string]: any })[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n\n // Return accumulated values\n return acc;\n}\n\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\nexport function normalize(input: any, depth?: number): any {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return JSON.parse(JSON.stringify(input, (key: string, value: any) => walk(key, value, depth)));\n } catch (_oO) {\n return '**non-serializable**';\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: any, maxLength: number = 40): string {\n // tslint:disable:strict-type-predicates\n const keys = Object.keys(getWalkSource(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val: T): T {\n if (isPlainObject(val)) {\n const obj = val as { [key: string]: any };\n const rv: { [key: string]: any } = {};\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n return rv as T;\n }\n\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys) as any;\n }\n\n return val;\n}\n"]} \ No newline at end of file +{"version":3,"file":"object.js","sources":["../../src/object.ts"],"sourcesContent":["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { WrappedFunction } from '@sentry/types';\n\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive } from './is';\nimport { truncate } from './string';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacementFactory: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacementFactory(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n try {\n markFunctionWrapped(wrapped, original);\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj: { [key: string]: unknown }, name: string, value: unknown): void {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nexport function getOriginalFunction(func: WrappedFunction): WrappedFunction | undefined {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nexport function convertToPlainObject(value: V):\n | {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n }\n | {\n [ownProps: string]: unknown;\n message: string;\n name: string;\n stack?: string;\n }\n | V {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj: {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n } = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target: unknown): string {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj: unknown): { [key: string]: unknown } {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps: { [key: string]: unknown } = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj as Record)[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: Record, maxLength: number = 40): string {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nexport function dropUndefinedKeys(inputValue: T): T {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue: T, memoizationMap: Map): T {\n if (isPlainObject(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: { [key: string]: any } = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue as T;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: unknown[] = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item: unknown) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue as unknown as T;\n }\n\n return inputValue;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat: unknown): typeof Object {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat as any).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return object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,GAAA,KAAA,QAAA;AACA,MAAA,WAAA,GAAA,MAAA,CAAA,GAAA,CAAA,CAAA;AACA,MAAA,MAAA;AACA;AACA;AACA,IAAA,KAAA,WAAA,CAAA,GAAA,CAAA;AACA;AACA,MAAA,WAAA,GAAA,IAAA,CAAA,GAAA,GAAA,WAAA,CAAA,GAAA,CAAA,CAAA;AACA,MAAA,MAAA;AACA;AACA;AACA,IAAA;AACA,MAAA,WAAA,GAAA,GAAA,CAAA;AACA,MAAA,MAAA;AACA,GAAA;AACA,EAAA,OAAA,WAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/path.d.ts b/node_modules/@sentry/utils/esm/path.d.ts deleted file mode 100644 index 74faee9..0000000 --- a/node_modules/@sentry/utils/esm/path.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** JSDoc */ -export declare function resolve(...args: string[]): string; -/** JSDoc */ -export declare function relative(from: string, to: string): string; -/** JSDoc */ -export declare function normalizePath(path: string): string; -/** JSDoc */ -export declare function isAbsolute(path: string): boolean; -/** JSDoc */ -export declare function join(...args: string[]): string; -/** JSDoc */ -export declare function dirname(path: string): string; -/** JSDoc */ -export declare function basename(path: string, ext?: string): string; -//# sourceMappingURL=path.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/path.d.ts.map b/node_modules/@sentry/utils/esm/path.d.ts.map deleted file mode 100644 index 47db869..0000000 --- a/node_modules/@sentry/utils/esm/path.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAyCA,YAAY;AACZ,wBAAgB,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAuBjD;AA0BD,YAAY;AACZ,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAyBzD;AAID,YAAY;AACZ,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAelD;AAGD,YAAY;AACZ,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAGD,YAAY;AACZ,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAE9C;AAED,YAAY;AACZ,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgB5C;AAED,YAAY;AACZ,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAM3D"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/path.js b/node_modules/@sentry/utils/esm/path.js index c3627ae..65d3576 100644 --- a/node_modules/@sentry/utils/esm/path.js +++ b/node_modules/@sentry/utils/esm/path.js @@ -1,158 +1,188 @@ // Slightly modified (no IE8 support, ES6) and transcribed to TypeScript // https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js + /** JSDoc */ function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } - else if (last === '..') { - parts.splice(i, 1); - up++; - } - else if (up) { - parts.splice(i, 1); - up--; - } + // if the path tries to go above the root, `up` ends up > 0 + let up = 0; + for (let i = parts.length - 1; i >= 0; i--) { + const last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; } - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); } - return parts; + } + + return parts; } + // Split a filename into [root, dir, basename, ext], unix version // 'root' is just a slash, or nothing. -var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +const splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/; /** JSDoc */ function splitPath(filename) { - var parts = splitPathRe.exec(filename); - return parts ? parts.slice(1) : []; + const parts = splitPathRe.exec(filename); + return parts ? parts.slice(1) : []; } + // path.resolve([from ...], to) // posix version /** JSDoc */ -export function resolve() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; +function resolve(...args) { + let resolvedPath = ''; + let resolvedAbsolute = false; + + for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { + const path = i >= 0 ? args[i] : '/'; + + // Skip empty entries + if (!path) { + continue; } - var resolvedPath = ''; - var resolvedAbsolute = false; - for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = i >= 0 ? args[i] : '/'; - // Skip empty entries - if (!path) { - continue; - } - resolvedPath = path + "/" + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - // Normalize the path - resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/'); - return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; + + resolvedPath = `${path}/${resolvedPath}`; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray( + resolvedPath.split('/').filter(p => !!p), + !resolvedAbsolute, + ).join('/'); + + return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; } + /** JSDoc */ function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') { - break; - } - } - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') { - break; - } + let start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') { + break; } - if (start > end) { - return []; + } + + let end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') { + break; } - return arr.slice(start, end - start + 1); + } + + if (start > end) { + return []; + } + return arr.slice(start, end - start + 1); } + // path.relative(from, to) // posix version /** JSDoc */ -export function relative(from, to) { - // tslint:disable:no-parameter-reassignment - from = resolve(from).substr(1); - to = resolve(to).substr(1); - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); +function relative(from, to) { + /* eslint-disable no-param-reassign */ + from = resolve(from).slice(1); + to = resolve(to).slice(1); + /* eslint-enable no-param-reassign */ + + const fromParts = trim(from.split('/')); + const toParts = trim(to.split('/')); + + const length = Math.min(fromParts.length, toParts.length); + let samePartsLength = length; + for (let i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - return outputParts.join('/'); + } + + let outputParts = []; + for (let i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); } + // path.normalize(path) // posix version /** JSDoc */ -export function normalizePath(path) { - var isPathAbsolute = isAbsolute(path); - var trailingSlash = path.substr(-1) === '/'; - // Normalize the path - var normalizedPath = normalizeArray(path.split('/').filter(function (p) { return !!p; }), !isPathAbsolute).join('/'); - if (!normalizedPath && !isPathAbsolute) { - normalizedPath = '.'; - } - if (normalizedPath && trailingSlash) { - normalizedPath += '/'; - } - return (isPathAbsolute ? '/' : '') + normalizedPath; +function normalizePath(path) { + const isPathAbsolute = isAbsolute(path); + const trailingSlash = path.slice(-1) === '/'; + + // Normalize the path + let normalizedPath = normalizeArray( + path.split('/').filter(p => !!p), + !isPathAbsolute, + ).join('/'); + + if (!normalizedPath && !isPathAbsolute) { + normalizedPath = '.'; + } + if (normalizedPath && trailingSlash) { + normalizedPath += '/'; + } + + return (isPathAbsolute ? '/' : '') + normalizedPath; } + // posix version /** JSDoc */ -export function isAbsolute(path) { - return path.charAt(0) === '/'; +function isAbsolute(path) { + return path.charAt(0) === '/'; } + // posix version /** JSDoc */ -export function join() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return normalizePath(args.join('/')); +function join(...args) { + return normalizePath(args.join('/')); } + /** JSDoc */ -export function dirname(path) { - var result = splitPath(path); - var root = result[0]; - var dir = result[1]; - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - return root + dir; +function dirname(path) { + const result = splitPath(path); + const root = result[0]; + let dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.slice(0, dir.length - 1); + } + + return root + dir; } + /** JSDoc */ -export function basename(path, ext) { - var f = splitPath(path)[2]; - if (ext && f.substr(ext.length * -1) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; +function basename(path, ext) { + let f = splitPath(path)[2]; + if (ext && f.slice(ext.length * -1) === ext) { + f = f.slice(0, f.length - ext.length); + } + return f; } -//# sourceMappingURL=path.js.map \ No newline at end of file + +export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve }; +//# sourceMappingURL=path.js.map diff --git a/node_modules/@sentry/utils/esm/path.js.map b/node_modules/@sentry/utils/esm/path.js.map index 138d4a6..994a9a1 100644 --- a/node_modules/@sentry/utils/esm/path.js.map +++ b/node_modules/@sentry/utils/esm/path.js.map @@ -1 +1 @@ -{"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,qGAAqG;AAErG,YAAY;AACZ,SAAS,cAAc,CAA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IAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAEpB,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE;QACjB,wBAAwB;QACxB,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,GAAG,EAAE;QACP,yCAAyC;QACzC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KACrC;IAED,OAAO,IAAI,GAAG,GAAG,CAAC;AACpB,CAAC;AAED,YAAY;AACZ,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,GAAY;IACjD,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QAC5C,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;KACxC;IACD,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(p => !!p), !resolvedAbsolute).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n // tslint:disable:no-parameter-reassignment\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(path.split('/').filter(p => !!p), !isPathAbsolute).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n"]} \ No newline at end of file +{"version":3,"file":"path.js","sources":["../../src/path.ts"],"sourcesContent":["// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(\n resolvedPath.split('/').filter(p => !!p),\n !resolvedAbsolute,\n ).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n /* eslint-disable no-param-reassign */\n from = resolve(from).slice(1);\n to = resolve(to).slice(1);\n /* eslint-enable no-param-reassign */\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.slice(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(\n path.split('/').filter(p => !!p),\n !isPathAbsolute,\n ).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.slice(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.slice(ext.length * -1) === ext) {\n f = f.slice(0, f.length - ext.length);\n }\n return f;\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,SAAA,cAAA,CAAA,KAAA,EAAA,cAAA,EAAA;AACA;AACA,EAAA,IAAA,EAAA,GAAA,CAAA,CAAA;AACA,EAAA,KAAA,IAAA,CAAA,GAAA,KAAA,CAAA,MAAA,GAAA,CAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,EAAA,EAAA;AACA,IAAA,MAAA,IAAA,GAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,IAAA,IAAA,IAAA,KAAA,GAAA,EAAA;AACA,MAAA,KAAA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A,EAAA,IAAA,GAAA,EAAA;AACA;AACA,IAAA,GAAA,GAAA,GAAA,CAAA,KAAA,CAAA,CAAA,EAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,IAAA,GAAA,GAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,QAAA,CAAA,IAAA,EAAA,GAAA,EAAA;AACA,EAAA,IAAA,CAAA,GAAA,SAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,EAAA,IAAA,GAAA,IAAA,CAAA,CAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA,KAAA,GAAA,EAAA;AACA,IAAA,CAAA,GAAA,CAAA,CAAA,KAAA,CAAA,CAAA,EAAA,CAAA,CAAA,MAAA,GAAA,GAAA,CAAA,MAAA,CAAA,CAAA;AACA,GAAA;AACA,EAAA,OAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/polyfill.d.ts b/node_modules/@sentry/utils/esm/polyfill.d.ts deleted file mode 100644 index 80e2f3c..0000000 --- a/node_modules/@sentry/utils/esm/polyfill.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const setPrototypeOf: (o: any, proto: object | null) => any; -//# sourceMappingURL=polyfill.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/polyfill.d.ts.map b/node_modules/@sentry/utils/esm/polyfill.d.ts.map deleted file mode 100644 index f2ec1f0..0000000 --- a/node_modules/@sentry/utils/esm/polyfill.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../src/polyfill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,uCACmE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/polyfill.js b/node_modules/@sentry/utils/esm/polyfill.js deleted file mode 100644 index cb3d2df..0000000 --- a/node_modules/@sentry/utils/esm/polyfill.js +++ /dev/null @@ -1,22 +0,0 @@ -export var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method -/** - * setPrototypeOf polyfill using __proto__ - */ -function setProtoOf(obj, proto) { - // @ts-ignore - obj.__proto__ = proto; - return obj; -} -/** - * setPrototypeOf polyfill using mixin - */ -function mixinProperties(obj, proto) { - for (var prop in proto) { - if (!obj.hasOwnProperty(prop)) { - // @ts-ignore - obj[prop] = proto[prop]; - } - } - return obj; -} -//# sourceMappingURL=polyfill.js.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/polyfill.js.map b/node_modules/@sentry/utils/esm/polyfill.js.map deleted file mode 100644 index a7f11cf..0000000 --- a/node_modules/@sentry/utils/esm/polyfill.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"polyfill.js","sourceRoot":"","sources":["../src/polyfill.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,cAAc,GACzB,MAAM,CAAC,cAAc,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,wCAAwC;AAExI;;GAEG;AACH,SAAS,UAAU,CAAiC,GAAY,EAAE,KAAa;IAC7E,aAAa;IACb,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC;IACtB,OAAO,GAAuB,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAiC,GAAY,EAAE,KAAa;IAClF,KAAK,IAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;YAC7B,aAAa;YACb,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;SACzB;KACF;IAED,OAAO,GAAuB,CAAC;AACjC,CAAC","sourcesContent":["export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/promisebuffer.d.ts b/node_modules/@sentry/utils/esm/promisebuffer.d.ts deleted file mode 100644 index 202b46c..0000000 --- a/node_modules/@sentry/utils/esm/promisebuffer.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** A simple queue that holds promises. */ -export declare class PromiseBuffer { - protected _limit?: number | undefined; - constructor(_limit?: number | undefined); - /** Internal set of queued Promises */ - private readonly _buffer; - /** - * Says if the buffer is ready to take more requests - */ - isReady(): boolean; - /** - * Add a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns The original promise. - */ - add(task: PromiseLike): PromiseLike; - /** - * Remove a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns Removed promise. - */ - remove(task: PromiseLike): PromiseLike; - /** - * This function returns the number of unresolved promises in the queue. - */ - length(): number; - /** - * This will drain the whole queue, returns true if queue is empty or drained. - * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false. - * - * @param timeout Number in ms to wait until it resolves with false. - */ - drain(timeout?: number): PromiseLike; -} -//# sourceMappingURL=promisebuffer.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/promisebuffer.d.ts.map b/node_modules/@sentry/utils/esm/promisebuffer.d.ts.map deleted file mode 100644 index 6c2fbf3..0000000 --- a/node_modules/@sentry/utils/esm/promisebuffer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promisebuffer.d.ts","sourceRoot":"","sources":["../src/promisebuffer.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAC1C,qBAAa,aAAa,CAAC,CAAC;IACP,SAAS,CAAC,MAAM,CAAC;gBAAP,MAAM,CAAC,oBAAQ;IAE5C,sCAAsC;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IAErD;;OAEG;IACI,OAAO,IAAI,OAAO;IAIzB;;;;;OAKG;IACI,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;IAkBhD;;;;;OAKG;IACI,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;IAKnD;;OAEG;IACI,MAAM,IAAI,MAAM;IAIvB;;;;;OAKG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;CAiBrD"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/promisebuffer.js b/node_modules/@sentry/utils/esm/promisebuffer.js index 98ee54c..fea1ed0 100644 --- a/node_modules/@sentry/utils/esm/promisebuffer.js +++ b/node_modules/@sentry/utils/esm/promisebuffer.js @@ -1,83 +1,102 @@ -import { SentryError } from './error'; -import { SyncPromise } from './syncpromise'; -/** A simple queue that holds promises. */ -var PromiseBuffer = /** @class */ (function () { - function PromiseBuffer(_limit) { - this._limit = _limit; - /** Internal set of queued Promises */ - this._buffer = []; +import { SentryError } from './error.js'; +import { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js'; + +/** + * Creates an new PromiseBuffer object with the specified limit + * @param limit max number of promises that can be stored in the buffer + */ +function makePromiseBuffer(limit) { + const buffer = []; + + function isReady() { + return limit === undefined || buffer.length < limit; + } + + /** + * Remove a promise from the queue. + * + * @param task Can be any PromiseLike + * @returns Removed promise. + */ + function remove(task) { + return buffer.splice(buffer.indexOf(task), 1)[0]; + } + + /** + * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment. + * + * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task: + * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor + * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By + * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer + * limit check. + * @returns The original promise. + */ + function add(taskProducer) { + if (!isReady()) { + return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.')); } - /** - * Says if the buffer is ready to take more requests - */ - PromiseBuffer.prototype.isReady = function () { - return this._limit === undefined || this.length() < this._limit; - }; - /** - * Add a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns The original promise. - */ - PromiseBuffer.prototype.add = function (task) { - var _this = this; - if (!this.isReady()) { - return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.')); - } - if (this._buffer.indexOf(task) === -1) { - this._buffer.push(task); + + // start the task and add its promise to the queue + const task = taskProducer(); + if (buffer.indexOf(task) === -1) { + buffer.push(task); + } + void task + .then(() => remove(task)) + // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike` + // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't + // have promises, so TS has to polyfill when down-compiling.) + .then(null, () => + remove(task).then(null, () => { + // We have to add another catch here because `remove()` starts a new promise chain. + }), + ); + return task; + } + + /** + * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or + * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to + * `true`. + * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and + * `false` otherwise + */ + function drain(timeout) { + return new SyncPromise((resolve, reject) => { + let counter = buffer.length; + + if (!counter) { + return resolve(true); + } + + // wait for `timeout` ms and then resolve to `false` (if not cancelled first) + const capturedSetTimeout = setTimeout(() => { + if (timeout && timeout > 0) { + resolve(false); } - task - .then(function () { return _this.remove(task); }) - .then(null, function () { - return _this.remove(task).then(null, function () { - // We have to add this catch here otherwise we have an unhandledPromiseRejection - // because it's a new Promise chain. - }); - }); - return task; - }; - /** - * Remove a promise to the queue. - * - * @param task Can be any PromiseLike - * @returns Removed promise. - */ - PromiseBuffer.prototype.remove = function (task) { - var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0]; - return removedTask; - }; - /** - * This function returns the number of unresolved promises in the queue. - */ - PromiseBuffer.prototype.length = function () { - return this._buffer.length; - }; - /** - * This will drain the whole queue, returns true if queue is empty or drained. - * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false. - * - * @param timeout Number in ms to wait until it resolves with false. - */ - PromiseBuffer.prototype.drain = function (timeout) { - var _this = this; - return new SyncPromise(function (resolve) { - var capturedSetTimeout = setTimeout(function () { - if (timeout && timeout > 0) { - resolve(false); - } - }, timeout); - SyncPromise.all(_this._buffer) - .then(function () { - clearTimeout(capturedSetTimeout); - resolve(true); - }) - .then(null, function () { - resolve(true); - }); - }); - }; - return PromiseBuffer; -}()); -export { PromiseBuffer }; -//# sourceMappingURL=promisebuffer.js.map \ No newline at end of file + }, timeout); + + // if all promises resolve in time, cancel the timer and resolve to `true` + buffer.forEach(item => { + void resolvedSyncPromise(item).then(() => { + if (!--counter) { + clearTimeout(capturedSetTimeout); + resolve(true); + } + }, reject); + }); + }); + } + + return { + $: buffer, + add, + drain, + }; +} + +export { makePromiseBuffer }; +//# sourceMappingURL=promisebuffer.js.map diff --git a/node_modules/@sentry/utils/esm/promisebuffer.js.map b/node_modules/@sentry/utils/esm/promisebuffer.js.map index f5e052f..2f11550 100644 --- a/node_modules/@sentry/utils/esm/promisebuffer.js.map +++ b/node_modules/@sentry/utils/esm/promisebuffer.js.map @@ -1 +1 @@ -{"version":3,"file":"promisebuffer.js","sourceRoot":"","sources":["../src/promisebuffer.ts"],"names":[],"mappings":"AAAA,OAA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O,WAAW,CAAC;IACrB,CAAC;IAED;;OAEG;IACI,8BAAM,GAAb;QACE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACI,6BAAK,GAAZ,UAAa,OAAgB;QAA7B,iBAgBC;QAfC,OAAO,IAAI,WAAW,CAAU,UAAA,OAAO;YACrC,IAAM,kBAAkB,GAAG,UAAU,CAAC;gBACpC,IAAI,OAAO,IAAI,OAAO,GAAG,CAAC,EAAE;oBAC1B,OAAO,CAAC,KAAK,CAAC,CAAC;iBAChB;YACH,CAAC,EAAE,OAAO,CAAC,CAAC;YACZ,WAAW,CAAC,GAAG,CAAC,KAAI,CAAC,OAAO,CAAC;iBAC1B,IAAI,CAAC;gBACJ,YAAY,CAAC,kBAAkB,CAAC,CAAC;gBACjC,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,EAAE;gBACV,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;IACH,oBAAC;AAAD,CAAC,AA9ED,IA8EC","sourcesContent":["import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer {\n public constructor(protected _limit?: number) {}\n\n /** Internal set of queued Promises */\n private readonly _buffer: Array> = [];\n\n /**\n * Says if the buffer is ready to take more requests\n */\n public isReady(): boolean {\n return this._limit === undefined || this.length() < this._limit;\n }\n\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns The original promise.\n */\n public add(task: PromiseLike): PromiseLike {\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n task\n .then(() => this.remove(task))\n .then(null, () =>\n this.remove(task).then(null, () => {\n // We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n public remove(task: PromiseLike): PromiseLike {\n const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n }\n\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n public length(): number {\n return this._buffer.length;\n }\n\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n public drain(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(this._buffer)\n .then(() => {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, () => {\n resolve(true);\n });\n });\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"promisebuffer.js","sources":["../../src/promisebuffer.ts"],"sourcesContent":["import { SentryError } from './error';\nimport { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';\n\nexport interface PromiseBuffer {\n // exposes the internal array so tests can assert on the state of it.\n // XXX: this really should not be public api.\n $: Array>;\n add(taskProducer: () => PromiseLike): PromiseLike;\n drain(timeout?: number): PromiseLike;\n}\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit?: number): PromiseBuffer {\n const buffer: Array> = [];\n\n function isReady(): boolean {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task: PromiseLike): PromiseLike {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer: () => PromiseLike): PromiseLike {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout?: number): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n"],"names":[],"mappings":";;;AAWA;AACA;AACA;AACA;AACA,SAAA,iBAAA,CAAA,KAAA,EAAA;AACA,EA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,GAAA,MAAA,CAAA,MAAA,CAAA;AACA;AACA,MAAA,IAAA,CAAA,OAAA,EAAA;AACA,QAAA,OAAA,OAAA,CAAA,IAAA,CAAA,CAAA;AACA,OAAA;AACA;AACA;AACA,MAAA,MAAA,kBAAA,GAAA,UAAA,CAAA,MAAA;AACA,QAAA,IAAA,OAAA,IAAA,OAAA,GAAA,CAAA,EAAA;AACA,UAAA,OAAA,CAAA,KAAA,CAAA,CAAA;AACA,SAAA;AACA,OAAA,EAAA,OAAA,CAAA,CAAA;AACA;AACA;AACA,MAAA,MAAA,CAAA,OAAA,CAAA,IAAA,IAAA;AACA,QAAA,KAAA,mBAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AACA,UAAA,IAAA,CAAA,EAAA,OAAA,EAAA;AACA,YAAA,YAAA,CAAA,kBAAA,CAAA,CAAA;AACA,YAAA,OAAA,CAAA,IAAA,CAAA,CAAA;AACA,WAAA;AACA,SAAA,EAAA,MAAA,CAAA,CAAA;AACA,OAAA,CAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA;AACA,IAAA,CAAA,EAAA,MAAA;AACA,IAAA,GAAA;AACA,IAAA,KAAA;AACA,GAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/string.d.ts b/node_modules/@sentry/utils/esm/string.d.ts deleted file mode 100644 index fa0e504..0000000 --- a/node_modules/@sentry/utils/esm/string.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Truncates given string to the maximum characters count - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ -export declare function truncate(str: string, max?: number): string; -/** - * This is basically just `trim_line` from - * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ -export declare function snipLine(line: string, colno: number): string; -/** - * Join values in array - * @param input array of values to be joined together - * @param delimiter string to be placed in-between values - * @returns Joined values - */ -export declare function safeJoin(input: any[], delimiter?: string): string; -/** - * Checks if the value matches a regex or includes the string - * @param value The string value to be checked against - * @param pattern Either a regex or a string that must be contained in value - */ -export declare function isMatchingPattern(value: string, pattern: RegExp | string): boolean; -//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/string.d.ts.map b/node_modules/@sentry/utils/esm/string.d.ts.map deleted file mode 100644 index 1dfc927..0000000 --- a/node_modules/@sentry/utils/esm/string.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,GAAG,MAAM,CAM7D;AAED;;;;;;;GAOG;AAEH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAgC5D;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAiBjE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAQlF"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/string.js b/node_modules/@sentry/utils/esm/string.js index d74e900..e5c0130 100644 --- a/node_modules/@sentry/utils/esm/string.js +++ b/node_modules/@sentry/utils/esm/string.js @@ -1,19 +1,19 @@ -import { isRegExp } from './is'; +import { isString, isRegExp } from './is.js'; + /** * Truncates given string to the maximum characters count * * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string + * @param max Maximum number of characters in truncated string (0 = unlimited) * @returns string Encoded */ -export function truncate(str, max) { - if (max === void 0) { max = 0; } - // tslint:disable-next-line:strict-type-predicates - if (typeof str !== 'string' || max === 0) { - return str; - } - return str.length <= max ? str : str.substr(0, max) + "..."; +function truncate(str, max = 0) { + if (typeof str !== 'string' || max === 0) { + return str; + } + return str.length <= max ? str : `${str.slice(0, max)}...`; } + /** * This is basically just `trim_line` from * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 @@ -22,70 +22,128 @@ export function truncate(str, max) { * @param max Maximum number of characters in truncated string * @returns string Encoded */ -export function snipLine(line, colno) { - var newLine = line; - var ll = newLine.length; - if (ll <= 150) { - return newLine; - } - if (colno > ll) { - colno = ll; // tslint:disable-line:no-parameter-reassignment - } - var start = Math.max(colno - 60, 0); - if (start < 5) { - start = 0; - } - var end = Math.min(start + 140, ll); - if (end > ll - 5) { - end = ll; - } - if (end === ll) { - start = Math.max(end - 140, 0); - } - newLine = newLine.slice(start, end); - if (start > 0) { - newLine = "'{snip} " + newLine; - } - if (end < ll) { - newLine += ' {snip}'; - } +function snipLine(line, colno) { + let newLine = line; + const lineLength = newLine.length; + if (lineLength <= 150) { return newLine; + } + if (colno > lineLength) { + // eslint-disable-next-line no-param-reassign + colno = lineLength; + } + + let start = Math.max(colno - 60, 0); + if (start < 5) { + start = 0; + } + + let end = Math.min(start + 140, lineLength); + if (end > lineLength - 5) { + end = lineLength; + } + if (end === lineLength) { + start = Math.max(end - 140, 0); + } + + newLine = newLine.slice(start, end); + if (start > 0) { + newLine = `'{snip} ${newLine}`; + } + if (end < lineLength) { + newLine += ' {snip}'; + } + + return newLine; } + /** * Join values in array * @param input array of values to be joined together * @param delimiter string to be placed in-between values * @returns Joined values */ -export function safeJoin(input, delimiter) { - if (!Array.isArray(input)) { - return ''; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function safeJoin(input, delimiter) { + if (!Array.isArray(input)) { + return ''; + } + + const output = []; + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let i = 0; i < input.length; i++) { + const value = input[i]; + try { + output.push(String(value)); + } catch (e) { + output.push('[value cannot be serialized]'); } - var output = []; - // tslint:disable-next-line:prefer-for-of - for (var i = 0; i < input.length; i++) { - var value = input[i]; - try { - output.push(String(value)); - } - catch (e) { - output.push('[value cannot be serialized]'); - } - } - return output.join(delimiter); + } + + return output.join(delimiter); } + /** - * Checks if the value matches a regex or includes the string - * @param value The string value to be checked against - * @param pattern Either a regex or a string that must be contained in value + * Checks if the given value matches a regex or string + * + * @param value The string to test + * @param pattern Either a regex or a string against which `value` will be matched + * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match + * `pattern` if it contains `pattern`. Only applies to string-type patterns. */ -export function isMatchingPattern(value, pattern) { - if (isRegExp(pattern)) { - return pattern.test(value); - } - if (typeof pattern === 'string') { - return value.indexOf(pattern) !== -1; - } +function isMatchingPattern( + value, + pattern, + requireExactStringMatch = false, +) { + if (!isString(value)) { return false; + } + + if (isRegExp(pattern)) { + return pattern.test(value); + } + if (isString(pattern)) { + return requireExactStringMatch ? value === pattern : value.includes(pattern); + } + + return false; +} + +/** + * Test the given string against an array of strings and regexes. By default, string matching is done on a + * substring-inclusion basis rather than a strict equality basis + * + * @param testString The string to test + * @param patterns The patterns against which to test the string + * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to + * count. If false, `testString` will match a string pattern if it contains that pattern. + * @returns + */ +function stringMatchesSomePattern( + testString, + patterns = [], + requireExactStringMatch = false, +) { + return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch)); +} + +/** + * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to + * `new RegExp()`. + * + * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime + * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node + * 12+). + * + * @param regexString The string to escape + * @returns An version of the string with all special regex characters escaped + */ +function escapeStringForRegex(regexString) { + // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems + // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20. + return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d'); } -//# sourceMappingURL=string.js.map \ No newline at end of file + +export { escapeStringForRegex, isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate }; +//# sourceMappingURL=string.js.map diff --git a/node_modules/@sentry/utils/esm/string.js.map b/node_modules/@sentry/utils/esm/string.js.map index fe4c413..433671f 100644 --- a/node_modules/@sentry/utils/esm/string.js.map +++ b/node_modules/@sentry/utils/esm/string.js.map @@ -1 +1 @@ -{"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEhC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,GAAe;IAAf,oBAAA,EAAA,OAAe;IACnD,kDAAkD;IAClD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,CAAC,EAAE;QACxC,OAAO,GAAG,CAAC;KACZ;IACD,OAAO,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAI,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,QAAK,CAAC;AAC9D,CAAC;AAED;;;;;;;GAOG;AAEH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAa;IAClD,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAC1B,IAAI,EAAE,IAAI,GAAG,EAAE;QACb,OAAO,OAAO,CAAC;KAChB;IACD,IAAI,KAAK,GAAG,EAAE,EAAE;QACd,KAAK,GAAG,EAAE,CAAC,CAAC,gDAAgD;KAC7D;IAED,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IACpC,IAAI,KAAK,GAAG,CAAC,EAAE;QACb,KAAK,G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AAI,QAAQ,CAAC,OAAO,CAAC,EAAE;QACrB,OAAQ,OAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxC;IACD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;KACtC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { isRegExp } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n colno = ll; // tslint:disable-line:no-parameter-reassignment\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n"]} \ No newline at end of file +{"version":3,"file":"string.js","sources":["../../src/string.ts"],"sourcesContent":["import { isRegExp, isString } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nexport function isMatchingPattern(\n value: string,\n pattern: RegExp | string,\n requireExactStringMatch: boolean = false,\n): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nexport function stringMatchesSomePattern(\n testString: string,\n patterns: Array = [],\n requireExactStringMatch: boolean = false,\n): boolean {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString: string): string {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g,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AA,CAAA,KAAA,CAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA,QAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,OAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA;AACA,GAAA;AACA,EAAA,IAAA,QAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,uBAAA,GAAA,KAAA,KAAA,OAAA,GAAA,KAAA,CAAA,QAAA,CAAA,OAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,KAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,wBAAA;AACA,EAAA,UAAA;AACA,EAAA,QAAA,GAAA,EAAA;AACA,EAAA,uBAAA,GAAA,KAAA;AACA,EAAA;AACA,EAAA,OAAA,QAAA,CAAA,IAAA,CAAA,OAAA,IAAA,iBAAA,CAAA,UAAA,EAAA,OAAA,EAAA,uBAAA,CAAA,CAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,oBAAA,CAAA,WAAA,EAAA;AACA;AACA;AACA,EAAA,OAAA,WAAA,CAAA,OAAA,CAAA,qBAAA,EAAA,MAAA,CAAA,CAAA,OAAA,CAAA,IAAA,EAAA,OAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/supports.d.ts b/node_modules/@sentry/utils/esm/supports.d.ts deleted file mode 100644 index 8ec9ea8..0000000 --- a/node_modules/@sentry/utils/esm/supports.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Tells whether current environment supports ErrorEvent objects - * {@link supportsErrorEvent}. - * - * @returns Answer to the given question. - */ -export declare function supportsErrorEvent(): boolean; -/** - * Tells whether current environment supports DOMError objects - * {@link supportsDOMError}. - * - * @returns Answer to the given question. - */ -export declare function supportsDOMError(): boolean; -/** - * Tells whether current environment supports DOMException objects - * {@link supportsDOMException}. - * - * @returns Answer to the given question. - */ -export declare function supportsDOMException(): boolean; -/** - * Tells whether current environment supports Fetch API - * {@link supportsFetch}. - * - * @returns Answer to the given question. - */ -export declare function supportsFetch(): boolean; -/** - * Tells whether current environment supports Fetch API natively - * {@link supportsNativeFetch}. - * - * @returns true if `window.fetch` is natively implemented, false otherwise - */ -export declare function supportsNativeFetch(): boolean; -/** - * Tells whether current environment supports ReportingObserver API - * {@link supportsReportingObserver}. - * - * @returns Answer to the given question. - */ -export declare function supportsReportingObserver(): boolean; -/** - * Tells whether current environment supports Referrer Policy API - * {@link supportsReferrerPolicy}. - * - * @returns Answer to the given question. - */ -export declare function supportsReferrerPolicy(): boolean; -/** - * Tells whether current environment supports History API - * {@link supportsHistory}. - * - * @returns Answer to the given question. - */ -export declare function supportsHistory(): boolean; -//# sourceMappingURL=supports.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/supports.d.ts.map b/node_modules/@sentry/utils/esm/supports.d.ts.map deleted file mode 100644 index 9a743f8..0000000 --- a/node_modules/@sentry/utils/esm/supports.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"supports.d.ts","sourceRoot":"","sources":["../src/supports.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAQ5C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAY1C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAQ9C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAgBvC;AAQD;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAiC7C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAGnD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAmBhD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAWzC"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/supports.js b/node_modules/@sentry/utils/esm/supports.js index df3c927..16b2f82 100644 --- a/node_modules/@sentry/utils/esm/supports.js +++ b/node_modules/@sentry/utils/esm/supports.js @@ -1,173 +1,181 @@ -import { logger } from './logger'; -import { getGlobalObject } from './misc'; +import { logger } from './logger.js'; +import { getGlobalObject } from './worldwide.js'; + +// eslint-disable-next-line deprecation/deprecation +const WINDOW = getGlobalObject(); + /** * Tells whether current environment supports ErrorEvent objects * {@link supportsErrorEvent}. * * @returns Answer to the given question. */ -export function supportsErrorEvent() { - try { - // tslint:disable:no-unused-expression - new ErrorEvent(''); - return true; - } - catch (e) { - return false; - } +function supportsErrorEvent() { + try { + new ErrorEvent(''); + return true; + } catch (e) { + return false; + } } + /** * Tells whether current environment supports DOMError objects * {@link supportsDOMError}. * * @returns Answer to the given question. */ -export function supportsDOMError() { - try { - // It really needs 1 argument, not 0. - // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError': - // 1 argument required, but only 0 present. - // @ts-ignore - // tslint:disable:no-unused-expression - new DOMError(''); - return true; - } - catch (e) { - return false; - } +function supportsDOMError() { + try { + // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError': + // 1 argument required, but only 0 present. + // @ts-ignore It really needs 1 argument, not 0. + new DOMError(''); + return true; + } catch (e) { + return false; + } } + /** * Tells whether current environment supports DOMException objects * {@link supportsDOMException}. * * @returns Answer to the given question. */ -export function supportsDOMException() { - try { - // tslint:disable:no-unused-expression - new DOMException(''); - return true; - } - catch (e) { - return false; - } +function supportsDOMException() { + try { + new DOMException(''); + return true; + } catch (e) { + return false; + } } + /** * Tells whether current environment supports Fetch API * {@link supportsFetch}. * * @returns Answer to the given question. */ -export function supportsFetch() { - if (!('fetch' in getGlobalObject())) { - return false; - } - try { - // tslint:disable-next-line:no-unused-expression - new Headers(); - // tslint:disable-next-line:no-unused-expression - new Request(''); - // tslint:disable-next-line:no-unused-expression - new Response(); - return true; - } - catch (e) { - return false; - } +function supportsFetch() { + if (!('fetch' in WINDOW)) { + return false; + } + + try { + new Headers(); + new Request('http://www.example.com'); + new Response(); + return true; + } catch (e) { + return false; + } } /** * isNativeFetch checks if the given function is a native implementation of fetch() */ +// eslint-disable-next-line @typescript-eslint/ban-types function isNativeFetch(func) { - return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); + return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); } + /** * Tells whether current environment supports Fetch API natively * {@link supportsNativeFetch}. * * @returns true if `window.fetch` is natively implemented, false otherwise */ -export function supportsNativeFetch() { - if (!supportsFetch()) { - return false; - } - var global = getGlobalObject(); - // Fast path to avoid DOM I/O - // tslint:disable-next-line:no-unbound-method - if (isNativeFetch(global.fetch)) { - return true; - } - // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) - // so create a "pure" iframe to see if that has native fetch - var result = false; - var doc = global.document; - if (doc) { - try { - var sandbox = doc.createElement('iframe'); - sandbox.hidden = true; - doc.head.appendChild(sandbox); - if (sandbox.contentWindow && sandbox.contentWindow.fetch) { - // tslint:disable-next-line:no-unbound-method - result = isNativeFetch(sandbox.contentWindow.fetch); - } - doc.head.removeChild(sandbox); - } - catch (err) { - logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); - } +function supportsNativeFetch() { + if (!supportsFetch()) { + return false; + } + + // Fast path to avoid DOM I/O + // eslint-disable-next-line @typescript-eslint/unbound-method + if (isNativeFetch(WINDOW.fetch)) { + return true; + } + + // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) + // so create a "pure" iframe to see if that has native fetch + let result = false; + const doc = WINDOW.document; + // eslint-disable-next-line deprecation/deprecation + if (doc && typeof (doc.createElement ) === 'function') { + try { + const sandbox = doc.createElement('iframe'); + sandbox.hidden = true; + doc.head.appendChild(sandbox); + if (sandbox.contentWindow && sandbox.contentWindow.fetch) { + // eslint-disable-next-line @typescript-eslint/unbound-method + result = isNativeFetch(sandbox.contentWindow.fetch); + } + doc.head.removeChild(sandbox); + } catch (err) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); } - return result; + } + + return result; } + /** * Tells whether current environment supports ReportingObserver API * {@link supportsReportingObserver}. * * @returns Answer to the given question. */ -export function supportsReportingObserver() { - // tslint:disable-next-line: no-unsafe-any - return 'ReportingObserver' in getGlobalObject(); +function supportsReportingObserver() { + return 'ReportingObserver' in WINDOW; } + /** * Tells whether current environment supports Referrer Policy API * {@link supportsReferrerPolicy}. * * @returns Answer to the given question. */ -export function supportsReferrerPolicy() { - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default - // https://caniuse.com/#feat=referrer-policy - // It doesn't. And it throw exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - if (!supportsFetch()) { - return false; - } - try { - // tslint:disable:no-unused-expression - new Request('_', { - referrerPolicy: 'origin', - }); - return true; - } - catch (e) { - return false; - } +function supportsReferrerPolicy() { + // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default' + // (see https://caniuse.com/#feat=referrer-policy), + // it doesn't. And it throws an exception instead of ignoring this parameter... + // REF: https://github.com/getsentry/raven-js/issues/1233 + + if (!supportsFetch()) { + return false; + } + + try { + new Request('_', { + referrerPolicy: 'origin' , + }); + return true; + } catch (e) { + return false; + } } + /** * Tells whether current environment supports History API * {@link supportsHistory}. * * @returns Answer to the given question. */ -export function supportsHistory() { - // NOTE: in Chrome App environment, touching history.pushState, *even inside - // a try/catch block*, will cause Chrome to output an error to console.error - // borrowed from: https://github.com/angular/angular.js/pull/13945/files - var global = getGlobalObject(); - var chrome = global.chrome; - // tslint:disable-next-line:no-unsafe-any - var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; - var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState; - return !isChromePackagedApp && hasHistoryApi; +function supportsHistory() { + // NOTE: in Chrome App environment, touching history.pushState, *even inside + // a try/catch block*, will cause Chrome to output an error to console.error + // borrowed from: https://github.com/angular/angular.js/pull/13945/files + /* eslint-disable @typescript-eslint/no-unsafe-member-access */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const chrome = (WINDOW ).chrome; + const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; + /* eslint-enable @typescript-eslint/no-unsafe-member-access */ + const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState; + + return !isChromePackagedApp && hasHistoryApi; } -//# sourceMappingURL=supports.js.map \ No newline at end of file + +export { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver }; +//# sourceMappingURL=supports.js.map diff --git a/node_modules/@sentry/utils/esm/supports.js.map b/node_modules/@sentry/utils/esm/supports.js.map index aa0c0c5..f0ff43a 100644 --- a/node_modules/@sentry/utils/esm/supports.js.map +++ b/node_modules/@sentry/utils/esm/supports.js.map @@ -1 +1 @@ -{"version":3,"file":"supports.js","sourceRoot":"","sources":["../src/supports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IAChC,IAAI;QACF,sCAAsC;QACtC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC;KACb;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;IAC9B,IAAI;QACF,qCAAqC;QACrC,qEAAqE;QACrE,2CAA2C;QAC3C,aAAa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C;IACtC,yCAAyC;IACzC,IAAM,mBAAmB,GAAG,MAAM,IAAI,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;IACvE,IAAM,aAAa,GAAG,SAAS,IAAI,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;IAEzG,OAAO,CAAC,mBAAmB,IAAI,aAAa,CAAC;AAC/C,CAAC","sourcesContent":["import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // It really needs 1 argument, not 0.\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore\n // tslint:disable:no-unused-expression\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n // tslint:disable:no-unused-expression\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n // tslint:disable-next-line:no-unused-expression\n new Headers();\n // tslint:disable-next-line:no-unused-expression\n new Request('');\n // tslint:disable-next-line:no-unused-expression\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\nfunction isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // tslint:disable-next-line:no-unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n if (doc) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // tslint:disable-next-line:no-unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n // tslint:disable-next-line: no-unsafe-any\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n // tslint:disable:no-unused-expression\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n const chrome = (global as any).chrome;\n // tslint:disable-next-line:no-unsafe-any\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n"]} \ No newline at end of file +{"version":3,"file":"supports.js","sources":["../../src/supports.ts"],"sourcesContent":["import { logger } from './logger';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n __DEBUG_BUILD__ &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (WINDOW as any).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n"],"names":[],"mappings":";;;AAGA;AACA,MAAA,MAAA,GAAA,eAAA,EAAA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,kBAAA,GAAA;AACA,EAAA,IAAA;AACA,IAAA,IAAA,UAAA,CAAA,EAAA,CAAA,CAAA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,gBAAA,GAAA;AACA,EAAA,IAAA;AACA;AACA;AACA;AACA,IAAA,IAAA,QAAA,CAAA,EAAA,CAAA,CAAA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,oBAA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A,GAAA,MAAA,CAAA;AACA,EAAA,MAAA,mBAAA,GAAA,MAAA,IAAA,MAAA,CAAA,GAAA,IAAA,MAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AACA;AACA,EAAA,MAAA,aAAA,GAAA,SAAA,IAAA,MAAA,IAAA,CAAA,CAAA,MAAA,CAAA,OAAA,CAAA,SAAA,IAAA,CAAA,CAAA,MAAA,CAAA,OAAA,CAAA,YAAA,CAAA;AACA;AACA,EAAA,OAAA,CAAA,mBAAA,IAAA,aAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/syncpromise.d.ts b/node_modules/@sentry/utils/esm/syncpromise.d.ts deleted file mode 100644 index d977816..0000000 --- a/node_modules/@sentry/utils/esm/syncpromise.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Thenable class that behaves like a Promise and follows it's interface - * but is not async internally - */ -declare class SyncPromise implements PromiseLike { - private _state; - private _handlers; - private _value; - constructor(executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void); - /** JSDoc */ - toString(): string; - /** JSDoc */ - static resolve(value: T | PromiseLike): PromiseLike; - /** JSDoc */ - static reject(reason?: any): PromiseLike; - /** JSDoc */ - static all(collection: Array>): PromiseLike; - /** JSDoc */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): PromiseLike; - /** JSDoc */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): PromiseLike; - /** JSDoc */ - finally(onfinally?: (() => void) | null): PromiseLike; - /** JSDoc */ - private readonly _resolve; - /** JSDoc */ - private readonly _reject; - /** JSDoc */ - private readonly _setResult; - /** JSDoc */ - private readonly _attachHandler; - /** JSDoc */ - private readonly _executeHandlers; -} -export { SyncPromise }; -//# sourceMappingURL=syncpromise.d.ts.map \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/syncpromise.d.ts.map b/node_modules/@sentry/utils/esm/syncpromise.d.ts.map deleted file mode 100644 index 443fe7c..0000000 --- a/node_modules/@sentry/utils/esm/syncpromise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"syncpromise.d.ts","sourceRoot":"","sources":["../src/syncpromise.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,cAAM,WAAW,CAAC,CAAC,CAAE,YAAW,WAAW,CAAC,CAAC,CAAC;IAC5C,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,SAAS,CAGT;IACR,OAAO,CAAC,MAAM,CAAM;gBAGlB,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,IAAI,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI;IAS1G,YAAY;IACL,QAAQ,IAAI,MAAM;IAIzB,YAAY;WACE,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;IAMnE,YAAY;WACE,MAAM,CAAC,CAAC,GAAG,KAAK,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC;IAM7D,YAAY;WACE,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC;IA+BnF,YAAY;IACL,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,EACxC,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,EACrE,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,GACtE,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAmCnC,YAAY;IACL,KAAK,CAAC,OAAO,GAAG,KAAK,EAC1B,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,GACpE,WAAW,CAAC,CAAC,GAAG,OAAO,CAAC;IAI3B,YAAY;IACL,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC;IAgC9E,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAEvB;IAEF,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,OAAO,CAEtB;IAEF,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,UAAU,CAczB;IAGF,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,cAAc,CAQ7B;IAEF,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAqB/B;CACH;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/syncpromise.js b/node_modules/@sentry/utils/esm/syncpromise.js index 74bc8b8..d1f680a 100644 --- a/node_modules/@sentry/utils/esm/syncpromise.js +++ b/node_modules/@sentry/utils/esm/syncpromise.js @@ -1,193 +1,191 @@ -import { isThenable } from './is'; +import { isThenable } from './is.js'; + +/* eslint-disable @typescript-eslint/explicit-function-return-type */ + /** SyncPromise internal states */ -var States; -(function (States) { - /** Pending */ - States["PENDING"] = "PENDING"; - /** Resolved / OK */ - States["RESOLVED"] = "RESOLVED"; - /** Rejected / Error */ - States["REJECTED"] = "REJECTED"; +var States; (function (States) { + /** Pending */ + const PENDING = 0; States[States["PENDING"] = PENDING] = "PENDING"; + /** Resolved / OK */ + const RESOLVED = 1; States[States["RESOLVED"] = RESOLVED] = "RESOLVED"; + /** Rejected / Error */ + const REJECTED = 2; States[States["REJECTED"] = REJECTED] = "REJECTED"; })(States || (States = {})); + +// Overloads so we can call resolvedSyncPromise without arguments and generic argument + +/** + * Creates a resolved sync promise. + * + * @param value the value to resolve the promise with + * @returns the resolved sync promise + */ +function resolvedSyncPromise(value) { + return new SyncPromise(resolve => { + resolve(value); + }); +} + +/** + * Creates a rejected sync promise. + * + * @param value the value to reject the promise with + * @returns the rejected sync promise + */ +function rejectedSyncPromise(reason) { + return new SyncPromise((_, reject) => { + reject(reason); + }); +} + /** * Thenable class that behaves like a Promise and follows it's interface * but is not async internally */ -var SyncPromise = /** @class */ (function () { - function SyncPromise(executor) { - var _this = this; - this._state = States.PENDING; - this._handlers = []; - /** JSDoc */ - this._resolve = function (value) { - _this._setResult(States.RESOLVED, value); - }; - /** JSDoc */ - this._reject = function (reason) { - _this._setResult(States.REJECTED, reason); - }; - /** JSDoc */ - this._setResult = function (state, value) { - if (_this._state !== States.PENDING) { - return; - } - if (isThenable(value)) { - value.then(_this._resolve, _this._reject); - return; - } - _this._state = state; - _this._value = value; - _this._executeHandlers(); - }; - // TODO: FIXME - /** JSDoc */ - this._attachHandler = function (handler) { - _this._handlers = _this._handlers.concat(handler); - _this._executeHandlers(); - }; - /** JSDoc */ - this._executeHandlers = function () { - if (_this._state === States.PENDING) { - return; - } - if (_this._state === States.REJECTED) { - _this._handlers.forEach(function (handler) { - if (handler.onrejected) { - handler.onrejected(_this._value); - } - }); +class SyncPromise { + __init() {this._state = States.PENDING;} + __init2() {this._handlers = [];} + + constructor( + executor, + ) {;SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);SyncPromise.prototype.__init5.call(this);SyncPromise.prototype.__init6.call(this); + try { + executor(this._resolve, this._reject); + } catch (e) { + this._reject(e); + } + } + + /** JSDoc */ + then( + onfulfilled, + onrejected, + ) { + return new SyncPromise((resolve, reject) => { + this._handlers.push([ + false, + result => { + if (!onfulfilled) { + // TODO: ¯\_(ツ)_/¯ + // TODO: FIXME + resolve(result ); + } else { + try { + resolve(onfulfilled(result)); + } catch (e) { + reject(e); } - else { - _this._handlers.forEach(function (handler) { - if (handler.onfulfilled) { - // tslint:disable-next-line:no-unsafe-any - handler.onfulfilled(_this._value); - } - }); + } + }, + reason => { + if (!onrejected) { + reject(reason); + } else { + try { + resolve(onrejected(reason)); + } catch (e) { + reject(e); } - _this._handlers = []; - }; - try { - executor(this._resolve, this._reject); - } - catch (e) { - this._reject(e); + } + }, + ]); + this._executeHandlers(); + }); + } + + /** JSDoc */ + catch( + onrejected, + ) { + return this.then(val => val, onrejected); + } + + /** JSDoc */ + finally(onfinally) { + return new SyncPromise((resolve, reject) => { + let val; + let isRejected; + + return this.then( + value => { + isRejected = false; + val = value; + if (onfinally) { + onfinally(); + } + }, + reason => { + isRejected = true; + val = reason; + if (onfinally) { + onfinally(); + } + }, + ).then(() => { + if (isRejected) { + reject(val); + return; } + + resolve(val ); + }); + }); + } + + /** JSDoc */ + __init3() {this._resolve = (value) => { + this._setResult(States.RESOLVED, value); + };} + + /** JSDoc */ + __init4() {this._reject = (reason) => { + this._setResult(States.REJECTED, reason); + };} + + /** JSDoc */ + __init5() {this._setResult = (state, value) => { + if (this._state !== States.PENDING) { + return; } - /** JSDoc */ - SyncPromise.prototype.toString = function () { - return '[object SyncPromise]'; - }; - /** JSDoc */ - SyncPromise.resolve = function (value) { - return new SyncPromise(function (resolve) { - resolve(value); - }); - }; - /** JSDoc */ - SyncPromise.reject = function (reason) { - return new SyncPromise(function (_, reject) { - reject(reason); - }); - }; - /** JSDoc */ - SyncPromise.all = function (collection) { - return new SyncPromise(function (resolve, reject) { - if (!Array.isArray(collection)) { - reject(new TypeError("Promise.all requires an array as input.")); - return; - } - if (collection.length === 0) { - resolve([]); - return; - } - var counter = collection.length; - var resolvedCollection = []; - collection.forEach(function (item, index) { - SyncPromise.resolve(item) - .then(function (value) { - resolvedCollection[index] = value; - counter -= 1; - if (counter !== 0) { - return; - } - resolve(resolvedCollection); - }) - .then(null, reject); - }); - }); - }; - /** JSDoc */ - SyncPromise.prototype.then = function (onfulfilled, onrejected) { - var _this = this; - return new SyncPromise(function (resolve, reject) { - _this._attachHandler({ - onfulfilled: function (result) { - if (!onfulfilled) { - // TODO: ¯\_(ツ)_/¯ - // TODO: FIXME - resolve(result); - return; - } - try { - resolve(onfulfilled(result)); - return; - } - catch (e) { - reject(e); - return; - } - }, - onrejected: function (reason) { - if (!onrejected) { - reject(reason); - return; - } - try { - resolve(onrejected(reason)); - return; - } - catch (e) { - reject(e); - return; - } - }, - }); - }); - }; - /** JSDoc */ - SyncPromise.prototype.catch = function (onrejected) { - return this.then(function (val) { return val; }, onrejected); - }; - /** JSDoc */ - SyncPromise.prototype.finally = function (onfinally) { - var _this = this; - return new SyncPromise(function (resolve, reject) { - var val; - var isRejected; - return _this.then(function (value) { - isRejected = false; - val = value; - if (onfinally) { - onfinally(); - } - }, function (reason) { - isRejected = true; - val = reason; - if (onfinally) { - onfinally(); - } - }).then(function () { - if (isRejected) { - reject(val); - return; - } - // tslint:disable-next-line:no-unsafe-any - resolve(val); - }); - }); - }; - return SyncPromise; -}()); -export { SyncPromise }; -//# sourceMappingURL=syncpromise.js.map \ No newline at end of file + + if (isThenable(value)) { + void (value ).then(this._resolve, this._reject); + return; + } + + this._state = state; + this._value = value; + + this._executeHandlers(); + };} + + /** JSDoc */ + __init6() {this._executeHandlers = () => { + if (this._state === States.PENDING) { + return; + } + + const cachedHandlers = this._handlers.slice(); + this._handlers = []; + + cachedHandlers.forEach(handler => { + if (handler[0]) { + return; + } + + if (this._state === States.RESOLVED) { + // eslint-disable-next-line @typescript-eslint/no-floating-promises + handler[1](this._value ); + } + + if (this._state === States.REJECTED) { + handler[2](this._value); + } + + handler[0] = true; + }); + };} +} + +export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise }; +//# sourceMappingURL=syncpromise.js.map diff --git a/node_modules/@sentry/utils/esm/syncpromise.js.map b/node_modules/@sentry/utils/esm/syncpromise.js.map index 5c78d36..6c36ca7 100644 --- a/node_modules/@sentry/utils/esm/syncpromise.js.map +++ b/node_modules/@sentry/utils/esm/syncpromise.js.map @@ -1 +1 @@ -{"version":3,"file":"syncpromise.js","sourceRoot":"","sources":["../src/syncpromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,kCAAkC;AAClC,IAAK,MAOJ;AAPD,WAAK,MAAM;IACT,cAAc;IACd,6BAAmB,CAAA;IACnB,oBAAoB;IACpB,+BAAqB,CAAA;IACrB,uBAAuB;IACvB,+BAAqB,CAAA;AACvB,CAAC,EAPI,MAAM,KAAN,MAAM,QAOV;AAED;;;GAGG;AACH;IAQE,qBACE,QAAwG;QAD1G,iBAQC;QAfO,WAAM,GAAW,MAAM,CAAC,OAAO,CAAC;QAChC,cAAS,GAGZ,EAAE,CAAC;QA+IR,YAAY;QACK,aAAQ,GAAG,UAAC,KAAiC;YAC5D,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC1C,CAAC,CAAC;QAEF,YAAY;QACK,YAAO,GAAG,UAAC,MAAY;YACtC,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC,CAAC;QAEF,YAAY;QACK,eAAU,GAAG,UAAC,KAAa,EAAE,KAAgC;YAC5E,IAAI,KAAI,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE;gBAClC,OAAO;aACR;YAED,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;gBACpB,KAAwB,CAAC,IAAI,CAAC,KAAI,CAAC,QAAQ,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;gBAC5D,OAAO;aACR;YAED,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,KAAI,CAAC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gBACJ,UAAU,GAAG,IAAI,CAAC;gBAClB,GAAG,GAAG,MAAM,CAAC;gBACb,IAAI,SAAS,EAAE;oBACb,SAAS,EAAE,CAAC;iBACb;YACH,CAAC,CACF,CAAC,IAAI,CAAC;gBACL,IAAI,UAAU,EAAE;oBACd,MAAM,CAAC,GAAG,CAAC,CAAC;oBACZ,OAAO;iBACR;gBAED,yCAAyC;gBACzC,OAAO,CAAC,GAAG,CAAC,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAgEH,kBAAC;AAAD,CAAC,AAlND,IAkNC;AAED,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n /** Pending */\n PENDING = 'PENDING',\n /** Resolved / OK */\n RESOLVED = 'RESOLVED',\n /** Rejected / Error */\n REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<{\n onfulfilled?: ((value: T) => T | PromiseLike) | null;\n onrejected?: ((reason: any) => any) | null;\n }> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public toString(): string {\n return '[object SyncPromise]';\n }\n\n /** JSDoc */\n public static resolve(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n }\n\n /** JSDoc */\n public static reject(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n }\n\n /** JSDoc */\n public static all(collection: Array>): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n if (!Array.isArray(collection)) {\n reject(new TypeError(`Promise.all requires an array as input.`));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n let counter = collection.length;\n const resolvedCollection: U[] = [];\n\n collection.forEach((item, index) => {\n SyncPromise.resolve(item)\n .then(value => {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._attachHandler({\n onfulfilled: result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: reason => {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n // tslint:disable-next-line:no-unsafe-any\n resolve(val);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n // TODO: FIXME\n /** JSDoc */\n private readonly _attachHandler = (handler: {\n /** JSDoc */\n onfulfilled?(value: T): any;\n /** JSDoc */\n onrejected?(reason: any): any;\n }) => {\n this._handlers = this._handlers.concat(handler);\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n if (this._state === States.REJECTED) {\n this._handlers.forEach(handler => {\n if (handler.onrejected) {\n handler.onrejected(this._value);\n }\n });\n } else {\n this._handlers.forEach(handler => {\n if (handler.onfulfilled) {\n // tslint:disable-next-line:no-unsafe-any\n handler.onfulfilled(this._value);\n }\n });\n }\n\n this._handlers = [];\n };\n}\n\nexport { SyncPromise };\n"]} \ No newline at end of file +{"version":3,"file":"syncpromise.js","sources":["../../src/syncpromise.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst enum States {\n /** Pending */\n PENDING = 0,\n /** Resolved / OK */\n RESOLVED = 1,\n /** Rejected / Error */\n REJECTED = 2,\n}\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\nexport function resolvedSyncPromise(): PromiseLike;\nexport function resolvedSyncPromise(value: T | PromiseLike): PromiseLike;\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise(value?: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val as unknown as any);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value as unknown as any);\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };\n}\n\nexport { SyncPromise };\n"],"names":[],"mappings":";;AAAA;AAKA;AACA;AACA,IAAA,MAAA,CAAA,CAAA,CAAA,UAAA,MAAA,EAAA;AACA;AACA,EAAA,MAAA,OAAA,GAAA,CAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,SAAA,CAAA,GAAA,OAAA,CAAA,GAAA,SAAA,CAAA;AACA;AACA,EAAA,MAAA,QAAA,GAAA,CAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,UAAA,CAAA,GAAA,QAAA,CAAA,GAAA,UAAA,CAAA;AACA;AACA,EAAA,MAAA,QAAA,GAAA,CAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,UAAA,CAAA,GAAA,QAAA,CAAA,GAAA,UAAA,CAAA;AACA,CAAA,EAAA,MAAA,KAAA,MAAA,GAAA,EAAA,CAAA,CAAA,CAAA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,mBAAA,CAAA,KAAA,EAAA;AACA,EAAA,OAAA,IAAA,WAAA,CAAA,OAAA,IAAA;AACA,IAAA,OAAA,CAAA,KAAA,CAAA,CAAA;AACA,GAAA,CAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,mBAAA,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AAA,CAAA;AACA,IAAA,CAAA;AACA;AACA;AACA,IAAA,OAAA,GAAA,CAAA,IAAA,CAAA,gBAAA,GAAA,MAAA;AACA,IAAA,IAAA,IAAA,CAAA,MAAA,KAAA,MAAA,CAAA,OAAA,EAAA;AACA,MAAA,OAAA;AACA,KAAA;AACA;AACA,IAAA,MAAA,cAAA,GAAA,IAAA,CAAA,SAAA,CAAA,KAAA,EAAA,CAAA;AACA,IAAA,IAAA,CAAA,SAAA,GAAA,EAAA,CAAA;AACA;AACA,IAAA,cAAA,CAAA,OAAA,CAAA,OAAA,IAAA;AACA,MAAA,IAAA,OAAA,CAAA,CAAA,CAAA,EAAA;AACA,QAAA,OAAA;AACA,OAAA;AACA;AACA,MAAA,IAAA,IAAA,CAAA,MAAA,KAAA,MAAA,CAAA,QAAA,EAAA;AACA;AACA,QAAA,OAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,MAAA,EAAA,CAAA;AACA,OAAA;AACA;AACA,MAAA,IAAA,IAAA,CAAA,MAAA,KAAA,MAAA,CAAA,QAAA,EAAA;AACA,QAAA,OAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,MAAA,CAAA,CAAA;AACA,OAAA;AACA;AACA,MAAA,OAAA,CAAA,CAAA,CAAA,GAAA,IAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,IAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/package.json b/node_modules/@sentry/utils/package.json index 4a5b36c..f6dda94 100644 --- a/node_modules/@sentry/utils/package.json +++ b/node_modules/@sentry/utils/package.json @@ -1,84 +1,53 @@ { - "_args": [ - [ - "@sentry/utils@5.14.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "@sentry/utils@5.14.1", - "_id": "@sentry/utils@5.14.1", + "_from": "@sentry/utils@7.31.1", + "_id": "@sentry/utils@7.31.1", "_inBundle": false, - "_integrity": "sha1-V3qd17X0s0NujihH0FhUfqsu1cQ=", + "_integrity": "sha512-ZsIPq29aNdP9q3R7qIzJhZ9WW+4DzE9g5SfGwx3UjTIxoRRBfdUJUbf7S+LKEdvCkKbyoDt6FLt5MiSJV43xBA==", "_location": "/@sentry/utils", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "@sentry/utils@5.14.1", + "raw": "@sentry/utils@7.31.1", "name": "@sentry/utils", "escapedName": "@sentry%2futils", "scope": "@sentry", - "rawSpec": "5.14.1", + "rawSpec": "7.31.1", "saveSpec": null, - "fetchSpec": "5.14.1" + "fetchSpec": "7.31.1" }, "_requiredBy": [ - "/@sentry/apm", - "/@sentry/browser", "/@sentry/core", - "/@sentry/hub", "/@sentry/node" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/@sentry/utils/-/utils-5.14.1.tgz", - "_spec": "5.14.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.31.1.tgz", + "_shasum": "bdc988de603318a30ff247d5702c2f9ac81255cb", + "_spec": "@sentry/utils@7.31.1", + "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", "author": { "name": "Sentry" }, "bugs": { "url": "https://github.com/getsentry/sentry-javascript/issues" }, + "bundleDependencies": false, "dependencies": { - "@sentry/types": "5.14.1", + "@sentry/types": "7.31.1", "tslib": "^1.9.3" }, + "deprecated": false, "description": "Utilities for all Sentry JavaScript SDKs", "devDependencies": { - "chai": "^4.1.2", - "jest": "^24.7.1", - "npm-run-all": "^4.1.2", - "prettier": "^1.17.0", - "prettier-check": "^2.0.0", - "rimraf": "^2.6.3", - "tslint": "^5.16.0", - "typescript": "^3.4.5" + "@types/array.prototype.flat": "^1.2.1", + "array.prototype.flat": "^1.3.0", + "chai": "^4.1.2" }, "engines": { - "node": ">=6" + "node": ">=8" }, "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/utils", - "jest": { - "collectCoverage": true, - "transform": { - "^.+\\.ts$": "ts-jest" - }, - "moduleFileExtensions": [ - "js", - "ts" - ], - "testEnvironment": "node", - "testMatch": [ - "**/*.test.ts" - ], - "globals": { - "ts-jest": { - "tsConfig": "./tsconfig.json", - "diagnostics": false - } - } - }, - "license": "BSD-3-Clause", - "main": "dist/index.js", + "license": "MIT", + "main": "cjs/index.js", "module": "esm/index.js", "name": "@sentry/utils", "publishConfig": { @@ -88,26 +57,7 @@ "type": "git", "url": "git://github.com/getsentry/sentry-javascript.git" }, - "scripts": { - "build": "run-p build:es5 build:esm", - "build:es5": "tsc -p tsconfig.build.json", - "build:esm": "tsc -p tsconfig.esm.json", - "build:watch": "run-p build:watch:es5 build:watch:esm", - "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", - "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", - "clean": "rimraf dist esm coverage *.js *.js.map *.d.ts", - "fix": "run-s fix:tslint fix:prettier", - "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", - "fix:tslint": "tslint --fix -t stylish -p .", - "link:yarn": "yarn link", - "lint": "run-s lint:prettier lint:tslint", - "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", - "lint:tslint": "tslint -t stylish -p .", - "lint:tslint:json": "tslint --format json -p . | tee lint-results.json", - "test": "jest", - "test:watch": "jest --watch" - }, "sideEffects": false, - "types": "dist/index.d.ts", - "version": "5.14.1" + "types": "types/index.d.ts", + "version": "7.31.1" } diff --git a/node_modules/agent-base/README.md b/node_modules/agent-base/README.md index d791f00..256f1f3 100644 --- a/node_modules/agent-base/README.md +++ b/node_modules/agent-base/README.md @@ -15,7 +15,7 @@ Send a pull request to list yours! * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS - * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS (v4a) proxy `http.Agent` implementation for HTTP and HTTPS + * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS Installation diff --git a/node_modules/agent-base/dist/src/index.d.ts b/node_modules/agent-base/dist/src/index.d.ts index 28fb567..bc4ab74 100644 --- a/node_modules/agent-base/dist/src/index.d.ts +++ b/node_modules/agent-base/dist/src/index.d.ts @@ -1,29 +1,36 @@ /// import net from 'net'; import http from 'http'; +import https from 'https'; +import { Duplex } from 'stream'; import { EventEmitter } from 'events'; declare function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; -declare namespace createAgent { - var prototype: Agent; -} declare function createAgent(callback: createAgent.AgentCallback, opts?: createAgent.AgentOptions): createAgent.Agent; declare namespace createAgent { - var prototype: Agent; -} -declare namespace createAgent { - type ClientRequest = http.ClientRequest & { + interface ClientRequest extends http.ClientRequest { _last?: boolean; _hadError?: boolean; method: string; - }; - type AgentCallbackReturn = net.Socket | createAgent.Agent | http.Agent; - type AgentCallbackCallback = (err: Error | null | undefined, socket: createAgent.AgentCallbackReturn) => void; + } + interface AgentRequestOptions { + host?: string; + path?: string; + port: number; + } + interface HttpRequestOptions extends AgentRequestOptions, Omit { + secureEndpoint: false; + } + interface HttpsRequestOptions extends AgentRequestOptions, Omit { + secureEndpoint: true; + } + type RequestOptions = HttpRequestOptions | HttpsRequestOptions; + type AgentLike = Pick | http.Agent; + type AgentCallbackReturn = Duplex | AgentLike; + type AgentCallbackCallback = (err?: Error | null, socket?: createAgent.AgentCallbackReturn) => void; type AgentCallbackPromise = (req: createAgent.ClientRequest, opts: createAgent.RequestOptions) => createAgent.AgentCallbackReturn | Promise; type AgentCallback = typeof Agent.prototype.callback; - type AgentOptions = http.AgentOptions & {}; - type RequestOptions = http.RequestOptions & { - port: number; - secureEndpoint: boolean; + type AgentOptions = { + timeout?: number; }; /** * Base `http.Agent` implementation. @@ -34,11 +41,19 @@ declare namespace createAgent { */ class Agent extends EventEmitter { timeout: number | null; - options?: createAgent.AgentOptions; maxFreeSockets: number; + maxTotalSockets: number; maxSockets: number; - sockets: net.Socket[]; - requests: http.ClientRequest[]; + sockets: { + [key: string]: net.Socket[]; + }; + freeSockets: { + [key: string]: net.Socket[]; + }; + requests: { + [key: string]: http.IncomingMessage[]; + }; + options: https.AgentOptions; private promisifiedCallback?; private explicitDefaultPort?; private explicitProtocol?; diff --git a/node_modules/agent-base/dist/src/index.js b/node_modules/agent-base/dist/src/index.js index 788deca..bfd9e22 100644 --- a/node_modules/agent-base/dist/src/index.js +++ b/node_modules/agent-base/dist/src/index.js @@ -3,18 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; const events_1 = require("events"); +const debug_1 = __importDefault(require("debug")); const promisify_1 = __importDefault(require("./promisify")); -function isAgentBase(v) { - return Boolean(v) && typeof v.addRequest === 'function'; -} -function isHttpAgent(v) { +const debug = debug_1.default('agent-base'); +function isAgent(v) { return Boolean(v) && typeof v.addRequest === 'function'; } function isSecureEndpoint() { const { stack } = new Error(); if (typeof stack !== 'string') return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1); + return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); } function createAgent(callback, opts) { return new createAgent.Agent(callback, opts); @@ -30,8 +29,6 @@ function createAgent(callback, opts) { class Agent extends events_1.EventEmitter { constructor(callback, _opts) { super(); - // The callback gets promisified lazily - this.promisifiedCallback = undefined; let opts = _opts; if (typeof callback === 'function') { this.callback = callback; @@ -39,24 +36,26 @@ function createAgent(callback, opts) { else if (callback) { opts = callback; } - // timeout for the socket to be returned from the callback + // Timeout for the socket to be returned from the callback this.timeout = null; if (opts && typeof opts.timeout === 'number') { this.timeout = opts.timeout; } - this.options = opts || {}; + // These aren't actually used by `agent-base`, but are required + // for the TypeScript definition files in `@types/node` :/ this.maxFreeSockets = 1; this.maxSockets = 1; - this.sockets = []; - this.requests = []; + this.maxTotalSockets = Infinity; + this.sockets = {}; + this.freeSockets = {}; + this.requests = {}; + this.options = {}; } get defaultPort() { if (typeof this.explicitDefaultPort === 'number') { return this.explicitDefaultPort; } - else { - return isSecureEndpoint() ? 443 : 80; - } + return isSecureEndpoint() ? 443 : 80; } set defaultPort(v) { this.explicitDefaultPort = v; @@ -65,9 +64,7 @@ function createAgent(callback, opts) { if (typeof this.explicitProtocol === 'string') { return this.explicitProtocol; } - else { - return isSecureEndpoint() ? 'https:' : 'http:'; - } + return isSecureEndpoint() ? 'https:' : 'http:'; } set protocol(v) { this.explicitProtocol = v; @@ -82,23 +79,24 @@ function createAgent(callback, opts) { * @api public */ addRequest(req, _opts) { - const ownOpts = Object.assign({}, _opts); - if (typeof ownOpts.secureEndpoint !== 'boolean') { - ownOpts.secureEndpoint = isSecureEndpoint(); + const opts = Object.assign({}, _opts); + if (typeof opts.secureEndpoint !== 'boolean') { + opts.secureEndpoint = isSecureEndpoint(); + } + if (opts.host == null) { + opts.host = 'localhost'; } - // Set default `host` for HTTP to localhost - if (ownOpts.host == null) { - ownOpts.host = 'localhost'; + if (opts.port == null) { + opts.port = opts.secureEndpoint ? 443 : 80; } - // Set default `port` for HTTP if none was explicitly specified - if (ownOpts.port == null) { - ownOpts.port = ownOpts.secureEndpoint ? 443 : 80; + if (opts.protocol == null) { + opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; } - const opts = Object.assign(Object.assign({}, this.options), ownOpts); if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most likely the - // result of a `url.parse()` call... we need to remove the `path` portion so - // that `net.connect()` doesn't attempt to open that as a unix socket file. + // If both a `host` and `path` are specified then it's most + // likely the result of a `url.parse()` call... we need to + // remove the `path` portion so that `net.connect()` doesn't + // attempt to open that as a unix socket file. delete opts.path; } delete opts.agent; @@ -110,69 +108,65 @@ function createAgent(callback, opts) { // XXX: non-documented `http` module API :( req._last = true; req.shouldKeepAlive = false; - // Create the `stream.Duplex` instance let timedOut = false; - let timeout = null; - const timeoutMs = this.timeout; - const freeSocket = this.freeSocket; - function onerror(err) { + let timeoutId = null; + const timeoutMs = opts.timeout || this.timeout; + const onerror = (err) => { if (req._hadError) return; req.emit('error', err); // For Safety. Some additional errors might fire later on // and we need to make sure we don't double-fire the error event. req._hadError = true; - } - function ontimeout() { - timeout = null; + }; + const ontimeout = () => { + timeoutId = null; timedOut = true; const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); err.code = 'ETIMEOUT'; onerror(err); - } - function callbackError(err) { + }; + const callbackError = (err) => { if (timedOut) return; - if (timeout !== null) { - clearTimeout(timeout); - timeout = null; + if (timeoutId !== null) { + clearTimeout(timeoutId); + timeoutId = null; } onerror(err); - } - function onsocket(socket) { - let sock; - function onfree() { - freeSocket(sock, opts); - } + }; + const onsocket = (socket) => { if (timedOut) return; - if (timeout != null) { - clearTimeout(timeout); - timeout = null; + if (timeoutId != null) { + clearTimeout(timeoutId); + timeoutId = null; } - if (isAgentBase(socket) || isHttpAgent(socket)) { + if (isAgent(socket)) { // `socket` is actually an `http.Agent` instance, so // relinquish responsibility for this `req` to the Agent // from here on + debug('Callback returned another Agent instance %o', socket.constructor.name); socket.addRequest(req, opts); return; } if (socket) { - sock = socket; - sock.on('free', onfree); - req.onSocket(sock); + socket.once('free', () => { + this.freeSocket(socket, opts); + }); + req.onSocket(socket); return; } const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); onerror(err); - } + }; if (typeof this.callback !== 'function') { onerror(new Error('`callback` is not defined')); return; } if (!this.promisifiedCallback) { if (this.callback.length >= 3) { - // Legacy callback function - convert to a Promise + debug('Converting legacy callback function to promise'); this.promisifiedCallback = promisify_1.default(this.callback); } else { @@ -180,12 +174,13 @@ function createAgent(callback, opts) { } } if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeout = setTimeout(ontimeout, timeoutMs); + timeoutId = setTimeout(ontimeout, timeoutMs); } if ('port' in opts && typeof opts.port !== 'number') { opts.port = Number(opts.port); } try { + debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); } catch (err) { @@ -193,14 +188,16 @@ function createAgent(callback, opts) { } } freeSocket(socket, opts) { - // TODO reuse sockets + debug('Freeing socket %o %o', socket.constructor.name, opts); socket.destroy(); } - destroy() { } + destroy() { + debug('Destroying agent %o', this.constructor.name); + } } createAgent.Agent = Agent; + // So that `instanceof` works correctly + createAgent.prototype = createAgent.Agent.prototype; })(createAgent || (createAgent = {})); -// So that `instanceof` works correctly -createAgent.prototype = createAgent.Agent.prototype; module.exports = createAgent; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/agent-base/dist/src/index.js.map b/node_modules/agent-base/dist/src/index.js.map index 64065f6..bd118ab 100644 --- a/node_modules/agent-base/dist/src/index.js.map +++ b/node_modules/agent-base/dist/src/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAEA,mCAAsC;AACtC,4DAAoC;AAEpC,SAAS,WAAW,CAAC,CAAM;IAC1B,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;AACzD,CAAC;AAED,SAAS,WAAW,CAAC,CAAM;IAC1B,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;AACzD,CAAC;AAED,SAAS,gBAAgB;IACxB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,CAAC;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,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AW,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;KACD;IAxPY,iBAAK,QAwPjB,CAAA;IAED,uCAAuC;IACvC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;AACrD,CAAC,EAtTS,WAAW,KAAX,WAAW,QAsTpB;AAED,iBAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/agent-base/dist/src/promisify.js.map b/node_modules/agent-base/dist/src/promisify.js.map index cff5289..4bff9bf 100644 --- a/node_modules/agent-base/dist/src/promisify.js.map +++ b/node_modules/agent-base/dist/src/promisify.js.map @@ -1 +1 @@ -{"version":3,"file":"promisify.js","sourceRoot":"","sources":["../../src/promisify.ts"],"names":[],"mappings":";;AAeA,SAAwB,SAAS,CAAC,EAAkB;IACnD,OAAO,UAAsB,GAAkB,EAAE,IAAoB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,EAAE,CAAC,IAAI,CACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,CAAC,GAA6B,EAAE,GAAwB,EAAE,EAAE;gBAC3D,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAC;iBACZ;qBAAM;oBACN,OAAO,CAAC,GAAG,CAAC,CAAC;iBACb;YACF,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAjBD,4BAiBC"} \ No newline at end of file +{"version":3,"file":"promisify.js","sourceRoot":"","sources":["../../src/promisify.ts"],"names":[],"mappings":";;AAeA,SAAwB,SAAS,CAAC,EAAkB;IACnD,OAAO,UAAsB,GAAkB,EAAE,IAAoB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,EAAE,CAAC,IAAI,CACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,CAAC,GAA6B,EAAE,GAAyB,EAAE,EAAE;gBAC5D,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAC;iBACZ;qBAAM;oBACN,OAAO,CAAC,GAAG,CAAC,CAAC;iBACb;YACF,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAjBD,4BAiBC"} \ No newline at end of file diff --git a/node_modules/agent-base/package.json b/node_modules/agent-base/package.json index e31c1fb..6fdbabb 100644 --- a/node_modules/agent-base/package.json +++ b/node_modules/agent-base/package.json @@ -1,32 +1,27 @@ { - "_args": [ - [ - "agent-base@5.1.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "agent-base@5.1.1", - "_id": "agent-base@5.1.1", + "_from": "agent-base@6", + "_id": "agent-base@6.0.2", "_inBundle": false, - "_integrity": "sha1-6Ps/JClZ20TWO+Zl23qOc5U3oyw=", + "_integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "_location": "/agent-base", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "agent-base@5.1.1", + "raw": "agent-base@6", "name": "agent-base", "escapedName": "agent-base", - "rawSpec": "5.1.1", + "rawSpec": "6", "saveSpec": null, - "fetchSpec": "5.1.1" + "fetchSpec": "6" }, "_requiredBy": [ "/https-proxy-agent" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/agent-base/-/agent-base-5.1.1.tgz", - "_spec": "5.1.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "_shasum": "49fff58577cfee3f37176feab4c22e00f86d7f77", + "_spec": "agent-base@6", + "_where": "C:\\code\\com.mill\\node_modules\\https-proxy-agent", "author": { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net", @@ -35,10 +30,17 @@ "bugs": { "url": "https://github.com/TooTallNate/node-agent-base/issues" }, + "bundleDependencies": false, + "dependencies": { + "debug": "4" + }, + "deprecated": false, "description": "Turn a function into an `http.Agent` instance", "devDependencies": { + "@types/debug": "4", "@types/mocha": "^5.2.7", - "@types/node": "^10.5.3", + "@types/node": "^14.0.20", + "@types/semver": "^7.1.0", "@types/ws": "^6.0.3", "@typescript-eslint/eslint-plugin": "1.6.0", "@typescript-eslint/parser": "1.1.0", @@ -53,6 +55,7 @@ "eslint-plugin-react": "7.12.4", "mocha": "^6.2.0", "rimraf": "^3.0.0", + "semver": "^7.1.2", "typescript": "^3.5.3", "ws": "^3.0.0" }, @@ -60,7 +63,8 @@ "node": ">= 6.0.0" }, "files": [ - "dist/src" + "dist/src", + "src" ], "homepage": "https://github.com/TooTallNate/node-agent-base#readme", "keywords": [ @@ -86,5 +90,5 @@ "test-lint": "eslint src --ext .js,.ts" }, "typings": "dist/src/index", - "version": "5.1.1" + "version": "6.0.2" } diff --git a/node_modules/cookie/HISTORY.md b/node_modules/cookie/HISTORY.md index 5bd6485..2d21760 100644 --- a/node_modules/cookie/HISTORY.md +++ b/node_modules/cookie/HISTORY.md @@ -1,3 +1,19 @@ +0.4.2 / 2022-02-02 +================== + + * pref: read value only when assigning in parse + * pref: remove unnecessary regexp in parse + +0.4.1 / 2020-04-21 +================== + + * Fix `maxAge` option to reject invalid values + +0.4.0 / 2019-05-15 +================== + + * Add `SameSite=None` support + 0.3.1 / 2016-05-26 ================== diff --git a/node_modules/cookie/README.md b/node_modules/cookie/README.md index db0d078..e275c70 100644 --- a/node_modules/cookie/README.md +++ b/node_modules/cookie/README.md @@ -1,15 +1,19 @@ # cookie -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] [![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] [![Test Coverage][coveralls-image]][coveralls-url] Basic HTTP cookie parser and serializer for HTTP servers. ## Installation +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + ```sh $ npm install cookie ``` @@ -64,7 +68,7 @@ var setCookie = cookie.serialize('foo', 'bar'); ##### domain -Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6266-5.2.3]. By default, no +Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6265-5.2.3]. By default, no domain is set, and most clients will consider the cookie to apply to only the current domain. ##### encode @@ -73,22 +77,22 @@ Specifies a function that will be used to encode a cookie's value. Since value o has a limited character set (and must be a simple string), this function can be used to encode a value into a string suited for a cookie's value. -The default function is the global `ecodeURIComponent`, which will encode a JavaScript string +The default function is the global `encodeURIComponent`, which will encode a JavaScript string into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range. ##### expires -Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6266-5.2.1]. +Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6265-5.2.1]. By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting a web browser application. -**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and -`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this, +**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and +`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, so if both are set, they should point to the same date and time. ##### httpOnly -Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6266-5.2.6]. When truthy, +Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6265-5.2.6]. When truthy, the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set. **note** be careful when setting this to `true`, as compliant clients will not allow client-side @@ -96,38 +100,37 @@ JavaScript to see the cookie in `document.cookie`. ##### maxAge -Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6266-5.2.2]. +Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6265-5.2.2]. The given number will be converted to an integer by rounding down. By default, no maximum age is set. -**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and -`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this, +**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and +`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, so if both are set, they should point to the same date and time. ##### path -Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6266-5.2.4]. By default, the path -is considered the ["default path"][rfc-6266-5.1.4]. By default, no maximum age is set, and most -clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting -a web browser application. +Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path +is considered the ["default path"][rfc-6265-5.1.4]. ##### sameSite -Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][draft-west-first-party-cookies-07]. +Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-03-4.1.2.7]. - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - `false` will not set the `SameSite` attribute. - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement. + - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie. - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement. -More information about the different enforcement levels can be found in the specification -https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1.1 +More information about the different enforcement levels can be found in +[the specification][rfc-6265bis-03-4.1.2.7]. **note** This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it. ##### secure -Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6266-5.2.5]. When truthy, +Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6265-5.2.5]. When truthy, the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set. **note** be careful when setting this to `true`, as compliant clients will not send the cookie back to @@ -178,7 +181,7 @@ function onRequest(req, res) { res.write('
'); res.write(' '); - res.end(''); } http.createServer(onRequest).listen(3000); @@ -190,31 +193,94 @@ http.createServer(onRequest).listen(3000); $ npm test ``` +## Benchmark + +``` +$ npm run bench + +> cookie@0.4.1 bench +> node benchmark/index.js + + node@16.13.1 + v8@9.4.146.24-node.14 + uv@1.42.0 + zlib@1.2.11 + brotli@1.0.9 + ares@1.18.1 + modules@93 + nghttp2@1.45.1 + napi@8 + llhttp@6.0.4 + openssl@1.1.1l+quic + cldr@39.0 + icu@69.1 + tz@2021a + unicode@13.0 + ngtcp2@0.1.0-DEV + nghttp3@0.1.0-DEV + +> node benchmark/parse-top.js + + cookie.parse - top sites + + 15 tests completed. + + parse accounts.google.com x 504,358 ops/sec ±6.55% (171 runs sampled) + parse apple.com x 1,369,991 ops/sec ±0.84% (189 runs sampled) + parse cloudflare.com x 360,669 ops/sec ±3.75% (182 runs sampled) + parse docs.google.com x 521,496 ops/sec ±4.90% (180 runs sampled) + parse drive.google.com x 553,514 ops/sec ±0.59% (189 runs sampled) + parse en.wikipedia.org x 286,052 ops/sec ±0.62% (188 runs sampled) + parse linkedin.com x 178,817 ops/sec ±0.61% (192 runs sampled) + parse maps.google.com x 284,585 ops/sec ±0.68% (188 runs sampled) + parse microsoft.com x 161,230 ops/sec ±0.56% (192 runs sampled) + parse play.google.com x 352,144 ops/sec ±1.01% (181 runs sampled) + parse plus.google.com x 275,204 ops/sec ±7.78% (156 runs sampled) + parse support.google.com x 339,493 ops/sec ±1.02% (191 runs sampled) + parse www.google.com x 286,110 ops/sec ±0.90% (191 runs sampled) + parse youtu.be x 548,557 ops/sec ±0.60% (184 runs sampled) + parse youtube.com x 545,293 ops/sec ±0.65% (191 runs sampled) + +> node benchmark/parse.js + + cookie.parse - generic + + 6 tests completed. + + simple x 1,266,646 ops/sec ±0.65% (191 runs sampled) + decode x 838,413 ops/sec ±0.60% (191 runs sampled) + unquote x 877,820 ops/sec ±0.72% (189 runs sampled) + duplicates x 516,680 ops/sec ±0.61% (191 runs sampled) + 10 cookies x 156,874 ops/sec ±0.52% (189 runs sampled) + 100 cookies x 14,663 ops/sec ±0.53% (191 runs sampled) +``` + ## References -- [RFC 6266: HTTP State Management Mechanism][rfc-6266] -- [Same-site Cookies][draft-west-first-party-cookies-07] +- [RFC 6265: HTTP State Management Mechanism][rfc-6265] +- [Same-site Cookies][rfc-6265bis-03-4.1.2.7] -[draft-west-first-party-cookies-07]: https://tools.ietf.org/html/draft-west-first-party-cookies-07 -[rfc-6266]: https://tools.ietf.org/html/rfc6266 -[rfc-6266-5.1.4]: https://tools.ietf.org/html/rfc6266#section-5.1.4 -[rfc-6266-5.2.1]: https://tools.ietf.org/html/rfc6266#section-5.2.1 -[rfc-6266-5.2.2]: https://tools.ietf.org/html/rfc6266#section-5.2.2 -[rfc-6266-5.2.3]: https://tools.ietf.org/html/rfc6266#section-5.2.3 -[rfc-6266-5.2.4]: https://tools.ietf.org/html/rfc6266#section-5.2.4 -[rfc-6266-5.3]: https://tools.ietf.org/html/rfc6266#section-5.3 +[rfc-6265bis-03-4.1.2.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7 +[rfc-6265]: https://tools.ietf.org/html/rfc6265 +[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4 +[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1 +[rfc-6265-5.2.2]: https://tools.ietf.org/html/rfc6265#section-5.2.2 +[rfc-6265-5.2.3]: https://tools.ietf.org/html/rfc6265#section-5.2.3 +[rfc-6265-5.2.4]: https://tools.ietf.org/html/rfc6265#section-5.2.4 +[rfc-6265-5.2.5]: https://tools.ietf.org/html/rfc6265#section-5.2.5 +[rfc-6265-5.2.6]: https://tools.ietf.org/html/rfc6265#section-5.2.6 +[rfc-6265-5.3]: https://tools.ietf.org/html/rfc6265#section-5.3 ## License [MIT](LICENSE) -[npm-image]: https://img.shields.io/npm/v/cookie.svg -[npm-url]: https://npmjs.org/package/cookie -[node-version-image]: https://img.shields.io/node/v/cookie.svg -[node-version-url]: https://nodejs.org/en/download -[travis-image]: https://img.shields.io/travis/jshttp/cookie/master.svg -[travis-url]: https://travis-ci.org/jshttp/cookie -[coveralls-image]: https://img.shields.io/coveralls/jshttp/cookie/master.svg +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master [coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master -[downloads-image]: https://img.shields.io/npm/dm/cookie.svg -[downloads-url]: https://npmjs.org/package/cookie +[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/cookie/ci/master?label=ci +[github-actions-ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml +[node-version-image]: https://badgen.net/npm/node/cookie +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/cookie +[npm-url]: https://npmjs.org/package/cookie +[npm-version-image]: https://badgen.net/npm/v/cookie diff --git a/node_modules/cookie/index.js b/node_modules/cookie/index.js index ab2e467..55331d9 100644 --- a/node_modules/cookie/index.js +++ b/node_modules/cookie/index.js @@ -22,7 +22,6 @@ exports.serialize = serialize; var decode = decodeURIComponent; var encode = encodeURIComponent; -var pairSplitRegExp = /; */; /** * RegExp to match field-content in RFC 7230 sec 3.2 @@ -53,28 +52,29 @@ function parse(str, options) { var obj = {} var opt = options || {}; - var pairs = str.split(pairSplitRegExp); + var pairs = str.split(';') var dec = opt.decode || decode; for (var i = 0; i < pairs.length; i++) { var pair = pairs[i]; - var eq_idx = pair.indexOf('='); + var index = pair.indexOf('=') // skip things that don't look like key=value - if (eq_idx < 0) { + if (index < 0) { continue; } - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } + var key = pair.substring(0, index).trim() // only assign once if (undefined == obj[key]) { + var val = pair.substring(index + 1, pair.length).trim() + + // quoted values + if (val[0] === '"') { + val = val.slice(1, -1) + } + obj[key] = tryDecode(val, dec); } } @@ -120,7 +120,11 @@ function serialize(name, val, options) { if (null != opt.maxAge) { var maxAge = opt.maxAge - 0; - if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); + + if (isNaN(maxAge) || !isFinite(maxAge)) { + throw new TypeError('option maxAge is invalid') + } + str += '; Max-Age=' + Math.floor(maxAge); } @@ -170,6 +174,9 @@ function serialize(name, val, options) { case 'strict': str += '; SameSite=Strict'; break; + case 'none': + str += '; SameSite=None'; + break; default: throw new TypeError('option sameSite is invalid'); } diff --git a/node_modules/cookie/package.json b/node_modules/cookie/package.json index 6bb483d..8013635 100644 --- a/node_modules/cookie/package.json +++ b/node_modules/cookie/package.json @@ -1,32 +1,27 @@ { - "_args": [ - [ - "cookie@0.3.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "cookie@0.3.1", - "_id": "cookie@0.3.1", + "_from": "cookie@^0.4.1", + "_id": "cookie@0.4.2", "_inBundle": false, - "_integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "_integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", "_location": "/cookie", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "cookie@0.3.1", + "raw": "cookie@^0.4.1", "name": "cookie", "escapedName": "cookie", - "rawSpec": "0.3.1", + "rawSpec": "^0.4.1", "saveSpec": null, - "fetchSpec": "0.3.1" + "fetchSpec": "^0.4.1" }, "_requiredBy": [ "/@sentry/node" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/cookie/-/cookie-0.3.1.tgz", - "_spec": "0.3.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "_shasum": "0e41f24de5ecf317947c82fc789e06a884824432", + "_spec": "cookie@^0.4.1", + "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", "author": { "name": "Roman Shtylman", "email": "shtylman@gmail.com" @@ -34,16 +29,23 @@ "bugs": { "url": "https://github.com/jshttp/cookie/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Douglas Christopher Wilson", "email": "doug@somethingdoug.com" } ], + "deprecated": false, "description": "HTTP server cookie parsing and serialization", "devDependencies": { - "istanbul": "0.4.3", - "mocha": "1.21.5" + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "7.32.0", + "eslint-plugin-markdown": "2.2.1", + "mocha": "9.2.0", + "nyc": "15.1.0", + "top-sites": "1.1.85" }, "engines": { "node": ">= 0.6" @@ -66,9 +68,13 @@ "url": "git+https://github.com/jshttp/cookie.git" }, "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" + "bench": "node benchmark/index.js", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks --ui qunit test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update-bench": "node scripts/update-benchmark.js", + "version": "node scripts/version-history.js && git add HISTORY.md" }, - "version": "0.3.1" + "version": "0.4.2" } diff --git a/node_modules/https-proxy-agent/.editorconfig b/node_modules/https-proxy-agent/.editorconfig deleted file mode 100644 index 12b4b9a..0000000 --- a/node_modules/https-proxy-agent/.editorconfig +++ /dev/null @@ -1,37 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -tab_width = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[{*.json,*.json.example,*.gyp,*.yml,*.yaml,*.workflow}] -indent_style = space -indent_size = 2 - -[{*.py,*.asm}] -indent_style = space - -[*.py] -indent_size = 4 - -[*.asm] -indent_size = 8 - -[*.md] -trim_trailing_whitespace = false - -# Ideal settings - some plugins might support these. -[*.js] -quote_type = single - -[{*.c,*.cc,*.h,*.hh,*.cpp,*.hpp,*.m,*.mm,*.mpp,*.js,*.java,*.go,*.rs,*.php,*.ng,*.jsx,*.ts,*.d,*.cs,*.swift}] -curly_bracket_next_line = false -spaces_around_operators = true -spaces_around_brackets = outside -# close enough to 1TB -indent_brace_style = K&R diff --git a/node_modules/https-proxy-agent/.eslintrc.js b/node_modules/https-proxy-agent/.eslintrc.js deleted file mode 100644 index 62743f2..0000000 --- a/node_modules/https-proxy-agent/.eslintrc.js +++ /dev/null @@ -1,86 +0,0 @@ -module.exports = { - 'extends': [ - 'airbnb', - 'prettier' - ], - 'parser': '@typescript-eslint/parser', - 'parserOptions': { - 'ecmaVersion': 2018, - 'sourceType': 'module', - 'modules': true - }, - 'plugins': [ - '@typescript-eslint' - ], - 'settings': { - 'import/resolver': { - 'typescript': { - } - } - }, - 'rules': { - 'quotes': [ - 2, - 'single', - { - 'allowTemplateLiterals': true - } - ], - 'class-methods-use-this': 0, - 'consistent-return': 0, - 'func-names': 0, - 'global-require': 0, - 'guard-for-in': 0, - 'import/no-duplicates': 0, - 'import/no-dynamic-require': 0, - 'import/no-extraneous-dependencies': 0, - 'import/prefer-default-export': 0, - 'lines-between-class-members': 0, - 'no-await-in-loop': 0, - 'no-bitwise': 0, - 'no-console': 0, - 'no-continue': 0, - 'no-control-regex': 0, - 'no-empty': 0, - 'no-loop-func': 0, - 'no-nested-ternary': 0, - 'no-param-reassign': 0, - 'no-plusplus': 0, - 'no-restricted-globals': 0, - 'no-restricted-syntax': 0, - 'no-shadow': 0, - 'no-underscore-dangle': 0, - 'no-use-before-define': 0, - 'prefer-const': 0, - 'prefer-destructuring': 0, - 'camelcase': 0, - 'no-unused-vars': 0, // in favor of '@typescript-eslint/no-unused-vars' - // 'indent': 0 // in favor of '@typescript-eslint/indent' - '@typescript-eslint/no-unused-vars': 'warn', - // '@typescript-eslint/indent': ['error', 2] // this might conflict with a lot ongoing changes - '@typescript-eslint/no-array-constructor': 'error', - '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/class-name-casing': 'error', - '@typescript-eslint/interface-name-prefix': 'error', - '@typescript-eslint/no-empty-interface': 'error', - '@typescript-eslint/no-inferrable-types': 'error', - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-namespace': 'error', - '@typescript-eslint/no-non-null-assertion': 'error', - '@typescript-eslint/no-parameter-properties': 'error', - '@typescript-eslint/no-triple-slash-reference': 'error', - '@typescript-eslint/prefer-namespace-keyword': 'error', - '@typescript-eslint/type-annotation-spacing': 'error', - // '@typescript-eslint/array-type': 'error', - // '@typescript-eslint/ban-types': 'error', - // '@typescript-eslint/explicit-function-return-type': 'warn', - // '@typescript-eslint/explicit-member-accessibility': 'error', - // '@typescript-eslint/member-delimiter-style': 'error', - // '@typescript-eslint/no-angle-bracket-type-assertion': 'error', - // '@typescript-eslint/no-explicit-any': 'warn', - // '@typescript-eslint/no-object-literal-type-assertion': 'error', - // '@typescript-eslint/no-use-before-define': 'error', - // '@typescript-eslint/no-var-requires': 'error', - // '@typescript-eslint/prefer-interface': 'error' - } -} diff --git a/node_modules/https-proxy-agent/.github/workflows/test.yml b/node_modules/https-proxy-agent/.github/workflows/test.yml deleted file mode 100644 index 329914f..0000000 --- a/node_modules/https-proxy-agent/.github/workflows/test.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Node CI - -on: - push: - branches: - - master - tags: - - '!*' - pull_request: - -jobs: - build: - name: Test Node.js ${{ matrix.node-version }} on ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - node-version: [6.x, 8.x, 10.x, 12.x] - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v1 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Print Node.js Version - run: node --version - - - name: Install Dependencies - run: npm install - env: - CI: true - - - name: Run "build" step - run: npm run build --if-present - env: - CI: true - - - name: Run tests - run: npm test - env: - CI: true diff --git a/node_modules/https-proxy-agent/index.d.ts b/node_modules/https-proxy-agent/index.d.ts deleted file mode 100644 index cec35d8..0000000 --- a/node_modules/https-proxy-agent/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare module 'https-proxy-agent' { - import * as https from 'https'; - - namespace HttpsProxyAgent { - interface HttpsProxyAgentOptions { - host: string; - port: number | string; - secureProxy?: boolean; - headers?: { - [key: string]: string; - }; - [key: string]: any; - } - } - - // HttpsProxyAgent doesnt *actually* extend https.Agent, but for my purposes I want it to pretend that it does - class HttpsProxyAgent extends https.Agent { - constructor(opts: HttpsProxyAgent.HttpsProxyAgentOptions | string); - } - - export = HttpsProxyAgent; -} diff --git a/node_modules/https-proxy-agent/index.js b/node_modules/https-proxy-agent/index.js deleted file mode 100644 index aa3021e..0000000 --- a/node_modules/https-proxy-agent/index.js +++ /dev/null @@ -1,239 +0,0 @@ -/** - * Module dependencies. - */ - -var net = require('net'); -var tls = require('tls'); -var url = require('url'); -var assert = require('assert'); -var Agent = require('agent-base'); -var inherits = require('util').inherits; -var debug = require('debug')('https-proxy-agent'); - -/** - * Module exports. - */ - -module.exports = HttpsProxyAgent; - -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to the - * specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * @api public - */ - -function HttpsProxyAgent(opts) { - if (!(this instanceof HttpsProxyAgent)) return new HttpsProxyAgent(opts); - if ('string' == typeof opts) opts = url.parse(opts); - if (!opts) - throw new Error( - 'an HTTP(S) proxy server `host` and `port` must be specified!' - ); - debug('creating new HttpsProxyAgent instance: %o', opts); - Agent.call(this, opts); - - var proxy = Object.assign({}, opts); - - // if `true`, then connect to the proxy server over TLS. defaults to `false`. - this.secureProxy = proxy.protocol - ? /^https:?$/i.test(proxy.protocol) - : false; - - // prefer `hostname` over `host`, and set the `port` if needed - proxy.host = proxy.hostname || proxy.host; - proxy.port = +proxy.port || (this.secureProxy ? 443 : 80); - - // ALPN is supported by Node.js >= v5. - // attempt to negotiate http/1.1 for proxy servers that support http/2 - if (this.secureProxy && !('ALPNProtocols' in proxy)) { - proxy.ALPNProtocols = ['http 1.1']; - } - - if (proxy.host && proxy.path) { - // if both a `host` and `path` are specified then it's most likely the - // result of a `url.parse()` call... we need to remove the `path` portion so - // that `net.connect()` doesn't attempt to open that as a unix socket file. - delete proxy.path; - delete proxy.pathname; - } - - this.proxy = proxy; -} -inherits(HttpsProxyAgent, Agent); - -/** - * Called when the node-core HTTP client library is creating a new HTTP request. - * - * @api public - */ - -HttpsProxyAgent.prototype.callback = function connect(req, opts, fn) { - var proxy = this.proxy; - - // create a socket connection to the proxy server - var socket; - if (this.secureProxy) { - socket = tls.connect(proxy); - } else { - socket = net.connect(proxy); - } - - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - var buffers = []; - var buffersLength = 0; - - function read() { - var b = socket.read(); - if (b) ondata(b); - else socket.once('readable', read); - } - - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('close', onclose); - socket.removeListener('readable', read); - } - - function onclose(err) { - debug('onclose had error %o', err); - } - - function onend() { - debug('onend'); - } - - function onerror(err) { - cleanup(); - fn(err); - } - - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - var buffered = Buffer.concat(buffers, buffersLength); - var str = buffered.toString('ascii'); - - if (!~str.indexOf('\r\n\r\n')) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - - var firstLine = str.substring(0, str.indexOf('\r\n')); - var statusCode = +firstLine.split(' ')[1]; - debug('got proxy server response: %o', firstLine); - - if (200 == statusCode) { - // 200 Connected status code! - var sock = socket; - - // nullify the buffered data since we won't be needing it - buffers = buffered = null; - - if (opts.secureEndpoint) { - // since the proxy is connecting to an SSL server, we have - // to upgrade this socket connection to an SSL connection - debug( - 'upgrading proxy-connected socket to TLS connection: %o', - opts.host - ); - opts.socket = socket; - opts.servername = opts.servername || opts.host; - opts.host = null; - opts.hostname = null; - opts.port = null; - sock = tls.connect(opts); - } - - cleanup(); - req.once('socket', resume); - fn(null, sock); - } else { - // some other status code that's not 200... need to re-play the HTTP header - // "data" events onto the socket once the HTTP machinery is attached so - // that the node core `http` can parse and handle the error status code - cleanup(); - - // the original socket is closed, and a new closed socket is - // returned instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - socket = new net.Socket(); - socket.readable = true; - - // save a reference to the concat'd Buffer for the `onsocket` callback - buffers = buffered; - - // need to wait for the "socket" event to re-play the "data" events - req.once('socket', onsocket); - - fn(null, socket); - } - } - - function onsocket(socket) { - debug('replaying proxy buffer for failed request'); - assert(socket.listenerCount('data') > 0); - - // replay the "buffers" Buffer onto the `socket`, since at this point - // the HTTP module machinery has been hooked up for the user - socket.push(buffers); - - // nullify the cached Buffer instance - buffers = null; - } - - socket.on('error', onerror); - socket.on('close', onclose); - socket.on('end', onend); - - read(); - - var hostname = opts.host + ':' + opts.port; - var msg = 'CONNECT ' + hostname + ' HTTP/1.1\r\n'; - - var headers = Object.assign({}, proxy.headers); - if (proxy.auth) { - headers['Proxy-Authorization'] = - 'Basic ' + Buffer.from(proxy.auth).toString('base64'); - } - - // the Host header should only include the port - // number when it is a non-standard port - var host = opts.host; - if (!isDefaultPort(opts.port, opts.secureEndpoint)) { - host += ':' + opts.port; - } - headers['Host'] = host; - - headers['Connection'] = 'close'; - Object.keys(headers).forEach(function(name) { - msg += name + ': ' + headers[name] + '\r\n'; - }); - - socket.write(msg + '\r\n'); -}; - -/** - * Resumes a socket. - * - * @param {(net.Socket|tls.Socket)} socket The socket to resume - * @api public - */ - -function resume(socket) { - socket.resume(); -} - -function isDefaultPort(port, secure) { - return Boolean((!secure && port === 80) || (secure && port === 443)); -} diff --git a/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md b/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,395 +0,0 @@ - -3.1.0 / 2017-09-26 -================== - - * Add `DEBUG_HIDE_DATE` env var (#486) - * Remove ReDoS regexp in %o formatter (#504) - * Remove "component" from package.json - * Remove `component.json` - * Ignore package-lock.json - * Examples: fix colors printout - * Fix: browser detection - * Fix: spelling mistake (#496, @EdwardBetts) - -3.0.1 / 2017-08-24 -================== - - * Fix: Disable colors in Edge and Internet Explorer (#489) - -3.0.0 / 2017-08-08 -================== - - * Breaking: Remove DEBUG_FD (#406) - * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) - * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) - * Addition: document `enabled` flag (#465) - * Addition: add 256 colors mode (#481) - * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) - * Update: component: update "ms" to v2.0.0 - * Update: separate the Node and Browser tests in Travis-CI - * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots - * Update: separate Node.js and web browser examples for organization - * Update: update "browserify" to v14.4.0 - * Fix: fix Readme typo (#473) - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/https-proxy-agent/node_modules/debug/LICENSE b/node_modules/https-proxy-agent/node_modules/debug/LICENSE index 658c933..1a9820e 100644 --- a/node_modules/https-proxy-agent/node_modules/debug/LICENSE +++ b/node_modules/https-proxy-agent/node_modules/debug/LICENSE @@ -1,19 +1,20 @@ (The MIT License) -Copyright (c) 2014 TJ Holowaychuk +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/https-proxy-agent/node_modules/debug/README.md b/node_modules/https-proxy-agent/node_modules/debug/README.md index 88dae35..e9c3e04 100644 --- a/node_modules/https-proxy-agent/node_modules/debug/README.md +++ b/node_modules/https-proxy-agent/node_modules/debug/README.md @@ -1,5 +1,5 @@ # debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) @@ -241,6 +241,9 @@ setInterval(function(){ }, 1200); ``` +In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. + + ## Output streams @@ -351,12 +354,34 @@ if (debug.enabled) { You can also manually toggle this property to force the debug instance to be enabled or disabled. +## Usage in child processes + +Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. +For example: + +```javascript +worker = fork(WORKER_WRAP_PATH, [workerPath], { + stdio: [ + /* stdin: */ 0, + /* stdout: */ 'pipe', + /* stderr: */ 'pipe', + 'ipc', + ], + env: Object.assign({}, process.env, { + DEBUG_COLORS: 1 // without this settings, colors won't be shown + }), +}); + +worker.stderr.pipe(process.stderr, { end: false }); +``` + ## Authors - TJ Holowaychuk - Nathan Rajlich - Andrew Rhyne + - Josh Junon ## Backers @@ -434,6 +459,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s (The MIT License) Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> +Copyright (c) 2018-2021 Josh Junon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/node_modules/https-proxy-agent/node_modules/debug/dist/debug.js b/node_modules/https-proxy-agent/node_modules/debug/dist/debug.js deleted file mode 100644 index 89ad0c2..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/dist/debug.js +++ /dev/null @@ -1,912 +0,0 @@ -"use strict"; - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -(function (f) { - if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { - module.exports = f(); - } else if (typeof define === "function" && define.amd) { - define([], f); - } else { - var g; - - if (typeof window !== "undefined") { - g = window; - } else if (typeof global !== "undefined") { - g = global; - } else if (typeof self !== "undefined") { - g = self; - } else { - g = this; - } - - g.debug = f(); - } -})(function () { - var define, module, exports; - return function () { - function r(e, n, t) { - function o(i, f) { - if (!n[i]) { - if (!e[i]) { - var c = "function" == typeof require && require; - if (!f && c) return c(i, !0); - if (u) return u(i, !0); - var a = new Error("Cannot find module '" + i + "'"); - throw a.code = "MODULE_NOT_FOUND", a; - } - - var p = n[i] = { - exports: {} - }; - e[i][0].call(p.exports, function (r) { - var n = e[i][1][r]; - return o(n || r); - }, p, p.exports, r, e, n, t); - } - - return n[i].exports; - } - - for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) { - o(t[i]); - } - - return o; - } - - return r; - }()({ - 1: [function (require, module, exports) { - /** - * Helpers. - */ - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - - module.exports = function (val, options) { - options = options || {}; - - var type = _typeof(val); - - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); - }; - /** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - - - function parse(str) { - str = String(str); - - if (str.length > 100) { - return; - } - - var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); - - if (!match) { - return; - } - - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - - case 'weeks': - case 'week': - case 'w': - return n * w; - - case 'days': - case 'day': - case 'd': - return n * d; - - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - - default: - return undefined; - } - } - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtShort(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - - return ms + 'ms'; - } - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtLong(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - - return ms + ' ms'; - } - /** - * Pluralization helper. - */ - - - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); - } - }, {}], - 2: [function (require, module, exports) { - // shim for using process in browser - var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it - // don't break things. But we need to wrap it in a try catch in case it is - // wrapped in strict mode code which doesn't define any globals. It's inside a - // function because try/catches deoptimize in certain engines. - - var cachedSetTimeout; - var cachedClearTimeout; - - function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); - } - - function defaultClearTimeout() { - throw new Error('clearTimeout has not been defined'); - } - - (function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } - })(); - - function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } // if setTimeout wasn't available but was latter defined - - - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - } - - function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } // if clearTimeout wasn't available but was latter defined - - - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - } - - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - - draining = false; - - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - - while (len) { - currentQueue = queue; - queue = []; - - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - - queueIndex = -1; - len = queue.length; - } - - currentQueue = null; - draining = false; - runClearTimeout(timeout); - } - - process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - - queue.push(new Item(fun, args)); - - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } - }; // v8 likes predictible objects - - - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - - process.title = 'browser'; - process.browser = true; - process.env = {}; - process.argv = []; - process.version = ''; // empty string to avoid regexp issues - - process.versions = {}; - - function noop() {} - - process.on = noop; - process.addListener = noop; - process.once = noop; - process.off = noop; - process.removeListener = noop; - process.removeAllListeners = noop; - process.emit = noop; - process.prependListener = noop; - process.prependOnceListener = noop; - - process.listeners = function (name) { - return []; - }; - - process.binding = function (name) { - throw new Error('process.binding is not supported'); - }; - - process.cwd = function () { - return '/'; - }; - - process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); - }; - - process.umask = function () { - return 0; - }; - }, {}], - 3: [function (require, module, exports) { - /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - Object.keys(env).forEach(function (key) { - createDebug[key] = env[key]; - }); - /** - * Active `debug` instances. - */ - - createDebug.instances = []; - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - - createDebug.formatters = {}; - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - - function selectColor(namespace) { - var hash = 0; - - for (var i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - - createDebug.selectColor = selectColor; - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - - function createDebug(namespace) { - var prevTime; - - function debug() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - // Disabled? - if (!debug.enabled) { - return; - } - - var self = debug; // Set `diff` timestamp - - var curr = Number(new Date()); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } // Apply any `formatters` transformations - - - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - - index++; - var formatter = createDebug.formatters[format]; - - if (typeof formatter === 'function') { - var val = args[index]; - match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` - - args.splice(index, 1); - index--; - } - - return match; - }); // Apply env-specific formatting (colors, etc.) - - createDebug.formatArgs.call(self, args); - var logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); - debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - debug.extend = extend; // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - // env-specific initialization logic for debug instances - - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - createDebug.instances.push(debug); - return debug; - } - - function destroy() { - var index = createDebug.instances.indexOf(this); - - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - - return false; - } - - function extend(namespace, delimiter) { - var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - - - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.names = []; - createDebug.skips = []; - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < createDebug.instances.length; i++) { - var instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - - - function disable() { - var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) { - return '-' + namespace; - }))).join(','); - createDebug.enable(''); - return namespaces; - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - - - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - var i; - var len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - - - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); - } - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - - - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - - return val; - } - - createDebug.enable(createDebug.load()); - return createDebug; - } - - module.exports = setup; - }, { - "ms": 1 - }], - 4: [function (require, module, exports) { - (function (process) { - /* eslint-env browser */ - - /** - * This is the web browser implementation of `debug()`. - */ - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - /** - * Colors. - */ - - exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; - /** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - // eslint-disable-next-line complexity - - function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } // Internet Explorer and Edge do not support colors. - - - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - - - return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - /** - * Colorize log arguments if enabled. - * - * @api public - */ - - - function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function (match) { - if (match === '%%') { - return; - } - - index++; - - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - /** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - - - function log() { - var _console; - - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); - } - /** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - - - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - - - function load() { - var r; - - try { - r = exports.storage.getItem('debug'); - } catch (error) {} // Swallow - // XXX (@Qix-) should we be logging these? - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - - - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; - } - /** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - - - function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - - module.exports = require('./common')(exports); - var formatters = module.exports.formatters; - /** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - - formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } - }; - }).call(this, require('_process')); - }, { - "./common": 3, - "_process": 2 - }] - }, {}, [4])(4); -}); diff --git a/node_modules/https-proxy-agent/node_modules/debug/package.json b/node_modules/https-proxy-agent/node_modules/debug/package.json index 6582922..6d833d2 100644 --- a/node_modules/https-proxy-agent/node_modules/debug/package.json +++ b/node_modules/https-proxy-agent/node_modules/debug/package.json @@ -1,41 +1,41 @@ { - "_args": [ - [ - "debug@4.1.1", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "debug@4.1.1", - "_id": "debug@4.1.1", + "_from": "debug@4", + "_id": "debug@4.3.4", "_inBundle": false, - "_integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", + "_integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "_location": "/https-proxy-agent/debug", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "debug@4.1.1", + "raw": "debug@4", "name": "debug", "escapedName": "debug", - "rawSpec": "4.1.1", + "rawSpec": "4", "saveSpec": null, - "fetchSpec": "4.1.1" + "fetchSpec": "4" }, "_requiredBy": [ "/https-proxy-agent" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/debug/-/debug-4.1.1.tgz", - "_spec": "4.1.1", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "_shasum": "1319f6579357f2338d3337d2cdd4914bb5dcc865", + "_spec": "debug@4", + "_where": "C:\\code\\com.mill\\node_modules\\https-proxy-agent", "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" + "name": "Josh Junon", + "email": "josh.junon@protonmail.com" }, "browser": "./src/browser.js", "bugs": { - "url": "https://github.com/visionmedia/debug/issues" + "url": "https://github.com/debug-js/debug/issues" }, + "bundleDependencies": false, "contributors": [ + { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net", @@ -47,34 +47,32 @@ } ], "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" }, - "description": "small debugging utility", + "deprecated": false, + "description": "Lightweight debugging utility for Node.js and the browser", "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "browserify": "14.4.0", - "chai": "^3.5.0", - "concurrently": "^3.1.0", + "brfs": "^2.0.1", + "browserify": "^16.2.3", "coveralls": "^3.0.2", "istanbul": "^0.4.5", - "karma": "^3.0.0", - "karma-chai": "^0.1.0", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", "mocha": "^5.2.0", "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", "xo": "^0.23.0" }, + "engines": { + "node": ">=6.0" + }, "files": [ "src", - "dist/debug.js", "LICENSE", "README.md" ], - "homepage": "https://github.com/visionmedia/debug#readme", + "homepage": "https://github.com/debug-js/debug#readme", "keywords": [ "debug", "log", @@ -83,23 +81,21 @@ "license": "MIT", "main": "./src/index.js", "name": "debug", + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, "repository": { "type": "git", - "url": "git://github.com/visionmedia/debug.git" + "url": "git://github.com/debug-js/debug.git" }, "scripts": { - "build": "npm run build:debug && npm run build:test", - "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", - "build:test": "babel -d dist test.js", - "clean": "rimraf dist coverage", "lint": "xo", - "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", - "pretest:browser": "npm run build", - "test": "npm run test:node && npm run test:browser", + "test": "npm run test:node && npm run test:browser && npm run lint", "test:browser": "karma start --single-run", "test:coverage": "cat ./coverage/lcov.info | coveralls", "test:node": "istanbul cover _mocha -- test.js" }, - "unpkg": "./dist/debug.js", - "version": "4.1.1" + "version": "4.3.4" } diff --git a/node_modules/https-proxy-agent/node_modules/debug/src/browser.js b/node_modules/https-proxy-agent/node_modules/debug/src/browser.js index 5f34c0d..cd0fc35 100644 --- a/node_modules/https-proxy-agent/node_modules/debug/src/browser.js +++ b/node_modules/https-proxy-agent/node_modules/debug/src/browser.js @@ -4,12 +4,21 @@ * This is the web browser implementation of `debug()`. */ -exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); /** * Colors. @@ -170,18 +179,14 @@ function formatArgs(args) { } /** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. * * @api public */ -function log(...args) { - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return typeof console === 'object' && - console.log && - console.log(...args); -} +exports.log = console.debug || console.log || (() => {}); /** * Save `namespaces`. diff --git a/node_modules/https-proxy-agent/node_modules/debug/src/common.js b/node_modules/https-proxy-agent/node_modules/debug/src/common.js index 2f82b8d..e3291b2 100644 --- a/node_modules/https-proxy-agent/node_modules/debug/src/common.js +++ b/node_modules/https-proxy-agent/node_modules/debug/src/common.js @@ -12,16 +12,12 @@ function setup(env) { createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require('ms'); + createDebug.destroy = destroy; Object.keys(env).forEach(key => { createDebug[key] = env[key]; }); - /** - * Active `debug` instances. - */ - createDebug.instances = []; - /** * The currently active debug mode names, and names to skip. */ @@ -38,7 +34,7 @@ function setup(env) { /** * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored + * @param {String} namespace The namespace string for the debug instance to be colored * @return {Number|String} An ANSI color code for the given namespace * @api private */ @@ -63,6 +59,9 @@ function setup(env) { */ function createDebug(namespace) { let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; function debug(...args) { // Disabled? @@ -92,7 +91,7 @@ function setup(env) { args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { // If we encounter an escaped % then don't increase the array index if (match === '%%') { - return match; + return '%'; } index++; const formatter = createDebug.formatters[format]; @@ -115,33 +114,38 @@ function setup(env) { } debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; + debug.color = createDebug.selectColor(namespace); debug.extend = extend; - // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } - // env-specific initialization logic for debug instances + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances if (typeof createDebug.init === 'function') { createDebug.init(debug); } - createDebug.instances.push(debug); - return debug; } - function destroy() { - const index = createDebug.instances.indexOf(this); - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - return false; - } - function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); newDebug.log = this.log; @@ -157,6 +161,7 @@ function setup(env) { */ function enable(namespaces) { createDebug.save(namespaces); + createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; @@ -174,16 +179,11 @@ function setup(env) { namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); } else { createDebug.names.push(new RegExp('^' + namespaces + '$')); } } - - for (i = 0; i < createDebug.instances.length; i++) { - const instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } } /** @@ -258,6 +258,14 @@ function setup(env) { return val; } + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + createDebug.enable(createDebug.load()); return createDebug; diff --git a/node_modules/https-proxy-agent/node_modules/debug/src/node.js b/node_modules/https-proxy-agent/node_modules/debug/src/node.js index 5e1f154..79bc085 100644 --- a/node_modules/https-proxy-agent/node_modules/debug/src/node.js +++ b/node_modules/https-proxy-agent/node_modules/debug/src/node.js @@ -15,6 +15,10 @@ exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); /** * Colors. @@ -244,7 +248,9 @@ const {formatters} = module.exports; formatters.o = function (v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts) - .replace(/\s*\n\s*/g, ' '); + .split('\n') + .map(str => str.trim()) + .join(' '); }; /** diff --git a/node_modules/https-proxy-agent/node_modules/ms/package.json b/node_modules/https-proxy-agent/node_modules/ms/package.json index a22f9bc..f31aa97 100644 --- a/node_modules/https-proxy-agent/node_modules/ms/package.json +++ b/node_modules/https-proxy-agent/node_modules/ms/package.json @@ -1,14 +1,8 @@ { - "_args": [ - [ - "ms@2.1.2", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], "_from": "ms@2.1.2", "_id": "ms@2.1.2", "_inBundle": false, - "_integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", + "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "_location": "/https-proxy-agent/ms", "_phantomChildren": {}, "_requested": { @@ -24,12 +18,15 @@ "_requiredBy": [ "/https-proxy-agent/debug" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/ms/-/ms-2.1.2.tgz", - "_spec": "2.1.2", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009", + "_spec": "ms@2.1.2", + "_where": "C:\\code\\com.mill\\node_modules\\https-proxy-agent\\node_modules\\debug", "bugs": { "url": "https://github.com/zeit/ms/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Tiny millisecond conversion utility", "devDependencies": { "eslint": "4.12.1", diff --git a/node_modules/https-proxy-agent/package.json b/node_modules/https-proxy-agent/package.json index 560f194..3d46dc8 100644 --- a/node_modules/https-proxy-agent/package.json +++ b/node_modules/https-proxy-agent/package.json @@ -1,32 +1,27 @@ { - "_args": [ - [ - "https-proxy-agent@4.0.0", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "https-proxy-agent@4.0.0", - "_id": "https-proxy-agent@4.0.0", + "_from": "https-proxy-agent@^5.0.0", + "_id": "https-proxy-agent@5.0.1", "_inBundle": false, - "_integrity": "sha1-cCtx+1UgoTKmbeH2dUHZ5iFU2Cs=", + "_integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "_location": "/https-proxy-agent", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "https-proxy-agent@4.0.0", + "raw": "https-proxy-agent@^5.0.0", "name": "https-proxy-agent", "escapedName": "https-proxy-agent", - "rawSpec": "4.0.0", + "rawSpec": "^5.0.0", "saveSpec": null, - "fetchSpec": "4.0.0" + "fetchSpec": "^5.0.0" }, "_requiredBy": [ "/@sentry/node" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "_shasum": "c59ef224a04fe8b754f3db0063a25ea30d0005d6", + "_spec": "https-proxy-agent@^5.0.0", + "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", "author": { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net", @@ -35,18 +30,36 @@ "bugs": { "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues" }, + "bundleDependencies": false, "dependencies": { - "agent-base": "5", + "agent-base": "6", "debug": "4" }, + "deprecated": false, "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", "devDependencies": { - "mocha": "6", - "proxy": "1" + "@types/debug": "4", + "@types/node": "^12.12.11", + "@typescript-eslint/eslint-plugin": "1.6.0", + "@typescript-eslint/parser": "1.1.0", + "eslint": "5.16.0", + "eslint-config-airbnb": "17.1.0", + "eslint-config-prettier": "4.1.0", + "eslint-import-resolver-typescript": "1.1.1", + "eslint-plugin-import": "2.16.0", + "eslint-plugin-jsx-a11y": "6.2.1", + "eslint-plugin-react": "7.12.4", + "mocha": "^6.2.2", + "proxy": "1", + "rimraf": "^3.0.0", + "typescript": "^3.5.3" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 6" }, + "files": [ + "dist" + ], "homepage": "https://github.com/TooTallNate/node-https-proxy-agent#readme", "keywords": [ "https", @@ -55,15 +68,19 @@ "agent" ], "license": "MIT", - "main": "./index.js", + "main": "dist/index", "name": "https-proxy-agent", "repository": { "type": "git", "url": "git://github.com/TooTallNate/node-https-proxy-agent.git" }, "scripts": { - "test": "mocha --reporter spec" + "build": "tsc", + "prebuild": "rimraf dist", + "prepublishOnly": "npm run build", + "test": "mocha --reporter spec", + "test-lint": "eslint src --ext .js,.ts" }, - "types": "./index.d.ts", - "version": "4.0.0" + "types": "dist/index", + "version": "5.0.1" } diff --git a/node_modules/lru_map/package.json b/node_modules/lru_map/package.json index 1fb48cf..6530006 100644 --- a/node_modules/lru_map/package.json +++ b/node_modules/lru_map/package.json @@ -1,32 +1,27 @@ { - "_args": [ - [ - "lru_map@0.3.3", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "lru_map@0.3.3", + "_from": "lru_map@^0.3.3", "_id": "lru_map@0.3.3", "_inBundle": false, - "_integrity": "sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=", + "_integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", "_location": "/lru_map", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "lru_map@0.3.3", + "raw": "lru_map@^0.3.3", "name": "lru_map", "escapedName": "lru_map", - "rawSpec": "0.3.3", + "rawSpec": "^0.3.3", "saveSpec": null, - "fetchSpec": "0.3.3" + "fetchSpec": "^0.3.3" }, "_requiredBy": [ "/@sentry/node" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/lru_map/-/lru_map-0.3.3.tgz", - "_spec": "0.3.3", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "_shasum": "b5c8351b9464cbd750335a79650a0ec0e56118dd", + "_spec": "lru_map@^0.3.3", + "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", "author": { "name": "Rasmus Andersson", "email": "me@rsms.me" @@ -34,6 +29,8 @@ "bugs": { "url": "https://github.com/rsms/js-lru/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Finite key-value map using the Least Recently Used (LRU) algorithm where the most recently used objects are keept in the map while less recently used items are evicted to make room for new ones.", "devDependencies": { "typescript": "^2.0.10" diff --git a/node_modules/node-fetch/CHANGELOG.md b/node_modules/node-fetch/CHANGELOG.md deleted file mode 100644 index 188fcd3..0000000 --- a/node_modules/node-fetch/CHANGELOG.md +++ /dev/null @@ -1,266 +0,0 @@ - -Changelog -========= - - -# 2.x release - -## v2.6.0 - -- Enhance: `options.agent`, it now accepts a function that returns custom http(s).Agent instance based on current URL, see readme for more information. -- Fix: incorrect `Content-Length` was returned for stream body in 2.5.0 release; note that `node-fetch` doesn't calculate content length for stream body. -- Fix: `Response.url` should return empty string instead of `null` by default. - -## v2.5.0 - -- Enhance: `Response` object now includes `redirected` property. -- Enhance: `fetch()` now accepts third-party `Blob` implementation as body. -- Other: disable `package-lock.json` generation as we never commit them. -- Other: dev dependency update. -- Other: readme update. - -## v2.4.1 - -- Fix: `Blob` import rule for node < 10, as `Readable` isn't a named export. - -## v2.4.0 - -- Enhance: added `Brotli` compression support (using node's zlib). -- Enhance: updated `Blob` implementation per spec. -- Fix: set content type automatically for `URLSearchParams`. -- Fix: `Headers` now reject empty header names. -- Fix: test cases, as node 12+ no longer accepts invalid header response. - -## v2.3.0 - -- Enhance: added `AbortSignal` support, with README example. -- Enhance: handle invalid `Location` header during redirect by rejecting them explicitly with `FetchError`. -- Fix: update `browser.js` to support react-native environment, where `self` isn't available globally. - -## v2.2.1 - -- Fix: `compress` flag shouldn't overwrite existing `Accept-Encoding` header. -- Fix: multiple `import` rules, where `PassThrough` etc. doesn't have a named export when using node <10 and `--exerimental-modules` flag. -- Other: Better README. - -## v2.2.0 - -- Enhance: Support all `ArrayBuffer` view types -- Enhance: Support Web Workers -- Enhance: Support Node.js' `--experimental-modules` mode; deprecate `.es.js` file -- Fix: Add `__esModule` property to the exports object -- Other: Better example in README for writing response to a file -- Other: More tests for Agent - -## v2.1.2 - -- Fix: allow `Body` methods to work on `ArrayBuffer`-backed `Body` objects -- Fix: reject promise returned by `Body` methods when the accumulated `Buffer` exceeds the maximum size -- Fix: support custom `Host` headers with any casing -- Fix: support importing `fetch()` from TypeScript in `browser.js` -- Fix: handle the redirect response body properly - -## v2.1.1 - -Fix packaging errors in v2.1.0. - -## v2.1.0 - -- Enhance: allow using ArrayBuffer as the `body` of a `fetch()` or `Request` -- Fix: store HTTP headers of a `Headers` object internally with the given case, for compatibility with older servers that incorrectly treated header names in a case-sensitive manner -- Fix: silently ignore invalid HTTP headers -- Fix: handle HTTP redirect responses without a `Location` header just like non-redirect responses -- Fix: include bodies when following a redirection when appropriate - -## v2.0.0 - -This is a major release. Check [our upgrade guide](https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md) for an overview on some key differences between v1 and v2. - -### General changes - -- Major: Node.js 0.10.x and 0.12.x support is dropped -- Major: `require('node-fetch/lib/response')` etc. is now unsupported; use `require('node-fetch').Response` or ES6 module imports -- Enhance: start testing on Node.js v4.x, v6.x, v8.x LTS, as well as v9.x stable -- Enhance: use Rollup to produce a distributed bundle (less memory overhead and faster startup) -- Enhance: make `Object.prototype.toString()` on Headers, Requests, and Responses return correct class strings -- Other: rewrite in ES2015 using Babel -- Other: use Codecov for code coverage tracking -- Other: update package.json script for npm 5 -- Other: `encoding` module is now optional (alpha.7) -- Other: expose browser.js through package.json, avoid bundling mishaps (alpha.9) -- Other: allow TypeScript to `import` node-fetch by exposing default (alpha.9) - -### HTTP requests - -- Major: overwrite user's `Content-Length` if we can be sure our information is correct (per spec) -- Fix: errors in a response are caught before the body is accessed -- Fix: support WHATWG URL objects, created by `whatwg-url` package or `require('url').URL` in Node.js 7+ - -### Response and Request classes - -- Major: `response.text()` no longer attempts to detect encoding, instead always opting for UTF-8 (per spec); use `response.textConverted()` for the v1 behavior -- Major: make `response.json()` throw error instead of returning an empty object on 204 no-content respose (per spec; reverts behavior changed in v1.6.2) -- Major: internal methods are no longer exposed -- Major: throw error when a `GET` or `HEAD` Request is constructed with a non-null body (per spec) -- Enhance: add `response.arrayBuffer()` (also applies to Requests) -- Enhance: add experimental `response.blob()` (also applies to Requests) -- Enhance: `URLSearchParams` is now accepted as a body -- Enhance: wrap `response.json()` json parsing error as `FetchError` -- Fix: fix Request and Response with `null` body - -### Headers class - -- Major: remove `headers.getAll()`; make `get()` return all headers delimited by commas (per spec) -- Enhance: make Headers iterable -- Enhance: make Headers constructor accept an array of tuples -- Enhance: make sure header names and values are valid in HTTP -- Fix: coerce Headers prototype function parameters to strings, where applicable - -### Documentation - -- Enhance: more comprehensive API docs -- Enhance: add a list of default headers in README - - -# 1.x release - -## backport releases (v1.7.0 and beyond) - -See [changelog on 1.x branch](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) for details. - -## v1.6.3 - -- Enhance: error handling document to explain `FetchError` design -- Fix: support `form-data` 2.x releases (requires `form-data` >= 2.1.0) - -## v1.6.2 - -- Enhance: minor document update -- Fix: response.json() returns empty object on 204 no-content response instead of throwing a syntax error - -## v1.6.1 - -- Fix: if `res.body` is a non-stream non-formdata object, we will call `body.toString` and send it as a string -- Fix: `counter` value is incorrectly set to `follow` value when wrapping Request instance -- Fix: documentation update - -## v1.6.0 - -- Enhance: added `res.buffer()` api for convenience, it returns body as a Node.js buffer -- Enhance: better old server support by handling raw deflate response -- Enhance: skip encoding detection for non-HTML/XML response -- Enhance: minor document update -- Fix: HEAD request doesn't need decompression, as body is empty -- Fix: `req.body` now accepts a Node.js buffer - -## v1.5.3 - -- Fix: handle 204 and 304 responses when body is empty but content-encoding is gzip/deflate -- Fix: allow resolving response and cloned response in any order -- Fix: avoid setting `content-length` when `form-data` body use streams -- Fix: send DELETE request with content-length when body is present -- Fix: allow any url when calling new Request, but still reject non-http(s) url in fetch - -## v1.5.2 - -- Fix: allow node.js core to handle keep-alive connection pool when passing a custom agent - -## v1.5.1 - -- Fix: redirect mode `manual` should work even when there is no redirection or broken redirection - -## v1.5.0 - -- Enhance: rejected promise now use custom `Error` (thx to @pekeler) -- Enhance: `FetchError` contains `err.type` and `err.code`, allows for better error handling (thx to @pekeler) -- Enhance: basic support for redirect mode `manual` and `error`, allows for location header extraction (thx to @jimmywarting for the initial PR) - -## v1.4.1 - -- Fix: wrapping Request instance with FormData body again should preserve the body as-is - -## v1.4.0 - -- Enhance: Request and Response now have `clone` method (thx to @kirill-konshin for the initial PR) -- Enhance: Request and Response now have proper string and buffer body support (thx to @kirill-konshin) -- Enhance: Body constructor has been refactored out (thx to @kirill-konshin) -- Enhance: Headers now has `forEach` method (thx to @tricoder42) -- Enhance: back to 100% code coverage -- Fix: better form-data support (thx to @item4) -- Fix: better character encoding detection under chunked encoding (thx to @dsuket for the initial PR) - -## v1.3.3 - -- Fix: make sure `Content-Length` header is set when body is string for POST/PUT/PATCH requests -- Fix: handle body stream error, for cases such as incorrect `Content-Encoding` header -- Fix: when following certain redirects, use `GET` on subsequent request per Fetch Spec -- Fix: `Request` and `Response` constructors now parse headers input using `Headers` - -## v1.3.2 - -- Enhance: allow auto detect of form-data input (no `FormData` spec on node.js, this is form-data specific feature) - -## v1.3.1 - -- Enhance: allow custom host header to be set (server-side only feature, as it's a forbidden header on client-side) - -## v1.3.0 - -- Enhance: now `fetch.Request` is exposed as well - -## v1.2.1 - -- Enhance: `Headers` now normalized `Number` value to `String`, prevent common mistakes - -## v1.2.0 - -- Enhance: now fetch.Headers and fetch.Response are exposed, making testing easier - -## v1.1.2 - -- Fix: `Headers` should only support `String` and `Array` properties, and ignore others - -## v1.1.1 - -- Enhance: now req.headers accept both plain object and `Headers` instance - -## v1.1.0 - -- Enhance: timeout now also applies to response body (in case of slow response) -- Fix: timeout is now cleared properly when fetch is done/has failed - -## v1.0.6 - -- Fix: less greedy content-type charset matching - -## v1.0.5 - -- Fix: when `follow = 0`, fetch should not follow redirect -- Enhance: update tests for better coverage -- Enhance: code formatting -- Enhance: clean up doc - -## v1.0.4 - -- Enhance: test iojs support -- Enhance: timeout attached to socket event only fire once per redirect - -## v1.0.3 - -- Fix: response size limit should reject large chunk -- Enhance: added character encoding detection for xml, such as rss/atom feed (encoding in DTD) - -## v1.0.2 - -- Fix: added res.ok per spec change - -## v1.0.0 - -- Enhance: better test coverage and doc - - -# 0.x release - -## v0.1 - -- Major: initial public release diff --git a/node_modules/node-fetch/README.md b/node_modules/node-fetch/README.md index cb19901..4f87a59 100644 --- a/node_modules/node-fetch/README.md +++ b/node_modules/node-fetch/README.md @@ -5,11 +5,14 @@ node-fetch [![build status][travis-image]][travis-url] [![coverage status][codecov-image]][codecov-url] [![install size][install-size-image]][install-size-url] +[![Discord][discord-image]][discord-url] A light-weight module that brings `window.fetch` to Node.js (We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567)) +[![Backers][opencollective-image]][opencollective-url] + - [Motivation](#motivation) @@ -48,7 +51,7 @@ A light-weight module that brings `window.fetch` to Node.js ## Motivation -Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime. +Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime. See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side). @@ -56,9 +59,9 @@ See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorph - Stay consistent with `window.fetch` API. - Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences. -- Use native promise, but allow substituting it with [insert your favorite promise library]. -- Use native Node streams for body, on both request and response. -- Decode content encoding (gzip/deflate) properly, and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically. +- Use native promise but allow substituting it with [insert your favorite promise library]. +- Use native Node streams for body on both request and response. +- Decode content encoding (gzip/deflate) properly and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically. - Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting. ## Difference from client-side fetch @@ -72,16 +75,16 @@ See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorph Current stable release (`2.x`) ```sh -$ npm install node-fetch --save +$ npm install node-fetch ``` ## Loading and configuring the module -We suggest you load the module via `require`, pending the stabalizing of es modules in node: +We suggest you load the module via `require` until the stabilization of ES modules in node: ```js const fetch = require('node-fetch'); ``` -If you are using a Promise library other than native, set it through fetch.Promise: +If you are using a Promise library other than native, set it through `fetch.Promise`: ```js const Bluebird = require('bluebird'); @@ -90,7 +93,7 @@ fetch.Promise = Bluebird; ## Common Usage -NOTE: The documentation below is up-to-date with `2.x` releases, [see `1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences. +NOTE: The documentation below is up-to-date with `2.x` releases; see the [`1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences. #### Plain text or HTML ```js @@ -146,9 +149,9 @@ fetch('https://httpbin.org/post', { method: 'POST', body: params }) ``` #### Handling exceptions -NOTE: 3xx-5xx responses are *NOT* exceptions, and should be handled in `then()`, see the next section. +NOTE: 3xx-5xx responses are *NOT* exceptions and should be handled in `then()`; see the next section for more information. -Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, like network errors, and operational errors which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md) for more details. +Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, network errors and operational errors, which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md) for more details. ```js fetch('https://domain.invalid/') @@ -185,8 +188,51 @@ fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') }); ``` +In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch +errors -- the longer a response runs, the more likely it is to encounter an error. + +```js +const fetch = require('node-fetch'); +const response = await fetch('https://httpbin.org/stream/3'); +try { + for await (const chunk of response.body) { + console.dir(JSON.parse(chunk.toString())); + } +} catch (err) { + console.error(err.stack); +} +``` + +In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams +did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors +directly from the stream and wait on it response to fully close. + +```js +const fetch = require('node-fetch'); +const read = async body => { + let error; + body.on('error', err => { + error = err; + }); + for await (const chunk of body) { + console.dir(JSON.parse(chunk.toString())); + } + return new Promise((resolve, reject) => { + body.on('close', () => { + error ? reject(error) : resolve(); + }); + }); +}; +try { + const response = await fetch('https://httpbin.org/stream/3'); + await read(response.body); +} catch (err) { + console.error(err.stack); +} +``` + #### Buffer -If you prefer to cache binary data in full, use buffer(). (NOTE: buffer() is a `node-fetch` only API) +If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API) ```js const fileType = require('file-type'); @@ -211,7 +257,7 @@ fetch('https://github.com/') #### Extract Set-Cookie Header -Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`, this is a `node-fetch` only API. +Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API. ```js fetch(url).then(res => { @@ -263,11 +309,11 @@ fetch('https://httpbin.org/post', options) #### Request cancellation with AbortSignal -> NOTE: You may only cancel streamed requests on Node >= v8.0.0 +> NOTE: You may cancel streamed requests only on Node >= v8.0.0 You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller). -An example of timing out a request after 150ms could be achieved as follows: +An example of timing out a request after 150ms could be achieved as the following: ```js import AbortController from 'abort-controller'; @@ -308,7 +354,7 @@ See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) Perform an HTTP(S) fetch. -`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected promise. +`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`. ### Options @@ -350,7 +396,7 @@ Note: when `body` is a `Stream`, `Content-Length` is not set automatically. ##### Custom Agent -The `agent` option allows you to specify networking related options that's out of the scope of Fetch. Including and not limit to: +The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following: - Support self-signed certificate - Use only IPv4 or IPv6 @@ -358,7 +404,7 @@ The `agent` option allows you to specify networking related options that's out o See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information. -In addition, `agent` option accepts a function that returns http(s).Agent instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol. +In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol. ```js const httpAgent = new http.Agent({ @@ -432,7 +478,7 @@ The following properties are not implemented in node-fetch at this moment: *(spec-compliant)* -- `body` A string or [Readable stream][node-readable] +- `body` A `String` or [`Readable` stream][node-readable] - `options` A [`ResponseInit`][response-init] options dictionary Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response). @@ -462,7 +508,7 @@ This class allows manipulating and iterating over a set of HTTP headers. All met - `init` Optional argument to pre-fill the `Headers` object -Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object, or any iterable object. +Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object. ```js // Example adapted from https://fetch.spec.whatwg.org/#example-headers-class @@ -503,7 +549,7 @@ The following methods are not yet implemented in node-fetch at this moment: * Node.js [`Readable` stream][node-readable] -The data encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable]. +Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable]. #### body.bodyUsed @@ -511,7 +557,7 @@ The data encapsulated in the `Body` object. Note that while the [Fetch Standard] * `Boolean` -A boolean property for if this body has been consumed. Per spec, a consumed body cannot be used again. +A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again. #### body.arrayBuffer() #### body.blob() @@ -538,9 +584,9 @@ Consume the body and return a promise that will resolve to a Buffer. * Returns: Promise<String> -Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8, if possible. +Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8 if possible. -(This API requires an optional dependency on npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.) +(This API requires an optional dependency of the npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.) ### Class: FetchError @@ -574,6 +620,10 @@ MIT [codecov-url]: https://codecov.io/gh/bitinn/node-fetch [install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch [install-size-url]: https://packagephobia.now.sh/result?p=node-fetch +[discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square +[discord-url]: https://discord.gg/Zxbndcm +[opencollective-image]: https://opencollective.com/node-fetch/backers.svg +[opencollective-url]: https://opencollective.com/node-fetch [whatwg-fetch]: https://fetch.spec.whatwg.org/ [response-init]: https://fetch.spec.whatwg.org/#responseinit [node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams diff --git a/node_modules/node-fetch/browser.js b/node_modules/node-fetch/browser.js index 0ad5de0..7035edb 100644 --- a/node_modules/node-fetch/browser.js +++ b/node_modules/node-fetch/browser.js @@ -11,13 +11,15 @@ var getGlobal = function () { throw new Error('unable to locate global object'); } -var global = getGlobal(); +var globalObject = getGlobal(); -module.exports = exports = global.fetch; +module.exports = exports = globalObject.fetch; // Needed for TypeScript and Webpack. -exports.default = global.fetch.bind(global); +if (globalObject.fetch) { + exports.default = globalObject.fetch.bind(global); +} -exports.Headers = global.Headers; -exports.Request = global.Request; -exports.Response = global.Response; \ No newline at end of file +exports.Headers = globalObject.Headers; +exports.Request = globalObject.Request; +exports.Response = globalObject.Response; diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js index 37d022c..a8b6be4 100644 --- a/node_modules/node-fetch/lib/index.es.js +++ b/node_modules/node-fetch/lib/index.es.js @@ -3,6 +3,7 @@ process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); import Stream from 'stream'; import http from 'http'; import Url from 'url'; +import whatwgUrl from 'whatwg-url'; import https from 'https'; import zlib from 'zlib'; @@ -461,6 +462,12 @@ function convertBody(buffer, headers) { // html4 if (!res && str) { res = / 0; + + // if end happened before close but the socket didn't emit an error, do it now + if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', err); + } + }); + }); + } + req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1463,12 +1545,24 @@ function fetch(url, opts) { const location = headers.get('Location'); // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } // HTTP fetch step 5.5 switch (request.redirect) { case 'error': - reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); finalize(); return; case 'manual': @@ -1507,9 +1601,16 @@ function fetch(url, opts) { method: request.method, body: request.body, signal: request.signal, - timeout: request.timeout + timeout: request.timeout, + size: request.size }; + if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + // HTTP-redirect fetch step 9 if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); @@ -1597,6 +1698,13 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); + raw.on('end', function () { + // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. + if (!response) { + response = new Response(body, response_options); + resolve(response); + } + }); return; } @@ -1616,6 +1724,41 @@ function fetch(url, opts) { writeToStream(req, request); }); } +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + let socket; + + request.on('socket', function (s) { + socket = s; + }); + + request.on('response', function (response) { + const headers = response.headers; + + if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { + response.once('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = socket.listenerCount('data') > 0; + + if (hasDataListener && !hadError) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(err); + } + }); + } + }); +} + +function destroyStream(stream, err) { + if (stream.destroy) { + stream.destroy(err); + } else { + // node < 8 + stream.emit('error', err); + stream.end(); + } +} + /** * Redirect code matching * diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js index daa44bc..06a61a6 100644 --- a/node_modules/node-fetch/lib/index.js +++ b/node_modules/node-fetch/lib/index.js @@ -7,6 +7,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau var Stream = _interopDefault(require('stream')); var http = _interopDefault(require('http')); var Url = _interopDefault(require('url')); +var whatwgUrl = _interopDefault(require('whatwg-url')); var https = _interopDefault(require('https')); var zlib = _interopDefault(require('zlib')); @@ -465,6 +466,12 @@ function convertBody(buffer, headers) { // html4 if (!res && str) { res = / 0; + + // if end happened before close but the socket didn't emit an error, do it now + if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', err); + } + }); + }); + } + req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1467,12 +1549,24 @@ function fetch(url, opts) { const location = headers.get('Location'); // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } // HTTP fetch step 5.5 switch (request.redirect) { case 'error': - reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); finalize(); return; case 'manual': @@ -1511,9 +1605,16 @@ function fetch(url, opts) { method: request.method, body: request.body, signal: request.signal, - timeout: request.timeout + timeout: request.timeout, + size: request.size }; + if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + // HTTP-redirect fetch step 9 if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); @@ -1601,6 +1702,13 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); + raw.on('end', function () { + // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. + if (!response) { + response = new Response(body, response_options); + resolve(response); + } + }); return; } @@ -1620,6 +1728,41 @@ function fetch(url, opts) { writeToStream(req, request); }); } +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + let socket; + + request.on('socket', function (s) { + socket = s; + }); + + request.on('response', function (response) { + const headers = response.headers; + + if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { + response.once('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = socket.listenerCount('data') > 0; + + if (hasDataListener && !hadError) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(err); + } + }); + } + }); +} + +function destroyStream(stream, err) { + if (stream.destroy) { + stream.destroy(err); + } else { + // node < 8 + stream.emit('error', err); + stream.end(); + } +} + /** * Redirect code matching * diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs index e571ea6..e67d788 100644 --- a/node_modules/node-fetch/lib/index.mjs +++ b/node_modules/node-fetch/lib/index.mjs @@ -1,6 +1,7 @@ import Stream from 'stream'; import http from 'http'; import Url from 'url'; +import whatwgUrl from 'whatwg-url'; import https from 'https'; import zlib from 'zlib'; @@ -459,6 +460,12 @@ function convertBody(buffer, headers) { // html4 if (!res && str) { res = / 0; + + // if end happened before close but the socket didn't emit an error, do it now + if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', err); + } + }); + }); + } + req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1461,12 +1543,24 @@ function fetch(url, opts) { const location = headers.get('Location'); // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } // HTTP fetch step 5.5 switch (request.redirect) { case 'error': - reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); finalize(); return; case 'manual': @@ -1505,9 +1599,16 @@ function fetch(url, opts) { method: request.method, body: request.body, signal: request.signal, - timeout: request.timeout + timeout: request.timeout, + size: request.size }; + if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + // HTTP-redirect fetch step 9 if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); @@ -1595,6 +1696,13 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); + raw.on('end', function () { + // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. + if (!response) { + response = new Response(body, response_options); + resolve(response); + } + }); return; } @@ -1614,6 +1722,41 @@ function fetch(url, opts) { writeToStream(req, request); }); } +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + let socket; + + request.on('socket', function (s) { + socket = s; + }); + + request.on('response', function (response) { + const headers = response.headers; + + if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { + response.once('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = socket.listenerCount('data') > 0; + + if (hasDataListener && !hadError) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(err); + } + }); + } + }); +} + +function destroyStream(stream, err) { + if (stream.destroy) { + stream.destroy(err); + } else { + // node < 8 + stream.emit('error', err); + stream.end(); + } +} + /** * Redirect code matching * diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json index 2837b8a..9aadd84 100644 --- a/node_modules/node-fetch/package.json +++ b/node_modules/node-fetch/package.json @@ -1,32 +1,28 @@ { - "_args": [ - [ - "node-fetch@2.6.0", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" - ] - ], - "_from": "node-fetch@2.6.0", - "_id": "node-fetch@2.6.0", + "_from": "node-fetch@2.6.8", + "_id": "node-fetch@2.6.8", "_inBundle": false, - "_integrity": "sha1-5jNFY4bUqlWGP2dqerDaqP3ssP0=", + "_integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", "_location": "/node-fetch", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "node-fetch@2.6.0", + "raw": "node-fetch@2.6.8", "name": "node-fetch", "escapedName": "node-fetch", - "rawSpec": "2.6.0", + "rawSpec": "2.6.8", "saveSpec": null, - "fetchSpec": "2.6.0" + "fetchSpec": "2.6.8" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/node-fetch/-/node-fetch-2.6.0.tgz", - "_spec": "2.6.0", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "_shasum": "a68d30b162bc1d8fd71a367e81b997e1f4d4937e", + "_spec": "node-fetch@2.6.8", + "_where": "C:\\code\\com.mill", "author": { "name": "David Frank" }, @@ -34,7 +30,11 @@ "bugs": { "url": "https://github.com/bitinn/node-fetch/issues" }, - "dependencies": {}, + "bundleDependencies": false, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "deprecated": false, "description": "A light-weight module that brings window.fetch to node.js", "devDependencies": { "@ungap/url-search-params": "^0.1.2", @@ -42,13 +42,15 @@ "abortcontroller-polyfill": "^1.3.0", "babel-core": "^6.26.3", "babel-plugin-istanbul": "^4.1.6", - "babel-preset-env": "^1.6.1", + "babel-plugin-transform-async-generator-functions": "^6.24.1", + "babel-polyfill": "^6.26.0", + "babel-preset-env": "1.4.0", "babel-register": "^6.16.3", "chai": "^3.5.0", "chai-as-promised": "^7.1.1", "chai-iterator": "^1.1.1", "chai-string": "~1.3.0", - "codecov": "^3.3.0", + "codecov": "3.3.0", "cross-env": "^5.2.0", "form-data": "^2.3.3", "is-builtin-module": "^1.0.0", @@ -60,7 +62,7 @@ "rollup": "^0.63.4", "rollup-plugin-babel": "^3.0.7", "string-to-arraybuffer": "^1.0.2", - "whatwg-url": "^5.0.0" + "teeny-request": "3.7.0" }, "engines": { "node": "4.x || >=6.0.0" @@ -78,9 +80,28 @@ "promise" ], "license": "MIT", - "main": "lib/index", + "main": "lib/index.js", "module": "lib/index.mjs", "name": "node-fetch", + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + }, + "release": { + "branches": [ + "+([0-9]).x", + "main", + "next", + { + "name": "beta", + "prerelease": true + } + ] + }, "repository": { "type": "git", "url": "git+https://github.com/bitinn/node-fetch.git" @@ -92,5 +113,5 @@ "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js" }, - "version": "2.6.0" + "version": "2.6.8" } diff --git a/node_modules/tslib/package.json b/node_modules/tslib/package.json index e3850ca..fbfe30b 100644 --- a/node_modules/tslib/package.json +++ b/node_modules/tslib/package.json @@ -2,7 +2,7 @@ "_args": [ [ "tslib@1.9.3", - "/Users/glennskarepedersen/code/mystuff/homey/com.mill" + "C:\\code\\com.mill" ] ], "_from": "tslib@1.9.3", @@ -22,18 +22,14 @@ "fetchSpec": "1.9.3" }, "_requiredBy": [ - "/@sentry/apm", - "/@sentry/browser", "/@sentry/core", - "/@sentry/hub", - "/@sentry/minimal", "/@sentry/node", "/@sentry/utils", "/rxjs" ], "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/tslib/-/tslib-1.9.3.tgz", "_spec": "1.9.3", - "_where": "/Users/glennskarepedersen/code/mystuff/homey/com.mill", + "_where": "C:\\code\\com.mill", "author": { "name": "Microsoft Corp." }, From 8dd37cd65514370cba3b86e784aaec2803b44509 Mon Sep 17 00:00:00 2001 From: Rune Vaernes Date: Mon, 23 Jan 2023 09:08:14 +0100 Subject: [PATCH 3/5] removed node_module --- node_modules/@sentry/core/LICENSE | 14 - node_modules/@sentry/core/README.md | 23 - node_modules/@sentry/core/esm/api.js | 86 - node_modules/@sentry/core/esm/api.js.map | 1 - node_modules/@sentry/core/esm/baseclient.js | 641 ------ .../@sentry/core/esm/baseclient.js.map | 1 - node_modules/@sentry/core/esm/index.js | 20 - node_modules/@sentry/core/esm/index.js.map | 1 - node_modules/@sentry/core/esm/integration.js | 98 - .../@sentry/core/esm/integration.js.map | 1 - .../core/esm/integrations/functiontostring.js | 33 - .../esm/integrations/functiontostring.js.map | 1 - .../core/esm/integrations/inboundfilters.js | 180 -- .../esm/integrations/inboundfilters.js.map | 1 - .../@sentry/core/esm/integrations/index.js | 3 - .../core/esm/integrations/index.js.map | 1 - node_modules/@sentry/core/esm/sdk.js | 37 - node_modules/@sentry/core/esm/sdk.js.map | 1 - node_modules/@sentry/core/package.json | 58 - node_modules/@sentry/node/LICENSE | 14 - node_modules/@sentry/node/README.md | 62 - node_modules/@sentry/node/esm/client.js | 165 -- node_modules/@sentry/node/esm/client.js.map | 1 - node_modules/@sentry/node/esm/handlers.js | 289 --- node_modules/@sentry/node/esm/handlers.js.map | 1 - node_modules/@sentry/node/esm/index.js | 34 - node_modules/@sentry/node/esm/index.js.map | 1 - .../@sentry/node/esm/integrations/console.js | 57 - .../node/esm/integrations/console.js.map | 1 - .../@sentry/node/esm/integrations/http.js | 260 --- .../@sentry/node/esm/integrations/http.js.map | 1 - .../@sentry/node/esm/integrations/index.js | 11 - .../node/esm/integrations/index.js.map | 1 - .../node/esm/integrations/linkederrors.js | 108 - .../node/esm/integrations/linkederrors.js.map | 1 - .../@sentry/node/esm/integrations/modules.js | 106 - .../node/esm/integrations/modules.js.map | 1 - .../esm/integrations/onuncaughtexception.js | 151 -- .../integrations/onuncaughtexception.js.map | 1 - .../esm/integrations/onunhandledrejection.js | 83 - .../integrations/onunhandledrejection.js.map | 1 - node_modules/@sentry/node/esm/sdk.js | 277 --- node_modules/@sentry/node/esm/sdk.js.map | 1 - .../@sentry/node/esm/transports/http.js | 153 -- .../@sentry/node/esm/transports/http.js.map | 1 - .../@sentry/node/esm/transports/index.js | 4 - .../@sentry/node/esm/transports/index.js.map | 1 - node_modules/@sentry/node/package.json | 70 - node_modules/@sentry/types/LICENSE | 14 - node_modules/@sentry/types/README.md | 20 - node_modules/@sentry/types/esm/index.js | 55 - node_modules/@sentry/types/esm/index.js.map | 1 - node_modules/@sentry/types/package.json | 55 - node_modules/@sentry/utils/LICENSE | 14 - node_modules/@sentry/utils/README.md | 22 - node_modules/@sentry/utils/esm/dsn.js | 109 - node_modules/@sentry/utils/esm/dsn.js.map | 1 - node_modules/@sentry/utils/esm/error.js | 18 - node_modules/@sentry/utils/esm/error.js.map | 1 - node_modules/@sentry/utils/esm/index.js | 29 - node_modules/@sentry/utils/esm/index.js.map | 1 - node_modules/@sentry/utils/esm/instrument.js | 574 ------ .../@sentry/utils/esm/instrument.js.map | 1 - node_modules/@sentry/utils/esm/is.js | 179 -- node_modules/@sentry/utils/esm/is.js.map | 1 - node_modules/@sentry/utils/esm/logger.js | 83 - node_modules/@sentry/utils/esm/logger.js.map | 1 - node_modules/@sentry/utils/esm/memo.js | 45 - node_modules/@sentry/utils/esm/memo.js.map | 1 - node_modules/@sentry/utils/esm/misc.js | 197 -- node_modules/@sentry/utils/esm/misc.js.map | 1 - node_modules/@sentry/utils/esm/object.js | 279 --- node_modules/@sentry/utils/esm/object.js.map | 1 - node_modules/@sentry/utils/esm/path.js | 188 -- node_modules/@sentry/utils/esm/path.js.map | 1 - .../@sentry/utils/esm/promisebuffer.js | 102 - .../@sentry/utils/esm/promisebuffer.js.map | 1 - node_modules/@sentry/utils/esm/string.js | 149 -- node_modules/@sentry/utils/esm/string.js.map | 1 - node_modules/@sentry/utils/esm/supports.js | 181 -- .../@sentry/utils/esm/supports.js.map | 1 - node_modules/@sentry/utils/esm/syncpromise.js | 191 -- .../@sentry/utils/esm/syncpromise.js.map | 1 - node_modules/@sentry/utils/package.json | 63 - node_modules/agent-base/README.md | 145 -- node_modules/agent-base/dist/src/index.d.ts | 78 - node_modules/agent-base/dist/src/index.js | 203 -- node_modules/agent-base/dist/src/index.js.map | 1 - .../agent-base/dist/src/promisify.d.ts | 4 - node_modules/agent-base/dist/src/promisify.js | 18 - .../agent-base/dist/src/promisify.js.map | 1 - node_modules/agent-base/package.json | 94 - node_modules/cookie/HISTORY.md | 134 -- node_modules/cookie/LICENSE | 24 - node_modules/cookie/README.md | 286 --- node_modules/cookie/index.js | 202 -- node_modules/cookie/package.json | 80 - node_modules/https-proxy-agent/README.md | 137 -- .../node_modules/debug/LICENSE | 20 - .../node_modules/debug/README.md | 481 ----- .../node_modules/debug/package.json | 101 - .../node_modules/debug/src/browser.js | 269 --- .../node_modules/debug/src/common.js | 274 --- .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/node.js | 263 --- .../node_modules/ms/index.js | 162 -- .../node_modules/ms/license.md | 21 - .../node_modules/ms/package.json | 69 - .../node_modules/ms/readme.md | 60 - node_modules/https-proxy-agent/package.json | 86 - node_modules/lru_map/.npmignore | 5 - node_modules/lru_map/.travis.yml | 6 - node_modules/lru_map/README.md | 214 -- node_modules/lru_map/benchmark.js | 155 -- node_modules/lru_map/benchmark.out.txt | 123 -- node_modules/lru_map/example.html | 94 - node_modules/lru_map/lru.d.ts | 83 - node_modules/lru_map/lru.js | 305 --- node_modules/lru_map/package.json | 59 - node_modules/lru_map/test.js | 336 ---- node_modules/lru_map/tsconfig.json | 16 - node_modules/lru_map/tstest.ts | 6 - node_modules/node-fetch/LICENSE.md | 22 - node_modules/node-fetch/README.md | 633 ------ node_modules/node-fetch/browser.js | 25 - node_modules/node-fetch/lib/index.es.js | 1776 ---------------- node_modules/node-fetch/lib/index.js | 1785 ----------------- node_modules/node-fetch/lib/index.mjs | 1774 ---------------- node_modules/node-fetch/package.json | 117 -- node_modules/tslib/.gitattributes | 1 - node_modules/tslib/CopyrightNotice.txt | 15 - node_modules/tslib/LICENSE.txt | 55 - node_modules/tslib/README.md | 134 -- node_modules/tslib/bower.json | 34 - node_modules/tslib/docs/generator.md | 486 ----- node_modules/tslib/package.json | 61 - node_modules/tslib/tslib.d.ts | 33 - node_modules/tslib/tslib.es6.html | 1 - node_modules/tslib/tslib.es6.js | 186 -- node_modules/tslib/tslib.html | 1 - node_modules/tslib/tslib.js | 243 --- 141 files changed, 17647 deletions(-) delete mode 100644 node_modules/@sentry/core/LICENSE delete mode 100644 node_modules/@sentry/core/README.md delete mode 100644 node_modules/@sentry/core/esm/api.js delete mode 100644 node_modules/@sentry/core/esm/api.js.map delete mode 100644 node_modules/@sentry/core/esm/baseclient.js delete mode 100644 node_modules/@sentry/core/esm/baseclient.js.map delete mode 100644 node_modules/@sentry/core/esm/index.js delete mode 100644 node_modules/@sentry/core/esm/index.js.map delete mode 100644 node_modules/@sentry/core/esm/integration.js delete mode 100644 node_modules/@sentry/core/esm/integration.js.map delete mode 100644 node_modules/@sentry/core/esm/integrations/functiontostring.js delete mode 100644 node_modules/@sentry/core/esm/integrations/functiontostring.js.map delete mode 100644 node_modules/@sentry/core/esm/integrations/inboundfilters.js delete mode 100644 node_modules/@sentry/core/esm/integrations/inboundfilters.js.map delete mode 100644 node_modules/@sentry/core/esm/integrations/index.js delete mode 100644 node_modules/@sentry/core/esm/integrations/index.js.map delete mode 100644 node_modules/@sentry/core/esm/sdk.js delete mode 100644 node_modules/@sentry/core/esm/sdk.js.map delete mode 100644 node_modules/@sentry/core/package.json delete mode 100644 node_modules/@sentry/node/LICENSE delete mode 100644 node_modules/@sentry/node/README.md delete mode 100644 node_modules/@sentry/node/esm/client.js delete mode 100644 node_modules/@sentry/node/esm/client.js.map delete mode 100644 node_modules/@sentry/node/esm/handlers.js delete mode 100644 node_modules/@sentry/node/esm/handlers.js.map delete mode 100644 node_modules/@sentry/node/esm/index.js delete mode 100644 node_modules/@sentry/node/esm/index.js.map delete mode 100644 node_modules/@sentry/node/esm/integrations/console.js delete mode 100644 node_modules/@sentry/node/esm/integrations/console.js.map delete mode 100644 node_modules/@sentry/node/esm/integrations/http.js delete mode 100644 node_modules/@sentry/node/esm/integrations/http.js.map delete mode 100644 node_modules/@sentry/node/esm/integrations/index.js delete mode 100644 node_modules/@sentry/node/esm/integrations/index.js.map delete mode 100644 node_modules/@sentry/node/esm/integrations/linkederrors.js delete mode 100644 node_modules/@sentry/node/esm/integrations/linkederrors.js.map delete mode 100644 node_modules/@sentry/node/esm/integrations/modules.js delete mode 100644 node_modules/@sentry/node/esm/integrations/modules.js.map delete mode 100644 node_modules/@sentry/node/esm/integrations/onuncaughtexception.js delete mode 100644 node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map delete mode 100644 node_modules/@sentry/node/esm/integrations/onunhandledrejection.js delete mode 100644 node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map delete mode 100644 node_modules/@sentry/node/esm/sdk.js delete mode 100644 node_modules/@sentry/node/esm/sdk.js.map delete mode 100644 node_modules/@sentry/node/esm/transports/http.js delete mode 100644 node_modules/@sentry/node/esm/transports/http.js.map delete mode 100644 node_modules/@sentry/node/esm/transports/index.js delete mode 100644 node_modules/@sentry/node/esm/transports/index.js.map delete mode 100644 node_modules/@sentry/node/package.json delete mode 100644 node_modules/@sentry/types/LICENSE delete mode 100644 node_modules/@sentry/types/README.md delete mode 100644 node_modules/@sentry/types/esm/index.js delete mode 100644 node_modules/@sentry/types/esm/index.js.map delete mode 100644 node_modules/@sentry/types/package.json delete mode 100644 node_modules/@sentry/utils/LICENSE delete mode 100644 node_modules/@sentry/utils/README.md delete mode 100644 node_modules/@sentry/utils/esm/dsn.js delete mode 100644 node_modules/@sentry/utils/esm/dsn.js.map delete mode 100644 node_modules/@sentry/utils/esm/error.js delete mode 100644 node_modules/@sentry/utils/esm/error.js.map delete mode 100644 node_modules/@sentry/utils/esm/index.js delete mode 100644 node_modules/@sentry/utils/esm/index.js.map delete mode 100644 node_modules/@sentry/utils/esm/instrument.js delete mode 100644 node_modules/@sentry/utils/esm/instrument.js.map delete mode 100644 node_modules/@sentry/utils/esm/is.js delete mode 100644 node_modules/@sentry/utils/esm/is.js.map delete mode 100644 node_modules/@sentry/utils/esm/logger.js delete mode 100644 node_modules/@sentry/utils/esm/logger.js.map delete mode 100644 node_modules/@sentry/utils/esm/memo.js delete mode 100644 node_modules/@sentry/utils/esm/memo.js.map delete mode 100644 node_modules/@sentry/utils/esm/misc.js delete mode 100644 node_modules/@sentry/utils/esm/misc.js.map delete mode 100644 node_modules/@sentry/utils/esm/object.js delete mode 100644 node_modules/@sentry/utils/esm/object.js.map delete mode 100644 node_modules/@sentry/utils/esm/path.js delete mode 100644 node_modules/@sentry/utils/esm/path.js.map delete mode 100644 node_modules/@sentry/utils/esm/promisebuffer.js delete mode 100644 node_modules/@sentry/utils/esm/promisebuffer.js.map delete mode 100644 node_modules/@sentry/utils/esm/string.js delete mode 100644 node_modules/@sentry/utils/esm/string.js.map delete mode 100644 node_modules/@sentry/utils/esm/supports.js delete mode 100644 node_modules/@sentry/utils/esm/supports.js.map delete mode 100644 node_modules/@sentry/utils/esm/syncpromise.js delete mode 100644 node_modules/@sentry/utils/esm/syncpromise.js.map delete mode 100644 node_modules/@sentry/utils/package.json delete mode 100644 node_modules/agent-base/README.md delete mode 100644 node_modules/agent-base/dist/src/index.d.ts delete mode 100644 node_modules/agent-base/dist/src/index.js delete mode 100644 node_modules/agent-base/dist/src/index.js.map delete mode 100644 node_modules/agent-base/dist/src/promisify.d.ts delete mode 100644 node_modules/agent-base/dist/src/promisify.js delete mode 100644 node_modules/agent-base/dist/src/promisify.js.map delete mode 100644 node_modules/agent-base/package.json delete mode 100644 node_modules/cookie/HISTORY.md delete mode 100644 node_modules/cookie/LICENSE delete mode 100644 node_modules/cookie/README.md delete mode 100644 node_modules/cookie/index.js delete mode 100644 node_modules/cookie/package.json delete mode 100644 node_modules/https-proxy-agent/README.md delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/LICENSE delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/README.md delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/package.json delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/src/browser.js delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/src/common.js delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/src/index.js delete mode 100644 node_modules/https-proxy-agent/node_modules/debug/src/node.js delete mode 100644 node_modules/https-proxy-agent/node_modules/ms/index.js delete mode 100644 node_modules/https-proxy-agent/node_modules/ms/license.md delete mode 100644 node_modules/https-proxy-agent/node_modules/ms/package.json delete mode 100644 node_modules/https-proxy-agent/node_modules/ms/readme.md delete mode 100644 node_modules/https-proxy-agent/package.json delete mode 100644 node_modules/lru_map/.npmignore delete mode 100644 node_modules/lru_map/.travis.yml delete mode 100644 node_modules/lru_map/README.md delete mode 100644 node_modules/lru_map/benchmark.js delete mode 100644 node_modules/lru_map/benchmark.out.txt delete mode 100755 node_modules/lru_map/example.html delete mode 100644 node_modules/lru_map/lru.d.ts delete mode 100644 node_modules/lru_map/lru.js delete mode 100644 node_modules/lru_map/package.json delete mode 100644 node_modules/lru_map/test.js delete mode 100644 node_modules/lru_map/tsconfig.json delete mode 100644 node_modules/lru_map/tstest.ts delete mode 100644 node_modules/node-fetch/LICENSE.md delete mode 100644 node_modules/node-fetch/README.md delete mode 100644 node_modules/node-fetch/browser.js delete mode 100644 node_modules/node-fetch/lib/index.es.js delete mode 100644 node_modules/node-fetch/lib/index.js delete mode 100644 node_modules/node-fetch/lib/index.mjs delete mode 100644 node_modules/node-fetch/package.json delete mode 100644 node_modules/tslib/.gitattributes delete mode 100644 node_modules/tslib/CopyrightNotice.txt delete mode 100644 node_modules/tslib/LICENSE.txt delete mode 100644 node_modules/tslib/README.md delete mode 100644 node_modules/tslib/bower.json delete mode 100644 node_modules/tslib/docs/generator.md delete mode 100644 node_modules/tslib/package.json delete mode 100644 node_modules/tslib/tslib.d.ts delete mode 100644 node_modules/tslib/tslib.es6.html delete mode 100644 node_modules/tslib/tslib.es6.js delete mode 100644 node_modules/tslib/tslib.html delete mode 100644 node_modules/tslib/tslib.js diff --git a/node_modules/@sentry/core/LICENSE b/node_modules/@sentry/core/LICENSE deleted file mode 100644 index 535ef05..0000000 --- a/node_modules/@sentry/core/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@sentry/core/README.md b/node_modules/@sentry/core/README.md deleted file mode 100644 index 3e44a1d..0000000 --- a/node_modules/@sentry/core/README.md +++ /dev/null @@ -1,23 +0,0 @@ -

- - Sentry - -

- -# Sentry JavaScript SDK Core - -[![npm version](https://img.shields.io/npm/v/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core) -[![npm dm](https://img.shields.io/npm/dm/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core) -[![npm dt](https://img.shields.io/npm/dt/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core) - -## Links - -- [Official SDK Docs](https://docs.sentry.io/quickstart/) -- [TypeDoc](http://getsentry.github.io/sentry-javascript/) - -## General - -This package contains interface definitions, base classes and utilities for building Sentry JavaScript SDKs, like -`@sentry/node` or `@sentry/browser`. - -Please consider all classes and exported functions and interfaces `internal`. diff --git a/node_modules/@sentry/core/esm/api.js b/node_modules/@sentry/core/esm/api.js deleted file mode 100644 index 001a9c1..0000000 --- a/node_modules/@sentry/core/esm/api.js +++ /dev/null @@ -1,86 +0,0 @@ -import { urlEncode, makeDsn, dsnToString } from '@sentry/utils'; - -const SENTRY_API_VERSION = '7'; - -/** Returns the prefix to construct Sentry ingestion API endpoints. */ -function getBaseApiEndpoint(dsn) { - const protocol = dsn.protocol ? `${dsn.protocol}:` : ''; - const port = dsn.port ? `:${dsn.port}` : ''; - return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`; -} - -/** Returns the ingest API endpoint for target. */ -function _getIngestEndpoint(dsn) { - return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; -} - -/** Returns a URL-encoded string with auth config suitable for a query string. */ -function _encodedAuth(dsn, sdkInfo) { - return urlEncode({ - // We send only the minimum set of required information. See - // https://github.com/getsentry/sentry-javascript/issues/2572. - sentry_key: dsn.publicKey, - sentry_version: SENTRY_API_VERSION, - ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }), - }); -} - -/** - * Returns the envelope endpoint URL with auth in the query string. - * - * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests. - */ -function getEnvelopeEndpointWithUrlEncodedAuth( - dsn, - // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below - // options: ClientOptions = {} as ClientOptions, - tunnelOrOptions = {} , -) { - // TODO (v8): Use this code instead - // const { tunnel, _metadata = {} } = options; - // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`; - - const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel; - const sdkInfo = - typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk; - - return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; -} - -/** Returns the url to the report dialog endpoint. */ -function getReportDialogEndpoint( - dsnLike, - dialogOptions - -, -) { - const dsn = makeDsn(dsnLike); - const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`; - - let encodedOptions = `dsn=${dsnToString(dsn)}`; - for (const key in dialogOptions) { - if (key === 'dsn') { - continue; - } - - if (key === 'user') { - const user = dialogOptions.user; - if (!user) { - continue; - } - if (user.name) { - encodedOptions += `&name=${encodeURIComponent(user.name)}`; - } - if (user.email) { - encodedOptions += `&email=${encodeURIComponent(user.email)}`; - } - } else { - encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`; - } - } - - return `${endpoint}?${encodedOptions}`; -} - -export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint }; -//# sourceMappingURL=api.js.map diff --git a/node_modules/@sentry/core/esm/api.js.map b/node_modules/@sentry/core/esm/api.js.map deleted file mode 100644 index d1e7d52..0000000 --- a/node_modules/@sentry/core/esm/api.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"api.js","sources":["../../src/api.ts"],"sourcesContent":["import type { ClientOptions, DsnComponents, DsnLike, SdkInfo } from '@sentry/types';\nimport { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents): string {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents, sdkInfo: SdkInfo | undefined): string {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(\n dsn: DsnComponents,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions: string | ClientOptions = {} as ClientOptions,\n): string {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(\n dsnLike: DsnLike,\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n },\n): string {\n const dsn = makeDsn(dsnLike);\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n"],"names":[],"mappings":";;AAGA,MAAA,kBAAA,GAAA,GAAA,CAAA;AACA;AACA;AACA,SAAA,kBAAA,CAAA,GAAA,EAAA;AACA,EAAA,MAAA,QAAA,GAAA,GAAA,CAAA,QAAA,GAAA,CAAA,EAAA,GAAA,CAAA,QAAA,CAAA,CAAA,CAAA,GAAA,EAAA,CAAA;AACA,EAAA,MAAA,IAAA,GAAA,GAAA,CAAA,IAAA,GAAA,CAAA,CAAA,EAAA,GAAA,CAAA,IAAA,CAAA,CAAA,GAAA,EAAA,CAAA;AACA,EAAA,OAAA,CAAA,EAAA,QAAA,CAAA,EAAA,EAAA,GAAA,CAAA,IAAA,CAAA,EAAA,IAAA,CAAA,EAAA,GAAA,CAAA,IAAA,GAAA,CAAA,CAAA,EAAA,GAAA,CAAA,IAAA,CAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,kBAAA,CAAA,GAAA,EAAA;AACA,EAAA,OAAA,CAAA,EAAA,kBAAA,CAAA,GAAA,CAAA,CAAA,EAAA,GAAA,CAAA,SA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A;AACA,EAAA,KAAA,MAAA,GAAA,IAAA,aAAA,EAAA;AACA,IAAA,IAAA,GAAA,KAAA,KAAA,EAAA;AACA,MAAA,SAAA;AACA,KAAA;AACA;AACA,IAAA,IAAA,GAAA,KAAA,MAAA,EAAA;AACA,MAAA,MAAA,IAAA,GAAA,aAAA,CAAA,IAAA,CAAA;AACA,MAAA,IAAA,CAAA,IAAA,EAAA;AACA,QAAA,SAAA;AACA,OAAA;AACA,MAAA,IAAA,IAAA,CAAA,IAAA,EAAA;AACA,QAAA,cAAA,IAAA,CAAA,MAAA,EAAA,kBAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACA,OAAA;AACA,MAAA,IAAA,IAAA,CAAA,KAAA,EAAA;AACA,QAAA,cAAA,IAAA,CAAA,OAAA,EAAA,kBAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,OAAA;AACA,KAAA,MAAA;AACA,MAAA,cAAA,IAAA,CAAA,CAAA,EAAA,kBAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,kBAAA,CAAA,aAAA,CAAA,GAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,cAAA,CAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/baseclient.js b/node_modules/@sentry/core/esm/baseclient.js deleted file mode 100644 index a99a605..0000000 --- a/node_modules/@sentry/core/esm/baseclient.js +++ /dev/null @@ -1,641 +0,0 @@ -import { makeDsn, logger, checkOrSetAlreadyCaught, isPrimitive, resolvedSyncPromise, addItemToEnvelope, createAttachmentEnvelopeItem, SyncPromise, rejectedSyncPromise, SentryError, isThenable, isPlainObject } from '@sentry/utils'; -import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js'; -import { createEventEnvelope, createSessionEnvelope } from './envelope.js'; -import { setupIntegrations, setupIntegration } from './integration.js'; -import { updateSession } from './session.js'; -import { prepareEvent } from './utils/prepareEvent.js'; - -const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured."; - -/** - * Base implementation for all JavaScript SDK clients. - * - * Call the constructor with the corresponding options - * specific to the client subclass. To access these options later, use - * {@link Client.getOptions}. - * - * If a Dsn is specified in the options, it will be parsed and stored. Use - * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is - * invalid, the constructor will throw a {@link SentryException}. Note that - * without a valid Dsn, the SDK will not send any events to Sentry. - * - * Before sending an event, it is passed through - * {@link BaseClient._prepareEvent} to add SDK information and scope data - * (breadcrumbs and context). To add more custom information, override this - * method and extend the resulting prepared event. - * - * To issue automatically created events (e.g. via instrumentation), use - * {@link Client.captureEvent}. It will prepare the event and pass it through - * the callback lifecycle. To issue auto-breadcrumbs, use - * {@link Client.addBreadcrumb}. - * - * @example - * class NodeClient extends BaseClient { - * public constructor(options: NodeOptions) { - * super(options); - * } - * - * // ... - * } - */ -class BaseClient { - /** Options passed to the SDK. */ - - /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ - - /** Array of set up integrations. */ - __init() {this._integrations = {};} - - /** Indicates whether this client's integrations have been set up. */ - __init2() {this._integrationsInitialized = false;} - - /** Number of calls being processed */ - __init3() {this._numProcessing = 0;} - - /** Holds flushable */ - __init4() {this._outcomes = {};} - - /** - * Initializes this client instance. - * - * @param options Options for the client. - */ - constructor(options) {;BaseClient.prototype.__init.call(this);BaseClient.prototype.__init2.call(this);BaseClient.prototype.__init3.call(this);BaseClient.prototype.__init4.call(this); - this._options = options; - if (options.dsn) { - this._dsn = makeDsn(options.dsn); - const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options); - this._transport = options.transport({ - recordDroppedEvent: this.recordDroppedEvent.bind(this), - ...options.transportOptions, - url, - }); - } else { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not do anything.'); - } - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types - captureException(exception, hint, scope) { - // ensure we haven't captured this very object before - if (checkOrSetAlreadyCaught(exception)) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR); - return; - } - - let eventId = hint && hint.event_id; - - this._process( - this.eventFromException(exception, hint) - .then(event => this._captureEvent(event, hint, scope)) - .then(result => { - eventId = result; - }), - ); - - return eventId; - } - - /** - * @inheritDoc - */ - captureMessage( - message, - // eslint-disable-next-line deprecation/deprecation - level, - hint, - scope, - ) { - let eventId = hint && hint.event_id; - - const promisedEvent = isPrimitive(message) - ? this.eventFromMessage(String(message), level, hint) - : this.eventFromException(message, hint); - - this._process( - promisedEvent - .then(event => this._captureEvent(event, hint, scope)) - .then(result => { - eventId = result; - }), - ); - - return eventId; - } - - /** - * @inheritDoc - */ - captureEvent(event, hint, scope) { - // ensure we haven't captured this very object before - if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR); - return; - } - - let eventId = hint && hint.event_id; - - this._process( - this._captureEvent(event, hint, scope).then(result => { - eventId = result; - }), - ); - - return eventId; - } - - /** - * @inheritDoc - */ - captureSession(session) { - if (!this._isEnabled()) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('SDK not enabled, will not capture session.'); - return; - } - - if (!(typeof session.release === 'string')) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Discarded session because of missing or non-string release'); - } else { - this.sendSession(session); - // After sending, we set init false to indicate it's not the first occurrence - updateSession(session, { init: false }); - } - } - - /** - * @inheritDoc - */ - getDsn() { - return this._dsn; - } - - /** - * @inheritDoc - */ - getOptions() { - return this._options; - } - - /** - * @see SdkMetadata in @sentry/types - * - * @return The metadata of the SDK - */ - getSdkMetadata() { - return this._options._metadata; - } - - /** - * @inheritDoc - */ - getTransport() { - return this._transport; - } - - /** - * @inheritDoc - */ - flush(timeout) { - const transport = this._transport; - if (transport) { - return this._isClientDoneProcessing(timeout).then(clientFinished => { - return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed); - }); - } else { - return resolvedSyncPromise(true); - } - } - - /** - * @inheritDoc - */ - close(timeout) { - return this.flush(timeout).then(result => { - this.getOptions().enabled = false; - return result; - }); - } - - /** - * Sets up the integrations - */ - setupIntegrations() { - if (this._isEnabled() && !this._integrationsInitialized) { - this._integrations = setupIntegrations(this._options.integrations); - this._integrationsInitialized = true; - } - } - - /** - * Gets an installed integration by its `id`. - * - * @returns The installed integration or `undefined` if no integration with that `id` was installed. - */ - getIntegrationById(integrationId) { - return this._integrations[integrationId]; - } - - /** - * @inheritDoc - */ - getIntegration(integration) { - try { - return (this._integrations[integration.id] ) || null; - } catch (_oO) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`); - return null; - } - } - - /** - * @inheritDoc - */ - addIntegration(integration) { - setupIntegration(integration, this._integrations); - } - - /** - * @inheritDoc - */ - sendEvent(event, hint = {}) { - if (this._dsn) { - let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); - - for (const attachment of hint.attachments || []) { - env = addItemToEnvelope( - env, - createAttachmentEnvelopeItem( - attachment, - this._options.transportOptions && this._options.transportOptions.textEncoder, - ), - ); - } - - this._sendEnvelope(env); - } - } - - /** - * @inheritDoc - */ - sendSession(session) { - if (this._dsn) { - const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel); - this._sendEnvelope(env); - } - } - - /** - * @inheritDoc - */ - recordDroppedEvent(reason, category, _event) { - // Note: we use `event` in replay, where we overwrite this hook. - - if (this._options.sendClientReports) { - // We want to track each category (error, transaction, session, replay_event) separately - // but still keep the distinction between different type of outcomes. - // We could use nested maps, but it's much easier to read and type this way. - // A correct type for map-based implementation if we want to go that route - // would be `Partial>>>` - // With typescript 4.1 we could even use template literal types - const key = `${reason}:${category}`; - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Adding outcome: "${key}"`); - - // The following works because undefined + 1 === NaN and NaN is falsy - this._outcomes[key] = this._outcomes[key] + 1 || 1; - } - } - - /** Updates existing session based on the provided event */ - _updateSessionFromEvent(session, event) { - let crashed = false; - let errored = false; - const exceptions = event.exception && event.exception.values; - - if (exceptions) { - errored = true; - - for (const ex of exceptions) { - const mechanism = ex.mechanism; - if (mechanism && mechanism.handled === false) { - crashed = true; - break; - } - } - } - - // A session is updated and that session update is sent in only one of the two following scenarios: - // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update - // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update - const sessionNonTerminal = session.status === 'ok'; - const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed); - - if (shouldUpdateAndSend) { - updateSession(session, { - ...(crashed && { status: 'crashed' }), - errors: session.errors || Number(errored || crashed), - }); - this.captureSession(session); - } - } - - /** - * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying - * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. - * - * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not - * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to - * `true`. - * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and - * `false` otherwise - */ - _isClientDoneProcessing(timeout) { - return new SyncPromise(resolve => { - let ticked = 0; - const tick = 1; - - const interval = setInterval(() => { - if (this._numProcessing == 0) { - clearInterval(interval); - resolve(true); - } else { - ticked += tick; - if (timeout && ticked >= timeout) { - clearInterval(interval); - resolve(false); - } - } - }, tick); - }); - } - - /** Determines whether this SDK is enabled and a valid Dsn is present. */ - _isEnabled() { - return this.getOptions().enabled !== false && this._dsn !== undefined; - } - - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional information about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - */ - _prepareEvent(event, hint, scope) { - const options = this.getOptions(); - return prepareEvent(options, event, hint, scope); - } - - /** - * Processes the event and logs an error in case of rejection - * @param event - * @param hint - * @param scope - */ - _captureEvent(event, hint = {}, scope) { - return this._processEvent(event, hint, scope).then( - finalEvent => { - return finalEvent.event_id; - }, - reason => { - if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { - // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for - // control flow, log just the message (no stack) as a log-level log. - const sentryError = reason ; - if (sentryError.logLevel === 'log') { - logger.log(sentryError.message); - } else { - logger.warn(sentryError); - } - } - return undefined; - }, - ); - } - - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional information about the original exception. - * @param scope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - _processEvent(event, hint, scope) { - const options = this.getOptions(); - const { sampleRate } = options; - - if (!this._isEnabled()) { - return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log')); - } - - const isTransaction = isTransactionEvent(event); - const isError = isErrorEvent(event); - const eventType = event.type || 'error'; - const beforeSendLabel = `before send for type \`${eventType}\``; - - // 1.0 === 100% events are sent - // 0.0 === 0% events are sent - // Sampling for transaction happens somewhere else - if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) { - this.recordDroppedEvent('sample_rate', 'error', event); - return rejectedSyncPromise( - new SentryError( - `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, - 'log', - ), - ); - } - - return this._prepareEvent(event, hint, scope) - .then(prepared => { - if (prepared === null) { - this.recordDroppedEvent('event_processor', eventType, event); - throw new SentryError('An event processor returned `null`, will not send event.', 'log'); - } - - const isInternalException = hint.data && (hint.data ).__sentry__ === true; - if (isInternalException) { - return prepared; - } - - const result = processBeforeSend(options, prepared, hint); - return _validateBeforeSendResult(result, beforeSendLabel); - }) - .then(processedEvent => { - if (processedEvent === null) { - this.recordDroppedEvent('before_send', event.type || 'error', event); - throw new SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, 'log'); - } - - const session = scope && scope.getSession(); - if (!isTransaction && session) { - this._updateSessionFromEvent(session, processedEvent); - } - - // None of the Sentry built event processor will update transaction name, - // so if the transaction name has been changed by an event processor, we know - // it has to come from custom event processor added by a user - const transactionInfo = processedEvent.transaction_info; - if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { - const source = 'custom'; - processedEvent.transaction_info = { - ...transactionInfo, - source, - changes: [ - ...transactionInfo.changes, - { - source, - // use the same timestamp as the processed event. - timestamp: processedEvent.timestamp , - propagations: transactionInfo.propagations, - }, - ], - }; - } - - this.sendEvent(processedEvent, hint); - return processedEvent; - }) - .then(null, reason => { - if (reason instanceof SentryError) { - throw reason; - } - - this.captureException(reason, { - data: { - __sentry__: true, - }, - originalException: reason , - }); - throw new SentryError( - `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`, - ); - }); - } - - /** - * Occupies the client with processing and event - */ - _process(promise) { - this._numProcessing++; - void promise.then( - value => { - this._numProcessing--; - return value; - }, - reason => { - this._numProcessing--; - return reason; - }, - ); - } - - /** - * @inheritdoc - */ - _sendEnvelope(envelope) { - if (this._transport && this._dsn) { - this._transport.send(envelope).then(null, reason => { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Error while sending event:', reason); - }); - } else { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Transport disabled'); - } - } - - /** - * Clears outcomes on this client and returns them. - */ - _clearOutcomes() { - const outcomes = this._outcomes; - this._outcomes = {}; - return Object.keys(outcomes).map(key => { - const [reason, category] = key.split(':') ; - return { - reason, - category, - quantity: outcomes[key], - }; - }); - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types - -} - -/** - * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so. - */ -function _validateBeforeSendResult( - beforeSendResult, - beforeSendLabel, -) { - const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; - if (isThenable(beforeSendResult)) { - return beforeSendResult.then( - event => { - if (!isPlainObject(event) && event !== null) { - throw new SentryError(invalidValueError); - } - return event; - }, - e => { - throw new SentryError(`${beforeSendLabel} rejected with ${e}`); - }, - ); - } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) { - throw new SentryError(invalidValueError); - } - return beforeSendResult; -} - -/** - * Process the matching `beforeSendXXX` callback. - */ -function processBeforeSend( - options, - event, - hint, -) { - const { beforeSend, beforeSendTransaction } = options; - - if (isErrorEvent(event) && beforeSend) { - return beforeSend(event, hint); - } - - if (isTransactionEvent(event) && beforeSendTransaction) { - return beforeSendTransaction(event, hint); - } - - return event; -} - -function isErrorEvent(event) { - return event.type === undefined; -} - -function isTransactionEvent(event) { - return event.type === 'transaction'; -} - -export { BaseClient }; -//# sourceMappingURL=baseclient.js.map diff --git a/node_modules/@sentry/core/esm/baseclient.js.map b/node_modules/@sentry/core/esm/baseclient.js.map deleted file mode 100644 index 3d6d649..0000000 --- a/node_modules/@sentry/core/esm/baseclient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"baseclient.js","sources":["../../src/baseclient.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport type {\n Client,\n ClientOptions,\n DataCategory,\n DsnComponents,\n Envelope,\n ErrorEvent,\n Event,\n EventDropReason,\n EventHint,\n Integration,\n IntegrationClass,\n Outcome,\n SdkMetadata,\n Session,\n SessionAggregates,\n Severity,\n SeverityLevel,\n TransactionEvent,\n Transport,\n} from '@sentry/types';\nimport {\n addItemToEnvelope,\n checkOrSetAlreadyCaught,\n createAttachmentEnvelopeItem,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n makeDsn,\n rejectedSyncPromise,\n resolvedSyncPromise,\n SentryError,\n SyncPromise,\n} from '@sentry/utils';\n\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope';\nimport type { IntegrationIndex } from './integration';\nimport { setupIntegration, setupIntegrations } from './integration';\nimport type { Scope } from './scope';\nimport { updateSession } from './session';\nimport { prepareEvent } from './utils/prepareEvent';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: DsnComponents;\n\n protected readonly _transport?: Transport;\n\n /** Array of set up integrations. */\n protected _integrations: IntegrationIndex = {};\n\n /** Indicates whether this client's integrations have been set up. */\n protected _integrationsInitialized: boolean = false;\n\n /** Number of calls being processed */\n protected _numProcessing: number = 0;\n\n /** Holds flushable */\n private _outcomes: { [key: string]: number } = {};\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n protected constructor(options: O) {\n this._options = options;\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n } else {\n __DEBUG_BUILD__ && logger.warn('No DSN provided, client will not do anything.');\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n __DEBUG_BUILD__ && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level?: Severity | SeverityLevel,\n hint?: EventHint,\n scope?: Scope,\n ): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(String(message), level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n __DEBUG_BUILD__ && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!this._isEnabled()) {\n __DEBUG_BUILD__ && logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n\n if (!(typeof session.release === 'string')) {\n __DEBUG_BUILD__ && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): DsnComponents | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n public getSdkMetadata(): SdkMetadata | undefined {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport | undefined {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n const transport = this._transport;\n if (transport) {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n if (this._isEnabled() && !this._integrationsInitialized) {\n this._integrations = setupIntegrations(this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */\n public getIntegrationById(integrationId: string): Integration | undefined {\n return this._integrations[integrationId];\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n __DEBUG_BUILD__ && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public addIntegration(integration: Integration): void {\n setupIntegration(integration, this._integrations);\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event, hint: EventHint = {}): void {\n if (this._dsn) {\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(\n env,\n createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n this._sendEnvelope(env);\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session | SessionAggregates): void {\n if (this._dsn) {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n this._sendEnvelope(env);\n }\n }\n\n /**\n * @inheritDoc\n */\n public recordDroppedEvent(reason: EventDropReason, category: DataCategory, _event?: Event): void {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n __DEBUG_BUILD__ && logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n const options = this.getOptions();\n return prepareEvent(options, event, hint, scope);\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint: EventHint = {}, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (__DEBUG_BUILD__) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason as SentryError;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', eventType, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', event.type || 'error', event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n changes: [\n ...transactionInfo.changes,\n {\n source,\n // use the same timestamp as the processed event.\n timestamp: processedEvent.timestamp as number,\n propagations: transactionInfo.propagations,\n },\n ],\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): void {\n if (this._transport && this._dsn) {\n this._transport.send(envelope).then(null, reason => {\n __DEBUG_BUILD__ && logger.error('Error while sending event:', reason);\n });\n } else {\n __DEBUG_BUILD__ && logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n protected _clearOutcomes(): Outcome[] {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') as [EventDropReason, DataCategory];\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public abstract eventFromException(_exception: any, _hint?: EventHint): PromiseLike;\n\n /**\n * @inheritDoc\n */\n public abstract eventFromMessage(\n _message: string,\n // eslint-disable-next-line deprecation/deprecation\n _level?: Severity | SeverityLevel,\n _hint?: EventHint,\n ): PromiseLike;\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult: PromiseLike | Event | null,\n beforeSendLabel: string,\n): PromiseLike | Event | null {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n): PromiseLike | Event | null {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n return event.type === 'transaction';\n}\n"],"names":[],"mappings":";;;;;;;AA6CA,MAAA,kBAAA,GAAA,6DAAA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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,EAAA,IAAA,kBAAA,CAAA,KAAA,CAAA,IAAA,qBAAA,EAAA;AACA,IAAA,OAAA,qBAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,KAAA,CAAA;AACA,CAAA;AACA;AACA,SAAA,YAAA,CAAA,KAAA,EAAA;AACA,EAAA,OAAA,KAAA,CAAA,IAAA,KAAA,SAAA,CAAA;AACA,CAAA;AACA;AACA,SAAA,kBAAA,CAAA,KAAA,EAAA;AACA,EAAA,OAAA,KAAA,CAAA,IAAA,KAAA,aAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/index.js b/node_modules/@sentry/core/esm/index.js deleted file mode 100644 index c064478..0000000 --- a/node_modules/@sentry/core/esm/index.js +++ /dev/null @@ -1,20 +0,0 @@ -export { addBreadcrumb, captureEvent, captureException, captureMessage, configureScope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope } from './exports.js'; -export { Hub, getCurrentHub, getHubFromCarrier, getMainCarrier, makeMain, setHubOnCarrier } from './hub.js'; -export { closeSession, makeSession, updateSession } from './session.js'; -export { SessionFlusher } from './sessionflusher.js'; -export { Scope, addGlobalEventProcessor } from './scope.js'; -export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api.js'; -export { BaseClient } from './baseclient.js'; -export { initAndBind } from './sdk.js'; -export { createTransport } from './transports/base.js'; -export { SDK_VERSION } from './version.js'; -export { getIntegrationsToSetup } from './integration.js'; -import * as index from './integrations/index.js'; -export { index as Integrations }; -export { prepareEvent } from './utils/prepareEvent.js'; -export { FunctionToString } from './integrations/functiontostring.js'; -export { InboundFilters } from './integrations/inboundfilters.js'; - -; -; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/core/esm/index.js.map b/node_modules/@sentry/core/esm/index.js.map deleted file mode 100644 index b7046aa..0000000 --- a/node_modules/@sentry/core/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["export type { ClientClass } from './sdk';\nexport type { Carrier, Layer } from './hub';\n\nexport {\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n startTransaction,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from './exports';\nexport { getCurrentHub, getHubFromCarrier, Hub, makeMain, getMainCarrier, setHubOnCarrier } from './hub';\nexport { makeSession, closeSession, updateSession } from './session';\nexport { SessionFlusher } from './sessionflusher';\nexport { addGlobalEventProcessor, Scope } from './scope';\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api';\nexport { BaseClient } from './baseclient';\nexport { initAndBind } from './sdk';\nexport { createTransport } from './transports/base';\nexport { SDK_VERSION } from './version';\nexport { getIntegrationsToSetup } from './integration';\nexport { FunctionToString, InboundFilters } from './integrations';\nexport { prepareEvent } from './utils/prepareEvent';\n\nimport * as Integrations from './integrations';\n\nexport { Integrations };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,CAAA;AACA"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integration.js b/node_modules/@sentry/core/esm/integration.js deleted file mode 100644 index fe0bcd0..0000000 --- a/node_modules/@sentry/core/esm/integration.js +++ /dev/null @@ -1,98 +0,0 @@ -import { arrayify, logger } from '@sentry/utils'; -import { getCurrentHub } from './hub.js'; -import { addGlobalEventProcessor } from './scope.js'; - -const installedIntegrations = []; - -/** Map of integrations assigned to a client */ - -/** - * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to - * preseve the order of integrations in the array. - * - * @private - */ -function filterDuplicates(integrations) { - const integrationsByName = {}; - - integrations.forEach(currentInstance => { - const { name } = currentInstance; - - const existingInstance = integrationsByName[name]; - - // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a - // default instance to overwrite an existing user instance - if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) { - return; - } - - integrationsByName[name] = currentInstance; - }); - - return Object.values(integrationsByName); -} - -/** Gets integrations to install */ -function getIntegrationsToSetup(options) { - const defaultIntegrations = options.defaultIntegrations || []; - const userIntegrations = options.integrations; - - // We flag default instances, so that later we can tell them apart from any user-created instances of the same class - defaultIntegrations.forEach(integration => { - integration.isDefaultInstance = true; - }); - - let integrations; - - if (Array.isArray(userIntegrations)) { - integrations = [...defaultIntegrations, ...userIntegrations]; - } else if (typeof userIntegrations === 'function') { - integrations = arrayify(userIntegrations(defaultIntegrations)); - } else { - integrations = defaultIntegrations; - } - - const finalIntegrations = filterDuplicates(integrations); - - // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or - // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event - // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore - // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array. - const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug'); - if (debugIndex !== -1) { - const [debugInstance] = finalIntegrations.splice(debugIndex, 1); - finalIntegrations.push(debugInstance); - } - - return finalIntegrations; -} - -/** - * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default - * integrations are added unless they were already provided before. - * @param integrations array of integration instances - * @param withDefault should enable default integrations - */ -function setupIntegrations(integrations) { - const integrationIndex = {}; - - integrations.forEach(integration => { - setupIntegration(integration, integrationIndex); - }); - - return integrationIndex; -} - -/** Setup a single integration. */ -function setupIntegration(integration, integrationIndex) { - integrationIndex[integration.name] = integration; - - if (installedIntegrations.indexOf(integration.name) === -1) { - integration.setupOnce(addGlobalEventProcessor, getCurrentHub); - installedIntegrations.push(integration.name); - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`); - } -} - -export { getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations }; -//# sourceMappingURL=integration.js.map diff --git a/node_modules/@sentry/core/esm/integration.js.map b/node_modules/@sentry/core/esm/integration.js.map deleted file mode 100644 index 70301bc..0000000 --- a/node_modules/@sentry/core/esm/integration.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"integration.js","sources":["../../src/integration.ts"],"sourcesContent":["import type { Integration, Options } from '@sentry/types';\nimport { arrayify, logger } from '@sentry/utils';\n\nimport { getCurrentHub } from './hub';\nimport { addGlobalEventProcessor } from './scope';\n\ndeclare module '@sentry/types' {\n interface Integration {\n isDefaultInstance?: boolean;\n }\n}\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n};\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n const integrationsByName: { [key: string]: Integration } = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations: Integration[];\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(integrations: Integration[]): IntegrationIndex {\n const integrationIndex: IntegrationIndex = {};\n\n integrations.forEach(integration => {\n setupIntegration(integration, integrationIndex);\n });\n\n return integrationIndex;\n}\n\n/** Setup a single integration. */\nexport function setupIntegration(integration: Integration, integrationIndex: IntegrationIndex): void {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n __DEBUG_BUILD__ && logger.log(`Integration installed: ${integration.name}`);\n }\n}\n"],"names":[],"mappings":";;;;AAYA,MAAA,qBAAA,GAAA,GAAA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,gBAAA,CAAA,YAAA,EAAA;AACA,EAAA,MAAA,kBAAA,GAAA,EAAA,CAAA;AACA;AACA,EAAA,YAAA,CAAA,OAAA,CAAA,eAAA,IAAA;AACA,IAAA,MAAA,EAAA,IAAA,EAAA,GAAA,eAAA,CAAA;AACA;AACA,IAAA,MAAA,gBAAA,GAAA,kBAAA,CAAA,IAAA,CAAA,CAAA;AACA;AACA;AACA;AACA,IAAA,IAAA,gBAAA,IAAA,CAAA,gBAAA,CAAA,iBAAA,IAAA,eAAA,CAAA,iBAAA,EAAA;AACA,MAAA,OAAA;AACA,KAAA;AACA;AACA,IAAA,kBAAA,CAAA,IAAA,CAAA,GAAA,eAAA,C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A;AACA;AACA;AACA;AACA,SAAA,iBAAA,CAAA,YAAA,EAAA;AACA,EAAA,MAAA,gBAAA,GAAA,EAAA,CAAA;AACA;AACA,EAAA,YAAA,CAAA,OAAA,CAAA,WAAA,IAAA;AACA,IAAA,gBAAA,CAAA,WAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,CAAA,CAAA;AACA;AACA,EAAA,OAAA,gBAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,gBAAA,CAAA,WAAA,EAAA,gBAAA,EAAA;AACA,EAAA,gBAAA,CAAA,WAAA,CAAA,IAAA,CAAA,GAAA,WAAA,CAAA;AACA;AACA,EAAA,IAAA,qBAAA,CAAA,OAAA,CAAA,WAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,EAAA;AACA,IAAA,WAAA,CAAA,SAAA,CAAA,uBAAA,EAAA,aAAA,CAAA,CAAA;AACA,IAAA,qBAAA,CAAA,IAAA,CAAA,WAAA,CAAA,IAAA,CAAA,CAAA;AACA,IAAA,CAAA,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA,KAAA,MAAA,CAAA,GAAA,CAAA,CAAA,uBAAA,EAAA,WAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACA,GAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/functiontostring.js b/node_modules/@sentry/core/esm/integrations/functiontostring.js deleted file mode 100644 index ef0ca57..0000000 --- a/node_modules/@sentry/core/esm/integrations/functiontostring.js +++ /dev/null @@ -1,33 +0,0 @@ -import { getOriginalFunction } from '@sentry/utils'; - -let originalFunctionToString; - -/** Patch toString calls to return proper name for wrapped functions */ -class FunctionToString {constructor() { FunctionToString.prototype.__init.call(this); } - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'FunctionToString';} - - /** - * @inheritDoc - */ - __init() {this.name = FunctionToString.id;} - - /** - * @inheritDoc - */ - setupOnce() { - // eslint-disable-next-line @typescript-eslint/unbound-method - originalFunctionToString = Function.prototype.toString; - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Function.prototype.toString = function ( ...args) { - const context = getOriginalFunction(this) || this; - return originalFunctionToString.apply(context, args); - }; - } -} FunctionToString.__initStatic(); - -export { FunctionToString }; -//# sourceMappingURL=functiontostring.js.map diff --git a/node_modules/@sentry/core/esm/integrations/functiontostring.js.map b/node_modules/@sentry/core/esm/integrations/functiontostring.js.map deleted file mode 100644 index 7123afd..0000000 --- a/node_modules/@sentry/core/esm/integrations/functiontostring.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"functiontostring.js","sources":["../../../src/integrations/functiontostring.ts"],"sourcesContent":["import type { Integration, WrappedFunction } from '@sentry/types';\nimport { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function (this: WrappedFunction, ...args: any[]): string {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n"],"names":[],"mappings":";;AAGA,IAAA,wBAAA,CAAA;AACA;AACA;AACA,MAAA,gBAAA,EAAA,CAAA,WAAA,GAAA,EAAA,gBAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,mBAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,gBAAA,CAAA,GAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,SAAA,GAAA;AACA;AACA,IAAA,wBAAA,GAAA,QAAA,CAAA,SAAA,CAAA,QAAA,CAAA;AACA;AACA;AACA,IAAA,QAAA,CAAA,SAAA,CAAA,QAAA,GAAA,WAAA,GAAA,IAAA,EAAA;AACA,MAAA,MAAA,OAAA,GAAA,mBAAA,CAAA,IAAA,CAAA,IAAA,IAAA,CAAA;AACA,MAAA,OAAA,wBAAA,CAAA,KAAA,CAAA,OAAA,EAAA,IAAA,CAAA,CAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA,CAAA,CAAA,gBAAA,CAAA,YAAA,EAAA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/inboundfilters.js b/node_modules/@sentry/core/esm/integrations/inboundfilters.js deleted file mode 100644 index 6d10fc3..0000000 --- a/node_modules/@sentry/core/esm/integrations/inboundfilters.js +++ /dev/null @@ -1,180 +0,0 @@ -import { logger, getEventDescription, stringMatchesSomePattern } from '@sentry/utils'; - -// "Script error." is hard coded into browsers for errors that it can't read. -// this is the result of a script being pulled in from an external domain and CORS. -const DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/]; - -/** Options for the InboundFilters integration */ - -/** Inbound filters configurable by the user */ -class InboundFilters { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'InboundFilters';} - - /** - * @inheritDoc - */ - __init() {this.name = InboundFilters.id;} - - constructor( _options = {}) {;this._options = _options;InboundFilters.prototype.__init.call(this);} - - /** - * @inheritDoc - */ - setupOnce(addGlobalEventProcessor, getCurrentHub) { - const eventProcess = (event) => { - const hub = getCurrentHub(); - if (hub) { - const self = hub.getIntegration(InboundFilters); - if (self) { - const client = hub.getClient(); - const clientOptions = client ? client.getOptions() : {}; - const options = _mergeOptions(self._options, clientOptions); - return _shouldDropEvent(event, options) ? null : event; - } - } - return event; - }; - - eventProcess.id = this.name; - addGlobalEventProcessor(eventProcess); - } -} InboundFilters.__initStatic(); - -/** JSDoc */ -function _mergeOptions( - internalOptions = {}, - clientOptions = {}, -) { - return { - allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])], - denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])], - ignoreErrors: [ - ...(internalOptions.ignoreErrors || []), - ...(clientOptions.ignoreErrors || []), - ...DEFAULT_IGNORE_ERRORS, - ], - ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true, - }; -} - -/** JSDoc */ -function _shouldDropEvent(event, options) { - if (options.ignoreInternal && _isSentryError(event)) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${getEventDescription(event)}`); - return true; - } - if (_isIgnoredError(event, options.ignoreErrors)) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.warn( - `Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${getEventDescription(event)}`, - ); - return true; - } - if (_isDeniedUrl(event, options.denyUrls)) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.warn( - `Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${getEventDescription( - event, - )}.\nUrl: ${_getEventFilterUrl(event)}`, - ); - return true; - } - if (!_isAllowedUrl(event, options.allowUrls)) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.warn( - `Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${getEventDescription( - event, - )}.\nUrl: ${_getEventFilterUrl(event)}`, - ); - return true; - } - return false; -} - -function _isIgnoredError(event, ignoreErrors) { - if (!ignoreErrors || !ignoreErrors.length) { - return false; - } - - return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors)); -} - -function _isDeniedUrl(event, denyUrls) { - // TODO: Use Glob instead? - if (!denyUrls || !denyUrls.length) { - return false; - } - const url = _getEventFilterUrl(event); - return !url ? false : stringMatchesSomePattern(url, denyUrls); -} - -function _isAllowedUrl(event, allowUrls) { - // TODO: Use Glob instead? - if (!allowUrls || !allowUrls.length) { - return true; - } - const url = _getEventFilterUrl(event); - return !url ? true : stringMatchesSomePattern(url, allowUrls); -} - -function _getPossibleEventMessages(event) { - if (event.message) { - return [event.message]; - } - if (event.exception) { - try { - const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {}; - return [`${value}`, `${type}: ${value}`]; - } catch (oO) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(`Cannot extract message for event ${getEventDescription(event)}`); - return []; - } - } - return []; -} - -function _isSentryError(event) { - try { - // @ts-ignore can't be a sentry error if undefined - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return event.exception.values[0].type === 'SentryError'; - } catch (e) { - // ignore - } - return false; -} - -function _getLastValidUrl(frames = []) { - for (let i = frames.length - 1; i >= 0; i--) { - const frame = frames[i]; - - if (frame && frame.filename !== '' && frame.filename !== '[native code]') { - return frame.filename || null; - } - } - - return null; -} - -function _getEventFilterUrl(event) { - try { - let frames; - try { - // @ts-ignore we only care about frames if the whole thing here is defined - frames = event.exception.values[0].stacktrace.frames; - } catch (e) { - // ignore - } - return frames ? _getLastValidUrl(frames) : null; - } catch (oO) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(`Cannot extract url for event ${getEventDescription(event)}`); - return null; - } -} - -export { InboundFilters, _mergeOptions, _shouldDropEvent }; -//# sourceMappingURL=inboundfilters.js.map diff --git a/node_modules/@sentry/core/esm/integrations/inboundfilters.js.map b/node_modules/@sentry/core/esm/integrations/inboundfilters.js.map deleted file mode 100644 index e45f4b8..0000000 --- a/node_modules/@sentry/core/esm/integrations/inboundfilters.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inboundfilters.js","sources":["../../../src/integrations/inboundfilters.ts"],"sourcesContent":["import type { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types';\nimport { getEventDescription, logger, stringMatchesSomePattern } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** Options for the InboundFilters integration */\nexport interface InboundFiltersOptions {\n allowUrls: Array;\n denyUrls: Array;\n ignoreErrors: Array;\n ignoreInternal: boolean;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n\n public constructor(private readonly _options: Partial = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (processor: EventProcessor) => void, getCurrentHub: () => Hub): void {\n const eventProcess: EventProcessor = (event: Event) => {\n const hub = getCurrentHub();\n if (hub) {\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n const options = _mergeOptions(self._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n }\n return event;\n };\n\n eventProcess.id = this.name;\n addGlobalEventProcessor(eventProcess);\n }\n}\n\n/** JSDoc */\nexport function _mergeOptions(\n internalOptions: Partial = {},\n clientOptions: Partial = {},\n): Partial {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\n/** JSDoc */\nexport function _shouldDropEvent(event: Event, options: Partial): boolean {\n if (options.ignoreInternal && _isSentryError(event)) {\n __DEBUG_BUILD__ &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event: Event, ignoreErrors?: Array): boolean {\n if (!ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isDeniedUrl(event: Event, denyUrls?: Array): boolean {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event: Event, allowUrls?: Array): boolean {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n __DEBUG_BUILD__ && logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n}\n\nfunction _isSentryError(event: Event): boolean {\n try {\n // @ts-ignore can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event: Event): string | null {\n try {\n let frames;\n try {\n // @ts-ignore we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n __DEBUG_BUILD__ && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n"],"names":[],"mappings":";;AAGA;AACA;AACA,MAAA,qBAAA,GAAA,CAAA,mBAAA,EAAA,+CAAA,CAAA,CAAA;AACA;AACA;;AAQA;AACA,MAAA,cAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,iBAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,cAAA,CAAA,GAAA,CAAA;AACA;AACA,GAAA,WAAA,GAAA,QAAA,GAAA,EAAA,EAAA,CAAA,CAAA,IAAA,CAAA,QAAA,GAAA,QAAA,CAAA,cAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,SAAA,CAAA,uBAAA,EAAA,aAAA,EAAA;AACA,IAAA,MAAA,YAAA,GAAA,CAAA,KAAA,KAAA;AACA,MAAA,MAAA,GAAA,GAAA,aAAA,EAAA,CAAA;AACA,MAAA,IAAA,GAAA,EAAA;AACA,Q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,CAAA,QAAA,IAAA,IAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,IAAA,CAAA;AACA,CAAA;AACA;AACA,SAAA,kBAAA,CAAA,KAAA,EAAA;AACA,EAAA,IAAA;AACA,IAAA,IAAA,MAAA,CAAA;AACA,IAAA,IAAA;AACA;AACA,MAAA,MAAA,GAAA,KAAA,CAAA,SAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,MAAA,CAAA;AACA,KAAA,CAAA,OAAA,CAAA,EAAA;AACA;AACA,KAAA;AACA,IAAA,OAAA,MAAA,GAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,EAAA,EAAA;AACA,IAAA,CAAA,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA,KAAA,MAAA,CAAA,KAAA,CAAA,CAAA,6BAAA,EAAA,mBAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/integrations/index.js b/node_modules/@sentry/core/esm/integrations/index.js deleted file mode 100644 index 44113a0..0000000 --- a/node_modules/@sentry/core/esm/integrations/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { FunctionToString } from './functiontostring.js'; -export { InboundFilters } from './inboundfilters.js'; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/core/esm/integrations/index.js.map b/node_modules/@sentry/core/esm/integrations/index.js.map deleted file mode 100644 index 594ae09..0000000 --- a/node_modules/@sentry/core/esm/integrations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/node_modules/@sentry/core/esm/sdk.js b/node_modules/@sentry/core/esm/sdk.js deleted file mode 100644 index ba29053..0000000 --- a/node_modules/@sentry/core/esm/sdk.js +++ /dev/null @@ -1,37 +0,0 @@ -import { logger } from '@sentry/utils'; -import { getCurrentHub } from './hub.js'; - -/** A class object that can instantiate Client objects. */ - -/** - * Internal function to create a new SDK client instance. The client is - * installed and then bound to the current scope. - * - * @param clientClass The client class to instantiate. - * @param options Options to pass to the client. - */ -function initAndBind( - clientClass, - options, -) { - if (options.debug === true) { - if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { - logger.enable(); - } else { - // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped - // eslint-disable-next-line no-console - console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.'); - } - } - const hub = getCurrentHub(); - const scope = hub.getScope(); - if (scope) { - scope.update(options.initialScope); - } - - const client = new clientClass(options); - hub.bindClient(client); -} - -export { initAndBind }; -//# sourceMappingURL=sdk.js.map diff --git a/node_modules/@sentry/core/esm/sdk.js.map b/node_modules/@sentry/core/esm/sdk.js.map deleted file mode 100644 index d677706..0000000 --- a/node_modules/@sentry/core/esm/sdk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Client, ClientOptions } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { getCurrentHub } from './hub';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(\n clientClass: ClientClass,\n options: O,\n): void {\n if (options.debug === true) {\n if (__DEBUG_BUILD__) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n const hub = getCurrentHub();\n const scope = hub.getScope();\n if (scope) {\n scope.update(options.initialScope);\n }\n\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n"],"names":[],"mappings":";;;AAKA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,WAAA;AACA,EAAA,WAAA;AACA,EAAA,OAAA;AACA,EAAA;AACA,EAAA,IAAA,OAAA,CAAA,KAAA,KAAA,IAAA,EAAA;AACA,IAAA,KAAA,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA,GAAA;AACA,MAAA,MAAA,CAAA,MAAA,EAAA,CAAA;AACA,KAAA,MAAA;AACA;AACA;AACA,MAAA,OAAA,CAAA,IAAA,CAAA,8EAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA,EAAA,MAAA,GAAA,GAAA,aAAA,EAAA,CAAA;AACA,EAAA,MAAA,KAAA,GAAA,GAAA,CAAA,QAAA,EAAA,CAAA;AACA,EAAA,IAAA,KAAA,EAAA;AACA,IAAA,KAAA,CAAA,MAAA,CAAA,OAAA,CAAA,YAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,MAAA,MAAA,GAAA,IAAA,WAAA,CAAA,OAAA,CAAA,CAAA;AACA,EAAA,GAAA,CAAA,UAAA,CAAA,MAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/core/package.json b/node_modules/@sentry/core/package.json deleted file mode 100644 index b977afb..0000000 --- a/node_modules/@sentry/core/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "@sentry/core@7.31.1", - "_id": "@sentry/core@7.31.1", - "_inBundle": false, - "_integrity": "sha512-quaNU6z8jabmatBTDi28Wpff2yzfWIp/IU4bbi2QOtEiCNT+TQJXqlRTRMu9xLrX7YzyKCL5X2gbit/85lyWUg==", - "_location": "/@sentry/core", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@sentry/core@7.31.1", - "name": "@sentry/core", - "escapedName": "@sentry%2fcore", - "scope": "@sentry", - "rawSpec": "7.31.1", - "saveSpec": null, - "fetchSpec": "7.31.1" - }, - "_requiredBy": [ - "/@sentry/node" - ], - "_resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.31.1.tgz", - "_shasum": "8c48e9c6a24b612eb7f757fdf246ed6b22c26b3b", - "_spec": "@sentry/core@7.31.1", - "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", - "author": { - "name": "Sentry" - }, - "bugs": { - "url": "https://github.com/getsentry/sentry-javascript/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@sentry/types": "7.31.1", - "@sentry/utils": "7.31.1", - "tslib": "^1.9.3" - }, - "deprecated": false, - "description": "Base implementation for all Sentry JavaScript SDKs", - "engines": { - "node": ">=8" - }, - "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core", - "license": "MIT", - "main": "cjs/index.js", - "module": "esm/index.js", - "name": "@sentry/core", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git://github.com/getsentry/sentry-javascript.git" - }, - "sideEffects": false, - "types": "types/index.d.ts", - "version": "7.31.1" -} diff --git a/node_modules/@sentry/node/LICENSE b/node_modules/@sentry/node/LICENSE deleted file mode 100644 index 535ef05..0000000 --- a/node_modules/@sentry/node/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@sentry/node/README.md b/node_modules/@sentry/node/README.md deleted file mode 100644 index e6ef857..0000000 --- a/node_modules/@sentry/node/README.md +++ /dev/null @@ -1,62 +0,0 @@ -

- - Sentry - -

- -# Official Sentry SDK for NodeJS - -[![npm version](https://img.shields.io/npm/v/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node) -[![npm dm](https://img.shields.io/npm/dm/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node) -[![npm dt](https://img.shields.io/npm/dt/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node) - -## Links - -- [Official SDK Docs](https://docs.sentry.io/quickstart/) -- [TypeDoc](http://getsentry.github.io/sentry-javascript/) - -## Usage - -To use this SDK, call `init(options)` as early as possible in the main entry module. This will initialize the SDK and -hook into the environment. Note that you can turn off almost all side effects using the respective options. - -```javascript -// ES5 Syntax -const Sentry = require('@sentry/node'); -// ES6 Syntax -import * as Sentry from '@sentry/node'; - -Sentry.init({ - dsn: '__DSN__', - // ... -}); -``` - -To set context information or send manual events, use the exported functions of `@sentry/node`. Note that these -functions will not perform any action before you have called `init()`: - -```javascript -// Set user information, as well as tags and further extras -Sentry.configureScope(scope => { - scope.setExtra('battery', 0.7); - scope.setTag('user_mode', 'admin'); - scope.setUser({ id: '4711' }); - // scope.clear(); -}); - -// Add a breadcrumb for future events -Sentry.addBreadcrumb({ - message: 'My Breadcrumb', - // ... -}); - -// Capture exceptions, messages or manual events -Sentry.captureMessage('Hello, world!'); -Sentry.captureException(new Error('Good bye')); -Sentry.captureEvent({ - message: 'Manual', - stacktrace: [ - // ... - ], -}); -``` diff --git a/node_modules/@sentry/node/esm/client.js b/node_modules/@sentry/node/esm/client.js deleted file mode 100644 index 2c64fcd..0000000 --- a/node_modules/@sentry/node/esm/client.js +++ /dev/null @@ -1,165 +0,0 @@ -import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; -import { BaseClient, SDK_VERSION, SessionFlusher } from '@sentry/core'; -import { logger, resolvedSyncPromise } from '@sentry/utils'; -import * as os from 'os'; -import { TextEncoder } from 'util'; -import { eventFromUnknownInput, eventFromMessage } from './eventbuilder.js'; - -/** - * The Sentry Node SDK Client. - * - * @see NodeClientOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -class NodeClient extends BaseClient { - - /** - * Creates a new Node SDK instance. - * @param options Configuration options for this SDK. - */ - constructor(options) { - options._metadata = options._metadata || {}; - options._metadata.sdk = options._metadata.sdk || { - name: 'sentry.javascript.node', - packages: [ - { - name: 'npm:@sentry/node', - version: SDK_VERSION, - }, - ], - version: SDK_VERSION, - }; - - // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util - options.transportOptions = { - textEncoder: new TextEncoder(), - ...options.transportOptions, - }; - - super(options); - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types - captureException(exception, hint, scope) { - // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only - // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload - // sent to the Server only when the `requestHandler` middleware is used - if (this._options.autoSessionTracking && this._sessionFlusher && scope) { - const requestSession = scope.getRequestSession(); - - // Necessary checks to ensure this is code block is executed only within a request - // Should override the status only if `requestSession.status` is `Ok`, which is its initial stage - if (requestSession && requestSession.status === 'ok') { - requestSession.status = 'errored'; - } - } - - return super.captureException(exception, hint, scope); - } - - /** - * @inheritDoc - */ - captureEvent(event, hint, scope) { - // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only - // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload - // sent to the Server only when the `requestHandler` middleware is used - if (this._options.autoSessionTracking && this._sessionFlusher && scope) { - const eventType = event.type || 'exception'; - const isException = - eventType === 'exception' && event.exception && event.exception.values && event.exception.values.length > 0; - - // If the event is of type Exception, then a request session should be captured - if (isException) { - const requestSession = scope.getRequestSession(); - - // Ensure that this is happening within the bounds of a request, and make sure not to override - // Session Status if Errored / Crashed - if (requestSession && requestSession.status === 'ok') { - requestSession.status = 'errored'; - } - } - } - - return super.captureEvent(event, hint, scope); - } - - /** - * - * @inheritdoc - */ - close(timeout) { - _optionalChain([this, 'access', _ => _._sessionFlusher, 'optionalAccess', _2 => _2.close, 'call', _3 => _3()]); - return super.close(timeout); - } - - /** Method that initialises an instance of SessionFlusher on Client */ - initSessionFlusher() { - const { release, environment } = this._options; - if (!release) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot initialise an instance of SessionFlusher if no release is provided!'); - } else { - this._sessionFlusher = new SessionFlusher(this, { - release, - environment, - }); - } - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types - eventFromException(exception, hint) { - return resolvedSyncPromise(eventFromUnknownInput(this._options.stackParser, exception, hint)); - } - - /** - * @inheritDoc - */ - eventFromMessage( - message, - // eslint-disable-next-line deprecation/deprecation - level = 'info', - hint, - ) { - return resolvedSyncPromise( - eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace), - ); - } - - /** - * @inheritDoc - */ - _prepareEvent(event, hint, scope) { - event.platform = event.platform || 'node'; - event.contexts = { - ...event.contexts, - runtime: _optionalChain([event, 'access', _4 => _4.contexts, 'optionalAccess', _5 => _5.runtime]) || { - name: 'node', - version: global.process.version, - }, - }; - event.server_name = - event.server_name || this.getOptions().serverName || global.process.env.SENTRY_NAME || os.hostname(); - return super._prepareEvent(event, hint, scope); - } - - /** - * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment - * appropriate session aggregates bucket - */ - _captureRequestSession() { - if (!this._sessionFlusher) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Discarded request mode session because autoSessionTracking option was disabled'); - } else { - this._sessionFlusher.incrementSessionStatusCount(); - } - } -} - -export { NodeClient }; -//# sourceMappingURL=client.js.map diff --git a/node_modules/@sentry/node/esm/client.js.map b/node_modules/@sentry/node/esm/client.js.map deleted file mode 100644 index 9faf3d5..0000000 --- a/node_modules/@sentry/node/esm/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sources":["../../src/client.ts"],"sourcesContent":["import type { Scope } from '@sentry/core';\nimport { BaseClient, SDK_VERSION, SessionFlusher } from '@sentry/core';\nimport type { Event, EventHint, Severity, SeverityLevel } from '@sentry/types';\nimport { logger, resolvedSyncPromise } from '@sentry/utils';\nimport * as os from 'os';\nimport { TextEncoder } from 'util';\n\nimport { eventFromMessage, eventFromUnknownInput } from './eventbuilder';\nimport type { NodeClientOptions } from './types';\n\n/**\n * The Sentry Node SDK Client.\n *\n * @see NodeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class NodeClient extends BaseClient {\n protected _sessionFlusher: SessionFlusher | undefined;\n\n /**\n * Creates a new Node SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: NodeClientOptions) {\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.node',\n packages: [\n {\n name: 'npm:@sentry/node',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util\n options.transportOptions = {\n textEncoder: new TextEncoder(),\n ...options.transportOptions,\n };\n\n super(options);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only\n // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload\n // sent to the Server only when the `requestHandler` middleware is used\n if (this._options.autoSessionTracking && this._sessionFlusher && scope) {\n const requestSession = scope.getRequestSession();\n\n // Necessary checks to ensure this is code block is executed only within a request\n // Should override the status only if `requestSession.status` is `Ok`, which is its initial stage\n if (requestSession && requestSession.status === 'ok') {\n requestSession.status = 'errored';\n }\n }\n\n return super.captureException(exception, hint, scope);\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only\n // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload\n // sent to the Server only when the `requestHandler` middleware is used\n if (this._options.autoSessionTracking && this._sessionFlusher && scope) {\n const eventType = event.type || 'exception';\n const isException =\n eventType === 'exception' && event.exception && event.exception.values && event.exception.values.length > 0;\n\n // If the event is of type Exception, then a request session should be captured\n if (isException) {\n const requestSession = scope.getRequestSession();\n\n // Ensure that this is happening within the bounds of a request, and make sure not to override\n // Session Status if Errored / Crashed\n if (requestSession && requestSession.status === 'ok') {\n requestSession.status = 'errored';\n }\n }\n }\n\n return super.captureEvent(event, hint, scope);\n }\n\n /**\n *\n * @inheritdoc\n */\n public close(timeout?: number): PromiseLike {\n this._sessionFlusher?.close();\n return super.close(timeout);\n }\n\n /** Method that initialises an instance of SessionFlusher on Client */\n public initSessionFlusher(): void {\n const { release, environment } = this._options;\n if (!release) {\n __DEBUG_BUILD__ && logger.warn('Cannot initialise an instance of SessionFlusher if no release is provided!');\n } else {\n this._sessionFlusher = new SessionFlusher(this, {\n release,\n environment,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public eventFromException(exception: any, hint?: EventHint): PromiseLike {\n return resolvedSyncPromise(eventFromUnknownInput(this._options.stackParser, exception, hint));\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n ): PromiseLike {\n return resolvedSyncPromise(\n eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),\n );\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n event.platform = event.platform || 'node';\n event.contexts = {\n ...event.contexts,\n runtime: event.contexts?.runtime || {\n name: 'node',\n version: global.process.version,\n },\n };\n event.server_name =\n event.server_name || this.getOptions().serverName || global.process.env.SENTRY_NAME || os.hostname();\n return super._prepareEvent(event, hint, scope);\n }\n\n /**\n * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment\n * appropriate session aggregates bucket\n */\n protected _captureRequestSession(): void {\n if (!this._sessionFlusher) {\n __DEBUG_BUILD__ && logger.warn('Discarded request mode session because autoSessionTracking option was disabled');\n } else {\n this._sessionFlusher.incrementSessionStatusCount();\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;AAUA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA;CACA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAA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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;IACA;EACA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/handlers.js b/node_modules/@sentry/node/esm/handlers.js deleted file mode 100644 index 1c9c387..0000000 --- a/node_modules/@sentry/node/esm/handlers.js +++ /dev/null @@ -1,289 +0,0 @@ -import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; -import { getCurrentHub, startTransaction, withScope, captureException } from '@sentry/core'; -import { logger, isString, extractTraceparentData, baggageHeaderToDynamicSamplingContext, extractPathForTransaction, addRequestDataToTransaction, dropUndefinedKeys } from '@sentry/utils'; -import * as domain from 'domain'; -import { extractRequestData } from './requestdata.js'; -import { isAutoSessionTrackingEnabled, flush } from './sdk.js'; -export { extractRequestData, parseRequest } from './requestDataDeprecated.js'; - -/* eslint-disable @typescript-eslint/no-explicit-any */ - -/** - * Express-compatible tracing handler. - * @see Exposed as `Handlers.tracingHandler` - */ -function tracingHandler() - - { - return function sentryTracingMiddleware( - req, - res, - next, - ) { - const hub = getCurrentHub(); - const options = _optionalChain([hub, 'access', _ => _.getClient, 'call', _2 => _2(), 'optionalAccess', _3 => _3.getOptions, 'call', _4 => _4()]); - - if ( - !options || - options.instrumenter !== 'sentry' || - _optionalChain([req, 'access', _5 => _5.method, 'optionalAccess', _6 => _6.toUpperCase, 'call', _7 => _7()]) === 'OPTIONS' || - _optionalChain([req, 'access', _8 => _8.method, 'optionalAccess', _9 => _9.toUpperCase, 'call', _10 => _10()]) === 'HEAD' - ) { - return next(); - } - - // TODO: This is the `hasTracingEnabled` check, but we're doing it manually since `@sentry/tracing` isn't a - // dependency of `@sentry/node`. Long term, that function should probably move to `@sentry/hub. - if (!('tracesSampleRate' in options) && !('tracesSampler' in options)) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.warn( - 'Sentry `tracingHandler` is being used, but tracing is disabled. Please enable tracing by setting ' + - 'either `tracesSampleRate` or `tracesSampler` in your `Sentry.init()` options.', - ); - return next(); - } - - // If there is a trace header set, we extract the data from it (parentSpanId, traceId, and sampling decision) - const traceparentData = - req.headers && isString(req.headers['sentry-trace']) && extractTraceparentData(req.headers['sentry-trace']); - const incomingBaggageHeaders = _optionalChain([req, 'access', _11 => _11.headers, 'optionalAccess', _12 => _12.baggage]); - const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(incomingBaggageHeaders); - - const [name, source] = extractPathForTransaction(req, { path: true, method: true }); - const transaction = startTransaction( - { - name, - op: 'http.server', - ...traceparentData, - metadata: { - dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, - // The request should already have been stored in `scope.sdkProcessingMetadata` (which will become - // `event.sdkProcessingMetadata` the same way the metadata here will) by `sentryRequestMiddleware`, but on the - // off chance someone is using `sentryTracingMiddleware` without `sentryRequestMiddleware`, it doesn't hurt to - // be sure - request: req, - source, - }, - }, - // extra context passed to the tracesSampler - { request: extractRequestData(req) }, - ); - - // We put the transaction on the scope so users can attach children to it - hub.configureScope(scope => { - scope.setSpan(transaction); - }); - - // We also set __sentry_transaction on the response so people can grab the transaction there to add - // spans to it later. - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - (res ).__sentry_transaction = transaction; - - res.once('finish', () => { - // Push `transaction.finish` to the next event loop so open spans have a chance to finish before the transaction - // closes - setImmediate(() => { - addRequestDataToTransaction(transaction, req); - transaction.setHttpStatus(res.statusCode); - transaction.finish(); - }); - }); - - next(); - }; -} - -/** - * Backwards compatibility shim which can be removed in v8. Forces the given options to follow the - * `AddRequestDataToEventOptions` interface. - * - * TODO (v8): Get rid of this, and stop passing `requestDataOptionsFromExpressHandler` to `setSDKProcessingMetadata`. - */ -function convertReqHandlerOptsToAddReqDataOpts( - reqHandlerOptions = {}, -) { - let addRequestDataOptions; - - if ('include' in reqHandlerOptions) { - addRequestDataOptions = { include: reqHandlerOptions.include }; - } else { - // eslint-disable-next-line deprecation/deprecation - const { ip, request, transaction, user } = reqHandlerOptions ; - - if (ip || request || transaction || user) { - addRequestDataOptions = { include: dropUndefinedKeys({ ip, request, transaction, user }) }; - } - } - - return addRequestDataOptions; -} - -/** - * Express compatible request handler. - * @see Exposed as `Handlers.requestHandler` - */ -function requestHandler( - options, -) { - // TODO (v8): Get rid of this - const requestDataOptions = convertReqHandlerOptsToAddReqDataOpts(options); - - const currentHub = getCurrentHub(); - const client = currentHub.getClient(); - // Initialise an instance of SessionFlusher on the client when `autoSessionTracking` is enabled and the - // `requestHandler` middleware is used indicating that we are running in SessionAggregates mode - if (client && isAutoSessionTrackingEnabled(client)) { - client.initSessionFlusher(); - - // If Scope contains a Single mode Session, it is removed in favor of using Session Aggregates mode - const scope = currentHub.getScope(); - if (scope && scope.getSession()) { - scope.setSession(); - } - } - - return function sentryRequestMiddleware( - req, - res, - next, - ) { - if (options && options.flushTimeout && options.flushTimeout > 0) { - // eslint-disable-next-line @typescript-eslint/unbound-method - const _end = res.end; - res.end = function (chunk, encoding, cb) { - void flush(options.flushTimeout) - .then(() => { - _end.call(this, chunk, encoding, cb); - }) - .then(null, e => { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(e); - _end.call(this, chunk, encoding, cb); - }); - }; - } - const local = domain.create(); - local.add(req); - local.add(res); - - local.run(() => { - const currentHub = getCurrentHub(); - - currentHub.configureScope(scope => { - scope.setSDKProcessingMetadata({ - request: req, - // TODO (v8): Stop passing this - requestDataOptionsFromExpressHandler: requestDataOptions, - }); - - const client = currentHub.getClient(); - if (isAutoSessionTrackingEnabled(client)) { - const scope = currentHub.getScope(); - if (scope) { - // Set `status` of `RequestSession` to Ok, at the beginning of the request - scope.setRequestSession({ status: 'ok' }); - } - } - }); - - res.once('finish', () => { - const client = currentHub.getClient(); - if (isAutoSessionTrackingEnabled(client)) { - setImmediate(() => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (client && (client )._captureRequestSession) { - // Calling _captureRequestSession to capture request session at the end of the request by incrementing - // the correct SessionAggregates bucket i.e. crashed, errored or exited - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - (client )._captureRequestSession(); - } - }); - } - }); - next(); - }); - }; -} - -/** JSDoc */ - -/** JSDoc */ -function getStatusCodeFromResponse(error) { - const statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode); - return statusCode ? parseInt(statusCode , 10) : 500; -} - -/** Returns true if response code is internal server error */ -function defaultShouldHandleError(error) { - const status = getStatusCodeFromResponse(error); - return status >= 500; -} - -/** - * Express compatible error handler. - * @see Exposed as `Handlers.errorHandler` - */ -function errorHandler(options - -) - - { - return function sentryErrorMiddleware( - error, - _req, - res, - next, - ) { - const shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError; - - if (shouldHandleError(error)) { - withScope(_scope => { - // The request should already have been stored in `scope.sdkProcessingMetadata` by `sentryRequestMiddleware`, - // but on the off chance someone is using `sentryErrorMiddleware` without `sentryRequestMiddleware`, it doesn't - // hurt to be sure - _scope.setSDKProcessingMetadata({ request: _req }); - - // For some reason we need to set the transaction on the scope again - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - const transaction = (res ).__sentry_transaction ; - if (transaction && _scope.getSpan() === undefined) { - _scope.setSpan(transaction); - } - - const client = getCurrentHub().getClient(); - if (client && isAutoSessionTrackingEnabled(client)) { - // Check if the `SessionFlusher` is instantiated on the client to go into this branch that marks the - // `requestSession.status` as `Crashed`, and this check is necessary because the `SessionFlusher` is only - // instantiated when the the`requestHandler` middleware is initialised, which indicates that we should be - // running in SessionAggregates mode - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - const isSessionAggregatesMode = (client )._sessionFlusher !== undefined; - if (isSessionAggregatesMode) { - const requestSession = _scope.getRequestSession(); - // If an error bubbles to the `errorHandler`, then this is an unhandled error, and should be reported as a - // Crashed session. The `_requestSession.status` is checked to ensure that this error is happening within - // the bounds of a request, and if so the status is updated - if (requestSession && requestSession.status !== undefined) { - requestSession.status = 'crashed'; - } - } - } - - const eventId = captureException(error); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - (res ).sentry = eventId; - next(error); - }); - - return; - } - - next(error); - }; -} - -// TODO (v8 / #5257): Remove this -// eslint-disable-next-line deprecation/deprecation -; - -export { errorHandler, requestHandler, tracingHandler }; -//# sourceMappingURL=handlers.js.map diff --git a/node_modules/@sentry/node/esm/handlers.js.map b/node_modules/@sentry/node/esm/handlers.js.map deleted file mode 100644 index 1f1fa1d..0000000 --- a/node_modules/@sentry/node/esm/handlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handlers.js","sources":["../../src/handlers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { captureException, getCurrentHub, startTransaction, withScope } from '@sentry/core';\nimport type { Span } from '@sentry/types';\nimport type { AddRequestDataToEventOptions } from '@sentry/utils';\nimport {\n addRequestDataToTransaction,\n baggageHeaderToDynamicSamplingContext,\n dropUndefinedKeys,\n extractPathForTransaction,\n extractTraceparentData,\n isString,\n logger,\n} from '@sentry/utils';\nimport * as domain from 'domain';\nimport type * as http from 'http';\n\nimport type { NodeClient } from './client';\nimport { extractRequestData } from './requestdata';\n// TODO (v8 / XXX) Remove this import\nimport type { ParseRequestOptions } from './requestDataDeprecated';\nimport { flush, isAutoSessionTrackingEnabled } from './sdk';\n\n/**\n * Express-compatible tracing handler.\n * @see Exposed as `Handlers.tracingHandler`\n */\nexport function tracingHandler(): (\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n) => void {\n return function sentryTracingMiddleware(\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n ): void {\n const hub = getCurrentHub();\n const options = hub.getClient()?.getOptions();\n\n if (\n !options ||\n options.instrumenter !== 'sentry' ||\n req.method?.toUpperCase() === 'OPTIONS' ||\n req.method?.toUpperCase() === 'HEAD'\n ) {\n return next();\n }\n\n // TODO: This is the `hasTracingEnabled` check, but we're doing it manually since `@sentry/tracing` isn't a\n // dependency of `@sentry/node`. Long term, that function should probably move to `@sentry/hub.\n if (!('tracesSampleRate' in options) && !('tracesSampler' in options)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n 'Sentry `tracingHandler` is being used, but tracing is disabled. Please enable tracing by setting ' +\n 'either `tracesSampleRate` or `tracesSampler` in your `Sentry.init()` options.',\n );\n return next();\n }\n\n // If there is a trace header set, we extract the data from it (parentSpanId, traceId, and sampling decision)\n const traceparentData =\n req.headers && isString(req.headers['sentry-trace']) && extractTraceparentData(req.headers['sentry-trace']);\n const incomingBaggageHeaders = req.headers?.baggage;\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(incomingBaggageHeaders);\n\n const [name, source] = extractPathForTransaction(req, { path: true, method: true });\n const transaction = startTransaction(\n {\n name,\n op: 'http.server',\n ...traceparentData,\n metadata: {\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n // The request should already have been stored in `scope.sdkProcessingMetadata` (which will become\n // `event.sdkProcessingMetadata` the same way the metadata here will) by `sentryRequestMiddleware`, but on the\n // off chance someone is using `sentryTracingMiddleware` without `sentryRequestMiddleware`, it doesn't hurt to\n // be sure\n request: req,\n source,\n },\n },\n // extra context passed to the tracesSampler\n { request: extractRequestData(req) },\n );\n\n // We put the transaction on the scope so users can attach children to it\n hub.configureScope(scope => {\n scope.setSpan(transaction);\n });\n\n // We also set __sentry_transaction on the response so people can grab the transaction there to add\n // spans to it later.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (res as any).__sentry_transaction = transaction;\n\n res.once('finish', () => {\n // Push `transaction.finish` to the next event loop so open spans have a chance to finish before the transaction\n // closes\n setImmediate(() => {\n addRequestDataToTransaction(transaction, req);\n transaction.setHttpStatus(res.statusCode);\n transaction.finish();\n });\n });\n\n next();\n };\n}\n\nexport type RequestHandlerOptions =\n // TODO (v8 / XXX) Remove ParseRequestOptions type and eslint override\n // eslint-disable-next-line deprecation/deprecation\n | (ParseRequestOptions | AddRequestDataToEventOptions) & {\n flushTimeout?: number;\n };\n\n/**\n * Backwards compatibility shim which can be removed in v8. Forces the given options to follow the\n * `AddRequestDataToEventOptions` interface.\n *\n * TODO (v8): Get rid of this, and stop passing `requestDataOptionsFromExpressHandler` to `setSDKProcessingMetadata`.\n */\nfunction convertReqHandlerOptsToAddReqDataOpts(\n reqHandlerOptions: RequestHandlerOptions = {},\n): AddRequestDataToEventOptions | undefined {\n let addRequestDataOptions: AddRequestDataToEventOptions | undefined;\n\n if ('include' in reqHandlerOptions) {\n addRequestDataOptions = { include: reqHandlerOptions.include };\n } else {\n // eslint-disable-next-line deprecation/deprecation\n const { ip, request, transaction, user } = reqHandlerOptions as ParseRequestOptions;\n\n if (ip || request || transaction || user) {\n addRequestDataOptions = { include: dropUndefinedKeys({ ip, request, transaction, user }) };\n }\n }\n\n return addRequestDataOptions;\n}\n\n/**\n * Express compatible request handler.\n * @see Exposed as `Handlers.requestHandler`\n */\nexport function requestHandler(\n options?: RequestHandlerOptions,\n): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void {\n // TODO (v8): Get rid of this\n const requestDataOptions = convertReqHandlerOptsToAddReqDataOpts(options);\n\n const currentHub = getCurrentHub();\n const client = currentHub.getClient();\n // Initialise an instance of SessionFlusher on the client when `autoSessionTracking` is enabled and the\n // `requestHandler` middleware is used indicating that we are running in SessionAggregates mode\n if (client && isAutoSessionTrackingEnabled(client)) {\n client.initSessionFlusher();\n\n // If Scope contains a Single mode Session, it is removed in favor of using Session Aggregates mode\n const scope = currentHub.getScope();\n if (scope && scope.getSession()) {\n scope.setSession();\n }\n }\n\n return function sentryRequestMiddleware(\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error?: any) => void,\n ): void {\n if (options && options.flushTimeout && options.flushTimeout > 0) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _end = res.end;\n res.end = function (chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): void {\n void flush(options.flushTimeout)\n .then(() => {\n _end.call(this, chunk, encoding, cb);\n })\n .then(null, e => {\n __DEBUG_BUILD__ && logger.error(e);\n _end.call(this, chunk, encoding, cb);\n });\n };\n }\n const local = domain.create();\n local.add(req);\n local.add(res);\n\n local.run(() => {\n const currentHub = getCurrentHub();\n\n currentHub.configureScope(scope => {\n scope.setSDKProcessingMetadata({\n request: req,\n // TODO (v8): Stop passing this\n requestDataOptionsFromExpressHandler: requestDataOptions,\n });\n\n const client = currentHub.getClient();\n if (isAutoSessionTrackingEnabled(client)) {\n const scope = currentHub.getScope();\n if (scope) {\n // Set `status` of `RequestSession` to Ok, at the beginning of the request\n scope.setRequestSession({ status: 'ok' });\n }\n }\n });\n\n res.once('finish', () => {\n const client = currentHub.getClient();\n if (isAutoSessionTrackingEnabled(client)) {\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (client && (client as any)._captureRequestSession) {\n // Calling _captureRequestSession to capture request session at the end of the request by incrementing\n // the correct SessionAggregates bucket i.e. crashed, errored or exited\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (client as any)._captureRequestSession();\n }\n });\n }\n });\n next();\n });\n };\n}\n\n/** JSDoc */\ninterface MiddlewareError extends Error {\n status?: number | string;\n statusCode?: number | string;\n status_code?: number | string;\n output?: {\n statusCode?: number | string;\n };\n}\n\n/** JSDoc */\nfunction getStatusCodeFromResponse(error: MiddlewareError): number {\n const statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode);\n return statusCode ? parseInt(statusCode as string, 10) : 500;\n}\n\n/** Returns true if response code is internal server error */\nfunction defaultShouldHandleError(error: MiddlewareError): boolean {\n const status = getStatusCodeFromResponse(error);\n return status >= 500;\n}\n\n/**\n * Express compatible error handler.\n * @see Exposed as `Handlers.errorHandler`\n */\nexport function errorHandler(options?: {\n /**\n * Callback method deciding whether error should be captured and sent to Sentry\n * @param error Captured middleware error\n */\n shouldHandleError?(this: void, error: MiddlewareError): boolean;\n}): (\n error: MiddlewareError,\n req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error: MiddlewareError) => void,\n) => void {\n return function sentryErrorMiddleware(\n error: MiddlewareError,\n _req: http.IncomingMessage,\n res: http.ServerResponse,\n next: (error: MiddlewareError) => void,\n ): void {\n const shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError;\n\n if (shouldHandleError(error)) {\n withScope(_scope => {\n // The request should already have been stored in `scope.sdkProcessingMetadata` by `sentryRequestMiddleware`,\n // but on the off chance someone is using `sentryErrorMiddleware` without `sentryRequestMiddleware`, it doesn't\n // hurt to be sure\n _scope.setSDKProcessingMetadata({ request: _req });\n\n // For some reason we need to set the transaction on the scope again\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const transaction = (res as any).__sentry_transaction as Span;\n if (transaction && _scope.getSpan() === undefined) {\n _scope.setSpan(transaction);\n }\n\n const client = getCurrentHub().getClient();\n if (client && isAutoSessionTrackingEnabled(client)) {\n // Check if the `SessionFlusher` is instantiated on the client to go into this branch that marks the\n // `requestSession.status` as `Crashed`, and this check is necessary because the `SessionFlusher` is only\n // instantiated when the the`requestHandler` middleware is initialised, which indicates that we should be\n // running in SessionAggregates mode\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const isSessionAggregatesMode = (client as any)._sessionFlusher !== undefined;\n if (isSessionAggregatesMode) {\n const requestSession = _scope.getRequestSession();\n // If an error bubbles to the `errorHandler`, then this is an unhandled error, and should be reported as a\n // Crashed session. The `_requestSession.status` is checked to ensure that this error is happening within\n // the bounds of a request, and if so the status is updated\n if (requestSession && requestSession.status !== undefined) {\n requestSession.status = 'crashed';\n }\n }\n }\n\n const eventId = captureException(error);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (res as any).sentry = eventId;\n next(error);\n });\n\n return;\n }\n\n next(error);\n };\n}\n\n// TODO (v8 / #5257): Remove this\n// eslint-disable-next-line deprecation/deprecation\nexport type { ParseRequestOptions, ExpressRequest } from './requestDataDeprecated';\n// eslint-disable-next-line deprecation/deprecation\nexport { parseRequest, extractRequestData } from './requestDataDeprecated';\n"],"names":[],"mappings":";;;;;;;;AAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;;AAsBA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;CAIA;EACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,CAAA,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CAAA,CAAA,CAAA;QACA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,OAAA;QACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;MACA,CAAA,CAAA;;MAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA;;IAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EACA,CAAA;AACA;;AAEA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/index.js b/node_modules/@sentry/node/esm/index.js deleted file mode 100644 index 4802891..0000000 --- a/node_modules/@sentry/node/esm/index.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Integrations, getMainCarrier } from '@sentry/core'; -export { Hub, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, captureEvent, captureException, captureMessage, configureScope, createTransport, getCurrentHub, getHubFromCarrier, makeMain, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope } from '@sentry/core'; -export { NodeClient } from './client.js'; -import './transports/index.js'; -export { close, defaultIntegrations, defaultStackParser, flush, getSentryRelease, init, lastEventId } from './sdk.js'; -export { DEFAULT_USER_INCLUDES, addRequestDataToEvent, extractRequestData } from './requestdata.js'; -export { deepReadDirSync } from './utils.js'; -import * as domain from 'domain'; -import * as handlers from './handlers.js'; -export { handlers as Handlers }; -import * as index from './integrations/index.js'; -export { makeNodeTransport } from './transports/http.js'; - -; -; - -; -; - -const INTEGRATIONS = { - ...Integrations, - ...index, -}; - -// We need to patch domain on the global __SENTRY__ object to make it work for node in cross-platform packages like -// @sentry/core. If we don't do this, browser bundlers will have troubles resolving `require('domain')`. -const carrier = getMainCarrier(); -if (carrier.__SENTRY__) { - carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; - carrier.__SENTRY__.extensions.domain = carrier.__SENTRY__.extensions.domain || domain; -} - -export { INTEGRATIONS as Integrations }; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/node/esm/index.js.map b/node_modules/@sentry/node/esm/index.js.map deleted file mode 100644 index da23ead..0000000 --- a/node_modules/@sentry/node/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["export type {\n Breadcrumb,\n BreadcrumbHint,\n PolymorphicRequest,\n Request,\n SdkInfo,\n Event,\n EventHint,\n Exception,\n Session,\n // eslint-disable-next-line deprecation/deprecation\n Severity,\n SeverityLevel,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n Span,\n} from '@sentry/types';\nexport type { AddRequestDataToEventOptions } from '@sentry/utils';\n\nexport type { TransactionNamingScheme } from './requestdata';\nexport type { NodeOptions } from './types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n createTransport,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n makeMain,\n Scope,\n startTransaction,\n SDK_VERSION,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n withScope,\n} from '@sentry/core';\n\nexport { NodeClient } from './client';\nexport { makeNodeTransport } from './transports';\nexport { defaultIntegrations, init, defaultStackParser, lastEventId, flush, close, getSentryRelease } from './sdk';\nexport { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from './requestdata';\nexport { deepReadDirSync } from './utils';\n\nimport { getMainCarrier, Integrations as CoreIntegrations } from '@sentry/core';\nimport * as domain from 'domain';\n\nimport * as Handlers from './handlers';\nimport * as NodeIntegrations from './integrations';\n\nconst INTEGRATIONS = {\n ...CoreIntegrations,\n ...NodeIntegrations,\n};\n\nexport { INTEGRATIONS as Integrations, Handlers };\n\n// We need to patch domain on the global __SENTRY__ object to make it work for node in cross-platform packages like\n// @sentry/core. If we don't do this, browser bundlers will have troubles resolving `require('domain')`.\nconst carrier = getMainCarrier();\nif (carrier.__SENTRY__) {\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n carrier.__SENTRY__.extensions.domain = carrier.__SENTRY__.extensions.domain || domain;\n}\n"],"names":["CoreIntegrations","NodeIntegrations"],"mappings":";;;;;;;;;;;;;AAkBA,CAAA;AACA,CAAA;AACA;AACA,CAAA;AACA,CAAA;AAqCA;AACA,MAAA,YAAA,GAAA;AACA,EAAA,GAAAA,YAAA;AACA,EAAA,GAAAC,KAAA;AACA,EAAA;AAGA;AACA;AACA;AACA,MAAA,OAAA,GAAA,cAAA,EAAA,CAAA;AACA,IAAA,OAAA,CAAA,UAAA,EAAA;AACA,EAAA,OAAA,CAAA,UAAA,CAAA,UAAA,GAAA,OAAA,CAAA,UAAA,CAAA,UAAA,IAAA,EAAA,CAAA;AACA,EAAA,OAAA,CAAA,UAAA,CAAA,UAAA,CAAA,MAAA,GAAA,OAAA,CAAA,UAAA,CAAA,UAAA,CAAA,MAAA,IAAA,MAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/console.js b/node_modules/@sentry/node/esm/integrations/console.js deleted file mode 100644 index e8d013d..0000000 --- a/node_modules/@sentry/node/esm/integrations/console.js +++ /dev/null @@ -1,57 +0,0 @@ -import { getCurrentHub } from '@sentry/core'; -import { fill, severityLevelFromString } from '@sentry/utils'; -import * as util from 'util'; - -/** Console module integration */ -class Console {constructor() { Console.prototype.__init.call(this); } - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Console';} - - /** - * @inheritDoc - */ - __init() {this.name = Console.id;} - - /** - * @inheritDoc - */ - setupOnce() { - for (const level of ['debug', 'info', 'warn', 'error', 'log']) { - fill(console, level, createConsoleWrapper(level)); - } - } -} Console.__initStatic(); - -/** - * Wrapper function that'll be used for every console level - */ -function createConsoleWrapper(level) { - return function consoleWrapper(originalConsoleMethod) { - const sentryLevel = severityLevelFromString(level); - - /* eslint-disable prefer-rest-params */ - return function () { - if (getCurrentHub().getIntegration(Console)) { - getCurrentHub().addBreadcrumb( - { - category: 'console', - level: sentryLevel, - message: util.format.apply(undefined, arguments), - }, - { - input: [...arguments], - level, - }, - ); - } - - originalConsoleMethod.apply(this, arguments); - }; - /* eslint-enable prefer-rest-params */ - }; -} - -export { Console }; -//# sourceMappingURL=console.js.map diff --git a/node_modules/@sentry/node/esm/integrations/console.js.map b/node_modules/@sentry/node/esm/integrations/console.js.map deleted file mode 100644 index 1d527dc..0000000 --- a/node_modules/@sentry/node/esm/integrations/console.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"console.js","sources":["../../../src/integrations/console.ts"],"sourcesContent":["import { getCurrentHub } from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { fill, severityLevelFromString } from '@sentry/utils';\nimport * as util from 'util';\n\n/** Console module integration */\nexport class Console implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Console';\n\n /**\n * @inheritDoc\n */\n public name: string = Console.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n for (const level of ['debug', 'info', 'warn', 'error', 'log']) {\n fill(console, level, createConsoleWrapper(level));\n }\n }\n}\n\n/**\n * Wrapper function that'll be used for every console level\n */\nfunction createConsoleWrapper(level: string): (originalConsoleMethod: () => void) => void {\n return function consoleWrapper(originalConsoleMethod: () => void): () => void {\n const sentryLevel = severityLevelFromString(level);\n\n /* eslint-disable prefer-rest-params */\n return function (this: typeof console): void {\n if (getCurrentHub().getIntegration(Console)) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'console',\n level: sentryLevel,\n message: util.format.apply(undefined, arguments),\n },\n {\n input: [...arguments],\n level,\n },\n );\n }\n\n originalConsoleMethod.apply(this, arguments);\n };\n /* eslint-enable prefer-rest-params */\n };\n}\n"],"names":[],"mappings":";;;;AAKA;AACA,MAAA,OAAA,EAAA,CAAA,WAAA,GAAA,EAAA,OAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,UAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,OAAA,CAAA,GAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,SAAA,GAAA;AACA,IAAA,KAAA,MAAA,KAAA,IAAA,CAAA,OAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,KAAA,CAAA,EAAA;AACA,MAAA,IAAA,CAAA,OAAA,EAAA,KAAA,EAAA,oBAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA,CAAA,CAAA,OAAA,CAAA,YAAA,EAAA,CAAA;AACA;AACA;AACA;AACA;AACA,SAAA,oBAAA,CAAA,KAAA,EAAA;AACA,EAAA,OAAA,SAAA,cAAA,CAAA,qBAAA,EAAA;AACA,IAAA,MAAA,WAAA,GAAA,uBAAA,CAAA,KAAA,CAAA,CAAA;AACA;AACA;AACA,IAAA,OAAA,YAAA;AACA,MAAA,IAAA,aAAA,EAAA,CAAA,cAAA,CAAA,OAAA,CAAA,EAAA;AACA,QAAA,aAAA,EAAA,CAAA,aAAA;AACA,UAAA;AACA,YAAA,QAAA,EAAA,SAAA;AACA,YAAA,KAAA,EAAA,WAAA;AACA,YAAA,OAAA,EAAA,IAAA,CAAA,MAAA,CAAA,KAAA,CAAA,SAAA,EAAA,SAAA,CAAA;AACA,WAAA;AACA,UAAA;AACA,YAAA,KAAA,EAAA,CAAA,GAAA,SAAA,CAAA;AACA,YAAA,KAAA;AACA,WAAA;AACA,SAAA,CAAA;AACA,OAAA;AACA;AACA,MAAA,qBAAA,CAAA,KAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AACA,KAAA,CAAA;AACA;AACA,GAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/http.js b/node_modules/@sentry/node/esm/integrations/http.js deleted file mode 100644 index 5818812..0000000 --- a/node_modules/@sentry/node/esm/integrations/http.js +++ /dev/null @@ -1,260 +0,0 @@ -import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; -import { getCurrentHub } from '@sentry/core'; -import { parseSemver, logger, fill, stringMatchesSomePattern, dynamicSamplingContextToSentryBaggageHeader } from '@sentry/utils'; -import { normalizeRequestArgs, extractUrl, isSentryRequest, cleanSpanDescription } from './utils/http.js'; - -const NODE_VERSION = parseSemver(process.versions.node); - -/** - * The http module integration instruments Node's internal http module. It creates breadcrumbs, transactions for outgoing - * http requests and attaches trace data when tracing is enabled via its `tracing` option. - */ -class Http { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Http';} - - /** - * @inheritDoc - */ - __init() {this.name = Http.id;} - - /** - * @inheritDoc - */ - constructor(options = {}) {;Http.prototype.__init.call(this); - this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs; - this._tracing = !options.tracing ? undefined : options.tracing === true ? {} : options.tracing; - } - - /** - * @inheritDoc - */ - setupOnce( - _addGlobalEventProcessor, - setupOnceGetCurrentHub, - ) { - // No need to instrument if we don't want to track anything - if (!this._breadcrumbs && !this._tracing) { - return; - } - - const clientOptions = _optionalChain([setupOnceGetCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]); - - // Do not auto-instrument for other instrumenter - if (clientOptions && clientOptions.instrumenter !== 'sentry') { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('HTTP Integration is skipped because of instrumenter configuration.'); - return; - } - - // TODO (v8): `tracePropagationTargets` and `shouldCreateSpanForRequest` will be removed from clientOptions - // and we will no longer have to do this optional merge, we can just pass `this._tracing` directly. - const tracingOptions = this._tracing ? { ...clientOptions, ...this._tracing } : undefined; - - const wrappedHandlerMaker = _createWrappedRequestMethodFactory(this._breadcrumbs, tracingOptions); - - // eslint-disable-next-line @typescript-eslint/no-var-requires - const httpModule = require('http'); - fill(httpModule, 'get', wrappedHandlerMaker); - fill(httpModule, 'request', wrappedHandlerMaker); - - // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it. - // If we do, we'd get double breadcrumbs and double spans for `https` calls. - // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately. - if (NODE_VERSION.major && NODE_VERSION.major > 8) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const httpsModule = require('https'); - fill(httpsModule, 'get', wrappedHandlerMaker); - fill(httpsModule, 'request', wrappedHandlerMaker); - } - } -}Http.__initStatic(); - -// for ease of reading below - -/** - * Function which creates a function which creates wrapped versions of internal `request` and `get` calls within `http` - * and `https` modules. (NB: Not a typo - this is a creator^2!) - * - * @param breadcrumbsEnabled Whether or not to record outgoing requests as breadcrumbs - * @param tracingEnabled Whether or not to record outgoing requests as tracing spans - * - * @returns A function which accepts the exiting handler and returns a wrapped handler - */ -function _createWrappedRequestMethodFactory( - breadcrumbsEnabled, - tracingOptions, -) { - // We're caching results so we don't have to recompute regexp every time we create a request. - const createSpanUrlMap = {}; - const headersUrlMap = {}; - - const shouldCreateSpan = (url) => { - if (_optionalChain([tracingOptions, 'optionalAccess', _6 => _6.shouldCreateSpanForRequest]) === undefined) { - return true; - } - - if (createSpanUrlMap[url]) { - return createSpanUrlMap[url]; - } - - createSpanUrlMap[url] = tracingOptions.shouldCreateSpanForRequest(url); - - return createSpanUrlMap[url]; - }; - - const shouldAttachTraceData = (url) => { - if (_optionalChain([tracingOptions, 'optionalAccess', _7 => _7.tracePropagationTargets]) === undefined) { - return true; - } - - if (headersUrlMap[url]) { - return headersUrlMap[url]; - } - - headersUrlMap[url] = stringMatchesSomePattern(url, tracingOptions.tracePropagationTargets); - - return headersUrlMap[url]; - }; - - return function wrappedRequestMethodFactory(originalRequestMethod) { - return function wrappedMethod( ...args) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const httpModule = this; - - const requestArgs = normalizeRequestArgs(this, args); - const requestOptions = requestArgs[0]; - const requestUrl = extractUrl(requestOptions); - - // we don't want to record requests to Sentry as either breadcrumbs or spans, so just use the original method - if (isSentryRequest(requestUrl)) { - return originalRequestMethod.apply(httpModule, requestArgs); - } - - let requestSpan; - let parentSpan; - - const scope = getCurrentHub().getScope(); - - if (scope && tracingOptions && shouldCreateSpan(requestUrl)) { - parentSpan = scope.getSpan(); - - if (parentSpan) { - requestSpan = parentSpan.startChild({ - description: `${requestOptions.method || 'GET'} ${requestUrl}`, - op: 'http.client', - }); - - if (shouldAttachTraceData(requestUrl)) { - const sentryTraceHeader = requestSpan.toTraceparent(); - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.log( - `[Tracing] Adding sentry-trace header ${sentryTraceHeader} to outgoing request to "${requestUrl}": `, - ); - - requestOptions.headers = { - ...requestOptions.headers, - 'sentry-trace': sentryTraceHeader, - }; - - if (parentSpan.transaction) { - const dynamicSamplingContext = parentSpan.transaction.getDynamicSamplingContext(); - const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); - - let newBaggageHeaderField; - if (!requestOptions.headers || !requestOptions.headers.baggage) { - newBaggageHeaderField = sentryBaggageHeader; - } else if (!sentryBaggageHeader) { - newBaggageHeaderField = requestOptions.headers.baggage; - } else if (Array.isArray(requestOptions.headers.baggage)) { - newBaggageHeaderField = [...requestOptions.headers.baggage, sentryBaggageHeader]; - } else { - // Type-cast explanation: - // Technically this the following could be of type `(number | string)[]` but for the sake of simplicity - // we say this is undefined behaviour, since it would not be baggage spec conform if the user did this. - newBaggageHeaderField = [requestOptions.headers.baggage, sentryBaggageHeader] ; - } - - requestOptions.headers = { - ...requestOptions.headers, - // Setting a hader to `undefined` will crash in node so we only set the baggage header when it's defined - ...(newBaggageHeaderField && { baggage: newBaggageHeaderField }), - }; - } - } else { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.log( - `[Tracing] Not adding sentry-trace header to outgoing request (${requestUrl}) due to mismatching tracePropagationTargets option.`, - ); - } - - const transaction = parentSpan.transaction; - if (transaction) { - transaction.metadata.propagations++; - } - } - } - - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return originalRequestMethod - .apply(httpModule, requestArgs) - .once('response', function ( res) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const req = this; - if (breadcrumbsEnabled) { - addRequestBreadcrumb('response', requestUrl, req, res); - } - if (requestSpan) { - if (res.statusCode) { - requestSpan.setHttpStatus(res.statusCode); - } - requestSpan.description = cleanSpanDescription(requestSpan.description, requestOptions, req); - requestSpan.finish(); - } - }) - .once('error', function () { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const req = this; - - if (breadcrumbsEnabled) { - addRequestBreadcrumb('error', requestUrl, req); - } - if (requestSpan) { - requestSpan.setHttpStatus(500); - requestSpan.description = cleanSpanDescription(requestSpan.description, requestOptions, req); - requestSpan.finish(); - } - }); - }; - }; -} - -/** - * Captures Breadcrumb based on provided request/response pair - */ -function addRequestBreadcrumb(event, url, req, res) { - if (!getCurrentHub().getIntegration(Http)) { - return; - } - - getCurrentHub().addBreadcrumb( - { - category: 'http', - data: { - method: req.method, - status_code: res && res.statusCode, - url, - }, - type: 'http', - }, - { - event, - request: req, - response: res, - }, - ); -} - -export { Http }; -//# sourceMappingURL=http.js.map diff --git a/node_modules/@sentry/node/esm/integrations/http.js.map b/node_modules/@sentry/node/esm/integrations/http.js.map deleted file mode 100644 index fc037bf..0000000 --- a/node_modules/@sentry/node/esm/integrations/http.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.js","sources":["../../../src/integrations/http.ts"],"sourcesContent":["import type { Hub } from '@sentry/core';\nimport { getCurrentHub } from '@sentry/core';\nimport type { EventProcessor, Integration, Span, TracePropagationTargets } from '@sentry/types';\nimport {\n dynamicSamplingContextToSentryBaggageHeader,\n fill,\n logger,\n parseSemver,\n stringMatchesSomePattern,\n} from '@sentry/utils';\nimport type * as http from 'http';\nimport type * as https from 'https';\n\nimport type { NodeClient } from '../client';\nimport type { RequestMethod, RequestMethodArgs } from './utils/http';\nimport { cleanSpanDescription, extractUrl, isSentryRequest, normalizeRequestArgs } from './utils/http';\n\nconst NODE_VERSION = parseSemver(process.versions.node);\n\ninterface TracingOptions {\n /**\n * List of strings/regex controlling to which outgoing requests\n * the SDK will attach tracing headers.\n *\n * By default the SDK will attach those headers to all outgoing\n * requests. If this option is provided, the SDK will match the\n * request URL of outgoing requests against the items in this\n * array, and only attach tracing headers if a match was found.\n */\n tracePropagationTargets?: TracePropagationTargets;\n\n /**\n * Function determining whether or not to create spans to track outgoing requests to the given URL.\n * By default, spans will be created for all outgoing requests.\n */\n shouldCreateSpanForRequest?: (url: string) => boolean;\n}\n\ninterface HttpOptions {\n /**\n * Whether breadcrumbs should be recorded for requests\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * Whether tracing spans should be created for requests\n * Defaults to false\n */\n tracing?: TracingOptions | boolean;\n}\n\n/**\n * The http module integration instruments Node's internal http module. It creates breadcrumbs, transactions for outgoing\n * http requests and attaches trace data when tracing is enabled via its `tracing` option.\n */\nexport class Http implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Http';\n\n /**\n * @inheritDoc\n */\n public name: string = Http.id;\n\n private readonly _breadcrumbs: boolean;\n private readonly _tracing: TracingOptions | undefined;\n\n /**\n * @inheritDoc\n */\n public constructor(options: HttpOptions = {}) {\n this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs;\n this._tracing = !options.tracing ? undefined : options.tracing === true ? {} : options.tracing;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(\n _addGlobalEventProcessor: (callback: EventProcessor) => void,\n setupOnceGetCurrentHub: () => Hub,\n ): void {\n // No need to instrument if we don't want to track anything\n if (!this._breadcrumbs && !this._tracing) {\n return;\n }\n\n const clientOptions = setupOnceGetCurrentHub().getClient()?.getOptions();\n\n // Do not auto-instrument for other instrumenter\n if (clientOptions && clientOptions.instrumenter !== 'sentry') {\n __DEBUG_BUILD__ && logger.log('HTTP Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n // TODO (v8): `tracePropagationTargets` and `shouldCreateSpanForRequest` will be removed from clientOptions\n // and we will no longer have to do this optional merge, we can just pass `this._tracing` directly.\n const tracingOptions = this._tracing ? { ...clientOptions, ...this._tracing } : undefined;\n\n const wrappedHandlerMaker = _createWrappedRequestMethodFactory(this._breadcrumbs, tracingOptions);\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const httpModule = require('http');\n fill(httpModule, 'get', wrappedHandlerMaker);\n fill(httpModule, 'request', wrappedHandlerMaker);\n\n // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it.\n // If we do, we'd get double breadcrumbs and double spans for `https` calls.\n // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately.\n if (NODE_VERSION.major && NODE_VERSION.major > 8) {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const httpsModule = require('https');\n fill(httpsModule, 'get', wrappedHandlerMaker);\n fill(httpsModule, 'request', wrappedHandlerMaker);\n }\n }\n}\n\n// for ease of reading below\ntype OriginalRequestMethod = RequestMethod;\ntype WrappedRequestMethod = RequestMethod;\ntype WrappedRequestMethodFactory = (original: OriginalRequestMethod) => WrappedRequestMethod;\n\n/**\n * Function which creates a function which creates wrapped versions of internal `request` and `get` calls within `http`\n * and `https` modules. (NB: Not a typo - this is a creator^2!)\n *\n * @param breadcrumbsEnabled Whether or not to record outgoing requests as breadcrumbs\n * @param tracingEnabled Whether or not to record outgoing requests as tracing spans\n *\n * @returns A function which accepts the exiting handler and returns a wrapped handler\n */\nfunction _createWrappedRequestMethodFactory(\n breadcrumbsEnabled: boolean,\n tracingOptions: TracingOptions | undefined,\n): WrappedRequestMethodFactory {\n // We're caching results so we don't have to recompute regexp every time we create a request.\n const createSpanUrlMap: Record = {};\n const headersUrlMap: Record = {};\n\n const shouldCreateSpan = (url: string): boolean => {\n if (tracingOptions?.shouldCreateSpanForRequest === undefined) {\n return true;\n }\n\n if (createSpanUrlMap[url]) {\n return createSpanUrlMap[url];\n }\n\n createSpanUrlMap[url] = tracingOptions.shouldCreateSpanForRequest(url);\n\n return createSpanUrlMap[url];\n };\n\n const shouldAttachTraceData = (url: string): boolean => {\n if (tracingOptions?.tracePropagationTargets === undefined) {\n return true;\n }\n\n if (headersUrlMap[url]) {\n return headersUrlMap[url];\n }\n\n headersUrlMap[url] = stringMatchesSomePattern(url, tracingOptions.tracePropagationTargets);\n\n return headersUrlMap[url];\n };\n\n return function wrappedRequestMethodFactory(originalRequestMethod: OriginalRequestMethod): WrappedRequestMethod {\n return function wrappedMethod(this: typeof http | typeof https, ...args: RequestMethodArgs): http.ClientRequest {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const httpModule = this;\n\n const requestArgs = normalizeRequestArgs(this, args);\n const requestOptions = requestArgs[0];\n const requestUrl = extractUrl(requestOptions);\n\n // we don't want to record requests to Sentry as either breadcrumbs or spans, so just use the original method\n if (isSentryRequest(requestUrl)) {\n return originalRequestMethod.apply(httpModule, requestArgs);\n }\n\n let requestSpan: Span | undefined;\n let parentSpan: Span | undefined;\n\n const scope = getCurrentHub().getScope();\n\n if (scope && tracingOptions && shouldCreateSpan(requestUrl)) {\n parentSpan = scope.getSpan();\n\n if (parentSpan) {\n requestSpan = parentSpan.startChild({\n description: `${requestOptions.method || 'GET'} ${requestUrl}`,\n op: 'http.client',\n });\n\n if (shouldAttachTraceData(requestUrl)) {\n const sentryTraceHeader = requestSpan.toTraceparent();\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Adding sentry-trace header ${sentryTraceHeader} to outgoing request to \"${requestUrl}\": `,\n );\n\n requestOptions.headers = {\n ...requestOptions.headers,\n 'sentry-trace': sentryTraceHeader,\n };\n\n if (parentSpan.transaction) {\n const dynamicSamplingContext = parentSpan.transaction.getDynamicSamplingContext();\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n\n let newBaggageHeaderField;\n if (!requestOptions.headers || !requestOptions.headers.baggage) {\n newBaggageHeaderField = sentryBaggageHeader;\n } else if (!sentryBaggageHeader) {\n newBaggageHeaderField = requestOptions.headers.baggage;\n } else if (Array.isArray(requestOptions.headers.baggage)) {\n newBaggageHeaderField = [...requestOptions.headers.baggage, sentryBaggageHeader];\n } else {\n // Type-cast explanation:\n // Technically this the following could be of type `(number | string)[]` but for the sake of simplicity\n // we say this is undefined behaviour, since it would not be baggage spec conform if the user did this.\n newBaggageHeaderField = [requestOptions.headers.baggage, sentryBaggageHeader] as string[];\n }\n\n requestOptions.headers = {\n ...requestOptions.headers,\n // Setting a hader to `undefined` will crash in node so we only set the baggage header when it's defined\n ...(newBaggageHeaderField && { baggage: newBaggageHeaderField }),\n };\n }\n } else {\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Not adding sentry-trace header to outgoing request (${requestUrl}) due to mismatching tracePropagationTargets option.`,\n );\n }\n\n const transaction = parentSpan.transaction;\n if (transaction) {\n transaction.metadata.propagations++;\n }\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalRequestMethod\n .apply(httpModule, requestArgs)\n .once('response', function (this: http.ClientRequest, res: http.IncomingMessage): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const req = this;\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('response', requestUrl, req, res);\n }\n if (requestSpan) {\n if (res.statusCode) {\n requestSpan.setHttpStatus(res.statusCode);\n }\n requestSpan.description = cleanSpanDescription(requestSpan.description, requestOptions, req);\n requestSpan.finish();\n }\n })\n .once('error', function (this: http.ClientRequest): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const req = this;\n\n if (breadcrumbsEnabled) {\n addRequestBreadcrumb('error', requestUrl, req);\n }\n if (requestSpan) {\n requestSpan.setHttpStatus(500);\n requestSpan.description = cleanSpanDescription(requestSpan.description, requestOptions, req);\n requestSpan.finish();\n }\n });\n };\n };\n}\n\n/**\n * Captures Breadcrumb based on provided request/response pair\n */\nfunction addRequestBreadcrumb(event: string, url: string, req: http.ClientRequest, res?: http.IncomingMessage): void {\n if (!getCurrentHub().getIntegration(Http)) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'http',\n data: {\n method: req.method,\n status_code: res && res.statusCode,\n url,\n },\n type: 'http',\n },\n {\n event,\n request: req,\n response: res,\n },\n );\n}\n"],"names":[],"mappings":";;;;;AAiBA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;AAmCA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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A,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,WAAA,EAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,CAAA,CAAA,CAAA;MACA,CAAA;MACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,CAAA;IACA;MACA,CAAA,CAAA,CAAA,CAAA,CAAA;MACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;MACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;IACA,CAAA;EACA,CAAA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/index.js b/node_modules/@sentry/node/esm/integrations/index.js deleted file mode 100644 index d6a1182..0000000 --- a/node_modules/@sentry/node/esm/integrations/index.js +++ /dev/null @@ -1,11 +0,0 @@ -export { Console } from './console.js'; -export { Http } from './http.js'; -export { OnUncaughtException } from './onuncaughtexception.js'; -export { OnUnhandledRejection } from './onunhandledrejection.js'; -export { LinkedErrors } from './linkederrors.js'; -export { Modules } from './modules.js'; -export { ContextLines } from './contextlines.js'; -export { Context } from './context.js'; -export { RequestData } from './requestdata.js'; -export { LocalVariables } from './localvariables.js'; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/node/esm/integrations/index.js.map b/node_modules/@sentry/node/esm/integrations/index.js.map deleted file mode 100644 index 6d75ebc..0000000 --- a/node_modules/@sentry/node/esm/integrations/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/linkederrors.js b/node_modules/@sentry/node/esm/integrations/linkederrors.js deleted file mode 100644 index bc39b9a..0000000 --- a/node_modules/@sentry/node/esm/integrations/linkederrors.js +++ /dev/null @@ -1,108 +0,0 @@ -import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; -import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core'; -import { isInstanceOf, resolvedSyncPromise, SyncPromise } from '@sentry/utils'; -import { exceptionFromError } from '../eventbuilder.js'; -import { ContextLines } from './contextlines.js'; - -const DEFAULT_KEY = 'cause'; -const DEFAULT_LIMIT = 5; - -/** Adds SDK info to an event. */ -class LinkedErrors { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'LinkedErrors';} - - /** - * @inheritDoc - */ - __init() {this.name = LinkedErrors.id;} - - /** - * @inheritDoc - */ - - /** - * @inheritDoc - */ - - /** - * @inheritDoc - */ - constructor(options = {}) {;LinkedErrors.prototype.__init.call(this); - this._key = options.key || DEFAULT_KEY; - this._limit = options.limit || DEFAULT_LIMIT; - } - - /** - * @inheritDoc - */ - setupOnce() { - addGlobalEventProcessor(async (event, hint) => { - const hub = getCurrentHub(); - const self = hub.getIntegration(LinkedErrors); - const client = hub.getClient(); - if (client && self && self._handler && typeof self._handler === 'function') { - await self._handler(client.getOptions().stackParser, event, hint); - } - return event; - }); - } - - /** - * @inheritDoc - */ - _handler(stackParser, event, hint) { - if (!event.exception || !event.exception.values || !isInstanceOf(hint.originalException, Error)) { - return resolvedSyncPromise(event); - } - - return new SyncPromise(resolve => { - void this._walkErrorTree(stackParser, hint.originalException , this._key) - .then((linkedErrors) => { - if (event && event.exception && event.exception.values) { - event.exception.values = [...linkedErrors, ...event.exception.values]; - } - resolve(event); - }) - .then(null, () => { - resolve(event); - }); - }); - } - - /** - * @inheritDoc - */ - async _walkErrorTree( - stackParser, - error, - key, - stack = [], - ) { - if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) { - return Promise.resolve(stack); - } - - const exception = exceptionFromError(stackParser, error[key]); - - // If the ContextLines integration is enabled, we add source code context to linked errors - // because we can't guarantee the order that integrations are run. - const contextLines = getCurrentHub().getIntegration(ContextLines); - if (contextLines && _optionalChain([exception, 'access', _ => _.stacktrace, 'optionalAccess', _2 => _2.frames])) { - await contextLines.addSourceContextToFrames(exception.stacktrace.frames); - } - - return new Promise((resolve, reject) => { - void this._walkErrorTree(stackParser, error[key], key, [exception, ...stack]) - .then(resolve) - .then(null, () => { - reject(); - }); - }); - } -}LinkedErrors.__initStatic(); - -export { LinkedErrors }; -//# sourceMappingURL=linkederrors.js.map diff --git a/node_modules/@sentry/node/esm/integrations/linkederrors.js.map b/node_modules/@sentry/node/esm/integrations/linkederrors.js.map deleted file mode 100644 index 9632c54..0000000 --- a/node_modules/@sentry/node/esm/integrations/linkederrors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linkederrors.js","sources":["../../../src/integrations/linkederrors.ts"],"sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Exception, ExtendedError, Integration, StackParser } from '@sentry/types';\nimport { isInstanceOf, resolvedSyncPromise, SyncPromise } from '@sentry/utils';\n\nimport type { NodeClient } from '../client';\nimport { exceptionFromError } from '../eventbuilder';\nimport { ContextLines } from './contextlines';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event, hint: EventHint) => {\n const hub = getCurrentHub();\n const self = hub.getIntegration(LinkedErrors);\n const client = hub.getClient();\n if (client && self && self._handler && typeof self._handler === 'function') {\n await self._handler(client.getOptions().stackParser, event, hint);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(stackParser: StackParser, event: Event, hint: EventHint): PromiseLike {\n if (!event.exception || !event.exception.values || !isInstanceOf(hint.originalException, Error)) {\n return resolvedSyncPromise(event);\n }\n\n return new SyncPromise(resolve => {\n void this._walkErrorTree(stackParser, hint.originalException as Error, this._key)\n .then((linkedErrors: Exception[]) => {\n if (event && event.exception && event.exception.values) {\n event.exception.values = [...linkedErrors, ...event.exception.values];\n }\n resolve(event);\n })\n .then(null, () => {\n resolve(event);\n });\n });\n }\n\n /**\n * @inheritDoc\n */\n private async _walkErrorTree(\n stackParser: StackParser,\n error: ExtendedError,\n key: string,\n stack: Exception[] = [],\n ): Promise {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return Promise.resolve(stack);\n }\n\n const exception = exceptionFromError(stackParser, error[key]);\n\n // If the ContextLines integration is enabled, we add source code context to linked errors\n // because we can't guarantee the order that integrations are run.\n const contextLines = getCurrentHub().getIntegration(ContextLines);\n if (contextLines && exception.stacktrace?.frames) {\n await contextLines.addSourceContextToFrames(exception.stacktrace.frames);\n }\n\n return new Promise((resolve, reject) => {\n void this._walkErrorTree(stackParser, error[key], key, [exception, ...stack])\n .then(resolve)\n .then(null, () => {\n reject();\n });\n });\n }\n}\n"],"names":[],"mappings":";;;;;;AAQA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA;;AAEA,CAAA,CAAA,EAAA,CAAA,CAAA,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ACA;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/modules.js b/node_modules/@sentry/node/esm/integrations/modules.js deleted file mode 100644 index 486cf88..0000000 --- a/node_modules/@sentry/node/esm/integrations/modules.js +++ /dev/null @@ -1,106 +0,0 @@ -import { existsSync, readFileSync } from 'fs'; -import { dirname, join } from 'path'; - -let moduleCache; - -/** Extract information about paths */ -function getPaths() { - try { - return require.cache ? Object.keys(require.cache ) : []; - } catch (e) { - return []; - } -} - -/** Extract information about package.json modules */ -function collectModules() - - { - const mainPaths = (require.main && require.main.paths) || []; - const paths = getPaths(); - const infos - - = {}; - const seen - - = {}; - - paths.forEach(path => { - let dir = path; - - /** Traverse directories upward in the search of package.json file */ - const updir = () => { - const orig = dir; - dir = dirname(orig); - - if (!dir || orig === dir || seen[orig]) { - return undefined; - } - if (mainPaths.indexOf(dir) < 0) { - return updir(); - } - - const pkgfile = join(orig, 'package.json'); - seen[orig] = true; - - if (!existsSync(pkgfile)) { - return updir(); - } - - try { - const info = JSON.parse(readFileSync(pkgfile, 'utf8')) - -; - infos[info.name] = info.version; - } catch (_oO) { - // no-empty - } - }; - - updir(); - }); - - return infos; -} - -/** Add node modules / packages to the event */ -class Modules {constructor() { Modules.prototype.__init.call(this); } - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Modules';} - - /** - * @inheritDoc - */ - __init() {this.name = Modules.id;} - - /** - * @inheritDoc - */ - setupOnce(addGlobalEventProcessor, getCurrentHub) { - addGlobalEventProcessor(event => { - if (!getCurrentHub().getIntegration(Modules)) { - return event; - } - return { - ...event, - modules: { - ...event.modules, - ...this._getModules(), - }, - }; - }); - } - - /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */ - _getModules() { - if (!moduleCache) { - moduleCache = collectModules(); - } - return moduleCache; - } -} Modules.__initStatic(); - -export { Modules }; -//# sourceMappingURL=modules.js.map diff --git a/node_modules/@sentry/node/esm/integrations/modules.js.map b/node_modules/@sentry/node/esm/integrations/modules.js.map deleted file mode 100644 index d45856c..0000000 --- a/node_modules/@sentry/node/esm/integrations/modules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modules.js","sources":["../../../src/integrations/modules.ts"],"sourcesContent":["import type { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { existsSync, readFileSync } from 'fs';\nimport { dirname, join } from 'path';\n\nlet moduleCache: { [key: string]: string };\n\n/** Extract information about paths */\nfunction getPaths(): string[] {\n try {\n return require.cache ? Object.keys(require.cache as Record) : [];\n } catch (e) {\n return [];\n }\n}\n\n/** Extract information about package.json modules */\nfunction collectModules(): {\n [name: string]: string;\n} {\n const mainPaths = (require.main && require.main.paths) || [];\n const paths = getPaths();\n const infos: {\n [name: string]: string;\n } = {};\n const seen: {\n [path: string]: boolean;\n } = {};\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = (): void | (() => void) => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen[orig]) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen[orig] = true;\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8')) as {\n name: string;\n version: string;\n };\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Add node modules / packages to the event */\nexport class Modules implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Modules';\n\n /**\n * @inheritDoc\n */\n public name: string = Modules.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n if (!getCurrentHub().getIntegration(Modules)) {\n return event;\n }\n return {\n ...event,\n modules: {\n ...event.modules,\n ...this._getModules(),\n },\n };\n });\n }\n\n /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\n private _getModules(): { [key: string]: string } {\n if (!moduleCache) {\n moduleCache = collectModules();\n }\n return moduleCache;\n }\n}\n"],"names":[],"mappings":";;;AAIA,IAAA,WAAA,CAAA;AACA;AACA;AACA,SAAA,QAAA,GAAA;AACA,EAAA,IAAA;AACA,IAAA,OAAA,OAAA,CAAA,KAAA,GAAA,MAAA,CAAA,IAAA,CAAA,OAAA,CAAA,KAAA,EAAA,GAAA,EAAA,CAAA;AACA,GAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,EAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,cAAA;AACA;AACA,CAAA;AACA,EAAA,MAAA,SAAA,GAAA,CAAA,OAAA,CAAA,IAAA,IAAA,OAAA,CAAA,IAAA,CAAA,KAAA,KAAA,EAAA,CAAA;AACA,EAAA,MAAA,KAAA,GAAA,QAAA,EAAA,CAAA;AACA,EAAA,MAAA,KAAA;AACA;AACA,GAAA,EAAA,CAAA;AACA,EAAA,MAAA,IAAA;AACA;AACA,GAAA,EAAA,CAAA;AACA;AACA,EAAA,KAAA,CAAA,OAAA,CAAA,IAAA,IAAA;AACA,IAAA,IAAA,GAAA,GAAA,IAAA,CAAA;AACA;AACA;AACA,IAAA,MAAA,KAAA,GAAA,MAAA;AACA,MAAA,MAAA,IAAA,GAAA,GAAA,CAAA;AACA,MAAA,GAAA,GAAA,OAAA,CAAA,IAAA,CAAA,CAAA;AACA;AACA,MAAA,IAAA,CAAA,GAAA,IAAA,IAAA,KAAA,GAAA,IAAA,IAAA,CAAA,IAAA,CAAA,EAAA;AACA,QAAA,OAAA,SAAA,CAAA;AACA,OAAA;AACA,MAAA,IAAA,SAAA,CAAA,OAAA,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ACA,QAAA,GAAA,KAAA;AACA,QAAA,OAAA,EAAA;AACA,UAAA,GAAA,KAAA,CAAA,OAAA;AACA,UAAA,GAAA,IAAA,CAAA,WAAA,EAAA;AACA,SAAA;AACA,OAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA;AACA,GAAA,WAAA,GAAA;AACA,IAAA,IAAA,CAAA,WAAA,EAAA;AACA,MAAA,WAAA,GAAA,cAAA,EAAA,CAAA;AACA,KAAA;AACA,IAAA,OAAA,WAAA,CAAA;AACA,GAAA;AACA,CAAA,CAAA,OAAA,CAAA,YAAA,EAAA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js b/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js deleted file mode 100644 index 732b498..0000000 --- a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js +++ /dev/null @@ -1,151 +0,0 @@ -import { getCurrentHub } from '@sentry/core'; -import { logger } from '@sentry/utils'; -import { logAndExitProcess } from './utils/errorhandling.js'; - -/** Global Exception handler */ -class OnUncaughtException { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'OnUncaughtException';} - - /** - * @inheritDoc - */ - __init() {this.name = OnUncaughtException.id;} - - /** - * @inheritDoc - */ - __init2() {this.handler = this._makeErrorHandler();} - - // CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts` - - /** - * @inheritDoc - */ - constructor(options = {}) {;OnUncaughtException.prototype.__init.call(this);OnUncaughtException.prototype.__init2.call(this); - this._options = { - exitEvenIfOtherHandlersAreRegistered: true, - ...options, - }; - } - - /** - * @inheritDoc - */ - setupOnce() { - global.process.on('uncaughtException', this.handler); - } - - /** - * @hidden - */ - _makeErrorHandler() { - const timeout = 2000; - let caughtFirstError = false; - let caughtSecondError = false; - let calledFatalError = false; - let firstError; - - return (error) => { - let onFatalError = logAndExitProcess; - const client = getCurrentHub().getClient(); - - if (this._options.onFatalError) { - onFatalError = this._options.onFatalError; - } else if (client && client.getOptions().onFatalError) { - onFatalError = client.getOptions().onFatalError ; - } - - // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not - // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust - // exit behaviour of the SDK accordingly: - // - If other listeners are attached, do not exit. - // - If the only listener attached is ours, exit. - const userProvidedListenersCount = global.process - .listeners('uncaughtException') - .reduce((acc, listener) => { - if ( - listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself - listener === this.handler // filter the handler we registered ourselves) - ) { - return acc; - } else { - return acc + 1; - } - }, 0); - - const processWouldExit = userProvidedListenersCount === 0; - const shouldApplyFatalHandlingLogic = this._options.exitEvenIfOtherHandlersAreRegistered || processWouldExit; - - if (!caughtFirstError) { - const hub = getCurrentHub(); - - // this is the first uncaught error and the ultimate reason for shutting down - // we want to do absolutely everything possible to ensure it gets captured - // also we want to make sure we don't go recursion crazy if more errors happen after this one - firstError = error; - caughtFirstError = true; - - if (hub.getIntegration(OnUncaughtException)) { - hub.withScope((scope) => { - scope.setLevel('fatal'); - hub.captureException(error, { - originalException: error, - data: { mechanism: { handled: false, type: 'onuncaughtexception' } }, - }); - if (!calledFatalError && shouldApplyFatalHandlingLogic) { - calledFatalError = true; - onFatalError(error); - } - }); - } else { - if (!calledFatalError && shouldApplyFatalHandlingLogic) { - calledFatalError = true; - onFatalError(error); - } - } - } else { - if (shouldApplyFatalHandlingLogic) { - if (calledFatalError) { - // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.warn( - 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown', - ); - logAndExitProcess(error); - } else if (!caughtSecondError) { - // two cases for how we can hit this branch: - // - capturing of first error blew up and we just caught the exception from that - // - quit trying to capture, proceed with shutdown - // - a second independent error happened while waiting for first error to capture - // - want to avoid causing premature shutdown before first error capture finishes - // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff - // so let's instead just delay a bit before we proceed with our action here - // in case 1, we just wait a bit unnecessarily but ultimately do the same thing - // in case 2, the delay hopefully made us wait long enough for the capture to finish - // two potential nonideal outcomes: - // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError - // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error - // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError) - // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish - caughtSecondError = true; - setTimeout(() => { - if (!calledFatalError) { - // it was probably case 1, let's treat err as the sendErr and call onFatalError - calledFatalError = true; - onFatalError(firstError, error); - } else { - // it was probably case 2, our first error finished capturing while we waited, cool, do nothing - } - }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc - } - } - } - }; - } -} OnUncaughtException.__initStatic(); - -export { OnUncaughtException }; -//# sourceMappingURL=onuncaughtexception.js.map diff --git a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map b/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map deleted file mode 100644 index a97371d..0000000 --- a/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onuncaughtexception.js","sources":["../../../src/integrations/onuncaughtexception.ts"],"sourcesContent":["import type { Scope } from '@sentry/core';\nimport { getCurrentHub } from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport type { NodeClient } from '../client';\nimport { logAndExitProcess } from './utils/errorhandling';\n\ntype OnFatalErrorHandler = (firstError: Error, secondError?: Error) => void;\n\n// CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts`\ninterface OnUncaughtExceptionOptions {\n // TODO(v8): Evaluate whether we should switch the default behaviour here.\n // Also, we can evaluate using https://nodejs.org/api/process.html#event-uncaughtexceptionmonitor per default, and\n // falling back to current behaviour when that's not available.\n /**\n * Controls if the SDK should register a handler to exit the process on uncaught errors:\n * - `true`: The SDK will exit the process on all uncaught errors.\n * - `false`: The SDK will only exit the process when there are no other `uncaughtException` handlers attached.\n *\n * Default: `true`\n */\n exitEvenIfOtherHandlersAreRegistered: boolean;\n\n /**\n * This is called when an uncaught error would cause the process to exit.\n *\n * @param firstError Uncaught error causing the process to exit\n * @param secondError Will be set if the handler was called multiple times. This can happen either because\n * `onFatalError` itself threw, or because an independent error happened somewhere else while `onFatalError`\n * was running.\n */\n onFatalError?(this: void, firstError: Error, secondError?: Error): void;\n}\n\n/** Global Exception handler */\nexport class OnUncaughtException implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'OnUncaughtException';\n\n /**\n * @inheritDoc\n */\n public name: string = OnUncaughtException.id;\n\n /**\n * @inheritDoc\n */\n public readonly handler: (error: Error) => void = this._makeErrorHandler();\n\n // CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts`\n private readonly _options: OnUncaughtExceptionOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options: Partial = {}) {\n this._options = {\n exitEvenIfOtherHandlersAreRegistered: true,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n global.process.on('uncaughtException', this.handler);\n }\n\n /**\n * @hidden\n */\n private _makeErrorHandler(): (error: Error) => void {\n const timeout = 2000;\n let caughtFirstError: boolean = false;\n let caughtSecondError: boolean = false;\n let calledFatalError: boolean = false;\n let firstError: Error;\n\n return (error: Error): void => {\n let onFatalError: OnFatalErrorHandler = logAndExitProcess;\n const client = getCurrentHub().getClient();\n\n if (this._options.onFatalError) {\n onFatalError = this._options.onFatalError;\n } else if (client && client.getOptions().onFatalError) {\n onFatalError = client.getOptions().onFatalError as OnFatalErrorHandler;\n }\n\n // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not\n // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust\n // exit behaviour of the SDK accordingly:\n // - If other listeners are attached, do not exit.\n // - If the only listener attached is ours, exit.\n const userProvidedListenersCount = global.process\n .listeners('uncaughtException')\n .reduce((acc, listener) => {\n if (\n listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself\n listener === this.handler // filter the handler we registered ourselves)\n ) {\n return acc;\n } else {\n return acc + 1;\n }\n }, 0);\n\n const processWouldExit = userProvidedListenersCount === 0;\n const shouldApplyFatalHandlingLogic = this._options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;\n\n if (!caughtFirstError) {\n const hub = getCurrentHub();\n\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (hub.getIntegration(OnUncaughtException)) {\n hub.withScope((scope: Scope) => {\n scope.setLevel('fatal');\n hub.captureException(error, {\n originalException: error,\n data: { mechanism: { handled: false, type: 'onuncaughtexception' } },\n });\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n });\n } else {\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n }\n } else {\n if (shouldApplyFatalHandlingLogic) {\n if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n __DEBUG_BUILD__ &&\n logger.warn(\n 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown',\n );\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n } else {\n // it was probably case 2, our first error finished capturing while we waited, cool, do nothing\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n }\n }\n };\n }\n}\n"],"names":[],"mappings":";;;;AAmCA;AACA,MAAA,mBAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,sBAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,mBAAA,CAAA,GAAA,CAAA;AACA;AACA;AACA;AACA;AACA,IAAA,OAAA,GAAA,CAAA,IAAA,CAAA,OAAA,GAAA,IAAA,CAAA,iBAAA,GAAA,CAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,GAAA,WAAA,CAAA,OAAA,GAAA,EAAA,EAAA,CAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,OAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA;AACA,MAAA,oCAAA,EAAA,IAAA;AACA,MAAA,GAAA,OAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA;AACA;AACA;AACA;AACA,GAAA,SAAA,GAAA;AACA,IAAA,MAAA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAA,iBAAA,GAAA,IAAA,CAAA;AACA,YAAA,UAAA,CAAA,MAAA;AACA,cAAA,IAAA,CAAA,gBAAA,EAAA;AACA;AACA,gBAAA,gBAAA,GAAA,IAAA,CAAA;AACA,gBAAA,YAAA,CAAA,UAAA,EAAA,KAAA,CAAA,CAAA;AACA,eAAA,MAAA;AACA;AACA,eAAA;AACA,aAAA,EAAA,OAAA,CAAA,CAAA;AACA,WAAA;AACA,SAAA;AACA,OAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA,CAAA,CAAA,mBAAA,CAAA,YAAA,EAAA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js b/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js deleted file mode 100644 index 075d1d8..0000000 --- a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js +++ /dev/null @@ -1,83 +0,0 @@ -import { getCurrentHub } from '@sentry/core'; -import { consoleSandbox } from '@sentry/utils'; -import { logAndExitProcess } from './utils/errorhandling.js'; - -/** Global Promise Rejection handler */ -class OnUnhandledRejection { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'OnUnhandledRejection';} - - /** - * @inheritDoc - */ - __init() {this.name = OnUnhandledRejection.id;} - - /** - * @inheritDoc - */ - constructor( - _options - - = { mode: 'warn' }, - ) {;this._options = _options;OnUnhandledRejection.prototype.__init.call(this);} - - /** - * @inheritDoc - */ - setupOnce() { - global.process.on('unhandledRejection', this.sendUnhandledPromise.bind(this)); - } - - /** - * Send an exception with reason - * @param reason string - * @param promise promise - */ - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any - sendUnhandledPromise(reason, promise) { - const hub = getCurrentHub(); - if (hub.getIntegration(OnUnhandledRejection)) { - hub.withScope((scope) => { - scope.setExtra('unhandledPromiseRejection', true); - hub.captureException(reason, { - originalException: promise, - data: { mechanism: { handled: false, type: 'onunhandledrejection' } }, - }); - }); - } - this._handleRejection(reason); - } - - /** - * Handler for `mode` option - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - _handleRejection(reason) { - // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240 - const rejectionWarning = - 'This error originated either by ' + - 'throwing inside of an async function without a catch block, ' + - 'or by rejecting a promise which was not handled with .catch().' + - ' The promise rejected with the reason:'; - - /* eslint-disable no-console */ - if (this._options.mode === 'warn') { - consoleSandbox(() => { - console.warn(rejectionWarning); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - console.error(reason && reason.stack ? reason.stack : reason); - }); - } else if (this._options.mode === 'strict') { - consoleSandbox(() => { - console.warn(rejectionWarning); - }); - logAndExitProcess(reason); - } - /* eslint-enable no-console */ - } -} OnUnhandledRejection.__initStatic(); - -export { OnUnhandledRejection }; -//# sourceMappingURL=onunhandledrejection.js.map diff --git a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map b/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map deleted file mode 100644 index 7a89d40..0000000 --- a/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onunhandledrejection.js","sources":["../../../src/integrations/onunhandledrejection.ts"],"sourcesContent":["import type { Scope } from '@sentry/core';\nimport { getCurrentHub } from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { consoleSandbox } from '@sentry/utils';\n\nimport { logAndExitProcess } from './utils/errorhandling';\n\ntype UnhandledRejectionMode = 'none' | 'warn' | 'strict';\n\n/** Global Promise Rejection handler */\nexport class OnUnhandledRejection implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'OnUnhandledRejection';\n\n /**\n * @inheritDoc\n */\n public name: string = OnUnhandledRejection.id;\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n /**\n * Option deciding what to do after capturing unhandledRejection,\n * that mimicks behavior of node's --unhandled-rejection flag.\n */\n mode: UnhandledRejectionMode;\n } = { mode: 'warn' },\n ) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n global.process.on('unhandledRejection', this.sendUnhandledPromise.bind(this));\n }\n\n /**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n public sendUnhandledPromise(reason: any, promise: any): void {\n const hub = getCurrentHub();\n if (hub.getIntegration(OnUnhandledRejection)) {\n hub.withScope((scope: Scope) => {\n scope.setExtra('unhandledPromiseRejection', true);\n hub.captureException(reason, {\n originalException: promise,\n data: { mechanism: { handled: false, type: 'onunhandledrejection' } },\n });\n });\n }\n this._handleRejection(reason);\n }\n\n /**\n * Handler for `mode` option\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _handleRejection(reason: any): void {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n /* eslint-disable no-console */\n if (this._options.mode === 'warn') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (this._options.mode === 'strict') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n logAndExitProcess(reason);\n }\n /* eslint-enable no-console */\n }\n}\n"],"names":[],"mappings":";;;;AASA;AACA,MAAA,oBAAA,EAAA;AACA;AACA;AACA;AACA,GAAA,OAAA,YAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,uBAAA,CAAA;AACA;AACA;AACA;AACA;AACA,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA,IAAA,GAAA,oBAAA,CAAA,GAAA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CAAA,IAAA,KAAA,MAAA,EAAA;AACA,MAAA,cAAA,CAAA,MAAA;AACA,QAAA,OAAA,CAAA,IAAA,CAAA,gBAAA,CAAA,CAAA;AACA;AACA,QAAA,OAAA,CAAA,KAAA,CAAA,MAAA,IAAA,MAAA,CAAA,KAAA,GAAA,MAAA,CAAA,KAAA,GAAA,MAAA,CAAA,CAAA;AACA,OAAA,CAAA,CAAA;AACA,KAAA,MAAA,IAAA,IAAA,CAAA,QAAA,CAAA,IAAA,KAAA,QAAA,EAAA;AACA,MAAA,cAAA,CAAA,MAAA;AACA,QAAA,OAAA,CAAA,IAAA,CAAA,gBAAA,CAAA,CAAA;AACA,OAAA,CAAA,CAAA;AACA,MAAA,iBAAA,CAAA,MAAA,CAAA,CAAA;AACA,KAAA;AACA;AACA,GAAA;AACA,CAAA,CAAA,oBAAA,CAAA,YAAA,EAAA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/sdk.js b/node_modules/@sentry/node/esm/sdk.js deleted file mode 100644 index ace7582..0000000 --- a/node_modules/@sentry/node/esm/sdk.js +++ /dev/null @@ -1,277 +0,0 @@ -import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; -import { Integrations, getMainCarrier, setHubOnCarrier, getCurrentHub, getIntegrationsToSetup, initAndBind } from '@sentry/core'; -import { stackParserFromStackParserOptions, logger, GLOBAL_OBJ, createStackParser, nodeStackLineParser } from '@sentry/utils'; -import * as domain from 'domain'; -import { NodeClient } from './client.js'; -import './integrations/index.js'; -import { getModule } from './module.js'; -import './transports/index.js'; -import { Console } from './integrations/console.js'; -import { Http } from './integrations/http.js'; -import { OnUncaughtException } from './integrations/onuncaughtexception.js'; -import { OnUnhandledRejection } from './integrations/onunhandledrejection.js'; -import { ContextLines } from './integrations/contextlines.js'; -import { LocalVariables } from './integrations/localvariables.js'; -import { Context } from './integrations/context.js'; -import { Modules } from './integrations/modules.js'; -import { RequestData } from './integrations/requestdata.js'; -import { LinkedErrors } from './integrations/linkederrors.js'; -import { makeNodeTransport } from './transports/http.js'; - -/* eslint-disable max-lines */ - -const defaultIntegrations = [ - // Common - new Integrations.InboundFilters(), - new Integrations.FunctionToString(), - // Native Wrappers - new Console(), - new Http(), - // Global Handlers - new OnUncaughtException(), - new OnUnhandledRejection(), - // Event Info - new ContextLines(), - new LocalVariables(), - new Context(), - new Modules(), - new RequestData(), - // Misc - new LinkedErrors(), -]; - -/** - * The Sentry Node SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible in the - * main entry module. To set context information or send manual events, use the - * provided methods. - * - * @example - * ``` - * - * const { init } = require('@sentry/node'); - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const { configureScope } = require('@sentry/node'); - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * const { addBreadcrumb } = require('@sentry/node'); - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const Sentry = require('@sentry/node'); - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link NodeOptions} for documentation on configuration options. - */ -function init(options = {}) { - const carrier = getMainCarrier(); - const autoloadedIntegrations = _optionalChain([carrier, 'access', _ => _.__SENTRY__, 'optionalAccess', _2 => _2.integrations]) || []; - - options.defaultIntegrations = - options.defaultIntegrations === false - ? [] - : [ - ...(Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : defaultIntegrations), - ...autoloadedIntegrations, - ]; - - if (options.dsn === undefined && process.env.SENTRY_DSN) { - options.dsn = process.env.SENTRY_DSN; - } - - if (options.tracesSampleRate === undefined && process.env.SENTRY_TRACES_SAMPLE_RATE) { - const tracesSampleRate = parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE); - if (isFinite(tracesSampleRate)) { - options.tracesSampleRate = tracesSampleRate; - } - } - - if (options.release === undefined) { - const detectedRelease = getSentryRelease(); - if (detectedRelease !== undefined) { - options.release = detectedRelease; - } else { - // If release is not provided, then we should disable autoSessionTracking - options.autoSessionTracking = false; - } - } - - if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) { - options.environment = process.env.SENTRY_ENVIRONMENT; - } - - if (options.autoSessionTracking === undefined && options.dsn !== undefined) { - options.autoSessionTracking = true; - } - - if (options.instrumenter === undefined) { - options.instrumenter = 'sentry'; - } - - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any - if ((domain ).active) { - setHubOnCarrier(carrier, getCurrentHub()); - } - - // TODO(v7): Refactor this to reduce the logic above - const clientOptions = { - ...options, - stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser), - integrations: getIntegrationsToSetup(options), - transport: options.transport || makeNodeTransport, - }; - - initAndBind(NodeClient, clientOptions); - - if (options.autoSessionTracking) { - startSessionTracking(); - } -} - -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -function lastEventId() { - return getCurrentHub().lastEventId(); -} - -/** - * Call `flush()` on the current client, if there is one. See {@link Client.flush}. - * - * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause - * the client to wait until all events are sent before resolving the promise. - * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it - * doesn't (or if there's no client defined). - */ -async function flush(timeout) { - const client = getCurrentHub().getClient(); - if (client) { - return client.flush(timeout); - } - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events. No client defined.'); - return Promise.resolve(false); -} - -/** - * Call `close()` on the current client, if there is one. See {@link Client.close}. - * - * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this - * parameter will cause the client to wait until all events are sent before disabling itself. - * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it - * doesn't (or if there's no client defined). - */ -async function close(timeout) { - const client = getCurrentHub().getClient(); - if (client) { - return client.close(timeout); - } - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events and disable SDK. No client defined.'); - return Promise.resolve(false); -} - -/** - * Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client - */ -function isAutoSessionTrackingEnabled(client) { - if (client === undefined) { - return false; - } - const clientOptions = client && client.getOptions(); - if (clientOptions && clientOptions.autoSessionTracking !== undefined) { - return clientOptions.autoSessionTracking; - } - return false; -} - -/** - * Returns a release dynamically from environment variables. - */ -function getSentryRelease(fallback) { - // Always read first as Sentry takes this as precedence - if (process.env.SENTRY_RELEASE) { - return process.env.SENTRY_RELEASE; - } - - // This supports the variable that sentry-webpack-plugin injects - if (GLOBAL_OBJ.SENTRY_RELEASE && GLOBAL_OBJ.SENTRY_RELEASE.id) { - return GLOBAL_OBJ.SENTRY_RELEASE.id; - } - - return ( - // GitHub Actions - https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables - process.env.GITHUB_SHA || - // Netlify - https://docs.netlify.com/configure-builds/environment-variables/#build-metadata - process.env.COMMIT_REF || - // Vercel - https://vercel.com/docs/v2/build-step#system-environment-variables - process.env.VERCEL_GIT_COMMIT_SHA || - process.env.VERCEL_GITHUB_COMMIT_SHA || - process.env.VERCEL_GITLAB_COMMIT_SHA || - process.env.VERCEL_BITBUCKET_COMMIT_SHA || - // Zeit (now known as Vercel) - process.env.ZEIT_GITHUB_COMMIT_SHA || - process.env.ZEIT_GITLAB_COMMIT_SHA || - process.env.ZEIT_BITBUCKET_COMMIT_SHA || - fallback - ); -} - -/** Node.js stack parser */ -const defaultStackParser = createStackParser(nodeStackLineParser(getModule)); - -/** - * Enable automatic Session Tracking for the node process. - */ -function startSessionTracking() { - const hub = getCurrentHub(); - hub.startSession(); - // Emitted in the case of healthy sessions, error of `mechanism.handled: true` and unhandledrejections because - // The 'beforeExit' event is not emitted for conditions causing explicit termination, - // such as calling process.exit() or uncaught exceptions. - // Ref: https://nodejs.org/api/process.html#process_event_beforeexit - process.on('beforeExit', () => { - const session = _optionalChain([hub, 'access', _3 => _3.getScope, 'call', _4 => _4(), 'optionalAccess', _5 => _5.getSession, 'call', _6 => _6()]); - const terminalStates = ['exited', 'crashed']; - // Only call endSession, if the Session exists on Scope and SessionStatus is not a - // Terminal Status i.e. Exited or Crashed because - // "When a session is moved away from ok it must not be updated anymore." - // Ref: https://develop.sentry.dev/sdk/sessions/ - if (session && !terminalStates.includes(session.status)) hub.endSession(); - }); -} - -export { close, defaultIntegrations, defaultStackParser, flush, getSentryRelease, init, isAutoSessionTrackingEnabled, lastEventId }; -//# sourceMappingURL=sdk.js.map diff --git a/node_modules/@sentry/node/esm/sdk.js.map b/node_modules/@sentry/node/esm/sdk.js.map deleted file mode 100644 index 675314d..0000000 --- a/node_modules/@sentry/node/esm/sdk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport {\n getCurrentHub,\n getIntegrationsToSetup,\n getMainCarrier,\n initAndBind,\n Integrations as CoreIntegrations,\n setHubOnCarrier,\n} from '@sentry/core';\nimport type { SessionStatus, StackParser } from '@sentry/types';\nimport {\n createStackParser,\n GLOBAL_OBJ,\n logger,\n nodeStackLineParser,\n stackParserFromStackParserOptions,\n} from '@sentry/utils';\nimport * as domain from 'domain';\n\nimport { NodeClient } from './client';\nimport {\n Console,\n Context,\n ContextLines,\n Http,\n LinkedErrors,\n LocalVariables,\n Modules,\n OnUncaughtException,\n OnUnhandledRejection,\n RequestData,\n} from './integrations';\nimport { getModule } from './module';\nimport { makeNodeTransport } from './transports';\nimport type { NodeClientOptions, NodeOptions } from './types';\n\nexport const defaultIntegrations = [\n // Common\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n // Native Wrappers\n new Console(),\n new Http(),\n // Global Handlers\n new OnUncaughtException(),\n new OnUnhandledRejection(),\n // Event Info\n new ContextLines(),\n new LocalVariables(),\n new Context(),\n new Modules(),\n new RequestData(),\n // Misc\n new LinkedErrors(),\n];\n\n/**\n * The Sentry Node SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible in the\n * main entry module. To set context information or send manual events, use the\n * provided methods.\n *\n * @example\n * ```\n *\n * const { init } = require('@sentry/node');\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { configureScope } = require('@sentry/node');\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * const { addBreadcrumb } = require('@sentry/node');\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * const Sentry = require('@sentry/node');\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link NodeOptions} for documentation on configuration options.\n */\nexport function init(options: NodeOptions = {}): void {\n const carrier = getMainCarrier();\n const autoloadedIntegrations = carrier.__SENTRY__?.integrations || [];\n\n options.defaultIntegrations =\n options.defaultIntegrations === false\n ? []\n : [\n ...(Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : defaultIntegrations),\n ...autoloadedIntegrations,\n ];\n\n if (options.dsn === undefined && process.env.SENTRY_DSN) {\n options.dsn = process.env.SENTRY_DSN;\n }\n\n if (options.tracesSampleRate === undefined && process.env.SENTRY_TRACES_SAMPLE_RATE) {\n const tracesSampleRate = parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE);\n if (isFinite(tracesSampleRate)) {\n options.tracesSampleRate = tracesSampleRate;\n }\n }\n\n if (options.release === undefined) {\n const detectedRelease = getSentryRelease();\n if (detectedRelease !== undefined) {\n options.release = detectedRelease;\n } else {\n // If release is not provided, then we should disable autoSessionTracking\n options.autoSessionTracking = false;\n }\n }\n\n if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {\n options.environment = process.env.SENTRY_ENVIRONMENT;\n }\n\n if (options.autoSessionTracking === undefined && options.dsn !== undefined) {\n options.autoSessionTracking = true;\n }\n\n if (options.instrumenter === undefined) {\n options.instrumenter = 'sentry';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n if ((domain as any).active) {\n setHubOnCarrier(carrier, getCurrentHub());\n }\n\n // TODO(v7): Refactor this to reduce the logic above\n const clientOptions: NodeClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeNodeTransport,\n };\n\n initAndBind(NodeClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function flush(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n __DEBUG_BUILD__ && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function close(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n __DEBUG_BUILD__ && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client\n */\nexport function isAutoSessionTrackingEnabled(client?: NodeClient): boolean {\n if (client === undefined) {\n return false;\n }\n const clientOptions = client && client.getOptions();\n if (clientOptions && clientOptions.autoSessionTracking !== undefined) {\n return clientOptions.autoSessionTracking;\n }\n return false;\n}\n\n/**\n * Returns a release dynamically from environment variables.\n */\nexport function getSentryRelease(fallback?: string): string | undefined {\n // Always read first as Sentry takes this as precedence\n if (process.env.SENTRY_RELEASE) {\n return process.env.SENTRY_RELEASE;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (GLOBAL_OBJ.SENTRY_RELEASE && GLOBAL_OBJ.SENTRY_RELEASE.id) {\n return GLOBAL_OBJ.SENTRY_RELEASE.id;\n }\n\n return (\n // GitHub Actions - https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables\n process.env.GITHUB_SHA ||\n // Netlify - https://docs.netlify.com/configure-builds/environment-variables/#build-metadata\n process.env.COMMIT_REF ||\n // Vercel - https://vercel.com/docs/v2/build-step#system-environment-variables\n process.env.VERCEL_GIT_COMMIT_SHA ||\n process.env.VERCEL_GITHUB_COMMIT_SHA ||\n process.env.VERCEL_GITLAB_COMMIT_SHA ||\n process.env.VERCEL_BITBUCKET_COMMIT_SHA ||\n // Zeit (now known as Vercel)\n process.env.ZEIT_GITHUB_COMMIT_SHA ||\n process.env.ZEIT_GITLAB_COMMIT_SHA ||\n process.env.ZEIT_BITBUCKET_COMMIT_SHA ||\n fallback\n );\n}\n\n/** Node.js stack parser */\nexport const defaultStackParser: StackParser = createStackParser(nodeStackLineParser(getModule));\n\n/**\n * Enable automatic Session Tracking for the node process.\n */\nfunction startSessionTracking(): void {\n const hub = getCurrentHub();\n hub.startSession();\n // Emitted in the case of healthy sessions, error of `mechanism.handled: true` and unhandledrejections because\n // The 'beforeExit' event is not emitted for conditions causing explicit termination,\n // such as calling process.exit() or uncaught exceptions.\n // Ref: https://nodejs.org/api/process.html#process_event_beforeexit\n process.on('beforeExit', () => {\n const session = hub.getScope()?.getSession();\n const terminalStates: SessionStatus[] = ['exited', 'crashed'];\n // Only call endSession, if the Session exists on Scope and SessionStatus is not a\n // Terminal Status i.e. Exited or Crashed because\n // \"When a session is moved away from ok it must not be updated anymore.\"\n // Ref: https://develop.sentry.dev/sdk/sessions/\n if (session && !terminalStates.includes(session.status)) hub.endSession();\n });\n}\n"],"names":["CoreIntegrations"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;;AAoCA,CAAA,CAAA,CAAA,CAAA,EAAA,oBAAA,EAAA;EACA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EACA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EACA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EACA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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AA,CAAA,MAAA,CAAA,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;EACA,CAAA,CAAA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/http.js b/node_modules/@sentry/node/esm/transports/http.js deleted file mode 100644 index 767210f..0000000 --- a/node_modules/@sentry/node/esm/transports/http.js +++ /dev/null @@ -1,153 +0,0 @@ -import { _nullishCoalesce } from '@sentry/utils/esm/buildPolyfills'; -import { createTransport } from '@sentry/core'; -import * as http from 'http'; -import * as https from 'https'; -import { Readable } from 'stream'; -import { URL } from 'url'; -import { createGzip } from 'zlib'; - -// Estimated maximum size for reasonable standalone event -const GZIP_THRESHOLD = 1024 * 32; - -/** - * Gets a stream from a Uint8Array or string - * Readable.from is ideal but was added in node.js v12.3.0 and v10.17.0 - */ -function streamFromBody(body) { - return new Readable({ - read() { - this.push(body); - this.push(null); - }, - }); -} - -/** - * Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry. - */ -function makeNodeTransport(options) { - let urlSegments; - - try { - urlSegments = new URL(options.url); - } catch (e) { - // eslint-disable-next-line no-console - console.warn( - '[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.', - ); - return createTransport(options, () => Promise.resolve({})); - } - - const isHttps = urlSegments.protocol === 'https:'; - - // Proxy prioritization: http => `options.proxy` | `process.env.http_proxy` - // Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy` - const proxy = applyNoProxyOption( - urlSegments, - options.proxy || (isHttps ? process.env.https_proxy : undefined) || process.env.http_proxy, - ); - - const nativeHttpModule = isHttps ? https : http; - const keepAlive = options.keepAlive === undefined ? false : options.keepAlive; - - // TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node - // versions(>= 8) as they had memory leaks when using it: #2555 - const agent = proxy - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - (new (require('https-proxy-agent'))(proxy) ) - : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 }); - - const requestExecutor = createRequestExecutor(options, _nullishCoalesce(options.httpModule, () => ( nativeHttpModule)), agent); - return createTransport(options, requestExecutor); -} - -/** - * Honors the `no_proxy` env variable with the highest priority to allow for hosts exclusion. - * - * @param transportUrl The URL the transport intends to send events to. - * @param proxy The client configured proxy. - * @returns A proxy the transport should use. - */ -function applyNoProxyOption(transportUrlSegments, proxy) { - const { no_proxy } = process.env; - - const urlIsExemptFromProxy = - no_proxy && - no_proxy - .split(',') - .some( - exemption => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption), - ); - - if (urlIsExemptFromProxy) { - return undefined; - } else { - return proxy; - } -} - -/** - * Creates a RequestExecutor to be used with `createTransport`. - */ -function createRequestExecutor( - options, - httpModule, - agent, -) { - const { hostname, pathname, port, protocol, search } = new URL(options.url); - return function makeRequest(request) { - return new Promise((resolve, reject) => { - let body = streamFromBody(request.body); - - const headers = { ...options.headers }; - - if (request.body.length > GZIP_THRESHOLD) { - headers['content-encoding'] = 'gzip'; - body = body.pipe(createGzip()); - } - - const req = httpModule.request( - { - method: 'POST', - agent, - headers, - hostname, - path: `${pathname}${search}`, - port, - protocol, - ca: options.caCerts, - }, - res => { - res.on('data', () => { - // Drain socket - }); - - res.on('end', () => { - // Drain socket - }); - - res.setEncoding('utf8'); - - // "Key-value pairs of header names and values. Header names are lower-cased." - // https://nodejs.org/api/http.html#http_message_headers - const retryAfterHeader = _nullishCoalesce(res.headers['retry-after'], () => ( null)); - const rateLimitsHeader = _nullishCoalesce(res.headers['x-sentry-rate-limits'], () => ( null)); - - resolve({ - statusCode: res.statusCode, - headers: { - 'retry-after': retryAfterHeader, - 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader, - }, - }); - }, - ); - - req.on('error', reject); - body.pipe(req); - }); - }; -} - -export { makeNodeTransport }; -//# sourceMappingURL=http.js.map diff --git a/node_modules/@sentry/node/esm/transports/http.js.map b/node_modules/@sentry/node/esm/transports/http.js.map deleted file mode 100644 index 0a19fd1..0000000 --- a/node_modules/@sentry/node/esm/transports/http.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.js","sources":["../../../src/transports/http.ts"],"sourcesContent":["import { createTransport } from '@sentry/core';\nimport type {\n BaseTransportOptions,\n Transport,\n TransportMakeRequestResponse,\n TransportRequest,\n TransportRequestExecutor,\n} from '@sentry/types';\nimport * as http from 'http';\nimport * as https from 'https';\nimport { Readable } from 'stream';\nimport { URL } from 'url';\nimport { createGzip } from 'zlib';\n\nimport type { HTTPModule } from './http-module';\n\nexport interface NodeTransportOptions extends BaseTransportOptions {\n /** Define custom headers */\n headers?: Record;\n /** Set a proxy that should be used for outbound requests. */\n proxy?: string;\n /** HTTPS proxy CA certificates */\n caCerts?: string | Buffer | Array;\n /** Custom HTTP module. Defaults to the native 'http' and 'https' modules. */\n httpModule?: HTTPModule;\n /** Allow overriding connection keepAlive, defaults to false */\n keepAlive?: boolean;\n}\n\n// Estimated maximum size for reasonable standalone event\nconst GZIP_THRESHOLD = 1024 * 32;\n\n/**\n * Gets a stream from a Uint8Array or string\n * Readable.from is ideal but was added in node.js v12.3.0 and v10.17.0\n */\nfunction streamFromBody(body: Uint8Array | string): Readable {\n return new Readable({\n read() {\n this.push(body);\n this.push(null);\n },\n });\n}\n\n/**\n * Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry.\n */\nexport function makeNodeTransport(options: NodeTransportOptions): Transport {\n let urlSegments: URL;\n\n try {\n urlSegments = new URL(options.url);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.',\n );\n return createTransport(options, () => Promise.resolve({}));\n }\n\n const isHttps = urlSegments.protocol === 'https:';\n\n // Proxy prioritization: http => `options.proxy` | `process.env.http_proxy`\n // Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy`\n const proxy = applyNoProxyOption(\n urlSegments,\n options.proxy || (isHttps ? process.env.https_proxy : undefined) || process.env.http_proxy,\n );\n\n const nativeHttpModule = isHttps ? https : http;\n const keepAlive = options.keepAlive === undefined ? false : options.keepAlive;\n\n // TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node\n // versions(>= 8) as they had memory leaks when using it: #2555\n const agent = proxy\n ? // eslint-disable-next-line @typescript-eslint/no-var-requires\n (new (require('https-proxy-agent'))(proxy) as http.Agent)\n : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 });\n\n const requestExecutor = createRequestExecutor(options, options.httpModule ?? nativeHttpModule, agent);\n return createTransport(options, requestExecutor);\n}\n\n/**\n * Honors the `no_proxy` env variable with the highest priority to allow for hosts exclusion.\n *\n * @param transportUrl The URL the transport intends to send events to.\n * @param proxy The client configured proxy.\n * @returns A proxy the transport should use.\n */\nfunction applyNoProxyOption(transportUrlSegments: URL, proxy: string | undefined): string | undefined {\n const { no_proxy } = process.env;\n\n const urlIsExemptFromProxy =\n no_proxy &&\n no_proxy\n .split(',')\n .some(\n exemption => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption),\n );\n\n if (urlIsExemptFromProxy) {\n return undefined;\n } else {\n return proxy;\n }\n}\n\n/**\n * Creates a RequestExecutor to be used with `createTransport`.\n */\nfunction createRequestExecutor(\n options: NodeTransportOptions,\n httpModule: HTTPModule,\n agent: http.Agent,\n): TransportRequestExecutor {\n const { hostname, pathname, port, protocol, search } = new URL(options.url);\n return function makeRequest(request: TransportRequest): Promise {\n return new Promise((resolve, reject) => {\n let body = streamFromBody(request.body);\n\n const headers: Record = { ...options.headers };\n\n if (request.body.length > GZIP_THRESHOLD) {\n headers['content-encoding'] = 'gzip';\n body = body.pipe(createGzip());\n }\n\n const req = httpModule.request(\n {\n method: 'POST',\n agent,\n headers,\n hostname,\n path: `${pathname}${search}`,\n port,\n protocol,\n ca: options.caCerts,\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n\n res.setEncoding('utf8');\n\n // \"Key-value pairs of header names and values. Header names are lower-cased.\"\n // https://nodejs.org/api/http.html#http_message_headers\n const retryAfterHeader = res.headers['retry-after'] ?? null;\n const rateLimitsHeader = res.headers['x-sentry-rate-limits'] ?? null;\n\n resolve({\n statusCode: res.statusCode,\n headers: {\n 'retry-after': retryAfterHeader,\n 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader,\n },\n });\n },\n );\n\n req.on('error', reject);\n body.pipe(req);\n });\n };\n}\n"],"names":[],"mappings":";;;;;;;;AA6BA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,EAAA;;AAEA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;YACA,CAAA;UACA,CAAA,CAAA;QACA,CAAA;MACA,CAAA;;MAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;MACA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,CAAA,CAAA;EACA,CAAA;AACA;;"} \ No newline at end of file diff --git a/node_modules/@sentry/node/esm/transports/index.js b/node_modules/@sentry/node/esm/transports/index.js deleted file mode 100644 index 4e98499..0000000 --- a/node_modules/@sentry/node/esm/transports/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { makeNodeTransport } from './http.js'; - -; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/node/esm/transports/index.js.map b/node_modules/@sentry/node/esm/transports/index.js.map deleted file mode 100644 index 8777c06..0000000 --- a/node_modules/@sentry/node/esm/transports/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../../../src/transports/index.ts"],"sourcesContent":["export type { NodeTransportOptions } from './http';\n\nexport { makeNodeTransport } from './http';\n"],"names":[],"mappings":";;AAAA"} \ No newline at end of file diff --git a/node_modules/@sentry/node/package.json b/node_modules/@sentry/node/package.json deleted file mode 100644 index 86412be..0000000 --- a/node_modules/@sentry/node/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "@sentry/node@7.31.1", - "_id": "@sentry/node@7.31.1", - "_inBundle": false, - "_integrity": "sha512-4VzfOU1YHeoGkBQmkVXlXoXITf+1NkZEREKhdzgpVAkVjb2Tk3sMoFov4wOKWnNTTj4ka50xyaw/ZmqApgQ4Pw==", - "_location": "/@sentry/node", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@sentry/node@7.31.1", - "name": "@sentry/node", - "escapedName": "@sentry%2fnode", - "scope": "@sentry", - "rawSpec": "7.31.1", - "saveSpec": null, - "fetchSpec": "7.31.1" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.31.1.tgz", - "_shasum": "cba1eaa5664fc7e6dc07bb5a378f7dbe42f63457", - "_spec": "@sentry/node@7.31.1", - "_where": "C:\\code\\com.mill", - "author": { - "name": "Sentry" - }, - "bugs": { - "url": "https://github.com/getsentry/sentry-javascript/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@sentry/core": "7.31.1", - "@sentry/types": "7.31.1", - "@sentry/utils": "7.31.1", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^1.9.3" - }, - "deprecated": false, - "description": "Official Sentry SDK for Node.js", - "devDependencies": { - "@types/cookie": "0.3.2", - "@types/express": "^4.17.14", - "@types/lru-cache": "^5.1.0", - "@types/node": "~10.17.0", - "express": "^4.17.1", - "nock": "^13.0.5" - }, - "engines": { - "node": ">=8" - }, - "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node", - "license": "MIT", - "main": "cjs/index.js", - "module": "esm/index.js", - "name": "@sentry/node", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git://github.com/getsentry/sentry-javascript.git" - }, - "types": "types/index.d.ts", - "version": "7.31.1" -} diff --git a/node_modules/@sentry/types/LICENSE b/node_modules/@sentry/types/LICENSE deleted file mode 100644 index 535ef05..0000000 --- a/node_modules/@sentry/types/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@sentry/types/README.md b/node_modules/@sentry/types/README.md deleted file mode 100644 index 4c0e2d9..0000000 --- a/node_modules/@sentry/types/README.md +++ /dev/null @@ -1,20 +0,0 @@ -

- - Sentry - -

- -# Sentry JavaScript SDK Types - -[![npm version](https://img.shields.io/npm/v/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types) -[![npm dm](https://img.shields.io/npm/dm/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types) -[![npm dt](https://img.shields.io/npm/dt/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types) - -## Links - -- [Official SDK Docs](https://docs.sentry.io/quickstart/) -- [TypeDoc](http://getsentry.github.io/sentry-javascript/) - -## General - -Common types used by the Sentry JavaScript SDKs. diff --git a/node_modules/@sentry/types/esm/index.js b/node_modules/@sentry/types/esm/index.js deleted file mode 100644 index 5f5093b..0000000 --- a/node_modules/@sentry/types/esm/index.js +++ /dev/null @@ -1,55 +0,0 @@ -; -; -; -; -; -; -; -; - -; -; -; -; -; -; -// This is a dummy export, purely for the purpose of loading `globals.ts`, in order to take advantage of its side effect -// of putting variables into the global namespace. See -// https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html. -; -; -; -; -; -; -; -; -; -; -; -; -; -; - -; - -// eslint-disable-next-line deprecation/deprecation -; -; -; -; -; -; - -; - -; -; - -; -; -; -; - -; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/types/esm/index.js.map b/node_modules/@sentry/types/esm/index.js.map deleted file mode 100644 index d2f656d..0000000 --- a/node_modules/@sentry/types/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["export type { Attachment } from './attachment';\nexport type { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport type { Client } from './client';\nexport type { ClientReport, Outcome, EventDropReason } from './clientreport';\nexport type { Context, Contexts, DeviceContext, OsContext, AppContext, CultureContext, TraceContext } from './context';\nexport type { DataCategory } from './datacategory';\nexport type { DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport type { DebugImage, DebugImageType, DebugMeta } from './debugMeta';\nexport type {\n AttachmentItem,\n BaseEnvelopeHeaders,\n BaseEnvelopeItemHeaders,\n ClientReportEnvelope,\n ClientReportItem,\n DynamicSamplingContext,\n Envelope,\n EnvelopeItemType,\n EnvelopeItem,\n EventEnvelope,\n EventEnvelopeHeaders,\n EventItem,\n ReplayEnvelope,\n SessionEnvelope,\n SessionItem,\n UserFeedbackItem,\n} from './envelope';\nexport type { ExtendedError } from './error';\nexport type { Event, EventHint, EventType, ErrorEvent, TransactionEvent } from './event';\nexport type { EventProcessor } from './eventprocessor';\nexport type { Exception } from './exception';\nexport type { Extra, Extras } from './extra';\n// This is a dummy export, purely for the purpose of loading `globals.ts`, in order to take advantage of its side effect\n// of putting variables into the global namespace. See\n// https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html.\nexport type {} from './globals';\nexport type { Hub } from './hub';\nexport type { Integration, IntegrationClass } from './integration';\nexport type { Mechanism } from './mechanism';\nexport type { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocation } from './misc';\nexport type { ClientOptions, Options } from './options';\nexport type { Package } from './package';\nexport type { PolymorphicEvent, PolymorphicRequest } from './polymorphics';\nexport type { ReplayEvent, ReplayRecordingData, ReplayRecordingMode } from './replay';\nexport type { QueryParams, Request } from './request';\nexport type { Runtime } from './runtime';\nexport type { CaptureContext, Scope, ScopeContext } from './scope';\nexport type { SdkInfo } from './sdkinfo';\nexport type { SdkMetadata } from './sdkmetadata';\nexport type {\n SessionAggregates,\n AggregationCounts,\n Session,\n SessionContext,\n SessionStatus,\n RequestSession,\n RequestSessionStatus,\n SessionFlusherLike,\n SerializedSession,\n} from './session';\n\n// eslint-disable-next-line deprecation/deprecation\nexport type { Severity, SeverityLevel } from './severity';\nexport type { Span, SpanContext } from './span';\nexport type { StackFrame } from './stackframe';\nexport type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace';\nexport type { TextEncoderInternal } from './textencoder';\nexport type { TracePropagationTargets } from './tracing';\nexport type {\n CustomSamplingContext,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n TransactionMetadata,\n TransactionSource,\n TransactionNameChange,\n} from './transaction';\nexport type {\n DurationUnit,\n InformationUnit,\n FractionUnit,\n MeasurementUnit,\n NoneUnit,\n Measurements,\n} from './measurement';\nexport type { Thread } from './thread';\nexport type {\n Transport,\n TransportRequest,\n TransportMakeRequestResponse,\n InternalBaseTransportOptions,\n BaseTransportOptions,\n TransportRequestExecutor,\n} from './transport';\nexport type { User, UserFeedback } from './user';\nexport type { WrappedFunction } from './wrappedfunction';\nexport type { Instrumenter } from './instrumenter';\n\nexport type { BrowserClientReplayOptions } from './browseroptions';\n"],"names":[],"mappings":"AAAA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;;AAkBA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;;AAWA,CAAA;AACA;AACA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;;AAUA,CAAA;;AAQA,CAAA;AACA,CAAA;;AAQA,CAAA;AACA,CAAA;AACA,CAAA;AACA,CAAA;AACA;AACA"} \ No newline at end of file diff --git a/node_modules/@sentry/types/package.json b/node_modules/@sentry/types/package.json deleted file mode 100644 index 76965ae..0000000 --- a/node_modules/@sentry/types/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_from": "@sentry/types@7.31.1", - "_id": "@sentry/types@7.31.1", - "_inBundle": false, - "_integrity": "sha512-1uzr2l0AxEnxUX/S0EdmXUQ15/kDsam8Nbdw4Gai8SU764XwQgA/TTjoewVP597CDI/AHKan67Y630/Ylmkx9w==", - "_location": "/@sentry/types", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@sentry/types@7.31.1", - "name": "@sentry/types", - "escapedName": "@sentry%2ftypes", - "scope": "@sentry", - "rawSpec": "7.31.1", - "saveSpec": null, - "fetchSpec": "7.31.1" - }, - "_requiredBy": [ - "/@sentry/core", - "/@sentry/node", - "/@sentry/utils" - ], - "_resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.31.1.tgz", - "_shasum": "920fc10b289ac1f99f277033b4d26625028a1f9f", - "_spec": "@sentry/types@7.31.1", - "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", - "author": { - "name": "Sentry" - }, - "bugs": { - "url": "https://github.com/getsentry/sentry-javascript/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Types for all Sentry JavaScript SDKs", - "engines": { - "node": ">=8" - }, - "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/types", - "license": "MIT", - "main": "cjs/index.js", - "module": "esm/index.js", - "name": "@sentry/types", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git://github.com/getsentry/sentry-javascript.git" - }, - "sideEffects": false, - "types": "types/index.d.ts", - "version": "7.31.1" -} diff --git a/node_modules/@sentry/utils/LICENSE b/node_modules/@sentry/utils/LICENSE deleted file mode 100644 index 535ef05..0000000 --- a/node_modules/@sentry/utils/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@sentry/utils/README.md b/node_modules/@sentry/utils/README.md deleted file mode 100644 index afa5082..0000000 --- a/node_modules/@sentry/utils/README.md +++ /dev/null @@ -1,22 +0,0 @@ -

- - Sentry - -

- -# Sentry JavaScript SDK Utilities - -[![npm version](https://img.shields.io/npm/v/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils) -[![npm dm](https://img.shields.io/npm/dm/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils) -[![npm dt](https://img.shields.io/npm/dt/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils) - -## Links - -- [Official SDK Docs](https://docs.sentry.io/quickstart/) -- [TypeDoc](http://getsentry.github.io/sentry-javascript/) - -## General - -Common utilities used by the Sentry JavaScript SDKs. - -Note: This package is only meant to be used internally, and as such is not part of our public API contract and does not follow semver. diff --git a/node_modules/@sentry/utils/esm/dsn.js b/node_modules/@sentry/utils/esm/dsn.js deleted file mode 100644 index 42de6b2..0000000 --- a/node_modules/@sentry/utils/esm/dsn.js +++ /dev/null @@ -1,109 +0,0 @@ -import { SentryError } from './error.js'; - -/** Regular expression used to parse a Dsn. */ -const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; - -function isValidProtocol(protocol) { - return protocol === 'http' || protocol === 'https'; -} - -/** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ -function dsnToString(dsn, withPassword = false) { - const { host, path, pass, port, projectId, protocol, publicKey } = dsn; - return ( - `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` + - `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}` - ); -} - -/** - * Parses a Dsn from a given string. - * - * @param str A Dsn as string - * @returns Dsn as DsnComponents - */ -function dsnFromString(str) { - const match = DSN_REGEX.exec(str); - - if (!match) { - throw new SentryError(`Invalid Sentry Dsn: ${str}`); - } - - const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1); - let path = ''; - let projectId = lastPath; - - const split = projectId.split('/'); - if (split.length > 1) { - path = split.slice(0, -1).join('/'); - projectId = split.pop() ; - } - - if (projectId) { - const projectMatch = projectId.match(/^\d+/); - if (projectMatch) { - projectId = projectMatch[0]; - } - } - - return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey }); -} - -function dsnFromComponents(components) { - return { - protocol: components.protocol, - publicKey: components.publicKey || '', - pass: components.pass || '', - host: components.host, - port: components.port || '', - path: components.path || '', - projectId: components.projectId, - }; -} - -function validateDsn(dsn) { - if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { - return; - } - - const { port, projectId, protocol } = dsn; - - const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId']; - requiredComponents.forEach(component => { - if (!dsn[component]) { - throw new SentryError(`Invalid Sentry Dsn: ${component} missing`); - } - }); - - if (!projectId.match(/^\d+$/)) { - throw new SentryError(`Invalid Sentry Dsn: Invalid projectId ${projectId}`); - } - - if (!isValidProtocol(protocol)) { - throw new SentryError(`Invalid Sentry Dsn: Invalid protocol ${protocol}`); - } - - if (port && isNaN(parseInt(port, 10))) { - throw new SentryError(`Invalid Sentry Dsn: Invalid port ${port}`); - } - - return true; -} - -/** The Sentry Dsn, identifying a Sentry instance and project. */ -function makeDsn(from) { - const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from); - validateDsn(components); - return components; -} - -export { dsnFromString, dsnToString, makeDsn }; -//# sourceMappingURL=dsn.js.map diff --git a/node_modules/@sentry/utils/esm/dsn.js.map b/node_modules/@sentry/utils/esm/dsn.js.map deleted file mode 100644 index 8aace66..0000000 --- a/node_modules/@sentry/utils/esm/dsn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dsn.js","sources":["../../src/dsn.ts"],"sourcesContent":["import type { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents\n */\nexport function dsnFromString(str: string): DsnComponents {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(`Invalid Sentry Dsn: ${str}`);\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean | void {\n if (!__DEBUG_BUILD__) {\n return;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray = ['protocol', 'publicKey', 'host', 'projectId'];\n requiredComponents.forEach(component => {\n if (!dsn[component]) {\n throw new SentryError(`Invalid Sentry Dsn: ${component} missing`);\n }\n });\n\n if (!projectId.match(/^\\d+$/)) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n }\n\n if (!isValidProtocol(protocol)) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid port ${port}`);\n }\n\n return true;\n}\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport function makeDsn(from: DsnLike): DsnComponents {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n validateDsn(components);\n return components;\n}\n"],"names":[],"mappings":";;AAIA;AACA,MAAA,SAAA,GAAA,iEAAA,CAAA;AACA;AACA,SAAA,eAAA,CAAA,QAAA,EAAA;AACA,EAAA,OAAA,QAAA,KAAA,MAAA,IAAA,QAAA,KAAA,OAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,WAAA,CAAA,GAAA,EAAA,YAAA,GAAA,KAAA,EAAA;AACA,EAAA,MAAA,EAAA,IAAA,EAAA,IAAA,EAAA,IAAA,EAAA,IAAA,EAAA,SAAA,EAAA,QAAA,EAAA,SAAA,EAAA,GAAA,GAAA,CAAA;AACA,EAAA;AACA,IAAA,CAAA,EAAA,QAAA,CAAA,GAAA,EAAA,SAAA,CAAA,EAAA,YAAA,IAAA,IAAA,GAAA,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA,GAAA,EAAA,CAAA,CAAA;AACA,IAAA,CAAA,CAAA,EAAA,IAAA,CAAA,EAAA,IAAA,GAAA,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA,GAAA,EAAA,CAAA,CAAA,EAAA,IAAA,GAAA,CAAA,EAAA,IAAA,CAAA,CAAA,CAAA,GAAA,IAAA,CAAA,EAAA,SAAA,CAAA,CAAA;AACA,IAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AAC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;AACA,EAAA,IAAA,IAAA,IAAA,KAAA,CAAA,QAAA,CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,EAAA;AACA,IAAA,MAAA,IAAA,WAAA,CAAA,CAAA,iCAAA,EAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,IAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,OAAA,CAAA,IAAA,EAAA;AACA,EAAA,MAAA,UAAA,GAAA,OAAA,IAAA,KAAA,QAAA,GAAA,aAAA,CAAA,IAAA,CAAA,GAAA,iBAAA,CAAA,IAAA,CAAA,CAAA;AACA,EAAA,WAAA,CAAA,UAAA,CAAA,CAAA;AACA,EAAA,OAAA,UAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/error.js b/node_modules/@sentry/utils/esm/error.js deleted file mode 100644 index 216552c..0000000 --- a/node_modules/@sentry/utils/esm/error.js +++ /dev/null @@ -1,18 +0,0 @@ -/** An error emitted by Sentry SDKs and related utilities. */ -class SentryError extends Error { - /** Display name of this error instance. */ - - constructor( message, logLevel = 'warn') { - super(message);this.message = message;; - - this.name = new.target.prototype.constructor.name; - // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line - // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes - // instances of `SentryError` fail `obj instanceof SentryError` checks. - Object.setPrototypeOf(this, new.target.prototype); - this.logLevel = logLevel; - } -} - -export { SentryError }; -//# sourceMappingURL=error.js.map diff --git a/node_modules/@sentry/utils/esm/error.js.map b/node_modules/@sentry/utils/esm/error.js.map deleted file mode 100644 index 923d38a..0000000 --- a/node_modules/@sentry/utils/esm/error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.js","sources":["../../src/error.ts"],"sourcesContent":["import type { ConsoleLevel } from './logger';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public logLevel: ConsoleLevel;\n\n public constructor(public message: string, logLevel: ConsoleLevel = 'warn') {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n"],"names":[],"mappings":"AAEA;AACA,MAAA,WAAA,SAAA,KAAA,CAAA;AACA;;AAKA,GAAA,WAAA,EAAA,OAAA,EAAA,QAAA,GAAA,MAAA,EAAA;AACA,IAAA,KAAA,CAAA,OAAA,CAAA,CAAA,IAAA,CAAA,OAAA,GAAA,OAAA,CAAA,CAAA;AACA;AACA,IAAA,IAAA,CAAA,IAAA,GAAA,GAAA,CAAA,MAAA,CAAA,SAAA,CAAA,WAAA,CAAA,IAAA,CAAA;AACA;AACA;AACA;AACA,IAAA,MAAA,CAAA,cAAA,CAAA,IAAA,EAAA,GAAA,CAAA,MAAA,CAAA,SAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA,QAAA,CAAA;AACA,GAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/index.js b/node_modules/@sentry/utils/esm/index.js deleted file mode 100644 index a93206e..0000000 --- a/node_modules/@sentry/utils/esm/index.js +++ /dev/null @@ -1,29 +0,0 @@ -export { getDomElement, getLocationHref, htmlTreeAsString } from './browser.js'; -export { dsnFromString, dsnToString, makeDsn } from './dsn.js'; -export { SentryError } from './error.js'; -export { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton } from './worldwide.js'; -export { addInstrumentationHandler } from './instrument.js'; -export { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable } from './is.js'; -export { CONSOLE_LEVELS, consoleSandbox, logger } from './logger.js'; -export { memoBuilder } from './memo.js'; -export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 } from './misc.js'; -export { dynamicRequire, isNodeEnv, loadModule } from './node.js'; -export { normalize, normalizeToSize, walk } from './normalize.js'; -export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode } from './object.js'; -export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './path.js'; -export { makePromiseBuffer } from './promisebuffer.js'; -export { addRequestDataToEvent, addRequestDataToTransaction, extractPathForTransaction, extractRequestData } from './requestdata.js'; -export { severityFromString, severityLevelFromString, validSeverityLevels } from './severity.js'; -export { createStackParser, getFunctionName, nodeStackLineParser, stackParserFromStackParserOptions, stripSentryFramesAndReverse } from './stacktrace.js'; -export { escapeStringForRegex, isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate } from './string.js'; -export { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver } from './supports.js'; -export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './syncpromise.js'; -export { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs, usingPerformanceAPI } from './time.js'; -export { TRACEPARENT_REGEXP, extractTraceparentData } from './tracing.js'; -export { isBrowserBundle } from './env.js'; -export { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope } from './envelope.js'; -export { createClientReportEnvelope } from './clientreport.js'; -export { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits } from './ratelimit.js'; -export { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from './baggage.js'; -export { getNumberOfUrlSegments, parseUrl, stripUrlQueryAndFragment } from './url.js'; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@sentry/utils/esm/index.js.map b/node_modules/@sentry/utils/esm/index.js.map deleted file mode 100644 index 721d3cf..0000000 --- a/node_modules/@sentry/utils/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/instrument.js b/node_modules/@sentry/utils/esm/instrument.js deleted file mode 100644 index 3a548bf..0000000 --- a/node_modules/@sentry/utils/esm/instrument.js +++ /dev/null @@ -1,574 +0,0 @@ -import { isInstanceOf, isString } from './is.js'; -import { logger, CONSOLE_LEVELS } from './logger.js'; -import { fill } from './object.js'; -import { getFunctionName } from './stacktrace.js'; -import { supportsNativeFetch, supportsHistory } from './supports.js'; -import { getGlobalObject } from './worldwide.js'; - -// eslint-disable-next-line deprecation/deprecation -const WINDOW = getGlobalObject(); - -/** - * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc. - * - Console API - * - Fetch API - * - XHR API - * - History API - * - DOM API (click/typing) - * - Error API - * - UnhandledRejection API - */ - -const handlers = {}; -const instrumented = {}; - -/** Instruments given API */ -function instrument(type) { - if (instrumented[type]) { - return; - } - - instrumented[type] = true; - - switch (type) { - case 'console': - instrumentConsole(); - break; - case 'dom': - instrumentDOM(); - break; - case 'xhr': - instrumentXHR(); - break; - case 'fetch': - instrumentFetch(); - break; - case 'history': - instrumentHistory(); - break; - case 'error': - instrumentError(); - break; - case 'unhandledrejection': - instrumentUnhandledRejection(); - break; - default: - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('unknown instrumentation type:', type); - return; - } -} - -/** - * Add handler that will be called when given type of instrumentation triggers. - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addInstrumentationHandler(type, callback) { - handlers[type] = handlers[type] || []; - (handlers[type] ).push(callback); - instrument(type); -} - -/** JSDoc */ -function triggerHandlers(type, data) { - if (!type || !handlers[type]) { - return; - } - - for (const handler of handlers[type] || []) { - try { - handler(data); - } catch (e) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.error( - `Error while triggering instrumentation handler.\nType: ${type}\nName: ${getFunctionName(handler)}\nError:`, - e, - ); - } - } -} - -/** JSDoc */ -function instrumentConsole() { - if (!('console' in WINDOW)) { - return; - } - - CONSOLE_LEVELS.forEach(function (level) { - if (!(level in WINDOW.console)) { - return; - } - - fill(WINDOW.console, level, function (originalConsoleMethod) { - return function (...args) { - triggerHandlers('console', { args, level }); - - // this fails for some browsers. :( - if (originalConsoleMethod) { - originalConsoleMethod.apply(WINDOW.console, args); - } - }; - }); - }); -} - -/** JSDoc */ -function instrumentFetch() { - if (!supportsNativeFetch()) { - return; - } - - fill(WINDOW, 'fetch', function (originalFetch) { - return function (...args) { - const handlerData = { - args, - fetchData: { - method: getFetchMethod(args), - url: getFetchUrl(args), - }, - startTimestamp: Date.now(), - }; - - triggerHandlers('fetch', { - ...handlerData, - }); - - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return originalFetch.apply(WINDOW, args).then( - (response) => { - triggerHandlers('fetch', { - ...handlerData, - endTimestamp: Date.now(), - response, - }); - return response; - }, - (error) => { - triggerHandlers('fetch', { - ...handlerData, - endTimestamp: Date.now(), - error, - }); - // NOTE: If you are a Sentry user, and you are seeing this stack frame, - // it means the sentry.javascript SDK caught an error invoking your application code. - // This is expected behavior and NOT indicative of a bug with sentry.javascript. - throw error; - }, - ); - }; - }); -} - -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/** Extract `method` from fetch call arguments */ -function getFetchMethod(fetchArgs = []) { - if ('Request' in WINDOW && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) { - return String(fetchArgs[0].method).toUpperCase(); - } - if (fetchArgs[1] && fetchArgs[1].method) { - return String(fetchArgs[1].method).toUpperCase(); - } - return 'GET'; -} - -/** Extract `url` from fetch call arguments */ -function getFetchUrl(fetchArgs = []) { - if (typeof fetchArgs[0] === 'string') { - return fetchArgs[0]; - } - if ('Request' in WINDOW && isInstanceOf(fetchArgs[0], Request)) { - return fetchArgs[0].url; - } - return String(fetchArgs[0]); -} -/* eslint-enable @typescript-eslint/no-unsafe-member-access */ - -/** JSDoc */ -function instrumentXHR() { - if (!('XMLHttpRequest' in WINDOW)) { - return; - } - - const xhrproto = XMLHttpRequest.prototype; - - fill(xhrproto, 'open', function (originalOpen) { - return function ( ...args) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const xhr = this; - const url = args[1]; - const xhrInfo = (xhr.__sentry_xhr__ = { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - method: isString(args[0]) ? args[0].toUpperCase() : args[0], - url: args[1], - }); - - // if Sentry key appears in URL, don't capture it as a request - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) { - xhr.__sentry_own_request__ = true; - } - - const onreadystatechangeHandler = function () { - if (xhr.readyState === 4) { - try { - // touching statusCode in some platforms throws - // an exception - xhrInfo.status_code = xhr.status; - } catch (e) { - /* do nothing */ - } - - triggerHandlers('xhr', { - args, - endTimestamp: Date.now(), - startTimestamp: Date.now(), - xhr, - }); - } - }; - - if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') { - fill(xhr, 'onreadystatechange', function (original) { - return function (...readyStateArgs) { - onreadystatechangeHandler(); - return original.apply(xhr, readyStateArgs); - }; - }); - } else { - xhr.addEventListener('readystatechange', onreadystatechangeHandler); - } - - return originalOpen.apply(xhr, args); - }; - }); - - fill(xhrproto, 'send', function (originalSend) { - return function ( ...args) { - if (this.__sentry_xhr__ && args[0] !== undefined) { - this.__sentry_xhr__.body = args[0]; - } - - triggerHandlers('xhr', { - args, - startTimestamp: Date.now(), - xhr: this, - }); - - return originalSend.apply(this, args); - }; - }); -} - -let lastHref; - -/** JSDoc */ -function instrumentHistory() { - if (!supportsHistory()) { - return; - } - - const oldOnPopState = WINDOW.onpopstate; - WINDOW.onpopstate = function ( ...args) { - const to = WINDOW.location.href; - // keep track of the current URL state, as we always receive only the updated state - const from = lastHref; - lastHref = to; - triggerHandlers('history', { - from, - to, - }); - if (oldOnPopState) { - // Apparently this can throw in Firefox when incorrectly implemented plugin is installed. - // https://github.com/getsentry/sentry-javascript/issues/3344 - // https://github.com/bugsnag/bugsnag-js/issues/469 - try { - return oldOnPopState.apply(this, args); - } catch (_oO) { - // no-empty - } - } - }; - - /** @hidden */ - function historyReplacementFunction(originalHistoryFunction) { - return function ( ...args) { - const url = args.length > 2 ? args[2] : undefined; - if (url) { - // coerce to string (this is what pushState does) - const from = lastHref; - const to = String(url); - // keep track of the current URL state, as we always receive only the updated state - lastHref = to; - triggerHandlers('history', { - from, - to, - }); - } - return originalHistoryFunction.apply(this, args); - }; - } - - fill(WINDOW.history, 'pushState', historyReplacementFunction); - fill(WINDOW.history, 'replaceState', historyReplacementFunction); -} - -const debounceDuration = 1000; -let debounceTimerID; -let lastCapturedEvent; - -/** - * Decide whether the current event should finish the debounce of previously captured one. - * @param previous previously captured event - * @param current event to be captured - */ -function shouldShortcircuitPreviousDebounce(previous, current) { - // If there was no previous event, it should always be swapped for the new one. - if (!previous) { - return true; - } - - // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress. - if (previous.type !== current.type) { - return true; - } - - try { - // If both events have the same type, it's still possible that actions were performed on different targets. - // e.g. 2 clicks on different buttons. - if (previous.target !== current.target) { - return true; - } - } catch (e) { - // just accessing `target` property can throw an exception in some rare circumstances - // see: https://github.com/getsentry/sentry-javascript/issues/838 - } - - // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_ - // to which an event listener was attached), we treat them as the same action, as we want to capture - // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box. - return false; -} - -/** - * Decide whether an event should be captured. - * @param event event to be captured - */ -function shouldSkipDOMEvent(event) { - // We are only interested in filtering `keypress` events for now. - if (event.type !== 'keypress') { - return false; - } - - try { - const target = event.target ; - - if (!target || !target.tagName) { - return true; - } - - // Only consider keypress events on actual input elements. This will disregard keypresses targeting body - // e.g.tabbing through elements, hotkeys, etc. - if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) { - return false; - } - } catch (e) { - // just accessing `target` property can throw an exception in some rare circumstances - // see: https://github.com/getsentry/sentry-javascript/issues/838 - } - - return true; -} - -/** - * Wraps addEventListener to capture UI breadcrumbs - * @param handler function that will be triggered - * @param globalListener indicates whether event was captured by the global event listener - * @returns wrapped breadcrumb events handler - * @hidden - */ -function makeDOMEventHandler(handler, globalListener = false) { - return (event) => { - // It's possible this handler might trigger multiple times for the same - // event (e.g. event propagation through node ancestors). - // Ignore if we've already captured that event. - if (!event || lastCapturedEvent === event) { - return; - } - - // We always want to skip _some_ events. - if (shouldSkipDOMEvent(event)) { - return; - } - - const name = event.type === 'keypress' ? 'input' : event.type; - - // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons. - if (debounceTimerID === undefined) { - handler({ - event: event, - name, - global: globalListener, - }); - lastCapturedEvent = event; - } - // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one. - // If that's the case, emit the previous event and store locally the newly-captured DOM event. - else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) { - handler({ - event: event, - name, - global: globalListener, - }); - lastCapturedEvent = event; - } - - // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together. - clearTimeout(debounceTimerID); - debounceTimerID = WINDOW.setTimeout(() => { - debounceTimerID = undefined; - }, debounceDuration); - }; -} - -/** JSDoc */ -function instrumentDOM() { - if (!('document' in WINDOW)) { - return; - } - - // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom - // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before - // we instrument `addEventListener` so that we don't end up attaching this handler twice. - const triggerDOMHandler = triggerHandlers.bind(null, 'dom'); - const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true); - WINDOW.document.addEventListener('click', globalDOMEventHandler, false); - WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false); - - // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled - // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That - // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler - // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still - // guaranteed to fire at least once.) - ['EventTarget', 'Node'].forEach((target) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - const proto = (WINDOW )[target] && (WINDOW )[target].prototype; - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - - fill(proto, 'addEventListener', function (originalAddEventListener) { - return function ( - - type, - listener, - options, - ) { - if (type === 'click' || type == 'keypress') { - try { - const el = this ; - const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {}); - const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 }); - - if (!handlerForType.handler) { - const handler = makeDOMEventHandler(triggerDOMHandler); - handlerForType.handler = handler; - originalAddEventListener.call(this, type, handler, options); - } - - handlerForType.refCount++; - } catch (e) { - // Accessing dom properties is always fragile. - // Also allows us to skip `addEventListenrs` calls with no proper `this` context. - } - } - - return originalAddEventListener.call(this, type, listener, options); - }; - }); - - fill( - proto, - 'removeEventListener', - function (originalRemoveEventListener) { - return function ( - - type, - listener, - options, - ) { - if (type === 'click' || type == 'keypress') { - try { - const el = this ; - const handlers = el.__sentry_instrumentation_handlers__ || {}; - const handlerForType = handlers[type]; - - if (handlerForType) { - handlerForType.refCount--; - // If there are no longer any custom handlers of the current type on this element, we can remove ours, too. - if (handlerForType.refCount <= 0) { - originalRemoveEventListener.call(this, type, handlerForType.handler, options); - handlerForType.handler = undefined; - delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete - } - - // If there are no longer any custom handlers of any type on this element, cleanup everything. - if (Object.keys(handlers).length === 0) { - delete el.__sentry_instrumentation_handlers__; - } - } - } catch (e) { - // Accessing dom properties is always fragile. - // Also allows us to skip `addEventListenrs` calls with no proper `this` context. - } - } - - return originalRemoveEventListener.call(this, type, listener, options); - }; - }, - ); - }); -} - -let _oldOnErrorHandler = null; -/** JSDoc */ -function instrumentError() { - _oldOnErrorHandler = WINDOW.onerror; - - WINDOW.onerror = function (msg, url, line, column, error) { - triggerHandlers('error', { - column, - error, - line, - msg, - url, - }); - - if (_oldOnErrorHandler) { - // eslint-disable-next-line prefer-rest-params - return _oldOnErrorHandler.apply(this, arguments); - } - - return false; - }; -} - -let _oldOnUnhandledRejectionHandler = null; -/** JSDoc */ -function instrumentUnhandledRejection() { - _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection; - - WINDOW.onunhandledrejection = function (e) { - triggerHandlers('unhandledrejection', e); - - if (_oldOnUnhandledRejectionHandler) { - // eslint-disable-next-line prefer-rest-params - return _oldOnUnhandledRejectionHandler.apply(this, arguments); - } - - return true; - }; -} - -export { addInstrumentationHandler }; -//# sourceMappingURL=instrument.js.map diff --git a/node_modules/@sentry/utils/esm/instrument.js.map b/node_modules/@sentry/utils/esm/instrument.js.map deleted file mode 100644 index 1f936f6..0000000 --- a/node_modules/@sentry/utils/esm/instrument.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"instrument.js","sources":["../../src/instrument.ts"],"sourcesContent":["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type { WrappedFunction } from '@sentry/types';\n\nimport { isInstanceOf, isString } from './is';\nimport { CONSOLE_LEVELS, logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nexport type InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\nexport type InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n __DEBUG_BUILD__ && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(callback);\n instrument(type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n __DEBUG_BUILD__ &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in WINDOW)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level: string): void {\n if (!(level in WINDOW.console)) {\n return;\n }\n\n fill(WINDOW.console, level, function (originalConsoleMethod: () => any): Function {\n return function (...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.apply(WINDOW.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(WINDOW, 'fetch', function (originalFetch: () => void): () => void {\n return function (...args: any[]): void {\n const handlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(WINDOW, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\ntype XHRSendInput = null | Blob | BufferSource | FormData | URLSearchParams | string;\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n body?: XHRSendInput;\n };\n}\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in WINDOW && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in WINDOW && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in WINDOW)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen: () => void): () => void {\n return function (this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const url = args[1];\n const xhrInfo: SentryWrappedXMLHttpRequest['__sentry_xhr__'] = (xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = function (): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhr.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr,\n });\n }\n };\n\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original: WrappedFunction): Function {\n return function (...readyStateArgs: any[]): void {\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n } else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n return originalOpen.apply(xhr, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend: () => void): () => void {\n return function (this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n if (this.__sentry_xhr__ && args[0] !== undefined) {\n this.__sentry_xhr__.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function (this: WindowEventHandlers, ...args: any[]): any {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function (this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nconst debounceDuration = 1000;\nlet debounceTimerID: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous: Event | undefined, current: Event): boolean {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event: Event): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n\n try {\n const target = event.target as HTMLElement;\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {\n return (event: Event): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: Function;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in WINDOW)) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (WINDOW as any)[target] && (WINDOW as any)[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = WINDOW.onerror;\n\n WINDOW.onerror = function (msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection;\n\n WINDOW.onunhandledrejection = function (e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n"],"names":[],"mappings":";;;;;;;AAYA;AACA,MAAA,MAAA,GAAA,eAAA,EAAA,CAAA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA,QAAA,GAAA,EAAA,CAAA;AACA,MAAA,YAAA,GAAA,EAAA,CAAA;AACA;AACA;AACA,SAAA,UAAA,CAAA,IAAA,EAAA;AACA,EAAA,IAAA,YAAA,CAAA,IAAA,CAAA,EAAA;AACA,IAAA,OAAA;AACA,GAAA;AACA;AACA,EAAA,YAAA,CAAA,IAAA,CAAA,GAAA,IAAA,CAAA;AACA;AACA,EAAA,QAAA,IAAA;AACA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,kBAAA,GAAA,MAAA,CAAA,OAAA,CAAA;AACA;AACA,EAAA,MAAA,CAAA,OAAA,GAAA,UAAA,GAAA,EAAA,GAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA;AACA,IAAA,eAAA,CAAA,OAAA,EAAA;AACA,MAAA,MAAA;AACA,MAAA,KAAA;AACA,MAAA,IAAA;AACA,MAAA,GAAA;AACA,MAAA,GAAA;AACA,KAAA,CAAA,CAAA;AACA;AACA,IAAA,IAAA,kBAAA,EAAA;AACA;AACA,MAAA,OAAA,kBAAA,CAAA,KAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AACA,KAAA;AACA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA,CAAA;AACA,CAAA;AACA;AACA,IAAA,+BAAA,GAAA,IAAA,CAAA;AACA;AACA,SAAA,4BAAA,GAAA;AACA,EAAA,+BAAA,GAAA,MAAA,CAAA,oBAAA,CAAA;AACA;AACA,EAAA,MAAA,CAAA,oBAAA,GAAA,UAAA,CAAA,EAAA;AACA,IAAA,eAAA,CAAA,oBAAA,EAAA,CAAA,CAAA,CAAA;AACA;AACA,IAAA,IAAA,+BAAA,EAAA;AACA;AACA,MAAA,OAAA,+BAAA,CAAA,KAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AACA,KAAA;AACA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/is.js b/node_modules/@sentry/utils/esm/is.js deleted file mode 100644 index 8b60633..0000000 --- a/node_modules/@sentry/utils/esm/is.js +++ /dev/null @@ -1,179 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/unbound-method -const objectToString = Object.prototype.toString; - -/** - * Checks whether given value's type is one of a few Error or Error-like - * {@link isError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isError(wat) { - switch (objectToString.call(wat)) { - case '[object Error]': - case '[object Exception]': - case '[object DOMException]': - return true; - default: - return isInstanceOf(wat, Error); - } -} -/** - * Checks whether given value is an instance of the given built-in class. - * - * @param wat The value to be checked - * @param className - * @returns A boolean representing the result. - */ -function isBuiltin(wat, className) { - return objectToString.call(wat) === `[object ${className}]`; -} - -/** - * Checks whether given value's type is ErrorEvent - * {@link isErrorEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isErrorEvent(wat) { - return isBuiltin(wat, 'ErrorEvent'); -} - -/** - * Checks whether given value's type is DOMError - * {@link isDOMError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isDOMError(wat) { - return isBuiltin(wat, 'DOMError'); -} - -/** - * Checks whether given value's type is DOMException - * {@link isDOMException}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isDOMException(wat) { - return isBuiltin(wat, 'DOMException'); -} - -/** - * Checks whether given value's type is a string - * {@link isString}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isString(wat) { - return isBuiltin(wat, 'String'); -} - -/** - * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol) - * {@link isPrimitive}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isPrimitive(wat) { - return wat === null || (typeof wat !== 'object' && typeof wat !== 'function'); -} - -/** - * Checks whether given value's type is an object literal - * {@link isPlainObject}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isPlainObject(wat) { - return isBuiltin(wat, 'Object'); -} - -/** - * Checks whether given value's type is an Event instance - * {@link isEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isEvent(wat) { - return typeof Event !== 'undefined' && isInstanceOf(wat, Event); -} - -/** - * Checks whether given value's type is an Element instance - * {@link isElement}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isElement(wat) { - return typeof Element !== 'undefined' && isInstanceOf(wat, Element); -} - -/** - * Checks whether given value's type is an regexp - * {@link isRegExp}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isRegExp(wat) { - return isBuiltin(wat, 'RegExp'); -} - -/** - * Checks whether given value has a then function. - * @param wat A value to be checked. - */ -function isThenable(wat) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return Boolean(wat && wat.then && typeof wat.then === 'function'); -} - -/** - * Checks whether given value's type is a SyntheticEvent - * {@link isSyntheticEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isSyntheticEvent(wat) { - return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; -} - -/** - * Checks whether given value is NaN - * {@link isNaN}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isNaN(wat) { - return typeof wat === 'number' && wat !== wat; -} - -/** - * Checks whether given value's type is an instance of provided constructor. - * {@link isInstanceOf}. - * - * @param wat A value to be checked. - * @param base A constructor to be used in a check. - * @returns A boolean representing the result. - */ -function isInstanceOf(wat, base) { - try { - return wat instanceof base; - } catch (_e) { - return false; - } -} - -export { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable }; -//# sourceMappingURL=is.js.map diff --git a/node_modules/@sentry/utils/esm/is.js.map b/node_modules/@sentry/utils/esm/is.js.map deleted file mode 100644 index 321cbb5..0000000 --- a/node_modules/@sentry/utils/esm/is.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is.js","sources":["../../src/is.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport type { PolymorphicEvent, Primitive } from '@sentry/types';\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: unknown): wat is Error {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat: unknown, className: string): boolean {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: unknown): boolean {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: unknown): wat is string {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: unknown): wat is Primitive {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: unknown): wat is Record {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: unknown): wat is PolymorphicEvent {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: unknown): boolean {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: unknown): wat is RegExp {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): wat is PromiseLike {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: unknown): boolean {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isNaN(wat: unknown): boolean {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n"],"names":[],"mappings":"AAKA;AACA,MAAA,cAAA,GAAA,MAAA,CAAA,SAAA,CAAA,QAAA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,OAAA,CAAA,GAAA,EAAA;AACA,EAAA,QAAA,cAAA,CAAA,IAAA,CAAA,GAAA,CAAA;AACA,IAAA,KAAA,gBA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,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,EAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/logger.js b/node_modules/@sentry/utils/esm/logger.js deleted file mode 100644 index 602b6f6..0000000 --- a/node_modules/@sentry/utils/esm/logger.js +++ /dev/null @@ -1,83 +0,0 @@ -import { GLOBAL_OBJ, getGlobalSingleton } from './worldwide.js'; - -/** Prefix for logging strings */ -const PREFIX = 'Sentry Logger '; - -const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ; - -/** - * Temporarily disable sentry console instrumentations. - * - * @param callback The function to run against the original `console` messages - * @returns The results of the callback - */ -function consoleSandbox(callback) { - if (!('console' in GLOBAL_OBJ)) { - return callback(); - } - - const originalConsole = GLOBAL_OBJ.console ; - const wrappedLevels = {}; - - // Restore all wrapped console methods - CONSOLE_LEVELS.forEach(level => { - // TODO(v7): Remove this check as it's only needed for Node 6 - const originalWrappedFunc = - originalConsole[level] && (originalConsole[level] ).__sentry_original__; - if (level in originalConsole && originalWrappedFunc) { - wrappedLevels[level] = originalConsole[level] ; - originalConsole[level] = originalWrappedFunc ; - } - }); - - try { - return callback(); - } finally { - // Revert restoration to wrapped state - Object.keys(wrappedLevels).forEach(level => { - originalConsole[level] = wrappedLevels[level ]; - }); - } -} - -function makeLogger() { - let enabled = false; - const logger = { - enable: () => { - enabled = true; - }, - disable: () => { - enabled = false; - }, - }; - - if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { - CONSOLE_LEVELS.forEach(name => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - logger[name] = (...args) => { - if (enabled) { - consoleSandbox(() => { - GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args); - }); - } - }; - }); - } else { - CONSOLE_LEVELS.forEach(name => { - logger[name] = () => undefined; - }); - } - - return logger ; -} - -// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used -let logger; -if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { - logger = getGlobalSingleton('logger', makeLogger); -} else { - logger = makeLogger(); -} - -export { CONSOLE_LEVELS, consoleSandbox, logger }; -//# sourceMappingURL=logger.js.map diff --git a/node_modules/@sentry/utils/esm/logger.js.map b/node_modules/@sentry/utils/esm/logger.js.map deleted file mode 100644 index 69620e8..0000000 --- a/node_modules/@sentry/utils/esm/logger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger.js","sources":["../../src/logger.ts"],"sourcesContent":["import type { WrappedFunction } from '@sentry/types';\n\nimport { getGlobalSingleton, GLOBAL_OBJ } from './worldwide';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nexport const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] as const;\nexport type ConsoleLevel = typeof CONSOLE_LEVELS[number];\n\ntype LoggerMethod = (...args: unknown[]) => void;\ntype LoggerConsoleMethods = Record;\n\n/** JSDoc */\ninterface Logger extends LoggerConsoleMethods {\n disable(): void;\n enable(): void;\n}\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox(callback: () => T): T {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const originalConsole = GLOBAL_OBJ.console as Console & Record;\n const wrappedLevels: Partial = {};\n\n // Restore all wrapped console methods\n CONSOLE_LEVELS.forEach(level => {\n // TODO(v7): Remove this check as it's only needed for Node 6\n const originalWrappedFunc =\n originalConsole[level] && (originalConsole[level] as WrappedFunction).__sentry_original__;\n if (level in originalConsole && originalWrappedFunc) {\n wrappedLevels[level] = originalConsole[level] as LoggerConsoleMethods[typeof level];\n originalConsole[level] = originalWrappedFunc as Console[typeof level];\n }\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(level => {\n originalConsole[level] = wrappedLevels[level as typeof CONSOLE_LEVELS[number]];\n });\n }\n}\n\nfunction makeLogger(): Logger {\n let enabled = false;\n const logger: Partial = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n };\n\n if (__DEBUG_BUILD__) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args: any[]) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger as Logger;\n}\n\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nlet logger: Logger;\nif (__DEBUG_BUILD__) {\n logger = getGlobalSingleton('logger', makeLogger);\n} else {\n logger = makeLogger();\n}\n\nexport { logger };\n"],"names":[],"mappings":";;AAIA;AACA,MAAA,MAAA,GAAA,gBAAA,CAAA;AACA;AACA,MAAA,cAAA,GAAA,CAAA,OAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,KAAA,EAAA,QAAA,EAAA,OAAA,CAAA,EAAA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,cAAA,CAAA,QAAA,EAAA;AACA,EAAA,IAAA,EAAA,SAAA,IAAA,UAAA,CAAA,EAAA;AACA,IAAA,OAAA,QAAA,EAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,MAAA,eAAA,GAAA,UAAA,CAAA,OAAA,EAAA;AACA,EAAA,MAAA,aAAA,GAAA,EAAA,CAAA;AACA;AACA;AACA,EAAA,cAAA,CAAA,OAAA,CAAA,KAAA,IAAA;AACA;AACA,IAAA,MAAA,mBAAA;AACA,MAAA,eAAA,CAAA,KAAA,CAAA,IAAA,CAAA,eAAA,CAAA,KAAA,CAAA,GAAA,mBAAA,CAAA;AACA,IAAA,IAAA,KAAA,IAAA,eAAA,I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AACA,MAAA,MAAA,CAAA,IAAA,CAAA,GAAA,MAAA,SAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,MAAA,EAAA;AACA,CAAA;AACA;AACA;AACA,IAAA,OAAA;AACA,KAAA,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA,GAAA;AACA,EAAA,MAAA,GAAA,kBAAA,CAAA,QAAA,EAAA,UAAA,CAAA,CAAA;AACA,CAAA,MAAA;AACA,EAAA,MAAA,GAAA,UAAA,EAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/memo.js b/node_modules/@sentry/utils/esm/memo.js deleted file mode 100644 index fe00c9c..0000000 --- a/node_modules/@sentry/utils/esm/memo.js +++ /dev/null @@ -1,45 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -/** - * Helper to decycle json objects - */ -function memoBuilder() { - const hasWeakSet = typeof WeakSet === 'function'; - const inner = hasWeakSet ? new WeakSet() : []; - function memoize(obj) { - if (hasWeakSet) { - if (inner.has(obj)) { - return true; - } - inner.add(obj); - return false; - } - // eslint-disable-next-line @typescript-eslint/prefer-for-of - for (let i = 0; i < inner.length; i++) { - const value = inner[i]; - if (value === obj) { - return true; - } - } - inner.push(obj); - return false; - } - - function unmemoize(obj) { - if (hasWeakSet) { - inner.delete(obj); - } else { - for (let i = 0; i < inner.length; i++) { - if (inner[i] === obj) { - inner.splice(i, 1); - break; - } - } - } - } - return [memoize, unmemoize]; -} - -export { memoBuilder }; -//# sourceMappingURL=memo.js.map diff --git a/node_modules/@sentry/utils/esm/memo.js.map b/node_modules/@sentry/utils/esm/memo.js.map deleted file mode 100644 index ef650e5..0000000 --- a/node_modules/@sentry/utils/esm/memo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"memo.js","sources":["../../src/memo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport type MemoFunc = [\n // memoize\n (obj: any) => boolean,\n // unmemoize\n (obj: any) => void,\n];\n\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder(): MemoFunc {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner: any = hasWeakSet ? new WeakSet() : [];\n function memoize(obj: any): boolean {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj: any): void {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n"],"names":[],"mappings":"AAAA;AACA;;AASA;AACA;AACA;AACA,SAAA,WAAA,GAAA;AACA,EAAA,MAAA,UAAA,GAAA,OAAA,OAAA,KAAA,UAAA,CAAA;AACA,EAAA,MAAA,KAAA,GAAA,UAAA,GAAA,IAAA,OAAA,EAAA,GAAA,EAAA,CAAA;AACA,EAAA,SAAA,OAAA,CAAA,GAAA,EAAA;AACA,IAAA,IAAA,UAAA,EAAA;AACA,MAAA,IAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,EAAA;AACA,QAAA,OAAA,IAAA,CAAA;AACA,OAAA;AACA,MAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,CAAA;AACA,MAAA,OAAA,KAAA,CAAA;AACA,KAAA;AACA;AACA,IAAA,KAAA,IAAA,CAAA,GAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA,MAAA,EAAA,CAAA,EAAA,EAAA;AACA,MAAA,MAAA,KAAA,GAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,MAAA,IAAA,KAAA,KAAA,GAAA,EAAA;AACA,QAAA,OAAA,IAAA,CAAA;AACA,OAAA;AACA,KAAA;AACA,IAAA,KAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,SAAA,SAAA,CAAA,GAAA,EAAA;AACA,IAAA,IAAA,UAAA,EAAA;AACA,MAAA,KAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA;AACA,KAAA,MAAA;AACA,MAAA,KAAA,IAAA,CAAA,GAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA,MAAA,EAAA,CAAA,EAAA,EAAA;AACA,QAAA,IAAA,KAAA,CAAA,CAAA,CAAA,KAAA,GAAA,EAAA;AACA,UAAA,KAAA,CAAA,MAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,UAAA,MAAA;AACA,SAAA;AACA,OAAA;AACA,KAAA;AACA,GAAA;AACA,EAAA,OAAA,CAAA,OAAA,EAAA,SAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/misc.js b/node_modules/@sentry/utils/esm/misc.js deleted file mode 100644 index 858f159..0000000 --- a/node_modules/@sentry/utils/esm/misc.js +++ /dev/null @@ -1,197 +0,0 @@ -import { addNonEnumerableProperty } from './object.js'; -import { snipLine } from './string.js'; -import { GLOBAL_OBJ } from './worldwide.js'; - -/** - * UUID4 generator - * - * @returns string Generated UUID4. - */ -function uuid4() { - const gbl = GLOBAL_OBJ ; - const crypto = gbl.crypto || gbl.msCrypto; - - if (crypto && crypto.randomUUID) { - return crypto.randomUUID().replace(/-/g, ''); - } - - const getRandomByte = - crypto && crypto.getRandomValues ? () => crypto.getRandomValues(new Uint8Array(1))[0] : () => Math.random() * 16; - - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 - // Concatenating the following numbers as strings results in '10000000100040008000100000000000' - return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c => - // eslint-disable-next-line no-bitwise - ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16), - ); -} - -function getFirstException(event) { - return event.exception && event.exception.values ? event.exception.values[0] : undefined; -} - -/** - * Extracts either message or type+value from an event that can be used for user-facing logs - * @returns event's description - */ -function getEventDescription(event) { - const { message, event_id: eventId } = event; - if (message) { - return message; - } - - const firstException = getFirstException(event); - if (firstException) { - if (firstException.type && firstException.value) { - return `${firstException.type}: ${firstException.value}`; - } - return firstException.type || firstException.value || eventId || ''; - } - return eventId || ''; -} - -/** - * Adds exception values, type and value to an synthetic Exception. - * @param event The event to modify. - * @param value Value of the exception. - * @param type Type of the exception. - * @hidden - */ -function addExceptionTypeValue(event, value, type) { - const exception = (event.exception = event.exception || {}); - const values = (exception.values = exception.values || []); - const firstException = (values[0] = values[0] || {}); - if (!firstException.value) { - firstException.value = value || ''; - } - if (!firstException.type) { - firstException.type = type || 'Error'; - } -} - -/** - * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed. - * - * @param event The event to modify. - * @param newMechanism Mechanism data to add to the event. - * @hidden - */ -function addExceptionMechanism(event, newMechanism) { - const firstException = getFirstException(event); - if (!firstException) { - return; - } - - const defaultMechanism = { type: 'generic', handled: true }; - const currentMechanism = firstException.mechanism; - firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }; - - if (newMechanism && 'data' in newMechanism) { - const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data }; - firstException.mechanism.data = mergedData; - } -} - -// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string -const SEMVER_REGEXP = - /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; - -/** - * Represents Semantic Versioning object - */ - -/** - * Parses input into a SemVer interface - * @param input string representation of a semver version - */ -function parseSemver(input) { - const match = input.match(SEMVER_REGEXP) || []; - const major = parseInt(match[1], 10); - const minor = parseInt(match[2], 10); - const patch = parseInt(match[3], 10); - return { - buildmetadata: match[5], - major: isNaN(major) ? undefined : major, - minor: isNaN(minor) ? undefined : minor, - patch: isNaN(patch) ? undefined : patch, - prerelease: match[4], - }; -} - -/** - * This function adds context (pre/post/line) lines to the provided frame - * - * @param lines string[] containing all lines - * @param frame StackFrame that will be mutated - * @param linesOfContext number of context lines we want to add pre/post - */ -function addContextToFrame(lines, frame, linesOfContext = 5) { - // When there is no line number in the frame, attaching context is nonsensical and will even break grouping - if (frame.lineno === undefined) { - return; - } - - const maxLines = lines.length; - const sourceLine = Math.max(Math.min(maxLines, frame.lineno - 1), 0); - - frame.pre_context = lines - .slice(Math.max(0, sourceLine - linesOfContext), sourceLine) - .map((line) => snipLine(line, 0)); - - frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); - - frame.post_context = lines - .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext) - .map((line) => snipLine(line, 0)); -} - -/** - * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object - * in question), and marks it captured if not. - * - * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and - * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so - * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because - * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not - * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This - * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we - * see it. - * - * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on - * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent - * object wrapper forms so that this check will always work. However, because we need to flag the exact object which - * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification - * must be done before the exception captured. - * - * @param A thrown exception to check or flag as having been seen - * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen) - */ -function checkOrSetAlreadyCaught(exception) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (exception && (exception ).__sentry_captured__) { - return true; - } - - try { - // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the - // `ExtraErrorData` integration - addNonEnumerableProperty(exception , '__sentry_captured__', true); - } catch (err) { - // `exception` is a primitive, so we can't mark it seen - } - - return false; -} - -/** - * Checks whether the given input is already an array, and if it isn't, wraps it in one. - * - * @param maybeArray Input to turn into an array, if necessary - * @returns The input, if already an array, or an array with the input as the only element, if not - */ -function arrayify(maybeArray) { - return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; -} - -export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 }; -//# sourceMappingURL=misc.js.map diff --git a/node_modules/@sentry/utils/esm/misc.js.map b/node_modules/@sentry/utils/esm/misc.js.map deleted file mode 100644 index 2090446..0000000 --- a/node_modules/@sentry/utils/esm/misc.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"misc.js","sources":["../../src/misc.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { Event, Exception, Mechanism, StackFrame } from '@sentry/types';\n\nimport { addNonEnumerableProperty } from './object';\nimport { snipLine } from './string';\nimport { GLOBAL_OBJ } from './worldwide';\n\ninterface CryptoInternal {\n getRandomValues(array: Uint8Array): Uint8Array;\n randomUUID?(): string;\n}\n\n/** An interface for common properties on global */\ninterface CryptoGlobal {\n msCrypto?: CryptoInternal;\n crypto?: CryptoInternal;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const gbl = GLOBAL_OBJ as typeof GLOBAL_OBJ & CryptoGlobal;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n\n const getRandomByte =\n crypto && crypto.getRandomValues ? () => crypto.getRandomValues(new Uint8Array(1))[0] : () => Math.random() * 16;\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] as unknown as string) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c as unknown as number) ^ ((getRandomByte() & 15) >> ((c as unknown as number) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event: Event): Exception | undefined {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event: Event, newMechanism?: Partial): void {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception: unknown): boolean {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception as any).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception as { [key: string]: unknown }, '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nexport function arrayify(maybeArray: T | T[]): T[] {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n"],"names":[],"mappings":";;;;AAkBA;AACA;AACA;AACA;AACA;AACA,SAAA,KAAA,GAAA;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,uBAAA,CAAA,SAAA,EAAA;AACA;AACA,EAAA,IAAA,SAAA,IAAA,CAAA,SAAA,GAAA,mBAAA,EAAA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA;AACA;AACA;AACA,IAAA,wBAAA,CAAA,SAAA,GAAA,qBAAA,EAAA,IAAA,CAAA,CAAA;AACA,GAAA,CAAA,OAAA,GAAA,EAAA;AACA;AACA,GAAA;AACA;AACA,EAAA,OAAA,KAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,QAAA,CAAA,UAAA,EAAA;AACA,EAAA,OAAA,KAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,UAAA,GAAA,CAAA,UAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/object.js b/node_modules/@sentry/utils/esm/object.js deleted file mode 100644 index 0f5c411..0000000 --- a/node_modules/@sentry/utils/esm/object.js +++ /dev/null @@ -1,279 +0,0 @@ -import { htmlTreeAsString } from './browser.js'; -import { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js'; -import { truncate } from './string.js'; - -/** - * Replace a method in an object with a wrapped version of itself. - * - * @param source An object that contains a method to be wrapped. - * @param name The name of the method to be wrapped. - * @param replacementFactory A higher-order function that takes the original version of the given method and returns a - * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to - * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`. - * @returns void - */ -function fill(source, name, replacementFactory) { - if (!(name in source)) { - return; - } - - const original = source[name] ; - const wrapped = replacementFactory(original) ; - - // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work - // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" - if (typeof wrapped === 'function') { - try { - markFunctionWrapped(wrapped, original); - } catch (_Oo) { - // This can throw if multiple fill happens on a global object like XMLHttpRequest - // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 - } - } - - source[name] = wrapped; -} - -/** - * Defines a non-enumerable property on the given object. - * - * @param obj The object on which to set the property - * @param name The name of the property to be set - * @param value The value to which to set the property - */ -function addNonEnumerableProperty(obj, name, value) { - Object.defineProperty(obj, name, { - // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it - value: value, - writable: true, - configurable: true, - }); -} - -/** - * Remembers the original function on the wrapped function and - * patches up the prototype. - * - * @param wrapped the wrapper function - * @param original the original function that gets wrapped - */ -function markFunctionWrapped(wrapped, original) { - const proto = original.prototype || {}; - wrapped.prototype = original.prototype = proto; - addNonEnumerableProperty(wrapped, '__sentry_original__', original); -} - -/** - * This extracts the original function if available. See - * `markFunctionWrapped` for more information. - * - * @param func the function to unwrap - * @returns the unwrapped version of the function if available. - */ -function getOriginalFunction(func) { - return func.__sentry_original__; -} - -/** - * Encodes given object into url-friendly format - * - * @param object An object that contains serializable values - * @returns string Encoded - */ -function urlEncode(object) { - return Object.keys(object) - .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`) - .join('&'); -} - -/** - * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their - * non-enumerable properties attached. - * - * @param value Initial source that we have to transform in order for it to be usable by the serializer - * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor - * an Error. - */ -function convertToPlainObject(value) - - { - if (isError(value)) { - return { - message: value.message, - name: value.name, - stack: value.stack, - ...getOwnProperties(value), - }; - } else if (isEvent(value)) { - const newObj - - = { - type: value.type, - target: serializeEventTarget(value.target), - currentTarget: serializeEventTarget(value.currentTarget), - ...getOwnProperties(value), - }; - - if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) { - newObj.detail = value.detail; - } - - return newObj; - } else { - return value; - } -} - -/** Creates a string representation of the target of an `Event` object */ -function serializeEventTarget(target) { - try { - return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target); - } catch (_oO) { - return ''; - } -} - -/** Filters out all but an object's own properties */ -function getOwnProperties(obj) { - if (typeof obj === 'object' && obj !== null) { - const extractedProps = {}; - for (const property in obj) { - if (Object.prototype.hasOwnProperty.call(obj, property)) { - extractedProps[property] = (obj )[property]; - } - } - return extractedProps; - } else { - return {}; - } -} - -/** - * Given any captured exception, extract its keys and create a sorted - * and truncated list that will be used inside the event message. - * eg. `Non-error exception captured with keys: foo, bar, baz` - */ -function extractExceptionKeysForMessage(exception, maxLength = 40) { - const keys = Object.keys(convertToPlainObject(exception)); - keys.sort(); - - if (!keys.length) { - return '[object has no keys]'; - } - - if (keys[0].length >= maxLength) { - return truncate(keys[0], maxLength); - } - - for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { - const serialized = keys.slice(0, includedKeys).join(', '); - if (serialized.length > maxLength) { - continue; - } - if (includedKeys === keys.length) { - return serialized; - } - return truncate(serialized, maxLength); - } - - return ''; -} - -/** - * Given any object, return a new object having removed all fields whose value was `undefined`. - * Works recursively on objects and arrays. - * - * Attention: This function keeps circular references in the returned object. - */ -function dropUndefinedKeys(inputValue) { - // This map keeps track of what already visited nodes map to. - // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular - // references as the input object. - const memoizationMap = new Map(); - - // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API - return _dropUndefinedKeys(inputValue, memoizationMap); -} - -function _dropUndefinedKeys(inputValue, memoizationMap) { - if (isPlainObject(inputValue)) { - // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object - const memoVal = memoizationMap.get(inputValue); - if (memoVal !== undefined) { - return memoVal ; - } - - const returnValue = {}; - // Store the mapping of this value in case we visit it again, in case of circular data - memoizationMap.set(inputValue, returnValue); - - for (const key of Object.keys(inputValue)) { - if (typeof inputValue[key] !== 'undefined') { - returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap); - } - } - - return returnValue ; - } - - if (Array.isArray(inputValue)) { - // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object - const memoVal = memoizationMap.get(inputValue); - if (memoVal !== undefined) { - return memoVal ; - } - - const returnValue = []; - // Store the mapping of this value in case we visit it again, in case of circular data - memoizationMap.set(inputValue, returnValue); - - inputValue.forEach((item) => { - returnValue.push(_dropUndefinedKeys(item, memoizationMap)); - }); - - return returnValue ; - } - - return inputValue; -} - -/** - * Ensure that something is an object. - * - * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper - * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives. - * - * @param wat The subject of the objectification - * @returns A version of `wat` which can safely be used with `Object` class methods - */ -function objectify(wat) { - let objectified; - switch (true) { - case wat === undefined || wat === null: - objectified = new String(wat); - break; - - // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason - // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as - // an object in order to wrap it. - case typeof wat === 'symbol' || typeof wat === 'bigint': - objectified = Object(wat); - break; - - // this will catch the remaining primitives: `String`, `Number`, and `Boolean` - case isPrimitive(wat): - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - objectified = new (wat ).constructor(wat); - break; - - // by process of elimination, at this point we know that `wat` must already be an object - default: - objectified = wat; - break; - } - return objectified; -} - -export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode }; -//# sourceMappingURL=object.js.map diff --git a/node_modules/@sentry/utils/esm/object.js.map b/node_modules/@sentry/utils/esm/object.js.map deleted file mode 100644 index f8503ee..0000000 --- a/node_modules/@sentry/utils/esm/object.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.js","sources":["../../src/object.ts"],"sourcesContent":["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { WrappedFunction } from '@sentry/types';\n\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive } from './is';\nimport { truncate } from './string';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacementFactory: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacementFactory(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n try {\n markFunctionWrapped(wrapped, original);\n } catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj: { [key: string]: unknown }, name: string, value: unknown): void {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nexport function getOriginalFunction(func: WrappedFunction): WrappedFunction | undefined {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nexport function convertToPlainObject(value: V):\n | {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n }\n | {\n [ownProps: string]: unknown;\n message: string;\n name: string;\n stack?: string;\n }\n | V {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj: {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n } = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target: unknown): string {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj: unknown): { [key: string]: unknown } {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps: { [key: string]: unknown } = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj as Record)[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: Record, maxLength: number = 40): string {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nexport function dropUndefinedKeys(inputValue: T): T {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue: T, memoizationMap: Map): T {\n if (isPlainObject(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: { [key: string]: any } = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue as T;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: unknown[] = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item: unknown) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue as unknown as T;\n }\n\n return inputValue;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat: unknown): typeof Object {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat as any).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n"],"names":[],"mappings":";;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,IAAA,CAAA,MAAA,EAAA,IAAA,EAAA,kBAAA,EAAA;AACA,EAAA,IAAA,EAAA,IAAA,IAAA,MAAA,CAAA,EAAA;AACA,IAAA,OAAA;AACA,GAAA;AACA;AACA,EAAA,MAAA,QAAA,GAAA,MAAA,CAAA,IAAA,CAAA,EAAA;AACA,EAAA,MAAA,OAAA,GAAA,kBAAA,CAAA,QAAA,CAAA,EAAA;AACA;AACA;AACA;AACA,EAAA,IAAA,OAAA,OAAA,KAAA,UAAA,EAAA;AACA,IAA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,CAAA,UAAA,CAAA,CAAA;AACA,IAAA,IAAA,OAAA,KAAA,SAAA,EAAA;AACA,MAAA,OAAA,OAAA,EAAA;AACA,KAAA;AACA;AACA,IAAA,MAAA,WAAA,GAAA,EAAA,CAAA;AACA;AACA,IAAA,cAAA,CAAA,GAAA,CAAA,UAAA,EAAA,WAAA,CAAA,CAAA;AACA;AACA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,IAAA,KAAA;AACA,MAAA,WAAA,CAAA,IAAA,CAAA,kBAAA,CAAA,IAAA,EAAA,cAAA,CAAA,CAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA;AACA,IAAA,OAAA,WAAA,EAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,UAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,SAAA,CAAA,GAAA,EAAA;AACA,EAAA,IAAA,WAAA,CAAA;AACA,EAAA,QAAA,IAAA;AACA,IAAA,KAAA,GAAA,KAAA,SAAA,IAAA,GAAA,KAAA,IAAA;AACA,MAAA,WAAA,GAAA,IAAA,MAAA,CAAA,GAAA,CAAA,CAAA;AACA,MAAA,MAAA;AACA;AACA;AACA;AACA;AACA,IAAA,KAAA,OAAA,GAAA,KAAA,QAAA,IAAA,OAAA,GAAA,KAAA,QAAA;AACA,MAAA,WAAA,GAAA,MAAA,CAAA,GAAA,CAAA,CAAA;AACA,MAAA,MAAA;AACA;AACA;AACA,IAAA,KAAA,WAAA,CAAA,GAAA,CAAA;AACA;AACA,MAAA,WAAA,GAAA,IAAA,CAAA,GAAA,GAAA,WAAA,CAAA,GAAA,CAAA,CAAA;AACA,MAAA,MAAA;AACA;AACA;AACA,IAAA;AACA,MAAA,WAAA,GAAA,GAAA,CAAA;AACA,MAAA,MAAA;AACA,GAAA;AACA,EAAA,OAAA,WAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/path.js b/node_modules/@sentry/utils/esm/path.js deleted file mode 100644 index 65d3576..0000000 --- a/node_modules/@sentry/utils/esm/path.js +++ /dev/null @@ -1,188 +0,0 @@ -// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript -// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js - -/** JSDoc */ -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - let up = 0; - for (let i = parts.length - 1; i >= 0; i--) { - const last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -const splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/; -/** JSDoc */ -function splitPath(filename) { - const parts = splitPathRe.exec(filename); - return parts ? parts.slice(1) : []; -} - -// path.resolve([from ...], to) -// posix version -/** JSDoc */ -function resolve(...args) { - let resolvedPath = ''; - let resolvedAbsolute = false; - - for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { - const path = i >= 0 ? args[i] : '/'; - - // Skip empty entries - if (!path) { - continue; - } - - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray( - resolvedPath.split('/').filter(p => !!p), - !resolvedAbsolute, - ).join('/'); - - return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; -} - -/** JSDoc */ -function trim(arr) { - let start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') { - break; - } - } - - let end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') { - break; - } - } - - if (start > end) { - return []; - } - return arr.slice(start, end - start + 1); -} - -// path.relative(from, to) -// posix version -/** JSDoc */ -function relative(from, to) { - /* eslint-disable no-param-reassign */ - from = resolve(from).slice(1); - to = resolve(to).slice(1); - /* eslint-enable no-param-reassign */ - - const fromParts = trim(from.split('/')); - const toParts = trim(to.split('/')); - - const length = Math.min(fromParts.length, toParts.length); - let samePartsLength = length; - for (let i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - let outputParts = []; - for (let i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -} - -// path.normalize(path) -// posix version -/** JSDoc */ -function normalizePath(path) { - const isPathAbsolute = isAbsolute(path); - const trailingSlash = path.slice(-1) === '/'; - - // Normalize the path - let normalizedPath = normalizeArray( - path.split('/').filter(p => !!p), - !isPathAbsolute, - ).join('/'); - - if (!normalizedPath && !isPathAbsolute) { - normalizedPath = '.'; - } - if (normalizedPath && trailingSlash) { - normalizedPath += '/'; - } - - return (isPathAbsolute ? '/' : '') + normalizedPath; -} - -// posix version -/** JSDoc */ -function isAbsolute(path) { - return path.charAt(0) === '/'; -} - -// posix version -/** JSDoc */ -function join(...args) { - return normalizePath(args.join('/')); -} - -/** JSDoc */ -function dirname(path) { - const result = splitPath(path); - const root = result[0]; - let dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.slice(0, dir.length - 1); - } - - return root + dir; -} - -/** JSDoc */ -function basename(path, ext) { - let f = splitPath(path)[2]; - if (ext && f.slice(ext.length * -1) === ext) { - f = f.slice(0, f.length - ext.length); - } - return f; -} - -export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve }; -//# sourceMappingURL=path.js.map diff --git a/node_modules/@sentry/utils/esm/path.js.map b/node_modules/@sentry/utils/esm/path.js.map deleted file mode 100644 index 994a9a1..0000000 --- a/node_modules/@sentry/utils/esm/path.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"path.js","sources":["../../src/path.ts"],"sourcesContent":["// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(\n resolvedPath.split('/').filter(p => !!p),\n !resolvedAbsolute,\n ).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n /* eslint-disable no-param-reassign */\n from = resolve(from).slice(1);\n to = resolve(to).slice(1);\n /* eslint-enable no-param-reassign */\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.slice(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(\n path.split('/').filter(p => !!p),\n !isPathAbsolute,\n ).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.slice(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.slice(ext.length * -1) === ext) {\n f = f.slice(0, f.length - ext.length);\n }\n return f;\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,SAAA,cAAA,CAAA,KAAA,EAAA,cAAA,EAAA;AACA;AACA,EAAA,IAAA,EAAA,GAAA,CAAA,CAAA;AACA,EAAA,KAAA,IAAA,CAAA,GAAA,KAAA,CAAA,MAAA,GAAA,CAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,EAAA,EAAA;AACA,IAAA,MAAA,IAAA,GAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,IAAA,IAAA,IAAA,KAAA,GAAA,EAAA;AACA,MAAA,KAAA,CAAA,MAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,KAAA,MAAA,IAAA,IAAA,KAAA,IAAA,EAAA;AACA,MAAA,KAAA,CAAA,MAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,MAAA,EAAA,EAAA,CAAA;AACA,KAAA,MAAA,IAAA,EAAA,EAAA;AACA,MAAA,KAAA,CAAA,MAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AACA,MAAA,EAAA,EAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;AACA;AACA,EAAA,IAAA,cAAA,EAAA;AACA,IAAA,OAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AACA,MAAA,KAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,KAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA,MAAA,WAAA,GAAA,4DAAA,CAAA;AACA;AACA,SAAA,SAAA,CAAA,QAAA,EAAA;AACA,EAAA,MAAA,KAAA,GAAA,WAAA,CAAA,IAAA,CAAA,QAAA,CAAA,CAAA;AACA,EAAA,OAAA,KAAA,GAAA,KAAA,CAAA,KAA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,CAAA;AACA;AACA;AACA;AACA,SAAA,IAAA,CAAA,GAAA,IAAA,EAAA;AACA,EAAA,OAAA,aAAA,CAAA,IAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,OAAA,CAAA,IAAA,EAAA;AACA,EAAA,MAAA,MAAA,GAAA,SAAA,CAAA,IAAA,CAAA,CAAA;AACA,EAAA,MAAA,IAAA,GAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACA,EAAA,IAAA,GAAA,GAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACA;AACA,EAAA,IAAA,CAAA,IAAA,IAAA,CAAA,GAAA,EAAA;AACA;AACA,IAAA,OAAA,GAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA,GAAA,EAAA;AACA;AACA,IAAA,GAAA,GAAA,GAAA,CAAA,KAAA,CAAA,CAAA,EAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,IAAA,GAAA,GAAA,CAAA;AACA,CAAA;AACA;AACA;AACA,SAAA,QAAA,CAAA,IAAA,EAAA,GAAA,EAAA;AACA,EAAA,IAAA,CAAA,GAAA,SAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,EAAA,IAAA,GAAA,IAAA,CAAA,CAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA,KAAA,GAAA,EAAA;AACA,IAAA,CAAA,GAAA,CAAA,CAAA,KAAA,CAAA,CAAA,EAAA,CAAA,CAAA,MAAA,GAAA,GAAA,CAAA,MAAA,CAAA,CAAA;AACA,GAAA;AACA,EAAA,OAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/promisebuffer.js b/node_modules/@sentry/utils/esm/promisebuffer.js deleted file mode 100644 index fea1ed0..0000000 --- a/node_modules/@sentry/utils/esm/promisebuffer.js +++ /dev/null @@ -1,102 +0,0 @@ -import { SentryError } from './error.js'; -import { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js'; - -/** - * Creates an new PromiseBuffer object with the specified limit - * @param limit max number of promises that can be stored in the buffer - */ -function makePromiseBuffer(limit) { - const buffer = []; - - function isReady() { - return limit === undefined || buffer.length < limit; - } - - /** - * Remove a promise from the queue. - * - * @param task Can be any PromiseLike - * @returns Removed promise. - */ - function remove(task) { - return buffer.splice(buffer.indexOf(task), 1)[0]; - } - - /** - * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment. - * - * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task: - * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor - * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By - * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer - * limit check. - * @returns The original promise. - */ - function add(taskProducer) { - if (!isReady()) { - return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.')); - } - - // start the task and add its promise to the queue - const task = taskProducer(); - if (buffer.indexOf(task) === -1) { - buffer.push(task); - } - void task - .then(() => remove(task)) - // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike` - // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't - // have promises, so TS has to polyfill when down-compiling.) - .then(null, () => - remove(task).then(null, () => { - // We have to add another catch here because `remove()` starts a new promise chain. - }), - ); - return task; - } - - /** - * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first. - * - * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or - * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to - * `true`. - * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and - * `false` otherwise - */ - function drain(timeout) { - return new SyncPromise((resolve, reject) => { - let counter = buffer.length; - - if (!counter) { - return resolve(true); - } - - // wait for `timeout` ms and then resolve to `false` (if not cancelled first) - const capturedSetTimeout = setTimeout(() => { - if (timeout && timeout > 0) { - resolve(false); - } - }, timeout); - - // if all promises resolve in time, cancel the timer and resolve to `true` - buffer.forEach(item => { - void resolvedSyncPromise(item).then(() => { - if (!--counter) { - clearTimeout(capturedSetTimeout); - resolve(true); - } - }, reject); - }); - }); - } - - return { - $: buffer, - add, - drain, - }; -} - -export { makePromiseBuffer }; -//# sourceMappingURL=promisebuffer.js.map diff --git a/node_modules/@sentry/utils/esm/promisebuffer.js.map b/node_modules/@sentry/utils/esm/promisebuffer.js.map deleted file mode 100644 index 2f11550..0000000 --- a/node_modules/@sentry/utils/esm/promisebuffer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promisebuffer.js","sources":["../../src/promisebuffer.ts"],"sourcesContent":["import { SentryError } from './error';\nimport { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';\n\nexport interface PromiseBuffer {\n // exposes the internal array so tests can assert on the state of it.\n // XXX: this really should not be public api.\n $: Array>;\n add(taskProducer: () => PromiseLike): PromiseLike;\n drain(timeout?: number): PromiseLike;\n}\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit?: number): PromiseBuffer {\n const buffer: Array> = [];\n\n function isReady(): boolean {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task: PromiseLike): PromiseLike {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer: () => PromiseLike): PromiseLike {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout?: number): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n"],"names":[],"mappings":";;;AAWA;AACA;AACA;AACA;AACA,SAAA,iBAAA,CAAA,KAAA,EAAA;AACA,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA;AACA;AACA,EAAA,SAAA,OAAA,GAAA;AACA,IAAA,OAAA,KAAA,KAAA,SAAA,IAAA,MAAA,CAAA,MAAA,GAAA,KAAA,CAAA;AACA,GAAA;AACA;A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,GAAA,UAAA,CAAA,MAAA;AACA,QAAA,IAAA,OAAA,IAAA,OAAA,GAAA,CAAA,EAAA;AACA,UAAA,OAAA,CAAA,KAAA,CAAA,CAAA;AACA,SAAA;AACA,OAAA,EAAA,OAAA,CAAA,CAAA;AACA;AACA;AACA,MAAA,MAAA,CAAA,OAAA,CAAA,IAAA,IAAA;AACA,QAAA,KAAA,mBAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AACA,UAAA,IAAA,CAAA,EAAA,OAAA,EAAA;AACA,YAAA,YAAA,CAAA,kBAAA,CAAA,CAAA;AACA,YAAA,OAAA,CAAA,IAAA,CAAA,CAAA;AACA,WAAA;AACA,SAAA,EAAA,MAAA,CAAA,CAAA;AACA,OAAA,CAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA;AACA,IAAA,CAAA,EAAA,MAAA;AACA,IAAA,GAAA;AACA,IAAA,KAAA;AACA,GAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/string.js b/node_modules/@sentry/utils/esm/string.js deleted file mode 100644 index e5c0130..0000000 --- a/node_modules/@sentry/utils/esm/string.js +++ /dev/null @@ -1,149 +0,0 @@ -import { isString, isRegExp } from './is.js'; - -/** - * Truncates given string to the maximum characters count - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string (0 = unlimited) - * @returns string Encoded - */ -function truncate(str, max = 0) { - if (typeof str !== 'string' || max === 0) { - return str; - } - return str.length <= max ? str : `${str.slice(0, max)}...`; -} - -/** - * This is basically just `trim_line` from - * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ -function snipLine(line, colno) { - let newLine = line; - const lineLength = newLine.length; - if (lineLength <= 150) { - return newLine; - } - if (colno > lineLength) { - // eslint-disable-next-line no-param-reassign - colno = lineLength; - } - - let start = Math.max(colno - 60, 0); - if (start < 5) { - start = 0; - } - - let end = Math.min(start + 140, lineLength); - if (end > lineLength - 5) { - end = lineLength; - } - if (end === lineLength) { - start = Math.max(end - 140, 0); - } - - newLine = newLine.slice(start, end); - if (start > 0) { - newLine = `'{snip} ${newLine}`; - } - if (end < lineLength) { - newLine += ' {snip}'; - } - - return newLine; -} - -/** - * Join values in array - * @param input array of values to be joined together - * @param delimiter string to be placed in-between values - * @returns Joined values - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function safeJoin(input, delimiter) { - if (!Array.isArray(input)) { - return ''; - } - - const output = []; - // eslint-disable-next-line @typescript-eslint/prefer-for-of - for (let i = 0; i < input.length; i++) { - const value = input[i]; - try { - output.push(String(value)); - } catch (e) { - output.push('[value cannot be serialized]'); - } - } - - return output.join(delimiter); -} - -/** - * Checks if the given value matches a regex or string - * - * @param value The string to test - * @param pattern Either a regex or a string against which `value` will be matched - * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match - * `pattern` if it contains `pattern`. Only applies to string-type patterns. - */ -function isMatchingPattern( - value, - pattern, - requireExactStringMatch = false, -) { - if (!isString(value)) { - return false; - } - - if (isRegExp(pattern)) { - return pattern.test(value); - } - if (isString(pattern)) { - return requireExactStringMatch ? value === pattern : value.includes(pattern); - } - - return false; -} - -/** - * Test the given string against an array of strings and regexes. By default, string matching is done on a - * substring-inclusion basis rather than a strict equality basis - * - * @param testString The string to test - * @param patterns The patterns against which to test the string - * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to - * count. If false, `testString` will match a string pattern if it contains that pattern. - * @returns - */ -function stringMatchesSomePattern( - testString, - patterns = [], - requireExactStringMatch = false, -) { - return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch)); -} - -/** - * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to - * `new RegExp()`. - * - * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime - * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node - * 12+). - * - * @param regexString The string to escape - * @returns An version of the string with all special regex characters escaped - */ -function escapeStringForRegex(regexString) { - // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems - // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20. - return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d'); -} - -export { escapeStringForRegex, isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate }; -//# sourceMappingURL=string.js.map diff --git a/node_modules/@sentry/utils/esm/string.js.map b/node_modules/@sentry/utils/esm/string.js.map deleted file mode 100644 index 433671f..0000000 --- a/node_modules/@sentry/utils/esm/string.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.js","sources":["../../src/string.ts"],"sourcesContent":["import { isRegExp, isString } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nexport function isMatchingPattern(\n value: string,\n pattern: RegExp | string,\n requireExactStringMatch: boolean = false,\n): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nexport function stringMatchesSomePattern(\n testString: string,\n patterns: Array = [],\n requireExactStringMatch: boolean = false,\n): boolean {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString: string): string {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,QAAA,CAAA,GAAA,EAAA,GAAA,GAAA,CAAA,EAAA;AACA,EAAA,IAAA,OAAA,GAAA,KAAA,QAAA,IAAA,GAAA,KAAA,CAAA,EAAA;AACA,IAAA,OAAA,GAAA,CAAA;AACA,GAAA;AACA,EAAA,OAAA,GAAA,CAAA,MAAA,IAAA,GAAA,GAAA,GAAA,GAAA,CAAA,EAAA,GAAA,CAAA,KAAA,CAAA,CAAA,EAAA,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,QAAA,CAAA,IAAA,EAAA,KAAA,EAAA;AACA,EAAA,IAAA,OAAA,GAAA,IAAA,CAAA;AACA,EAAA,MAAA,UAAA,GAAA,OAAA,CAAA,MAAA,CAAA;AACA,EAAA,IAAA,UAAA,IAAA,GAAA,EAAA;AACA,IAAA,OAAA,OAAA,CAAA;AACA,GAAA;AACA,EAAA,IAAA,KAAA,GAAA,UAAA,EAAA;AACA;AACA,IAAA,KAAA,GAAA,UAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA,KAAA,GAAA,IAAA,CAAA,GAAA,CAAA,KAAA,GAAA,EAAA,EAAA,CAAA,CAAA,CAAA;AACA,EAAA,IAAA,KAAA,GAAA,CAAA,EAAA;AACA,IAAA,KAAA,GAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA,GAAA,GAAA,IAAA,CAAA,GAAA,CAAA,KAAA,GAAA,GAAA,EAAA,UAAA,CAA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A,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,iBAAA;AACA,EAAA,KAAA;AACA,EAAA,OAAA;AACA,EAAA,uBAAA,GAAA,KAAA;AACA,EAAA;AACA,EAAA,IAAA,CAAA,QAAA,CAAA,KAAA,CAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,IAAA,QAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,OAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA;AACA,GAAA;AACA,EAAA,IAAA,QAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,uBAAA,GAAA,KAAA,KAAA,OAAA,GAAA,KAAA,CAAA,QAAA,CAAA,OAAA,CAAA,CAAA;AACA,GAAA;AACA;AACA,EAAA,OAAA,KAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,wBAAA;AACA,EAAA,UAAA;AACA,EAAA,QAAA,GAAA,EAAA;AACA,EAAA,uBAAA,GAAA,KAAA;AACA,EAAA;AACA,EAAA,OAAA,QAAA,CAAA,IAAA,CAAA,OAAA,IAAA,iBAAA,CAAA,UAAA,EAAA,OAAA,EAAA,uBAAA,CAAA,CAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,oBAAA,CAAA,WAAA,EAAA;AACA;AACA;AACA,EAAA,OAAA,WAAA,CAAA,OAAA,CAAA,qBAAA,EAAA,MAAA,CAAA,CAAA,OAAA,CAAA,IAAA,EAAA,OAAA,CAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/supports.js b/node_modules/@sentry/utils/esm/supports.js deleted file mode 100644 index 16b2f82..0000000 --- a/node_modules/@sentry/utils/esm/supports.js +++ /dev/null @@ -1,181 +0,0 @@ -import { logger } from './logger.js'; -import { getGlobalObject } from './worldwide.js'; - -// eslint-disable-next-line deprecation/deprecation -const WINDOW = getGlobalObject(); - -/** - * Tells whether current environment supports ErrorEvent objects - * {@link supportsErrorEvent}. - * - * @returns Answer to the given question. - */ -function supportsErrorEvent() { - try { - new ErrorEvent(''); - return true; - } catch (e) { - return false; - } -} - -/** - * Tells whether current environment supports DOMError objects - * {@link supportsDOMError}. - * - * @returns Answer to the given question. - */ -function supportsDOMError() { - try { - // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError': - // 1 argument required, but only 0 present. - // @ts-ignore It really needs 1 argument, not 0. - new DOMError(''); - return true; - } catch (e) { - return false; - } -} - -/** - * Tells whether current environment supports DOMException objects - * {@link supportsDOMException}. - * - * @returns Answer to the given question. - */ -function supportsDOMException() { - try { - new DOMException(''); - return true; - } catch (e) { - return false; - } -} - -/** - * Tells whether current environment supports Fetch API - * {@link supportsFetch}. - * - * @returns Answer to the given question. - */ -function supportsFetch() { - if (!('fetch' in WINDOW)) { - return false; - } - - try { - new Headers(); - new Request('http://www.example.com'); - new Response(); - return true; - } catch (e) { - return false; - } -} -/** - * isNativeFetch checks if the given function is a native implementation of fetch() - */ -// eslint-disable-next-line @typescript-eslint/ban-types -function isNativeFetch(func) { - return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); -} - -/** - * Tells whether current environment supports Fetch API natively - * {@link supportsNativeFetch}. - * - * @returns true if `window.fetch` is natively implemented, false otherwise - */ -function supportsNativeFetch() { - if (!supportsFetch()) { - return false; - } - - // Fast path to avoid DOM I/O - // eslint-disable-next-line @typescript-eslint/unbound-method - if (isNativeFetch(WINDOW.fetch)) { - return true; - } - - // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) - // so create a "pure" iframe to see if that has native fetch - let result = false; - const doc = WINDOW.document; - // eslint-disable-next-line deprecation/deprecation - if (doc && typeof (doc.createElement ) === 'function') { - try { - const sandbox = doc.createElement('iframe'); - sandbox.hidden = true; - doc.head.appendChild(sandbox); - if (sandbox.contentWindow && sandbox.contentWindow.fetch) { - // eslint-disable-next-line @typescript-eslint/unbound-method - result = isNativeFetch(sandbox.contentWindow.fetch); - } - doc.head.removeChild(sandbox); - } catch (err) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && - logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); - } - } - - return result; -} - -/** - * Tells whether current environment supports ReportingObserver API - * {@link supportsReportingObserver}. - * - * @returns Answer to the given question. - */ -function supportsReportingObserver() { - return 'ReportingObserver' in WINDOW; -} - -/** - * Tells whether current environment supports Referrer Policy API - * {@link supportsReferrerPolicy}. - * - * @returns Answer to the given question. - */ -function supportsReferrerPolicy() { - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default' - // (see https://caniuse.com/#feat=referrer-policy), - // it doesn't. And it throws an exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - - if (!supportsFetch()) { - return false; - } - - try { - new Request('_', { - referrerPolicy: 'origin' , - }); - return true; - } catch (e) { - return false; - } -} - -/** - * Tells whether current environment supports History API - * {@link supportsHistory}. - * - * @returns Answer to the given question. - */ -function supportsHistory() { - // NOTE: in Chrome App environment, touching history.pushState, *even inside - // a try/catch block*, will cause Chrome to output an error to console.error - // borrowed from: https://github.com/angular/angular.js/pull/13945/files - /* eslint-disable @typescript-eslint/no-unsafe-member-access */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const chrome = (WINDOW ).chrome; - const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; - /* eslint-enable @typescript-eslint/no-unsafe-member-access */ - const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState; - - return !isChromePackagedApp && hasHistoryApi; -} - -export { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver }; -//# sourceMappingURL=supports.js.map diff --git a/node_modules/@sentry/utils/esm/supports.js.map b/node_modules/@sentry/utils/esm/supports.js.map deleted file mode 100644 index f0ff43a..0000000 --- a/node_modules/@sentry/utils/esm/supports.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"supports.js","sources":["../../src/supports.ts"],"sourcesContent":["import { logger } from './logger';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n __DEBUG_BUILD__ &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (WINDOW as any).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n"],"names":[],"mappings":";;;AAGA;AACA,MAAA,MAAA,GAAA,eAAA,EAAA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,kBAAA,GAAA;AACA,EAAA,IAAA;AACA,IAAA,IAAA,UAAA,CAAA,EAAA,CAAA,CAAA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,gBAAA,GAAA;AACA,EAAA,IAAA;AACA;AACA;AACA;AACA,IAAA,IAAA,QAAA,CAAA,EAAA,CAAA,CAAA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,oBAAA,GAAA;AACA,EAAA,IAAA;AACA,IAAA,IAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AACA,IAAA,OAAA,IAAA,CAAA;AACA,GAAA,CAAA,OAAA,CAAA,EAAA;AACA,IAAA,OAAA,KAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,aAAA,GAAA;AACA,EAAA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OAAA,CAAA,YAAA,CAAA;AACA;AACA,EAAA,OAAA,CAAA,mBAAA,IAAA,aAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/esm/syncpromise.js b/node_modules/@sentry/utils/esm/syncpromise.js deleted file mode 100644 index d1f680a..0000000 --- a/node_modules/@sentry/utils/esm/syncpromise.js +++ /dev/null @@ -1,191 +0,0 @@ -import { isThenable } from './is.js'; - -/* eslint-disable @typescript-eslint/explicit-function-return-type */ - -/** SyncPromise internal states */ -var States; (function (States) { - /** Pending */ - const PENDING = 0; States[States["PENDING"] = PENDING] = "PENDING"; - /** Resolved / OK */ - const RESOLVED = 1; States[States["RESOLVED"] = RESOLVED] = "RESOLVED"; - /** Rejected / Error */ - const REJECTED = 2; States[States["REJECTED"] = REJECTED] = "REJECTED"; -})(States || (States = {})); - -// Overloads so we can call resolvedSyncPromise without arguments and generic argument - -/** - * Creates a resolved sync promise. - * - * @param value the value to resolve the promise with - * @returns the resolved sync promise - */ -function resolvedSyncPromise(value) { - return new SyncPromise(resolve => { - resolve(value); - }); -} - -/** - * Creates a rejected sync promise. - * - * @param value the value to reject the promise with - * @returns the rejected sync promise - */ -function rejectedSyncPromise(reason) { - return new SyncPromise((_, reject) => { - reject(reason); - }); -} - -/** - * Thenable class that behaves like a Promise and follows it's interface - * but is not async internally - */ -class SyncPromise { - __init() {this._state = States.PENDING;} - __init2() {this._handlers = [];} - - constructor( - executor, - ) {;SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);SyncPromise.prototype.__init5.call(this);SyncPromise.prototype.__init6.call(this); - try { - executor(this._resolve, this._reject); - } catch (e) { - this._reject(e); - } - } - - /** JSDoc */ - then( - onfulfilled, - onrejected, - ) { - return new SyncPromise((resolve, reject) => { - this._handlers.push([ - false, - result => { - if (!onfulfilled) { - // TODO: ¯\_(ツ)_/¯ - // TODO: FIXME - resolve(result ); - } else { - try { - resolve(onfulfilled(result)); - } catch (e) { - reject(e); - } - } - }, - reason => { - if (!onrejected) { - reject(reason); - } else { - try { - resolve(onrejected(reason)); - } catch (e) { - reject(e); - } - } - }, - ]); - this._executeHandlers(); - }); - } - - /** JSDoc */ - catch( - onrejected, - ) { - return this.then(val => val, onrejected); - } - - /** JSDoc */ - finally(onfinally) { - return new SyncPromise((resolve, reject) => { - let val; - let isRejected; - - return this.then( - value => { - isRejected = false; - val = value; - if (onfinally) { - onfinally(); - } - }, - reason => { - isRejected = true; - val = reason; - if (onfinally) { - onfinally(); - } - }, - ).then(() => { - if (isRejected) { - reject(val); - return; - } - - resolve(val ); - }); - }); - } - - /** JSDoc */ - __init3() {this._resolve = (value) => { - this._setResult(States.RESOLVED, value); - };} - - /** JSDoc */ - __init4() {this._reject = (reason) => { - this._setResult(States.REJECTED, reason); - };} - - /** JSDoc */ - __init5() {this._setResult = (state, value) => { - if (this._state !== States.PENDING) { - return; - } - - if (isThenable(value)) { - void (value ).then(this._resolve, this._reject); - return; - } - - this._state = state; - this._value = value; - - this._executeHandlers(); - };} - - /** JSDoc */ - __init6() {this._executeHandlers = () => { - if (this._state === States.PENDING) { - return; - } - - const cachedHandlers = this._handlers.slice(); - this._handlers = []; - - cachedHandlers.forEach(handler => { - if (handler[0]) { - return; - } - - if (this._state === States.RESOLVED) { - // eslint-disable-next-line @typescript-eslint/no-floating-promises - handler[1](this._value ); - } - - if (this._state === States.REJECTED) { - handler[2](this._value); - } - - handler[0] = true; - }); - };} -} - -export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise }; -//# sourceMappingURL=syncpromise.js.map diff --git a/node_modules/@sentry/utils/esm/syncpromise.js.map b/node_modules/@sentry/utils/esm/syncpromise.js.map deleted file mode 100644 index 6c36ca7..0000000 --- a/node_modules/@sentry/utils/esm/syncpromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"syncpromise.js","sources":["../../src/syncpromise.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst enum States {\n /** Pending */\n PENDING = 0,\n /** Resolved / OK */\n RESOLVED = 1,\n /** Rejected / Error */\n REJECTED = 2,\n}\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\nexport function resolvedSyncPromise(): PromiseLike;\nexport function resolvedSyncPromise(value: T | PromiseLike): PromiseLike;\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise(value?: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val as unknown as any);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value as unknown as any);\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };\n}\n\nexport { SyncPromise };\n"],"names":[],"mappings":";;AAAA;AAKA;AACA;AACA,IAAA,MAAA,CAAA,CAAA,CAAA,UAAA,MAAA,EAAA;AACA;AACA,EAAA,MAAA,OAAA,GAAA,CAAA,CAAA,CAAA,MAAA,C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,MAAA,IAAA,IAAA,CAAA,MAAA,KAAA,MAAA,CAAA,QAAA,EAAA;AACA,QAAA,OAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,MAAA,CAAA,CAAA;AACA,OAAA;AACA;AACA,MAAA,OAAA,CAAA,CAAA,CAAA,GAAA,IAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,IAAA,CAAA;AACA;;;;"} \ No newline at end of file diff --git a/node_modules/@sentry/utils/package.json b/node_modules/@sentry/utils/package.json deleted file mode 100644 index f6dda94..0000000 --- a/node_modules/@sentry/utils/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "@sentry/utils@7.31.1", - "_id": "@sentry/utils@7.31.1", - "_inBundle": false, - "_integrity": "sha512-ZsIPq29aNdP9q3R7qIzJhZ9WW+4DzE9g5SfGwx3UjTIxoRRBfdUJUbf7S+LKEdvCkKbyoDt6FLt5MiSJV43xBA==", - "_location": "/@sentry/utils", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@sentry/utils@7.31.1", - "name": "@sentry/utils", - "escapedName": "@sentry%2futils", - "scope": "@sentry", - "rawSpec": "7.31.1", - "saveSpec": null, - "fetchSpec": "7.31.1" - }, - "_requiredBy": [ - "/@sentry/core", - "/@sentry/node" - ], - "_resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.31.1.tgz", - "_shasum": "bdc988de603318a30ff247d5702c2f9ac81255cb", - "_spec": "@sentry/utils@7.31.1", - "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", - "author": { - "name": "Sentry" - }, - "bugs": { - "url": "https://github.com/getsentry/sentry-javascript/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@sentry/types": "7.31.1", - "tslib": "^1.9.3" - }, - "deprecated": false, - "description": "Utilities for all Sentry JavaScript SDKs", - "devDependencies": { - "@types/array.prototype.flat": "^1.2.1", - "array.prototype.flat": "^1.3.0", - "chai": "^4.1.2" - }, - "engines": { - "node": ">=8" - }, - "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/utils", - "license": "MIT", - "main": "cjs/index.js", - "module": "esm/index.js", - "name": "@sentry/utils", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git://github.com/getsentry/sentry-javascript.git" - }, - "sideEffects": false, - "types": "types/index.d.ts", - "version": "7.31.1" -} diff --git a/node_modules/agent-base/README.md b/node_modules/agent-base/README.md deleted file mode 100644 index 256f1f3..0000000 --- a/node_modules/agent-base/README.md +++ /dev/null @@ -1,145 +0,0 @@ -agent-base -========== -### Turn a function into an [`http.Agent`][http.Agent] instance -[![Build Status](https://github.com/TooTallNate/node-agent-base/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI) - -This module provides an `http.Agent` generator. That is, you pass it an async -callback function, and it returns a new `http.Agent` instance that will invoke the -given callback function when sending outbound HTTP requests. - -#### Some subclasses: - -Here's some more interesting uses of `agent-base`. -Send a pull request to list yours! - - * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints - * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints - * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS - * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install agent-base -``` - - -Example -------- - -Here's a minimal example that creates a new `net.Socket` connection to the server -for every HTTP request (i.e. the equivalent of `agent: false` option): - -```js -var net = require('net'); -var tls = require('tls'); -var url = require('url'); -var http = require('http'); -var agent = require('agent-base'); - -var endpoint = 'http://nodejs.org/api/'; -var parsed = url.parse(endpoint); - -// This is the important part! -parsed.agent = agent(function (req, opts) { - var socket; - // `secureEndpoint` is true when using the https module - if (opts.secureEndpoint) { - socket = tls.connect(opts); - } else { - socket = net.connect(opts); - } - return socket; -}); - -// Everything else works just like normal... -http.get(parsed, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - -Returning a Promise or using an `async` function is also supported: - -```js -agent(async function (req, opts) { - await sleep(1000); - // etc… -}); -``` - -Return another `http.Agent` instance to "pass through" the responsibility -for that HTTP request to that agent: - -```js -agent(function (req, opts) { - return opts.secureEndpoint ? https.globalAgent : http.globalAgent; -}); -``` - - -API ---- - -## Agent(Function callback[, Object options]) → [http.Agent][] - -Creates a base `http.Agent` that will execute the callback function `callback` -for every HTTP request that it is used as the `agent` for. The callback function -is responsible for creating a `stream.Duplex` instance of some kind that will be -used as the underlying socket in the HTTP request. - -The `options` object accepts the following properties: - - * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). - -The callback function should have the following signature: - -### callback(http.ClientRequest req, Object options, Function cb) → undefined - -The ClientRequest `req` can be accessed to read request headers and -and the path, etc. The `options` object contains the options passed -to the `http.request()`/`https.request()` function call, and is formatted -to be directly passed to `net.connect()`/`tls.connect()`, or however -else you want a Socket to be created. Pass the created socket to -the callback function `cb` once created, and the HTTP request will -continue to proceed. - -If the `https` module is used to invoke the HTTP request, then the -`secureEndpoint` property on `options` _will be set to `true`_. - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent -[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent -[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent -[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent -[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/node_modules/agent-base/dist/src/index.d.ts b/node_modules/agent-base/dist/src/index.d.ts deleted file mode 100644 index bc4ab74..0000000 --- a/node_modules/agent-base/dist/src/index.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/// -import net from 'net'; -import http from 'http'; -import https from 'https'; -import { Duplex } from 'stream'; -import { EventEmitter } from 'events'; -declare function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; -declare function createAgent(callback: createAgent.AgentCallback, opts?: createAgent.AgentOptions): createAgent.Agent; -declare namespace createAgent { - interface ClientRequest extends http.ClientRequest { - _last?: boolean; - _hadError?: boolean; - method: string; - } - interface AgentRequestOptions { - host?: string; - path?: string; - port: number; - } - interface HttpRequestOptions extends AgentRequestOptions, Omit { - secureEndpoint: false; - } - interface HttpsRequestOptions extends AgentRequestOptions, Omit { - secureEndpoint: true; - } - type RequestOptions = HttpRequestOptions | HttpsRequestOptions; - type AgentLike = Pick | http.Agent; - type AgentCallbackReturn = Duplex | AgentLike; - type AgentCallbackCallback = (err?: Error | null, socket?: createAgent.AgentCallbackReturn) => void; - type AgentCallbackPromise = (req: createAgent.ClientRequest, opts: createAgent.RequestOptions) => createAgent.AgentCallbackReturn | Promise; - type AgentCallback = typeof Agent.prototype.callback; - type AgentOptions = { - timeout?: number; - }; - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends EventEmitter { - timeout: number | null; - maxFreeSockets: number; - maxTotalSockets: number; - maxSockets: number; - sockets: { - [key: string]: net.Socket[]; - }; - freeSockets: { - [key: string]: net.Socket[]; - }; - requests: { - [key: string]: http.IncomingMessage[]; - }; - options: https.AgentOptions; - private promisifiedCallback?; - private explicitDefaultPort?; - private explicitProtocol?; - constructor(callback?: createAgent.AgentCallback | createAgent.AgentOptions, _opts?: createAgent.AgentOptions); - get defaultPort(): number; - set defaultPort(v: number); - get protocol(): string; - set protocol(v: string); - callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions, fn: createAgent.AgentCallbackCallback): void; - callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions): createAgent.AgentCallbackReturn | Promise; - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req: ClientRequest, _opts: RequestOptions): void; - freeSocket(socket: net.Socket, opts: AgentOptions): void; - destroy(): void; - } -} -export = createAgent; diff --git a/node_modules/agent-base/dist/src/index.js b/node_modules/agent-base/dist/src/index.js deleted file mode 100644 index bfd9e22..0000000 --- a/node_modules/agent-base/dist/src/index.js +++ /dev/null @@ -1,203 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const events_1 = require("events"); -const debug_1 = __importDefault(require("debug")); -const promisify_1 = __importDefault(require("./promisify")); -const debug = debug_1.default('agent-base'); -function isAgent(v) { - return Boolean(v) && typeof v.addRequest === 'function'; -} -function isSecureEndpoint() { - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} -function createAgent(callback, opts) { - return new createAgent.Agent(callback, opts); -} -(function (createAgent) { - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends events_1.EventEmitter { - constructor(callback, _opts) { - super(); - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } - else if (callback) { - opts = callback; - } - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - get defaultPort() { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - set defaultPort(v) { - this.explicitDefaultPort = v; - } - get protocol() { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - set protocol(v) { - this.explicitProtocol = v; - } - callback(req, opts, fn) { - throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); - } - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req, _opts) { - const opts = Object.assign({}, _opts); - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - if (opts.host == null) { - opts.host = 'localhost'; - } - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - let timedOut = false; - let timeoutId = null; - const timeoutMs = opts.timeout || this.timeout; - const onerror = (err) => { - if (req._hadError) - return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); - err.code = 'ETIMEOUT'; - onerror(err); - }; - const callbackError = (err) => { - if (timedOut) - return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - const onsocket = (socket) => { - if (timedOut) - return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug('Callback returned another Agent instance %o', socket.constructor.name); - socket.addRequest(req, opts); - return; - } - if (socket) { - socket.once('free', () => { - this.freeSocket(socket, opts); - }); - req.onSocket(socket); - return; - } - const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); - onerror(err); - }; - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify_1.default(this.callback); - } - else { - this.promisifiedCallback = this.callback; - } - } - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - try { - debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); - Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); - } - catch (err) { - Promise.reject(err).catch(callbackError); - } - } - freeSocket(socket, opts) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); - } - destroy() { - debug('Destroying agent %o', this.constructor.name); - } - } - createAgent.Agent = Agent; - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -})(createAgent || (createAgent = {})); -module.exports = createAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/agent-base/dist/src/index.js.map b/node_modules/agent-base/dist/src/index.js.map deleted file mode 100644 index bd118ab..0000000 --- a/node_modules/agent-base/dist/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAIA,mCAAsC;AACtC,kDAAgC;AAChC,4DAAoC;AAEpC,MAAM,KAAK,GAAG,eAAW,CAAC,YAAY,CAAC,CAAC;AAExC,SAAS,OAAO,CAAC,CAAM;IACtB,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;AACzD,CAAC;AAED,SAAS,gBAAgB;IACxB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,CAAC;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,IAAK,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC;AAOD,SAAS,WAAW,CACnB,QAA+D,EAC/D,IAA+B;IAE/B,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,WAAU,WAAW;IAmDpB;;;;;;OAMG;IACH,MAAa,KAAM,SAAQ,qBAAY;QAmBtC,YACC,QAA+D,EAC/D,KAAgC;YAEhC,KAAK,EAAE,CAAC;YAER,IAAI,IAAI,GAAG,KAAK,CAAC;YACjB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;aACzB;iBAAM,IAAI,QAAQ,EAAE;gBACpB,IAAI,GAAG,Q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EACb,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAC3B,CAAC;gBACF,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CACxD,QAAQ,EACR,aAAa,CACb,CAAC;aACF;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aACzC;QACF,CAAC;QAED,UAAU,CAAC,MAAkB,EAAE,IAAkB;YAChD,KAAK,CAAC,sBAAsB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;QAED,OAAO;YACN,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;KACD;IAxPY,iBAAK,QAwPjB,CAAA;IAED,uCAAuC;IACvC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;AACrD,CAAC,EAtTS,WAAW,KAAX,WAAW,QAsTpB;AAED,iBAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/agent-base/dist/src/promisify.d.ts b/node_modules/agent-base/dist/src/promisify.d.ts deleted file mode 100644 index 0268869..0000000 --- a/node_modules/agent-base/dist/src/promisify.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise } from './index'; -declare type LegacyCallback = (req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback) => void; -export default function promisify(fn: LegacyCallback): AgentCallbackPromise; -export {}; diff --git a/node_modules/agent-base/dist/src/promisify.js b/node_modules/agent-base/dist/src/promisify.js deleted file mode 100644 index b2f6132..0000000 --- a/node_modules/agent-base/dist/src/promisify.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function promisify(fn) { - return function (req, opts) { - return new Promise((resolve, reject) => { - fn.call(this, req, opts, (err, rtn) => { - if (err) { - reject(err); - } - else { - resolve(rtn); - } - }); - }); - }; -} -exports.default = promisify; -//# sourceMappingURL=promisify.js.map \ No newline at end of file diff --git a/node_modules/agent-base/dist/src/promisify.js.map b/node_modules/agent-base/dist/src/promisify.js.map deleted file mode 100644 index 4bff9bf..0000000 --- a/node_modules/agent-base/dist/src/promisify.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promisify.js","sourceRoot":"","sources":["../../src/promisify.ts"],"names":[],"mappings":";;AAeA,SAAwB,SAAS,CAAC,EAAkB;IACnD,OAAO,UAAsB,GAAkB,EAAE,IAAoB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,EAAE,CAAC,IAAI,CACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,CAAC,GAA6B,EAAE,GAAyB,EAAE,EAAE;gBAC5D,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAC;iBACZ;qBAAM;oBACN,OAAO,CAAC,GAAG,CAAC,CAAC;iBACb;YACF,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAjBD,4BAiBC"} \ No newline at end of file diff --git a/node_modules/agent-base/package.json b/node_modules/agent-base/package.json deleted file mode 100644 index 6fdbabb..0000000 --- a/node_modules/agent-base/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_from": "agent-base@6", - "_id": "agent-base@6.0.2", - "_inBundle": false, - "_integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "_location": "/agent-base", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "agent-base@6", - "name": "agent-base", - "escapedName": "agent-base", - "rawSpec": "6", - "saveSpec": null, - "fetchSpec": "6" - }, - "_requiredBy": [ - "/https-proxy-agent" - ], - "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "_shasum": "49fff58577cfee3f37176feab4c22e00f86d7f77", - "_spec": "agent-base@6", - "_where": "C:\\code\\com.mill\\node_modules\\https-proxy-agent", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "bugs": { - "url": "https://github.com/TooTallNate/node-agent-base/issues" - }, - "bundleDependencies": false, - "dependencies": { - "debug": "4" - }, - "deprecated": false, - "description": "Turn a function into an `http.Agent` instance", - "devDependencies": { - "@types/debug": "4", - "@types/mocha": "^5.2.7", - "@types/node": "^14.0.20", - "@types/semver": "^7.1.0", - "@types/ws": "^6.0.3", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "async-listen": "^1.2.0", - "cpy-cli": "^2.0.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.0", - "rimraf": "^3.0.0", - "semver": "^7.1.2", - "typescript": "^3.5.3", - "ws": "^3.0.0" - }, - "engines": { - "node": ">= 6.0.0" - }, - "files": [ - "dist/src", - "src" - ], - "homepage": "https://github.com/TooTallNate/node-agent-base#readme", - "keywords": [ - "http", - "agent", - "base", - "barebones", - "https" - ], - "license": "MIT", - "main": "dist/src/index", - "name": "agent-base", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-agent-base.git" - }, - "scripts": { - "build": "tsc", - "postbuild": "cpy --parents src test '!**/*.ts' dist", - "prebuild": "rimraf dist", - "prepublishOnly": "npm run build", - "test": "mocha --reporter spec dist/test/*.js", - "test-lint": "eslint src --ext .js,.ts" - }, - "typings": "dist/src/index", - "version": "6.0.2" -} diff --git a/node_modules/cookie/HISTORY.md b/node_modules/cookie/HISTORY.md deleted file mode 100644 index 2d21760..0000000 --- a/node_modules/cookie/HISTORY.md +++ /dev/null @@ -1,134 +0,0 @@ -0.4.2 / 2022-02-02 -================== - - * pref: read value only when assigning in parse - * pref: remove unnecessary regexp in parse - -0.4.1 / 2020-04-21 -================== - - * Fix `maxAge` option to reject invalid values - -0.4.0 / 2019-05-15 -================== - - * Add `SameSite=None` support - -0.3.1 / 2016-05-26 -================== - - * Fix `sameSite: true` to work with draft-7 clients - - `true` now sends `SameSite=Strict` instead of `SameSite` - -0.3.0 / 2016-05-26 -================== - - * Add `sameSite` option - - Replaces `firstPartyOnly` option, never implemented by browsers - * Improve error message when `encode` is not a function - * Improve error message when `expires` is not a `Date` - -0.2.4 / 2016-05-20 -================== - - * perf: enable strict mode - * perf: use for loop in parse - * perf: use string concatination for serialization - -0.2.3 / 2015-10-25 -================== - - * Fix cookie `Max-Age` to never be a floating point number - -0.2.2 / 2015-09-17 -================== - - * Fix regression when setting empty cookie value - - Ease the new restriction, which is just basic header-level validation - * Fix typo in invalid value errors - -0.2.1 / 2015-09-17 -================== - - * Throw on invalid values provided to `serialize` - - Ensures the resulting string is a valid HTTP header value - -0.2.0 / 2015-08-13 -================== - - * Add `firstPartyOnly` option - * Throw better error for invalid argument to parse - * perf: hoist regular expression - -0.1.5 / 2015-09-17 -================== - - * Fix regression when setting empty cookie value - - Ease the new restriction, which is just basic header-level validation - * Fix typo in invalid value errors - -0.1.4 / 2015-09-17 -================== - - * Throw better error for invalid argument to parse - * Throw on invalid values provided to `serialize` - - Ensures the resulting string is a valid HTTP header value - -0.1.3 / 2015-05-19 -================== - - * Reduce the scope of try-catch deopt - * Remove argument reassignments - -0.1.2 / 2014-04-16 -================== - - * Remove unnecessary files from npm package - -0.1.1 / 2014-02-23 -================== - - * Fix bad parse when cookie value contained a comma - * Fix support for `maxAge` of `0` - -0.1.0 / 2013-05-01 -================== - - * Add `decode` option - * Add `encode` option - -0.0.6 / 2013-04-08 -================== - - * Ignore cookie parts missing `=` - -0.0.5 / 2012-10-29 -================== - - * Return raw cookie value if value unescape errors - -0.0.4 / 2012-06-21 -================== - - * Use encode/decodeURIComponent for cookie encoding/decoding - - Improve server/client interoperability - -0.0.3 / 2012-06-06 -================== - - * Only escape special characters per the cookie RFC - -0.0.2 / 2012-06-01 -================== - - * Fix `maxAge` option to not throw error - -0.0.1 / 2012-05-28 -================== - - * Add more tests - -0.0.0 / 2012-05-28 -================== - - * Initial release diff --git a/node_modules/cookie/LICENSE b/node_modules/cookie/LICENSE deleted file mode 100644 index 058b6b4..0000000 --- a/node_modules/cookie/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 Roman Shtylman -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/cookie/README.md b/node_modules/cookie/README.md deleted file mode 100644 index e275c70..0000000 --- a/node_modules/cookie/README.md +++ /dev/null @@ -1,286 +0,0 @@ -# cookie - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Basic HTTP cookie parser and serializer for HTTP servers. - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install cookie -``` - -## API - -```js -var cookie = require('cookie'); -``` - -### cookie.parse(str, options) - -Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs. -The `str` argument is the string representing a `Cookie` header value and `options` is an -optional object containing additional parsing options. - -```js -var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2'); -// { foo: 'bar', equation: 'E=mc^2' } -``` - -#### Options - -`cookie.parse` accepts these properties in the options object. - -##### decode - -Specifies a function that will be used to decode a cookie's value. Since the value of a cookie -has a limited character set (and must be a simple string), this function can be used to decode -a previously-encoded cookie value into a JavaScript string or other object. - -The default function is the global `decodeURIComponent`, which will decode any URL-encoded -sequences into their byte representations. - -**note** if an error is thrown from this function, the original, non-decoded cookie value will -be returned as the cookie's value. - -### cookie.serialize(name, value, options) - -Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the -name for the cookie, the `value` argument is the value to set the cookie to, and the `options` -argument is an optional object containing additional serialization options. - -```js -var setCookie = cookie.serialize('foo', 'bar'); -// foo=bar -``` - -#### Options - -`cookie.serialize` accepts these properties in the options object. - -##### domain - -Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6265-5.2.3]. By default, no -domain is set, and most clients will consider the cookie to apply to only the current domain. - -##### encode - -Specifies a function that will be used to encode a cookie's value. Since value of a cookie -has a limited character set (and must be a simple string), this function can be used to encode -a value into a string suited for a cookie's value. - -The default function is the global `encodeURIComponent`, which will encode a JavaScript string -into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range. - -##### expires - -Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6265-5.2.1]. -By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and -will delete it on a condition like exiting a web browser application. - -**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and -`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, -so if both are set, they should point to the same date and time. - -##### httpOnly - -Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6265-5.2.6]. When truthy, -the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set. - -**note** be careful when setting this to `true`, as compliant clients will not allow client-side -JavaScript to see the cookie in `document.cookie`. - -##### maxAge - -Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6265-5.2.2]. -The given number will be converted to an integer by rounding down. By default, no maximum age is set. - -**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and -`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, -so if both are set, they should point to the same date and time. - -##### path - -Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path -is considered the ["default path"][rfc-6265-5.1.4]. - -##### sameSite - -Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-03-4.1.2.7]. - - - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - - `false` will not set the `SameSite` attribute. - - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement. - - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie. - - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - -More information about the different enforcement levels can be found in -[the specification][rfc-6265bis-03-4.1.2.7]. - -**note** This is an attribute that has not yet been fully standardized, and may change in the future. -This also means many clients may ignore this attribute until they understand it. - -##### secure - -Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6265-5.2.5]. When truthy, -the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set. - -**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to -the server in the future if the browser does not have an HTTPS connection. - -## Example - -The following example uses this module in conjunction with the Node.js core HTTP server -to prompt a user for their name and display it back on future visits. - -```js -var cookie = require('cookie'); -var escapeHtml = require('escape-html'); -var http = require('http'); -var url = require('url'); - -function onRequest(req, res) { - // Parse the query string - var query = url.parse(req.url, true, true).query; - - if (query && query.name) { - // Set a new cookie with the name - res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), { - httpOnly: true, - maxAge: 60 * 60 * 24 * 7 // 1 week - })); - - // Redirect back after setting cookie - res.statusCode = 302; - res.setHeader('Location', req.headers.referer || '/'); - res.end(); - return; - } - - // Parse the cookies on the request - var cookies = cookie.parse(req.headers.cookie || ''); - - // Get the visitor name set in the cookie - var name = cookies.name; - - res.setHeader('Content-Type', 'text/html; charset=UTF-8'); - - if (name) { - res.write('

Welcome back, ' + escapeHtml(name) + '!

'); - } else { - res.write('

Hello, new visitor!

'); - } - - res.write(''); - res.write(' '); - res.end(''); -} - -http.createServer(onRequest).listen(3000); -``` - -## Testing - -```sh -$ npm test -``` - -## Benchmark - -``` -$ npm run bench - -> cookie@0.4.1 bench -> node benchmark/index.js - - node@16.13.1 - v8@9.4.146.24-node.14 - uv@1.42.0 - zlib@1.2.11 - brotli@1.0.9 - ares@1.18.1 - modules@93 - nghttp2@1.45.1 - napi@8 - llhttp@6.0.4 - openssl@1.1.1l+quic - cldr@39.0 - icu@69.1 - tz@2021a - unicode@13.0 - ngtcp2@0.1.0-DEV - nghttp3@0.1.0-DEV - -> node benchmark/parse-top.js - - cookie.parse - top sites - - 15 tests completed. - - parse accounts.google.com x 504,358 ops/sec ±6.55% (171 runs sampled) - parse apple.com x 1,369,991 ops/sec ±0.84% (189 runs sampled) - parse cloudflare.com x 360,669 ops/sec ±3.75% (182 runs sampled) - parse docs.google.com x 521,496 ops/sec ±4.90% (180 runs sampled) - parse drive.google.com x 553,514 ops/sec ±0.59% (189 runs sampled) - parse en.wikipedia.org x 286,052 ops/sec ±0.62% (188 runs sampled) - parse linkedin.com x 178,817 ops/sec ±0.61% (192 runs sampled) - parse maps.google.com x 284,585 ops/sec ±0.68% (188 runs sampled) - parse microsoft.com x 161,230 ops/sec ±0.56% (192 runs sampled) - parse play.google.com x 352,144 ops/sec ±1.01% (181 runs sampled) - parse plus.google.com x 275,204 ops/sec ±7.78% (156 runs sampled) - parse support.google.com x 339,493 ops/sec ±1.02% (191 runs sampled) - parse www.google.com x 286,110 ops/sec ±0.90% (191 runs sampled) - parse youtu.be x 548,557 ops/sec ±0.60% (184 runs sampled) - parse youtube.com x 545,293 ops/sec ±0.65% (191 runs sampled) - -> node benchmark/parse.js - - cookie.parse - generic - - 6 tests completed. - - simple x 1,266,646 ops/sec ±0.65% (191 runs sampled) - decode x 838,413 ops/sec ±0.60% (191 runs sampled) - unquote x 877,820 ops/sec ±0.72% (189 runs sampled) - duplicates x 516,680 ops/sec ±0.61% (191 runs sampled) - 10 cookies x 156,874 ops/sec ±0.52% (189 runs sampled) - 100 cookies x 14,663 ops/sec ±0.53% (191 runs sampled) -``` - -## References - -- [RFC 6265: HTTP State Management Mechanism][rfc-6265] -- [Same-site Cookies][rfc-6265bis-03-4.1.2.7] - -[rfc-6265bis-03-4.1.2.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7 -[rfc-6265]: https://tools.ietf.org/html/rfc6265 -[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4 -[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1 -[rfc-6265-5.2.2]: https://tools.ietf.org/html/rfc6265#section-5.2.2 -[rfc-6265-5.2.3]: https://tools.ietf.org/html/rfc6265#section-5.2.3 -[rfc-6265-5.2.4]: https://tools.ietf.org/html/rfc6265#section-5.2.4 -[rfc-6265-5.2.5]: https://tools.ietf.org/html/rfc6265#section-5.2.5 -[rfc-6265-5.2.6]: https://tools.ietf.org/html/rfc6265#section-5.2.6 -[rfc-6265-5.3]: https://tools.ietf.org/html/rfc6265#section-5.3 - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master -[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master -[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/cookie/ci/master?label=ci -[github-actions-ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml -[node-version-image]: https://badgen.net/npm/node/cookie -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/cookie -[npm-url]: https://npmjs.org/package/cookie -[npm-version-image]: https://badgen.net/npm/v/cookie diff --git a/node_modules/cookie/index.js b/node_modules/cookie/index.js deleted file mode 100644 index 55331d9..0000000 --- a/node_modules/cookie/index.js +++ /dev/null @@ -1,202 +0,0 @@ -/*! - * cookie - * Copyright(c) 2012-2014 Roman Shtylman - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -exports.parse = parse; -exports.serialize = serialize; - -/** - * Module variables. - * @private - */ - -var decode = decodeURIComponent; -var encode = encodeURIComponent; - -/** - * RegExp to match field-content in RFC 7230 sec 3.2 - * - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - * obs-text = %x80-FF - */ - -var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; - -/** - * Parse a cookie header. - * - * Parse the given cookie header string into an object - * The object has the various cookies as keys(names) => values - * - * @param {string} str - * @param {object} [options] - * @return {object} - * @public - */ - -function parse(str, options) { - if (typeof str !== 'string') { - throw new TypeError('argument str must be a string'); - } - - var obj = {} - var opt = options || {}; - var pairs = str.split(';') - var dec = opt.decode || decode; - - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i]; - var index = pair.indexOf('=') - - // skip things that don't look like key=value - if (index < 0) { - continue; - } - - var key = pair.substring(0, index).trim() - - // only assign once - if (undefined == obj[key]) { - var val = pair.substring(index + 1, pair.length).trim() - - // quoted values - if (val[0] === '"') { - val = val.slice(1, -1) - } - - obj[key] = tryDecode(val, dec); - } - } - - return obj; -} - -/** - * Serialize data into a cookie header. - * - * Serialize the a name value pair into a cookie string suitable for - * http headers. An optional options object specified cookie parameters. - * - * serialize('foo', 'bar', { httpOnly: true }) - * => "foo=bar; httpOnly" - * - * @param {string} name - * @param {string} val - * @param {object} [options] - * @return {string} - * @public - */ - -function serialize(name, val, options) { - var opt = options || {}; - var enc = opt.encode || encode; - - if (typeof enc !== 'function') { - throw new TypeError('option encode is invalid'); - } - - if (!fieldContentRegExp.test(name)) { - throw new TypeError('argument name is invalid'); - } - - var value = enc(val); - - if (value && !fieldContentRegExp.test(value)) { - throw new TypeError('argument val is invalid'); - } - - var str = name + '=' + value; - - if (null != opt.maxAge) { - var maxAge = opt.maxAge - 0; - - if (isNaN(maxAge) || !isFinite(maxAge)) { - throw new TypeError('option maxAge is invalid') - } - - str += '; Max-Age=' + Math.floor(maxAge); - } - - if (opt.domain) { - if (!fieldContentRegExp.test(opt.domain)) { - throw new TypeError('option domain is invalid'); - } - - str += '; Domain=' + opt.domain; - } - - if (opt.path) { - if (!fieldContentRegExp.test(opt.path)) { - throw new TypeError('option path is invalid'); - } - - str += '; Path=' + opt.path; - } - - if (opt.expires) { - if (typeof opt.expires.toUTCString !== 'function') { - throw new TypeError('option expires is invalid'); - } - - str += '; Expires=' + opt.expires.toUTCString(); - } - - if (opt.httpOnly) { - str += '; HttpOnly'; - } - - if (opt.secure) { - str += '; Secure'; - } - - if (opt.sameSite) { - var sameSite = typeof opt.sameSite === 'string' - ? opt.sameSite.toLowerCase() : opt.sameSite; - - switch (sameSite) { - case true: - str += '; SameSite=Strict'; - break; - case 'lax': - str += '; SameSite=Lax'; - break; - case 'strict': - str += '; SameSite=Strict'; - break; - case 'none': - str += '; SameSite=None'; - break; - default: - throw new TypeError('option sameSite is invalid'); - } - } - - return str; -} - -/** - * Try decoding a string using a decoding function. - * - * @param {string} str - * @param {function} decode - * @private - */ - -function tryDecode(str, decode) { - try { - return decode(str); - } catch (e) { - return str; - } -} diff --git a/node_modules/cookie/package.json b/node_modules/cookie/package.json deleted file mode 100644 index 8013635..0000000 --- a/node_modules/cookie/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "cookie@^0.4.1", - "_id": "cookie@0.4.2", - "_inBundle": false, - "_integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "_location": "/cookie", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "cookie@^0.4.1", - "name": "cookie", - "escapedName": "cookie", - "rawSpec": "^0.4.1", - "saveSpec": null, - "fetchSpec": "^0.4.1" - }, - "_requiredBy": [ - "/@sentry/node" - ], - "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "_shasum": "0e41f24de5ecf317947c82fc789e06a884824432", - "_spec": "cookie@^0.4.1", - "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "bugs": { - "url": "https://github.com/jshttp/cookie/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "deprecated": false, - "description": "HTTP server cookie parsing and serialization", - "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "eslint": "7.32.0", - "eslint-plugin-markdown": "2.2.1", - "mocha": "9.2.0", - "nyc": "15.1.0", - "top-sites": "1.1.85" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "index.js" - ], - "homepage": "https://github.com/jshttp/cookie#readme", - "keywords": [ - "cookie", - "cookies" - ], - "license": "MIT", - "name": "cookie", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/cookie.git" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks --ui qunit test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update-bench": "node scripts/update-benchmark.js", - "version": "node scripts/version-history.js && git add HISTORY.md" - }, - "version": "0.4.2" -} diff --git a/node_modules/https-proxy-agent/README.md b/node_modules/https-proxy-agent/README.md deleted file mode 100644 index 328656a..0000000 --- a/node_modules/https-proxy-agent/README.md +++ /dev/null @@ -1,137 +0,0 @@ -https-proxy-agent -================ -### An HTTP(s) proxy `http.Agent` implementation for HTTPS -[![Build Status](https://github.com/TooTallNate/node-https-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-https-proxy-agent/actions?workflow=Node+CI) - -This module provides an `http.Agent` implementation that connects to a specified -HTTP or HTTPS proxy server, and can be used with the built-in `https` module. - -Specifically, this `Agent` implementation connects to an intermediary "proxy" -server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to -open a direct TCP connection to the destination server. - -Since this agent implements the CONNECT HTTP method, it also works with other -protocols that use this method when connecting over proxies (i.e. WebSockets). -See the "Examples" section below for more. - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install https-proxy-agent -``` - - -Examples --------- - -#### `https` module example - -``` js -var url = require('url'); -var https = require('https'); -var HttpsProxyAgent = require('https-proxy-agent'); - -// HTTP/HTTPS proxy to connect to -var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; -console.log('using proxy server %j', proxy); - -// HTTPS endpoint for the proxy to connect to -var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate'; -console.log('attempting to GET %j', endpoint); -var options = url.parse(endpoint); - -// create an instance of the `HttpsProxyAgent` class with the proxy server information -var agent = new HttpsProxyAgent(proxy); -options.agent = agent; - -https.get(options, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - -#### `ws` WebSocket connection example - -``` js -var url = require('url'); -var WebSocket = require('ws'); -var HttpsProxyAgent = require('https-proxy-agent'); - -// HTTP/HTTPS proxy to connect to -var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; -console.log('using proxy server %j', proxy); - -// WebSocket endpoint for the proxy to connect to -var endpoint = process.argv[2] || 'ws://echo.websocket.org'; -var parsed = url.parse(endpoint); -console.log('attempting to connect to WebSocket %j', endpoint); - -// create an instance of the `HttpsProxyAgent` class with the proxy server information -var options = url.parse(proxy); - -var agent = new HttpsProxyAgent(options); - -// finally, initiate the WebSocket connection -var socket = new WebSocket(endpoint, { agent: agent }); - -socket.on('open', function () { - console.log('"open" event!'); - socket.send('hello world'); -}); - -socket.on('message', function (data, flags) { - console.log('"message" event! %j %j', data, flags); - socket.close(); -}); -``` - -API ---- - -### new HttpsProxyAgent(Object options) - -The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects -to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket -requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT]. - -The `options` argument may either be a string URI of the proxy server to use, or an -"options" object with more specific properties: - - * `host` - String - Proxy host to connect to (may use `hostname` as well). Required. - * `port` - Number - Proxy port to connect to. Required. - * `protocol` - String - If `https:`, then use TLS to connect to the proxy. - * `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method. - * Any other options given are passed to the `net.connect()`/`tls.connect()` functions. - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling diff --git a/node_modules/https-proxy-agent/node_modules/debug/LICENSE b/node_modules/https-proxy-agent/node_modules/debug/LICENSE deleted file mode 100644 index 1a9820e..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/https-proxy-agent/node_modules/debug/README.md b/node_modules/https-proxy-agent/node_modules/debug/README.md deleted file mode 100644 index e9c3e04..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/README.md +++ /dev/null @@ -1,481 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. - - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - -## Usage in child processes - -Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. -For example: - -```javascript -worker = fork(WORKER_WRAP_PATH, [workerPath], { - stdio: [ - /* stdin: */ 0, - /* stdout: */ 'pipe', - /* stderr: */ 'pipe', - 'ipc', - ], - env: Object.assign({}, process.env, { - DEBUG_COLORS: 1 // without this settings, colors won't be shown - }), -}); - -worker.stderr.pipe(process.stderr, { end: false }); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - - Josh Junon - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/https-proxy-agent/node_modules/debug/package.json b/node_modules/https-proxy-agent/node_modules/debug/package.json deleted file mode 100644 index 6d833d2..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_from": "debug@4", - "_id": "debug@4.3.4", - "_inBundle": false, - "_integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "_location": "/https-proxy-agent/debug", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "debug@4", - "name": "debug", - "escapedName": "debug", - "rawSpec": "4", - "saveSpec": null, - "fetchSpec": "4" - }, - "_requiredBy": [ - "/https-proxy-agent" - ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "_shasum": "1319f6579357f2338d3337d2cdd4914bb5dcc865", - "_spec": "debug@4", - "_where": "C:\\code\\com.mill\\node_modules\\https-proxy-agent", - "author": { - "name": "Josh Junon", - "email": "josh.junon@protonmail.com" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/debug-js/debug/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } - ], - "dependencies": { - "ms": "2.1.2" - }, - "deprecated": false, - "description": "Lightweight debugging utility for Node.js and the browser", - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6.0" - }, - "files": [ - "src", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/debug-js/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls", - "test:node": "istanbul cover _mocha -- test.js" - }, - "version": "4.3.4" -} diff --git a/node_modules/https-proxy-agent/node_modules/debug/src/browser.js b/node_modules/https-proxy-agent/node_modules/debug/src/browser.js deleted file mode 100644 index cd0fc35..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/src/browser.js +++ /dev/null @@ -1,269 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/node_modules/https-proxy-agent/node_modules/debug/src/common.js b/node_modules/https-proxy-agent/node_modules/debug/src/common.js deleted file mode 100644 index e3291b2..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/src/common.js +++ /dev/null @@ -1,274 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - let i; - let len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/node_modules/https-proxy-agent/node_modules/debug/src/index.js b/node_modules/https-proxy-agent/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/https-proxy-agent/node_modules/debug/src/node.js b/node_modules/https-proxy-agent/node_modules/debug/src/node.js deleted file mode 100644 index 79bc085..0000000 --- a/node_modules/https-proxy-agent/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/node_modules/https-proxy-agent/node_modules/ms/index.js b/node_modules/https-proxy-agent/node_modules/ms/index.js deleted file mode 100644 index c4498bc..0000000 --- a/node_modules/https-proxy-agent/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/node_modules/https-proxy-agent/node_modules/ms/license.md b/node_modules/https-proxy-agent/node_modules/ms/license.md deleted file mode 100644 index 69b6125..0000000 --- a/node_modules/https-proxy-agent/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/https-proxy-agent/node_modules/ms/package.json b/node_modules/https-proxy-agent/node_modules/ms/package.json deleted file mode 100644 index f31aa97..0000000 --- a/node_modules/https-proxy-agent/node_modules/ms/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "ms@2.1.2", - "_id": "ms@2.1.2", - "_inBundle": false, - "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "_location": "/https-proxy-agent/ms", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ms@2.1.2", - "name": "ms", - "escapedName": "ms", - "rawSpec": "2.1.2", - "saveSpec": null, - "fetchSpec": "2.1.2" - }, - "_requiredBy": [ - "/https-proxy-agent/debug" - ], - "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009", - "_spec": "ms@2.1.2", - "_where": "C:\\code\\com.mill\\node_modules\\https-proxy-agent\\node_modules\\debug", - "bugs": { - "url": "https://github.com/zeit/ms/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Tiny millisecond conversion utility", - "devDependencies": { - "eslint": "4.12.1", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/zeit/ms#readme", - "license": "MIT", - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "main": "./index", - "name": "ms", - "repository": { - "type": "git", - "url": "git+https://github.com/zeit/ms.git" - }, - "scripts": { - "lint": "eslint lib/* bin/*", - "precommit": "lint-staged", - "test": "mocha tests.js" - }, - "version": "2.1.2" -} diff --git a/node_modules/https-proxy-agent/node_modules/ms/readme.md b/node_modules/https-proxy-agent/node_modules/ms/readme.md deleted file mode 100644 index 9a1996b..0000000 --- a/node_modules/https-proxy-agent/node_modules/ms/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# ms - -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/https-proxy-agent/package.json b/node_modules/https-proxy-agent/package.json deleted file mode 100644 index 3d46dc8..0000000 --- a/node_modules/https-proxy-agent/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_from": "https-proxy-agent@^5.0.0", - "_id": "https-proxy-agent@5.0.1", - "_inBundle": false, - "_integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "_location": "/https-proxy-agent", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "https-proxy-agent@^5.0.0", - "name": "https-proxy-agent", - "escapedName": "https-proxy-agent", - "rawSpec": "^5.0.0", - "saveSpec": null, - "fetchSpec": "^5.0.0" - }, - "_requiredBy": [ - "/@sentry/node" - ], - "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "_shasum": "c59ef224a04fe8b754f3db0063a25ea30d0005d6", - "_spec": "https-proxy-agent@^5.0.0", - "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "bugs": { - "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues" - }, - "bundleDependencies": false, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "deprecated": false, - "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", - "devDependencies": { - "@types/debug": "4", - "@types/node": "^12.12.11", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.2", - "proxy": "1", - "rimraf": "^3.0.0", - "typescript": "^3.5.3" - }, - "engines": { - "node": ">= 6" - }, - "files": [ - "dist" - ], - "homepage": "https://github.com/TooTallNate/node-https-proxy-agent#readme", - "keywords": [ - "https", - "proxy", - "endpoint", - "agent" - ], - "license": "MIT", - "main": "dist/index", - "name": "https-proxy-agent", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-https-proxy-agent.git" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist", - "prepublishOnly": "npm run build", - "test": "mocha --reporter spec", - "test-lint": "eslint src --ext .js,.ts" - }, - "types": "dist/index", - "version": "5.0.1" -} diff --git a/node_modules/lru_map/.npmignore b/node_modules/lru_map/.npmignore deleted file mode 100644 index 03eaa5a..0000000 --- a/node_modules/lru_map/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.DS_Store -_local -tstest.js -*-test.js -node_modules diff --git a/node_modules/lru_map/.travis.yml b/node_modules/lru_map/.travis.yml deleted file mode 100644 index 58e567c..0000000 --- a/node_modules/lru_map/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - node # latest stable - - 6 -script: - - npm test diff --git a/node_modules/lru_map/README.md b/node_modules/lru_map/README.md deleted file mode 100644 index 792c30a..0000000 --- a/node_modules/lru_map/README.md +++ /dev/null @@ -1,214 +0,0 @@ -# Least Recently Used (LRU) cache algorithm - -A finite key-value map using the [Least Recently Used (LRU)](http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used) algorithm, where the most recently-used items are "kept alive" while older, less-recently used items are evicted to make room for newer items. - -Useful when you want to limit use of memory to only hold commonly-used things. - -[![Build status](https://travis-ci.org/rsms/js-lru.svg?branch=master)](https://travis-ci.org/rsms/js-lru) - -## Terminology & design - -- Based on a doubly-linked list for low complexity random shuffling of entries. - -- The cache object iself has a "head" (least recently used entry) and a - "tail" (most recently used entry). - -- The "oldest" and "newest" are list entries -- an entry might have a "newer" and - an "older" entry (doubly-linked, "older" being close to "head" and "newer" - being closer to "tail"). - -- Key lookup is done through a key-entry mapping native object, which on most - platforms mean `O(1)` complexity. This comes at a very low memory cost (for - storing two extra pointers for each entry). - -Fancy ASCII art illustration of the general design: - -```txt - entry entry entry entry - ______ ______ ______ ______ - | head |.newer => | |.newer => | |.newer => | tail | -.oldest = | A | | B | | C | | D | = .newest - |______| <= older.|______| <= older.|______| <= older.|______| - - removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added -``` - -## Example - -```js -let c = new LRUMap(3) -c.set('adam', 29) -c.set('john', 26) -c.set('angela', 24) -c.toString() // -> "adam:29 < john:26 < angela:24" -c.get('john') // -> 26 - -// Now 'john' is the most recently used entry, since we just requested it -c.toString() // -> "adam:29 < angela:24 < john:26" -c.set('zorro', 141) // -> {key:adam, value:29} - -// Because we only have room for 3 entries, adding 'zorro' caused 'adam' -// to be removed in order to make room for the new entry -c.toString() // -> "angela:24 < john:26 < zorro:141" -``` - -# Usage - -**Recommended:** Copy the code in lru.js or copy the lru.js and lru.d.ts files into your source directory. For minimal functionality, you only need the lines up until the comment that says "Following code is optional". - -**Using NPM:** [`yarn add lru_map`](https://www.npmjs.com/package/lru_map) (note that because NPM is one large flat namespace, you need to import the module as "lru_map" rather than simply "lru".) - -**Using AMD:** An [AMD](https://github.com/amdjs/amdjs-api/blob/master/AMD.md#amd) module loader like [`amdld`](https://github.com/rsms/js-amdld) can be used to load this module as well. There should be nothing to configure. - -**Testing**: - -- Run tests with `npm test` -- Run benchmarks with `npm run benchmark` - -**ES compatibility:** This implementation is compatible with modern JavaScript environments and depend on the following features not found in ES5: - -- `const` and `let` keywords -- `Symbol` including `Symbol.iterator` -- `Map` - -> Note: If you need ES5 compatibility e.g. to use with older browsers, [please use version 2](https://github.com/rsms/js-lru/tree/v2) which has a slightly less feature-full API but is well-tested and about as fast as this implementation. - -**Using with TypeScript** - -This module comes with complete typing coverage for use with TypeScript. If you copied the code or files rather than using a module loader, make sure to include `lru.d.ts` into the same location where you put `lru.js`. - -```ts -import {LRUMap} from './lru' -// import {LRUMap} from 'lru' // when using via AMD -// import {LRUMap} from 'lru_map' // when using from NPM -console.log('LRUMap:', LRUMap) -``` - -# API - -The API imitates that of [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), which means that in most cases you can use `LRUMap` as a drop-in replacement for `Map`. - -```ts -export class LRUMap { - // Construct a new cache object which will hold up to limit entries. - // When the size == limit, a `put` operation will evict the oldest entry. - // - // If `entries` is provided, all entries are added to the new map. - // `entries` should be an Array or other iterable object whose elements are - // key-value pairs (2-element Arrays). Each key-value pair is added to the new Map. - // null is treated as undefined. - constructor(limit :number, entries? :Iterable<[K,V]>); - - // Convenience constructor equivalent to `new LRUMap(count(entries), entries)` - constructor(entries :Iterable<[K,V]>); - - // Current number of items - size :number; - - // Maximum number of items this map can hold - limit :number; - - // Least recently-used entry. Invalidated when map is modified. - oldest :Entry; - - // Most recently-used entry. Invalidated when map is modified. - newest :Entry; - - // Replace all values in this map with key-value pairs (2-element Arrays) from - // provided iterable. - assign(entries :Iterable<[K,V]>) : void; - - // Put into the cache associated with . Replaces any existing entry - // with the same key. Returns `this`. - set(key :K, value :V) : LRUMap; - - // Purge the least recently used (oldest) entry from the cache. - // Returns the removed entry or undefined if the cache was empty. - shift() : [K,V] | undefined; - - // Get and register recent use of . - // Returns the value associated with or undefined if not in cache. - get(key :K) : V | undefined; - - // Check if there's a value for key in the cache without registering recent use. - has(key :K) : boolean; - - // Access value for without registering recent use. Useful if you do not - // want to chage the state of the map, but only "peek" at it. - // Returns the value associated with if found, or undefined if not found. - find(key :K) : V | undefined; - - // Remove entry from cache and return its value. - // Returns the removed value, or undefined if not found. - delete(key :K) : V | undefined; - - // Removes all entries - clear() : void; - - // Returns an iterator over all keys, starting with the oldest. - keys() : Iterator; - - // Returns an iterator over all values, starting with the oldest. - values() : Iterator; - - // Returns an iterator over all entries, starting with the oldest. - entries() : Iterator<[K,V]>; - - // Returns an iterator over all entries, starting with the oldest. - [Symbol.iterator]() : Iterator<[K,V]>; - - // Call `fun` for each entry, starting with the oldest entry. - forEach(fun :(value :V, key :K, m :LRUMap)=>void, thisArg? :any) : void; - - // Returns an object suitable for JSON encoding - toJSON() : Array<{key :K, value :V}>; - - // Returns a human-readable text representation - toString() : string; -} - -// An entry holds the key and value, and pointers to any older and newer entries. -// Entries might hold references to adjacent entries in the internal linked-list. -// Therefore you should never store or modify Entry objects. Instead, reference the -// key and value of an entry when needed. -interface Entry { - key :K; - value :V; -} -``` - -If you need to perform any form of finalization of items as they are evicted from the cache, wrapping the `shift` method is a good way to do it: - -```js -let c = new LRUMap(123); -c.shift = function() { - let entry = LRUMap.prototype.shift.call(this); - doSomethingWith(entry); - return entry; -} -``` - -The internals calls `shift` as entries need to be evicted, so this method is guaranteed to be called for any item that's removed from the cache. The returned entry must not include any strong references to other entries. See note in the documentation of `LRUMap.prototype.set()`. - - -# MIT license - -Copyright (c) 2010-2016 Rasmus Andersson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/lru_map/benchmark.js b/node_modules/lru_map/benchmark.js deleted file mode 100644 index e5230b4..0000000 --- a/node_modules/lru_map/benchmark.js +++ /dev/null @@ -1,155 +0,0 @@ -// This is a benchmark suite which will run with nodejs. -// $ node --expose-gc benchmark.js -var assert = require('assert'), - util = require('util'), - LRUMap = require('./lru').LRUMap; - -// Create a cache with N entries -var N = 10000; - -// Run each measurement Iterations times -var Iterations = 1000; - - -var has_gc_access = typeof gc === 'function'; -var gc_collect = has_gc_access ? gc : function(){}; - -Number.prototype.toHuman = function(divisor) { - var N = Math.round(divisor ? this/divisor : this); - var n = N.toString().split('.'); - n[0] = n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,'); - return n.join('.'); -} -Number.prototype.toSignedHuman = function(divisor) { - var n = this.toHuman(divisor); - if (this > -1) n = '+'+n; - return n; -} - -function measure(block) { - gc_collect(); - var elapsed = 0, start, usec, n; - var sm = process.memoryUsage(); - if (Iterations && Iterations > 0) { - start = new Date(); - for (n = 0; n < Iterations; n++) { - block(); - } - usec = ((new Date() - start) / Iterations) * 1000; - } else { - start = new Date(); - block(); - usec = (new Date() - start) * 1000; - } - - var msg = '\n----------\n ' + block.toString().replace(/\n/g, "\n ") + '\n'; - - if (has_gc_access) { - gc_collect(); - var em = process.memoryUsage(); - var mrssd = em.rss - sm.rss; - var mhtotd = em.heapTotal - sm.heapTotal; - var mhusedd = em.heapUsed - sm.heapUsed; - msg += ' rss: ' + mrssd.toSignedHuman(1024) + ' kB -- (' + - sm.rss.toHuman(1024) + ' kB -> ' + em.rss.toHuman(1024) + ' kB)\n'; - if (typeof sm.vsize === 'number') { - var mvsized = em.vsize - sm.vsize; - msg += - ' vsize: ' + mvsized.toSignedHuman(1024) + ' kB -- (' + - sm.vsize.toHuman(1024) + ' kB -> ' + em.vsize.toHuman(1024) + ' kB)\n'; - } - msg += ' heap total: ' + mhtotd.toSignedHuman(1024) + ' kB -- (' + - sm.heapTotal.toHuman(1024) + ' kB -> ' + em.heapTotal.toHuman(1024) + ' kB)\n' + - ' heap used: ' + mhusedd.toSignedHuman(1024) + ' kB -- (' + - sm.heapUsed.toHuman(1024) + ' kB -> ' + em.heapUsed.toHuman(1024) + ' kB)\n\n'; - } - - var call_avg = usec; - msg += ' -- ' + (call_avg / 1000) + ' ms avg per iteration --\n'; - - process.stdout.write(msg); -} - -var c = new LRUMap(N); - -console.log('N = ' + N + ', Iterations = ' + Iterations); - -// We should probably spin up the system in some way, or repeat the benchmarks a -// few times, since initial heap resizing takes considerable time. - -measure(function(){ - // 1. put - // Simply append a new entry. - // There will be no reordering since we simply append to the tail. - for (var i=N; --i;) - c.set('key'+i, i); -}); - -measure(function(){ - // 2. get recent -> old - // Get entries starting with newest, effectively reversing the list. - // - // a. For each get, a find is first executed implemented as a native object with - // keys mapping to entries, so this should be reasonably fast as most native - // objects are implemented as hash maps. - // - // b. For each get, the aquired item will be moved to tail which includes a - // maximum of 7 assignment operations (minimum 3). - for (var i=1,L=N+1; i recent - // Get entries starting with oldest, effectively reversing the list. - // - // - Same conditions apply as for test 2. - for (var i=1,L=N+1; i + ) - for (var i=N; --i;) - c.set('key2_'+i, i); -}); - - -measure(function(){ - // 6. shift head -> tail - // Remove all entries going from head to tail - for (var i=1,L=N+1; i lru_map@0.3.0 benchmark /src/js-lru -> node --expose-gc benchmark.js - -N = 10000, Iterations = 1000 - ----------- - function (){ - // 1. put - // Simply append a new entry. - // There will be no reordering since we simply append to the tail. - for (var i=N; --i;) - c.set('key'+i, i); - } - rss: +9,380 kB -- (19,564 kB -> 28,944 kB) - heap total: +6,144 kB -- (11,260 kB -> 17,404 kB) - heap used: +1,640 kB -- (3,819 kB -> 5,459 kB) - - -- 1.192 ms avg per iteration -- - ----------- - function (){ - // 2. get recent -> old - // Get entries starting with newest, effectively reversing the list. - // - // a. For each get, a find is first executed implemented as a native object with - // keys mapping to entries, so this should be reasonably fast as most native - // objects are implemented as hash maps. - // - // b. For each get, the aquired item will be moved to tail which includes a - // maximum of 7 assignment operations (minimum 3). - for (var i=1,L=N+1; i 29,452 kB) - heap total: +0 kB -- (18,428 kB -> 18,428 kB) - heap used: -255 kB -- (5,479 kB -> 5,224 kB) - - -- 1.197 ms avg per iteration -- - ----------- - function (){ - // 3. get old -> recent - // Get entries starting with oldest, effectively reversing the list. - // - // - Same conditions apply as for test 2. - for (var i=1,L=N+1; i 29,132 kB) - heap total: +0 kB -- (18,428 kB -> 18,428 kB) - heap used: +3 kB -- (5,211 kB -> 5,215 kB) - - -- 1.161 ms avg per iteration -- - ----------- - function (){ - // 4. get missing - // Get try to get entries not in the cache. - // - Same conditions apply as for test 2, section a. - for (var i=1,L=N+1; i 29,132 kB) - heap total: +0 kB -- (18,428 kB -> 18,428 kB) - heap used: +5 kB -- (5,210 kB -> 5,215 kB) - - -- 1.035 ms avg per iteration -- - ----------- - function (){ - // 5. put overflow - // Overflow the cache with N more items than it can hold. - // a. The complexity of put in this case should be: - // ( + ) - for (var i=N; --i;) - c.set('key2_'+i, i); - } - rss: +2,036 kB -- (29,132 kB -> 31,168 kB) - heap total: +916 kB -- (18,428 kB -> 19,344 kB) - heap used: +542 kB -- (5,211 kB -> 5,752 kB) - - -- 1.185 ms avg per iteration -- - ----------- - function (){ - // 6. shift head -> tail - // Remove all entries going from head to tail - for (var i=1,L=N+1; i 29,760 kB) - heap total: +108 kB -- (18,320 kB -> 18,428 kB) - heap used: -1,819 kB -- (5,748 kB -> 3,929 kB) - - -- 0.023 ms avg per iteration -- - ----------- - function (){ - // 7. put - // Simply put N new items into an empty cache with exactly N space. - for (var i=N; --i;) - c.set('key'+i, i); - } - rss: +8,064 kB -- (29,876 kB -> 37,940 kB) - heap total: +8,192 kB -- (17,404 kB -> 25,596 kB) - heap used: +1,327 kB -- (3,904 kB -> 5,232 kB) - - -- 1.264 ms avg per iteration -- - ----------- - function (){ - // 8. delete random - // a. Most operations (which are not entries at head or tail) will cause closes - // siblings to be relinked. - for (var i=shuffledKeys.length, key; key = shuffledKeys[--i]; ) { - c.delete('key'+i, i); - } - } - rss: +132 kB -- (38,088 kB -> 38,220 kB) - heap total: +0 kB -- (25,596 kB -> 25,596 kB) - heap used: +410 kB -- (5,380 kB -> 5,789 kB) - - -- 1.914 ms avg per iteration -- diff --git a/node_modules/lru_map/example.html b/node_modules/lru_map/example.html deleted file mode 100755 index aea3436..0000000 --- a/node_modules/lru_map/example.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - lru - - - - - - -

Expected results:

-
adam:29 < john:26 < angela:24 -adam:29 < angela:24 < john:26 -angela:24 < john:26 < zorro:141 -
- -

Actual results:

-
- - - - diff --git a/node_modules/lru_map/lru.d.ts b/node_modules/lru_map/lru.d.ts deleted file mode 100644 index 07ea81b..0000000 --- a/node_modules/lru_map/lru.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -// An entry holds the key and value, and pointers to any older and newer entries. -interface Entry { - key :K; - value :V; -} - -export class LRUMap { - // Construct a new cache object which will hold up to limit entries. - // When the size == limit, a `put` operation will evict the oldest entry. - // - // If `entries` is provided, all entries are added to the new map. - // `entries` should be an Array or other iterable object whose elements are - // key-value pairs (2-element Arrays). Each key-value pair is added to the new Map. - // null is treated as undefined. - constructor(limit :number, entries? :Iterable<[K,V]>); - - // Convenience constructor equivalent to `new LRUMap(count(entries), entries)` - constructor(entries :Iterable<[K,V]>); - - // Current number of items - size :number; - - // Maximum number of items this map can hold - limit :number; - - // Least recently-used entry. Invalidated when map is modified. - oldest :Entry; - - // Most recently-used entry. Invalidated when map is modified. - newest :Entry; - - // Replace all values in this map with key-value pairs (2-element Arrays) from - // provided iterable. - assign(entries :Iterable<[K,V]>) : void; - - // Put into the cache associated with . Replaces any existing entry - // with the same key. Returns `this`. - set(key :K, value :V) : LRUMap; - - // Purge the least recently used (oldest) entry from the cache. - // Returns the removed entry or undefined if the cache was empty. - shift() : [K,V] | undefined; - - // Get and register recent use of . - // Returns the value associated with or undefined if not in cache. - get(key :K) : V | undefined; - - // Check if there's a value for key in the cache without registering recent use. - has(key :K) : boolean; - - // Access value for without registering recent use. Useful if you do not - // want to chage the state of the map, but only "peek" at it. - // Returns the value associated with if found, or undefined if not found. - find(key :K) : V | undefined; - - // Remove entry from cache and return its value. - // Returns the removed value, or undefined if not found. - delete(key :K) : V | undefined; - - // Removes all entries - clear() : void; - - // Returns an iterator over all keys, starting with the oldest. - keys() : Iterator; - - // Returns an iterator over all values, starting with the oldest. - values() : Iterator; - - // Returns an iterator over all entries, starting with the oldest. - entries() : Iterator<[K,V]>; - - // Returns an iterator over all entries, starting with the oldest. - [Symbol.iterator]() : Iterator<[K,V]>; - - // Call `fun` for each entry, starting with the oldest entry. - forEach(fun :(value :V, key :K, m :LRUMap)=>void, thisArg? :any) : void; - - // Returns an object suitable for JSON encoding - toJSON() : Array<{key :K, value :V}>; - - // Returns a human-readable text representation - toString() : string; -} diff --git a/node_modules/lru_map/lru.js b/node_modules/lru_map/lru.js deleted file mode 100644 index 937ccd8..0000000 --- a/node_modules/lru_map/lru.js +++ /dev/null @@ -1,305 +0,0 @@ -/** - * A doubly linked list-based Least Recently Used (LRU) cache. Will keep most - * recently used items while discarding least recently used items when its limit - * is reached. - * - * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson - * See README.md for details. - * - * Illustration of the design: - * - * entry entry entry entry - * ______ ______ ______ ______ - * | head |.newer => | |.newer => | |.newer => | tail | - * | A | | B | | C | | D | - * |______| <= older.|______| <= older.|______| <= older.|______| - * - * removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added - */ -(function(g,f){ - const e = typeof exports == 'object' ? exports : typeof g == 'object' ? g : {}; - f(e); - if (typeof define == 'function' && define.amd) { define('lru', e); } -})(this, function(exports) { - -const NEWER = Symbol('newer'); -const OLDER = Symbol('older'); - -function LRUMap(limit, entries) { - if (typeof limit !== 'number') { - // called as (entries) - entries = limit; - limit = 0; - } - - this.size = 0; - this.limit = limit; - this.oldest = this.newest = undefined; - this._keymap = new Map(); - - if (entries) { - this.assign(entries); - if (limit < 1) { - this.limit = this.size; - } - } -} - -exports.LRUMap = LRUMap; - -function Entry(key, value) { - this.key = key; - this.value = value; - this[NEWER] = undefined; - this[OLDER] = undefined; -} - - -LRUMap.prototype._markEntryAsUsed = function(entry) { - if (entry === this.newest) { - // Already the most recenlty used entry, so no need to update the list - return; - } - // HEAD--------------TAIL - // <.older .newer> - // <--- add direction -- - // A B C E - if (entry[NEWER]) { - if (entry === this.oldest) { - this.oldest = entry[NEWER]; - } - entry[NEWER][OLDER] = entry[OLDER]; // C <-- E. - } - if (entry[OLDER]) { - entry[OLDER][NEWER] = entry[NEWER]; // C. --> E - } - entry[NEWER] = undefined; // D --x - entry[OLDER] = this.newest; // D. --> E - if (this.newest) { - this.newest[NEWER] = entry; // E. <-- D - } - this.newest = entry; -}; - -LRUMap.prototype.assign = function(entries) { - let entry, limit = this.limit || Number.MAX_VALUE; - this._keymap.clear(); - let it = entries[Symbol.iterator](); - for (let itv = it.next(); !itv.done; itv = it.next()) { - let e = new Entry(itv.value[0], itv.value[1]); - this._keymap.set(e.key, e); - if (!entry) { - this.oldest = e; - } else { - entry[NEWER] = e; - e[OLDER] = entry; - } - entry = e; - if (limit-- == 0) { - throw new Error('overflow'); - } - } - this.newest = entry; - this.size = this._keymap.size; -}; - -LRUMap.prototype.get = function(key) { - // First, find our cache entry - var entry = this._keymap.get(key); - if (!entry) return; // Not cached. Sorry. - // As was found in the cache, register it as being requested recently - this._markEntryAsUsed(entry); - return entry.value; -}; - -LRUMap.prototype.set = function(key, value) { - var entry = this._keymap.get(key); - - if (entry) { - // update existing - entry.value = value; - this._markEntryAsUsed(entry); - return this; - } - - // new entry - this._keymap.set(key, (entry = new Entry(key, value))); - - if (this.newest) { - // link previous tail to the new tail (entry) - this.newest[NEWER] = entry; - entry[OLDER] = this.newest; - } else { - // we're first in -- yay - this.oldest = entry; - } - - // add new entry to the end of the linked list -- it's now the freshest entry. - this.newest = entry; - ++this.size; - if (this.size > this.limit) { - // we hit the limit -- remove the head - this.shift(); - } - - return this; -}; - -LRUMap.prototype.shift = function() { - // todo: handle special case when limit == 1 - var entry = this.oldest; - if (entry) { - if (this.oldest[NEWER]) { - // advance the list - this.oldest = this.oldest[NEWER]; - this.oldest[OLDER] = undefined; - } else { - // the cache is exhausted - this.oldest = undefined; - this.newest = undefined; - } - // Remove last strong reference to and remove links from the purged - // entry being returned: - entry[NEWER] = entry[OLDER] = undefined; - this._keymap.delete(entry.key); - --this.size; - return [entry.key, entry.value]; - } -}; - -// ---------------------------------------------------------------------------- -// Following code is optional and can be removed without breaking the core -// functionality. - -LRUMap.prototype.find = function(key) { - let e = this._keymap.get(key); - return e ? e.value : undefined; -}; - -LRUMap.prototype.has = function(key) { - return this._keymap.has(key); -}; - -LRUMap.prototype['delete'] = function(key) { - var entry = this._keymap.get(key); - if (!entry) return; - this._keymap.delete(entry.key); - if (entry[NEWER] && entry[OLDER]) { - // relink the older entry with the newer entry - entry[OLDER][NEWER] = entry[NEWER]; - entry[NEWER][OLDER] = entry[OLDER]; - } else if (entry[NEWER]) { - // remove the link to us - entry[NEWER][OLDER] = undefined; - // link the newer entry to head - this.oldest = entry[NEWER]; - } else if (entry[OLDER]) { - // remove the link to us - entry[OLDER][NEWER] = undefined; - // link the newer entry to head - this.newest = entry[OLDER]; - } else {// if(entry[OLDER] === undefined && entry.newer === undefined) { - this.oldest = this.newest = undefined; - } - - this.size--; - return entry.value; -}; - -LRUMap.prototype.clear = function() { - // Not clearing links should be safe, as we don't expose live links to user - this.oldest = this.newest = undefined; - this.size = 0; - this._keymap.clear(); -}; - - -function EntryIterator(oldestEntry) { this.entry = oldestEntry; } -EntryIterator.prototype[Symbol.iterator] = function() { return this; } -EntryIterator.prototype.next = function() { - let ent = this.entry; - if (ent) { - this.entry = ent[NEWER]; - return { done: false, value: [ent.key, ent.value] }; - } else { - return { done: true, value: undefined }; - } -}; - - -function KeyIterator(oldestEntry) { this.entry = oldestEntry; } -KeyIterator.prototype[Symbol.iterator] = function() { return this; } -KeyIterator.prototype.next = function() { - let ent = this.entry; - if (ent) { - this.entry = ent[NEWER]; - return { done: false, value: ent.key }; - } else { - return { done: true, value: undefined }; - } -}; - -function ValueIterator(oldestEntry) { this.entry = oldestEntry; } -ValueIterator.prototype[Symbol.iterator] = function() { return this; } -ValueIterator.prototype.next = function() { - let ent = this.entry; - if (ent) { - this.entry = ent[NEWER]; - return { done: false, value: ent.value }; - } else { - return { done: true, value: undefined }; - } -}; - - -LRUMap.prototype.keys = function() { - return new KeyIterator(this.oldest); -}; - -LRUMap.prototype.values = function() { - return new ValueIterator(this.oldest); -}; - -LRUMap.prototype.entries = function() { - return this; -}; - -LRUMap.prototype[Symbol.iterator] = function() { - return new EntryIterator(this.oldest); -}; - -LRUMap.prototype.forEach = function(fun, thisObj) { - if (typeof thisObj !== 'object') { - thisObj = this; - } - let entry = this.oldest; - while (entry) { - fun.call(thisObj, entry.value, entry.key, this); - entry = entry[NEWER]; - } -}; - -/** Returns a JSON (array) representation */ -LRUMap.prototype.toJSON = function() { - var s = new Array(this.size), i = 0, entry = this.oldest; - while (entry) { - s[i++] = { key: entry.key, value: entry.value }; - entry = entry[NEWER]; - } - return s; -}; - -/** Returns a String representation */ -LRUMap.prototype.toString = function() { - var s = '', entry = this.oldest; - while (entry) { - s += String(entry.key)+':'+entry.value; - entry = entry[NEWER]; - if (entry) { - s += ' < '; - } - } - return s; -}; - -}); diff --git a/node_modules/lru_map/package.json b/node_modules/lru_map/package.json deleted file mode 100644 index 6530006..0000000 --- a/node_modules/lru_map/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "lru_map@^0.3.3", - "_id": "lru_map@0.3.3", - "_inBundle": false, - "_integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "_location": "/lru_map", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "lru_map@^0.3.3", - "name": "lru_map", - "escapedName": "lru_map", - "rawSpec": "^0.3.3", - "saveSpec": null, - "fetchSpec": "^0.3.3" - }, - "_requiredBy": [ - "/@sentry/node" - ], - "_resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "_shasum": "b5c8351b9464cbd750335a79650a0ec0e56118dd", - "_spec": "lru_map@^0.3.3", - "_where": "C:\\code\\com.mill\\node_modules\\@sentry\\node", - "author": { - "name": "Rasmus Andersson", - "email": "me@rsms.me" - }, - "bugs": { - "url": "https://github.com/rsms/js-lru/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Finite key-value map using the Least Recently Used (LRU) algorithm where the most recently used objects are keept in the map while less recently used items are evicted to make room for new ones.", - "devDependencies": { - "typescript": "^2.0.10" - }, - "homepage": "https://github.com/rsms/js-lru#readme", - "keywords": [ - "cache", - "lru", - "buffer", - "map" - ], - "license": "MIT", - "main": "lru.js", - "name": "lru_map", - "repository": { - "type": "git", - "url": "git+https://github.com/rsms/js-lru.git" - }, - "scripts": { - "benchmark": "node --expose-gc benchmark.js", - "prepublish": "npm test", - "test": "node test.js && echo 'Verifying TypeScript definition...' && tsc --noEmit" - }, - "typings": "lru.d.ts", - "version": "0.3.3" -} diff --git a/node_modules/lru_map/test.js b/node_modules/lru_map/test.js deleted file mode 100644 index a7e3dc4..0000000 --- a/node_modules/lru_map/test.js +++ /dev/null @@ -1,336 +0,0 @@ -// Test which will run in nodejs -// $ node test.js -// (Might work with other CommonJS-compatible environments) -const assert = require('assert'); -const LRUMap = require('./lru').LRUMap; -const asserteq = assert.equal; -const tests = { - -['set and get']() { - let c = new LRUMap(4); - asserteq(c.size, 0); - asserteq(c.limit, 4); - asserteq(c.oldest, undefined); - asserteq(c.newest, undefined); - - c.set('adam', 29) - .set('john', 26) - .set('angela', 24) - .set('bob', 48); - asserteq(c.toString(), 'adam:29 < john:26 < angela:24 < bob:48'); - asserteq(c.size, 4); - - asserteq(c.get('adam'), 29); - asserteq(c.get('john'), 26); - asserteq(c.get('angela'), 24); - asserteq(c.get('bob'), 48); - asserteq(c.toString(), 'adam:29 < john:26 < angela:24 < bob:48'); - - asserteq(c.get('angela'), 24); - asserteq(c.toString(), 'adam:29 < john:26 < bob:48 < angela:24'); - - c.set('ygwie', 81); - asserteq(c.toString(), 'john:26 < bob:48 < angela:24 < ygwie:81'); - asserteq(c.size, 4); - asserteq(c.get('adam'), undefined); - - c.set('john', 11); - asserteq(c.toString(), 'bob:48 < angela:24 < ygwie:81 < john:11'); - asserteq(c.get('john'), 11); - - let expectedKeys = ['bob', 'angela', 'ygwie', 'john']; - c.forEach(function(v, k) { - //sys.sets(k+': '+v); - asserteq(k, expectedKeys.shift()); - }) - - // removing one item decrements size by one - let currentSize = c.size; - assert(c.delete('john') !== undefined); - asserteq(currentSize - 1, c.size); -}, - -['construct with iterator']() { - let verifyEntries = function(c) { - asserteq(c.size, 4); - asserteq(c.limit, 4); - asserteq(c.oldest.key, 'adam'); - asserteq(c.newest.key, 'bob'); - asserteq(c.get('adam'), 29); - asserteq(c.get('john'), 26); - asserteq(c.get('angela'), 24); - asserteq(c.get('bob'), 48); - }; - - // with explicit limit - verifyEntries(new LRUMap(4, [ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ])); - - // with inferred limit - verifyEntries(new LRUMap([ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ])); -}, - -assign() { - let c = new LRUMap([ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ]); - - let newEntries = [ - ['mimi', 1], - ['patrick', 2], - ['jane', 3], - ['fred', 4], - ]; - c.assign(newEntries); - asserteq(c.size, 4); - asserteq(c.limit, 4); - asserteq(c.oldest.key, newEntries[0][0]); - asserteq(c.newest.key, newEntries[newEntries.length-1][0]); - let i = 0; - c.forEach(function(v, k) { - asserteq(k, newEntries[i][0]); - asserteq(v, newEntries[i][1]); - i++; - }); - - // assigning too many items should throw an exception - assert.throws(() => { - c.assign([ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ['ken', 30], - ]); - }, /overflow/); - - // assigning less than limit should not affect limit but adjust size - c.assign([ - ['adam', 29], - ['john', 26], - ['angela', 24], - ]); - asserteq(c.size, 3); - asserteq(c.limit, 4); -}, - -delete() { - let c = new LRUMap([ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ]); - c.delete('adam'); - asserteq(c.size, 3); - c.delete('angela'); - asserteq(c.size, 2); - c.delete('bob'); - asserteq(c.size, 1); - c.delete('john'); - asserteq(c.size, 0); - asserteq(c.oldest, undefined); - asserteq(c.newest, undefined); -}, - -clear() { - let c = new LRUMap(4); - c.set('adam', 29); - c.set('john', 26); - asserteq(c.size, 2); - c.clear(); - asserteq(c.size, 0); - asserteq(c.oldest, undefined); - asserteq(c.newest, undefined); -}, - -shift() { - let c2 = new LRUMap(4); - asserteq(c2.size, 0); - c2.set('a', 1) - c2.set('b', 2) - c2.set('c', 3) - asserteq(c2.size, 3); - - let e = c2.shift(); - asserteq(e[0], 'a'); - asserteq(e[1], 1); - - e = c2.shift(); - asserteq(e[0], 'b'); - asserteq(e[1], 2); - - e = c2.shift(); - asserteq(e[0], 'c'); - asserteq(e[1], 3); - - // c2 should be empty - c2.forEach(function () { assert(false); }); - asserteq(c2.size, 0); -}, - -set() { - // Note: v0.1 allows putting same key multiple times. v0.2 does not. - c = new LRUMap(4); - c.set('a', 1); - c.set('a', 2); - c.set('a', 3); - c.set('a', 4); - asserteq(c.size, 1); - asserteq(c.newest, c.oldest); - assert.deepEqual(c.newest, {key:'a', value:4 }); - - c.set('a', 5); - asserteq(c.size, 1); - asserteq(c.newest, c.oldest); - assert.deepEqual(c.newest, {key:'a', value:5 }); - - c.set('b', 6); - asserteq(c.size, 2); - assert(c.newest !== c.oldest); - - assert.deepEqual(c.newest, { key:'b', value:6 }); - assert.deepEqual(c.oldest, { key:'a', value:5 }); - - c.shift(); - asserteq(c.size, 1); - c.shift(); - asserteq(c.size, 0); - c.forEach(function(){ assert(false) }); -}, - - -['entry iterator']() { - let c = new LRUMap(4, [ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ]); - - let verifyEntries = function(iterable) { - asserteq(typeof iterable[Symbol.iterator], 'function'); - let it = iterable[Symbol.iterator](); - assert.deepEqual(it.next().value, ['adam', 29]); - assert.deepEqual(it.next().value, ['john', 26]); - assert.deepEqual(it.next().value, ['angela', 24]); - assert.deepEqual(it.next().value, ['bob', 48]); - assert(it.next().done); - }; - - verifyEntries(c); - verifyEntries(c.entries()); -}, - - -['key iterator']() { - let c = new LRUMap(4, [ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ]); - let kit = c.keys(); - asserteq(kit.next().value, 'adam'); - asserteq(kit.next().value, 'john'); - asserteq(kit.next().value, 'angela'); - asserteq(kit.next().value, 'bob'); - assert(kit.next().done); -}, - - -['value iterator']() { - let c = new LRUMap(4, [ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ]); - let kit = c.values(); - asserteq(kit.next().value, 29); - asserteq(kit.next().value, 26); - asserteq(kit.next().value, 24); - asserteq(kit.next().value, 48); - assert(kit.next().done); -}, - - -toJSON() { - let c = new LRUMap(4, [ - ['adam', 29], - ['john', 26], - ['angela', 24], - ['bob', 48], - ]); - let json = c.toJSON(); - assert(json.length == 4); - assert.deepEqual(json, [ - {key:'adam', value:29}, - {key:'john', value:26}, - {key:'angela', value:24}, - {key:'bob', value:48}, - ]); -}, - - -}; // tests - - -function fmttime(t) { - return (Math.round((t)*10)/10)+'ms'; -} - -function die(err) { - console.error('\n' + (err.stack || err)); - process.exit(1); -} - -function runNextTest(tests, testNames, allDoneCallback) { - let testName = testNames[0]; - if (!testName) { - return allDoneCallback(); - } - process.stdout.write(testName+' ... '); - let t1 = Date.now(); - let next = function() { - t1 = Date.now() - t1; - if (t1 > 10) { - process.stdout.write('ok ('+fmttime(t1)+')\n'); - } else { - process.stdout.write('ok\n'); - } - runNextTest(tests, testNames.slice(1), allDoneCallback); - }; - try { - let p = tests[testName](); - if (p && p instanceof Promise) { - p.then(next).catch(die); - } else { - next(); - } - } catch (err) { - die(err); - } -} - -let t = Date.now(); -runNextTest(tests, Object.keys(tests), function() { - t = Date.now() - t; - let timestr = ''; - if (t > 10) { - timestr = '(' + fmttime(t) + ')'; - } - console.log(`${Object.keys(tests).length} tests passed ${timestr}`); -}); diff --git a/node_modules/lru_map/tsconfig.json b/node_modules/lru_map/tsconfig.json deleted file mode 100644 index 96e8ad0..0000000 --- a/node_modules/lru_map/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitAny": false, - "sourceMap": false, - "lib": [ - "es6", - "dom" - ], - "pretty": true - }, - "files": [ - "tstest.ts" - ] -} \ No newline at end of file diff --git a/node_modules/lru_map/tstest.ts b/node_modules/lru_map/tstest.ts deleted file mode 100644 index 7fd3eeb..0000000 --- a/node_modules/lru_map/tstest.ts +++ /dev/null @@ -1,6 +0,0 @@ -import {LRUMap} from './lru' - -let m = new LRUMap(3); -let entit = m.entries(); -let k : string = entit.next().value[0]; -let v : number = entit.next().value[1]; diff --git a/node_modules/node-fetch/LICENSE.md b/node_modules/node-fetch/LICENSE.md deleted file mode 100644 index 660ffec..0000000 --- a/node_modules/node-fetch/LICENSE.md +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 David Frank - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/node-fetch/README.md b/node_modules/node-fetch/README.md deleted file mode 100644 index 4f87a59..0000000 --- a/node_modules/node-fetch/README.md +++ /dev/null @@ -1,633 +0,0 @@ -node-fetch -========== - -[![npm version][npm-image]][npm-url] -[![build status][travis-image]][travis-url] -[![coverage status][codecov-image]][codecov-url] -[![install size][install-size-image]][install-size-url] -[![Discord][discord-image]][discord-url] - -A light-weight module that brings `window.fetch` to Node.js - -(We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567)) - -[![Backers][opencollective-image]][opencollective-url] - - - -- [Motivation](#motivation) -- [Features](#features) -- [Difference from client-side fetch](#difference-from-client-side-fetch) -- [Installation](#installation) -- [Loading and configuring the module](#loading-and-configuring-the-module) -- [Common Usage](#common-usage) - - [Plain text or HTML](#plain-text-or-html) - - [JSON](#json) - - [Simple Post](#simple-post) - - [Post with JSON](#post-with-json) - - [Post with form parameters](#post-with-form-parameters) - - [Handling exceptions](#handling-exceptions) - - [Handling client and server errors](#handling-client-and-server-errors) -- [Advanced Usage](#advanced-usage) - - [Streams](#streams) - - [Buffer](#buffer) - - [Accessing Headers and other Meta data](#accessing-headers-and-other-meta-data) - - [Extract Set-Cookie Header](#extract-set-cookie-header) - - [Post data using a file stream](#post-data-using-a-file-stream) - - [Post with form-data (detect multipart)](#post-with-form-data-detect-multipart) - - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal) -- [API](#api) - - [fetch(url[, options])](#fetchurl-options) - - [Options](#options) - - [Class: Request](#class-request) - - [Class: Response](#class-response) - - [Class: Headers](#class-headers) - - [Interface: Body](#interface-body) - - [Class: FetchError](#class-fetcherror) -- [License](#license) -- [Acknowledgement](#acknowledgement) - - - -## Motivation - -Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime. - -See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side). - -## Features - -- Stay consistent with `window.fetch` API. -- Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences. -- Use native promise but allow substituting it with [insert your favorite promise library]. -- Use native Node streams for body on both request and response. -- Decode content encoding (gzip/deflate) properly and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically. -- Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting. - -## Difference from client-side fetch - -- See [Known Differences](LIMITS.md) for details. -- If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue. -- Pull requests are welcomed too! - -## Installation - -Current stable release (`2.x`) - -```sh -$ npm install node-fetch -``` - -## Loading and configuring the module -We suggest you load the module via `require` until the stabilization of ES modules in node: -```js -const fetch = require('node-fetch'); -``` - -If you are using a Promise library other than native, set it through `fetch.Promise`: -```js -const Bluebird = require('bluebird'); - -fetch.Promise = Bluebird; -``` - -## Common Usage - -NOTE: The documentation below is up-to-date with `2.x` releases; see the [`1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences. - -#### Plain text or HTML -```js -fetch('https://github.com/') - .then(res => res.text()) - .then(body => console.log(body)); -``` - -#### JSON - -```js - -fetch('https://api.github.com/users/github') - .then(res => res.json()) - .then(json => console.log(json)); -``` - -#### Simple Post -```js -fetch('https://httpbin.org/post', { method: 'POST', body: 'a=1' }) - .then(res => res.json()) // expecting a json response - .then(json => console.log(json)); -``` - -#### Post with JSON - -```js -const body = { a: 1 }; - -fetch('https://httpbin.org/post', { - method: 'post', - body: JSON.stringify(body), - headers: { 'Content-Type': 'application/json' }, - }) - .then(res => res.json()) - .then(json => console.log(json)); -``` - -#### Post with form parameters -`URLSearchParams` is available in Node.js as of v7.5.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods. - -NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such: - -```js -const { URLSearchParams } = require('url'); - -const params = new URLSearchParams(); -params.append('a', 1); - -fetch('https://httpbin.org/post', { method: 'POST', body: params }) - .then(res => res.json()) - .then(json => console.log(json)); -``` - -#### Handling exceptions -NOTE: 3xx-5xx responses are *NOT* exceptions and should be handled in `then()`; see the next section for more information. - -Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, network errors and operational errors, which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md) for more details. - -```js -fetch('https://domain.invalid/') - .catch(err => console.error(err)); -``` - -#### Handling client and server errors -It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses: - -```js -function checkStatus(res) { - if (res.ok) { // res.status >= 200 && res.status < 300 - return res; - } else { - throw MyCustomError(res.statusText); - } -} - -fetch('https://httpbin.org/status/400') - .then(checkStatus) - .then(res => console.log('will not get here...')) -``` - -## Advanced Usage - -#### Streams -The "Node.js way" is to use streams when possible: - -```js -fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') - .then(res => { - const dest = fs.createWriteStream('./octocat.png'); - res.body.pipe(dest); - }); -``` - -In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch -errors -- the longer a response runs, the more likely it is to encounter an error. - -```js -const fetch = require('node-fetch'); -const response = await fetch('https://httpbin.org/stream/3'); -try { - for await (const chunk of response.body) { - console.dir(JSON.parse(chunk.toString())); - } -} catch (err) { - console.error(err.stack); -} -``` - -In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams -did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors -directly from the stream and wait on it response to fully close. - -```js -const fetch = require('node-fetch'); -const read = async body => { - let error; - body.on('error', err => { - error = err; - }); - for await (const chunk of body) { - console.dir(JSON.parse(chunk.toString())); - } - return new Promise((resolve, reject) => { - body.on('close', () => { - error ? reject(error) : resolve(); - }); - }); -}; -try { - const response = await fetch('https://httpbin.org/stream/3'); - await read(response.body); -} catch (err) { - console.error(err.stack); -} -``` - -#### Buffer -If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API) - -```js -const fileType = require('file-type'); - -fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') - .then(res => res.buffer()) - .then(buffer => fileType(buffer)) - .then(type => { /* ... */ }); -``` - -#### Accessing Headers and other Meta data -```js -fetch('https://github.com/') - .then(res => { - console.log(res.ok); - console.log(res.status); - console.log(res.statusText); - console.log(res.headers.raw()); - console.log(res.headers.get('content-type')); - }); -``` - -#### Extract Set-Cookie Header - -Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API. - -```js -fetch(url).then(res => { - // returns an array of values, instead of a string of comma-separated values - console.log(res.headers.raw()['set-cookie']); -}); -``` - -#### Post data using a file stream - -```js -const { createReadStream } = require('fs'); - -const stream = createReadStream('input.txt'); - -fetch('https://httpbin.org/post', { method: 'POST', body: stream }) - .then(res => res.json()) - .then(json => console.log(json)); -``` - -#### Post with form-data (detect multipart) - -```js -const FormData = require('form-data'); - -const form = new FormData(); -form.append('a', 1); - -fetch('https://httpbin.org/post', { method: 'POST', body: form }) - .then(res => res.json()) - .then(json => console.log(json)); - -// OR, using custom headers -// NOTE: getHeaders() is non-standard API - -const form = new FormData(); -form.append('a', 1); - -const options = { - method: 'POST', - body: form, - headers: form.getHeaders() -} - -fetch('https://httpbin.org/post', options) - .then(res => res.json()) - .then(json => console.log(json)); -``` - -#### Request cancellation with AbortSignal - -> NOTE: You may cancel streamed requests only on Node >= v8.0.0 - -You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller). - -An example of timing out a request after 150ms could be achieved as the following: - -```js -import AbortController from 'abort-controller'; - -const controller = new AbortController(); -const timeout = setTimeout( - () => { controller.abort(); }, - 150, -); - -fetch(url, { signal: controller.signal }) - .then(res => res.json()) - .then( - data => { - useData(data) - }, - err => { - if (err.name === 'AbortError') { - // request was aborted - } - }, - ) - .finally(() => { - clearTimeout(timeout); - }); -``` - -See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) for more examples. - - -## API - -### fetch(url[, options]) - -- `url` A string representing the URL for fetching -- `options` [Options](#fetch-options) for the HTTP(S) request -- Returns: Promise<[Response](#class-response)> - -Perform an HTTP(S) fetch. - -`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`. - - -### Options - -The default values are shown after each option key. - -```js -{ - // These properties are part of the Fetch Standard - method: 'GET', - headers: {}, // request headers. format is the identical to that accepted by the Headers constructor (see below) - body: null, // request body. can be null, a string, a Buffer, a Blob, or a Node.js Readable stream - redirect: 'follow', // set to `manual` to extract redirect headers, `error` to reject redirect - signal: null, // pass an instance of AbortSignal to optionally abort requests - - // The following properties are node-fetch extensions - follow: 20, // maximum redirect count. 0 to not follow redirect - timeout: 0, // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead. - compress: true, // support gzip/deflate content encoding. false to disable - size: 0, // maximum response body size in bytes. 0 to disable - agent: null // http(s).Agent instance or function that returns an instance (see below) -} -``` - -##### Default Headers - -If no values are set, the following request headers will be sent automatically: - -Header | Value -------------------- | -------------------------------------------------------- -`Accept-Encoding` | `gzip,deflate` _(when `options.compress === true`)_ -`Accept` | `*/*` -`Connection` | `close` _(when no `options.agent` is present)_ -`Content-Length` | _(automatically calculated, if possible)_ -`Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_ -`User-Agent` | `node-fetch/1.0 (+https://github.com/bitinn/node-fetch)` - -Note: when `body` is a `Stream`, `Content-Length` is not set automatically. - -##### Custom Agent - -The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following: - -- Support self-signed certificate -- Use only IPv4 or IPv6 -- Custom DNS Lookup - -See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information. - -In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol. - -```js -const httpAgent = new http.Agent({ - keepAlive: true -}); -const httpsAgent = new https.Agent({ - keepAlive: true -}); - -const options = { - agent: function (_parsedURL) { - if (_parsedURL.protocol == 'http:') { - return httpAgent; - } else { - return httpsAgent; - } - } -} -``` - - -### Class: Request - -An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface. - -Due to the nature of Node.js, the following properties are not implemented at this moment: - -- `type` -- `destination` -- `referrer` -- `referrerPolicy` -- `mode` -- `credentials` -- `cache` -- `integrity` -- `keepalive` - -The following node-fetch extension properties are provided: - -- `follow` -- `compress` -- `counter` -- `agent` - -See [options](#fetch-options) for exact meaning of these extensions. - -#### new Request(input[, options]) - -*(spec-compliant)* - -- `input` A string representing a URL, or another `Request` (which will be cloned) -- `options` [Options][#fetch-options] for the HTTP(S) request - -Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). - -In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object. - - -### Class: Response - -An HTTP(S) response. This class implements the [Body](#iface-body) interface. - -The following properties are not implemented in node-fetch at this moment: - -- `Response.error()` -- `Response.redirect()` -- `type` -- `trailer` - -#### new Response([body[, options]]) - -*(spec-compliant)* - -- `body` A `String` or [`Readable` stream][node-readable] -- `options` A [`ResponseInit`][response-init] options dictionary - -Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response). - -Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly. - -#### response.ok - -*(spec-compliant)* - -Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300. - -#### response.redirected - -*(spec-compliant)* - -Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0. - - -### Class: Headers - -This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented. - -#### new Headers([init]) - -*(spec-compliant)* - -- `init` Optional argument to pre-fill the `Headers` object - -Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object. - -```js -// Example adapted from https://fetch.spec.whatwg.org/#example-headers-class - -const meta = { - 'Content-Type': 'text/xml', - 'Breaking-Bad': '<3' -}; -const headers = new Headers(meta); - -// The above is equivalent to -const meta = [ - [ 'Content-Type', 'text/xml' ], - [ 'Breaking-Bad', '<3' ] -]; -const headers = new Headers(meta); - -// You can in fact use any iterable objects, like a Map or even another Headers -const meta = new Map(); -meta.set('Content-Type', 'text/xml'); -meta.set('Breaking-Bad', '<3'); -const headers = new Headers(meta); -const copyOfHeaders = new Headers(headers); -``` - - -### Interface: Body - -`Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes. - -The following methods are not yet implemented in node-fetch at this moment: - -- `formData()` - -#### body.body - -*(deviation from spec)* - -* Node.js [`Readable` stream][node-readable] - -Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable]. - -#### body.bodyUsed - -*(spec-compliant)* - -* `Boolean` - -A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again. - -#### body.arrayBuffer() -#### body.blob() -#### body.json() -#### body.text() - -*(spec-compliant)* - -* Returns: Promise - -Consume the body and return a promise that will resolve to one of these formats. - -#### body.buffer() - -*(node-fetch extension)* - -* Returns: Promise<Buffer> - -Consume the body and return a promise that will resolve to a Buffer. - -#### body.textConverted() - -*(node-fetch extension)* - -* Returns: Promise<String> - -Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8 if possible. - -(This API requires an optional dependency of the npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.) - - -### Class: FetchError - -*(node-fetch extension)* - -An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info. - - -### Class: AbortError - -*(node-fetch extension)* - -An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info. - -## Acknowledgement - -Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference. - -`node-fetch` v1 was maintained by [@bitinn](https://github.com/bitinn); v2 was maintained by [@TimothyGu](https://github.com/timothygu), [@bitinn](https://github.com/bitinn) and [@jimmywarting](https://github.com/jimmywarting); v2 readme is written by [@jkantr](https://github.com/jkantr). - -## License - -MIT - -[npm-image]: https://flat.badgen.net/npm/v/node-fetch -[npm-url]: https://www.npmjs.com/package/node-fetch -[travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch -[travis-url]: https://travis-ci.org/bitinn/node-fetch -[codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master -[codecov-url]: https://codecov.io/gh/bitinn/node-fetch -[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch -[install-size-url]: https://packagephobia.now.sh/result?p=node-fetch -[discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square -[discord-url]: https://discord.gg/Zxbndcm -[opencollective-image]: https://opencollective.com/node-fetch/backers.svg -[opencollective-url]: https://opencollective.com/node-fetch -[whatwg-fetch]: https://fetch.spec.whatwg.org/ -[response-init]: https://fetch.spec.whatwg.org/#responseinit -[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams -[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers -[LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md -[ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md -[UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md diff --git a/node_modules/node-fetch/browser.js b/node_modules/node-fetch/browser.js deleted file mode 100644 index 7035edb..0000000 --- a/node_modules/node-fetch/browser.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -// ref: https://github.com/tc39/proposal-global -var getGlobal = function () { - // the only reliable means to get the global object is - // `Function('return this')()` - // However, this causes CSP violations in Chrome apps. - if (typeof self !== 'undefined') { return self; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - throw new Error('unable to locate global object'); -} - -var globalObject = getGlobal(); - -module.exports = exports = globalObject.fetch; - -// Needed for TypeScript and Webpack. -if (globalObject.fetch) { - exports.default = globalObject.fetch.bind(global); -} - -exports.Headers = globalObject.Headers; -exports.Request = globalObject.Request; -exports.Response = globalObject.Response; diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js deleted file mode 100644 index a8b6be4..0000000 --- a/node_modules/node-fetch/lib/index.es.js +++ /dev/null @@ -1,1776 +0,0 @@ -process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); - -import Stream from 'stream'; -import http from 'http'; -import Url from 'url'; -import whatwgUrl from 'whatwg-url'; -import https from 'https'; -import zlib from 'zlib'; - -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; - -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); - -class Blob { - constructor() { - this[TYPE] = ''; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - - this[BUFFER] = Buffer.concat(buffers); - - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; - - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); - - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} - -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); - -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ - -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); - - this.message = message; - this.type = type; - - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; - -let convert; -try { - convert = require('encoding').convert; -} catch (e) {} - -const INTERNALS = Symbol('Body internals'); - -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; - -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} - -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, - - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, - - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, - - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; - - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; - -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); - -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; - -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - - this[INTERNALS].disturbed = true; - - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } - - let body = this.body; - - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } - - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; - - return new Body.Promise(function (resolve, reject) { - let resTimeout; - - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } - - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } - - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - - accumBytes += chunk.length; - accum.push(chunk); - }); - - body.on('end', function () { - if (abort) { - return; - } - - clearTimeout(resTimeout); - - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} - -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - - // html5 - if (!res && str) { - res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; - - this[MAP] = Object.create(null); - - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } - - return; - } - - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } - - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } - - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - - return this[MAP][key].join(', '); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } - - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } - - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } - - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } - - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } - - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } - - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); - -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; - - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} - -const INTERNAL = Symbol('internal'); - -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} - -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; - - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } - - this[INTERNAL].index = index + 1; - - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); - -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } - - return obj; -} - -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} - -const INTERNALS$1 = Symbol('Response internals'); - -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; - -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - Body.call(this, body, opts); - - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - - get url() { - return this[INTERNALS$1].url || ''; - } - - get status() { - return this[INTERNALS$1].status; - } - - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } - - get redirected() { - return this[INTERNALS$1].counter > 0; - } - - get statusText() { - return this[INTERNALS$1].statusText; - } - - get headers() { - return this[INTERNALS$1].headers; - } - - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} - -Body.mixIn(Response.prototype); - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); - -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); - -const INTERNALS$2 = Symbol('Request internals'); -const URL = Url.URL || whatwgUrl.URL; - -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; - -/** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ -function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); - } - - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); -} - -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} - -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} - -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - let parsedURL; - - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } - - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } - - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - - const headers = new Headers(init.headers || input.headers || {}); - - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; - - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } - - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } - - get method() { - return this[INTERNALS$2].method; - } - - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } - - get headers() { - return this[INTERNALS$2].headers; - } - - get redirect() { - return this[INTERNALS$2].redirect; - } - - get signal() { - return this[INTERNALS$2].signal; - } - - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} - -Body.mixIn(Request.prototype); - -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); - -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } - - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } - - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } - - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js - - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} - -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -const URL$1 = Url.URL || whatwgUrl.URL; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; - -const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; - - return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); -}; - -/** - * isSameProtocol reports whether the two provided URLs use the same protocol. - * - * Both domains must already be in canonical form. - * @param {string|URL} original - * @param {string|URL} destination - */ -const isSameProtocol = function isSameProtocol(destination, original) { - const orig = new URL$1(original).protocol; - const dest = new URL$1(destination).protocol; - - return orig === dest; -}; - -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } - - Body.Promise = fetch.Promise; - - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; - - let response = null; - - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - destroyStream(request.body, error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; - - if (signal && signal.aborted) { - abort(); - return; - } - - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; - - // send request - const req = send(options); - let reqTimeout; - - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } - - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } - - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } - - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - - if (response && response.body) { - destroyStream(response.body, err); - } - - finalize(); - }); - - fixResponseChunkedTransferBadEnding(req, function (err) { - if (signal && signal.aborted) { - return; - } - - destroyStream(response.body, err); - }); - - /* c8 ignore next 18 */ - if (parseInt(process.version.substring(1)) < 14) { - // Before Node.js 14, pipeline() does not fully support async iterators and does not always - // properly handle when the socket close/end events are out of order. - req.on('socket', function (s) { - s.addListener('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = s.listenerCount('data') > 0; - - // if end happened before close but the socket didn't emit an error, do it now - if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - response.body.emit('error', err); - } - }); - }); - } - - req.on('response', function (res) { - clearTimeout(reqTimeout); - - const headers = createHeadersLenient(res.headers); - - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); - - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = location === null ? null : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); - finalize(); - return; - } - } - - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; - - if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { - for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { - requestOpts.headers.delete(name); - } - } - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } - - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } - - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } - - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - raw.on('end', function () { - // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. - if (!response) { - response = new Response(body, response_options); - resolve(response); - } - }); - return; - } - - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } - - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); - - writeToStream(req, request); - }); -} -function fixResponseChunkedTransferBadEnding(request, errorCallback) { - let socket; - - request.on('socket', function (s) { - socket = s; - }); - - request.on('response', function (response) { - const headers = response.headers; - - if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { - response.once('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = socket.listenerCount('data') > 0; - - if (hasDataListener && !hadError) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - errorCallback(err); - } - }); - } - }); -} - -function destroyStream(stream, err) { - if (stream.destroy) { - stream.destroy(err); - } else { - // node < 8 - stream.emit('error', err); - stream.end(); - } -} - -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; - -// expose Promise -fetch.Promise = global.Promise; - -export default fetch; -export { Headers, Request, Response, FetchError }; diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js deleted file mode 100644 index 06a61a6..0000000 --- a/node_modules/node-fetch/lib/index.js +++ /dev/null @@ -1,1785 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var Stream = _interopDefault(require('stream')); -var http = _interopDefault(require('http')); -var Url = _interopDefault(require('url')); -var whatwgUrl = _interopDefault(require('whatwg-url')); -var https = _interopDefault(require('https')); -var zlib = _interopDefault(require('zlib')); - -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; - -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); - -class Blob { - constructor() { - this[TYPE] = ''; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - - this[BUFFER] = Buffer.concat(buffers); - - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; - - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); - - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} - -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); - -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ - -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); - - this.message = message; - this.type = type; - - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; - -let convert; -try { - convert = require('encoding').convert; -} catch (e) {} - -const INTERNALS = Symbol('Body internals'); - -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; - -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} - -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, - - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, - - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, - - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; - - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; - -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); - -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; - -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - - this[INTERNALS].disturbed = true; - - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } - - let body = this.body; - - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } - - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; - - return new Body.Promise(function (resolve, reject) { - let resTimeout; - - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } - - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } - - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - - accumBytes += chunk.length; - accum.push(chunk); - }); - - body.on('end', function () { - if (abort) { - return; - } - - clearTimeout(resTimeout); - - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} - -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - - // html5 - if (!res && str) { - res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; - - this[MAP] = Object.create(null); - - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } - - return; - } - - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } - - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } - - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - - return this[MAP][key].join(', '); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } - - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } - - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } - - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } - - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } - - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } - - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); - -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; - - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} - -const INTERNAL = Symbol('internal'); - -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} - -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; - - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } - - this[INTERNAL].index = index + 1; - - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); - -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } - - return obj; -} - -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} - -const INTERNALS$1 = Symbol('Response internals'); - -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; - -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - Body.call(this, body, opts); - - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - - get url() { - return this[INTERNALS$1].url || ''; - } - - get status() { - return this[INTERNALS$1].status; - } - - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } - - get redirected() { - return this[INTERNALS$1].counter > 0; - } - - get statusText() { - return this[INTERNALS$1].statusText; - } - - get headers() { - return this[INTERNALS$1].headers; - } - - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} - -Body.mixIn(Response.prototype); - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); - -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); - -const INTERNALS$2 = Symbol('Request internals'); -const URL = Url.URL || whatwgUrl.URL; - -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; - -/** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ -function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); - } - - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); -} - -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} - -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} - -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - let parsedURL; - - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } - - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } - - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - - const headers = new Headers(init.headers || input.headers || {}); - - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; - - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } - - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } - - get method() { - return this[INTERNALS$2].method; - } - - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } - - get headers() { - return this[INTERNALS$2].headers; - } - - get redirect() { - return this[INTERNALS$2].redirect; - } - - get signal() { - return this[INTERNALS$2].signal; - } - - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} - -Body.mixIn(Request.prototype); - -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); - -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } - - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } - - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } - - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js - - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} - -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -const URL$1 = Url.URL || whatwgUrl.URL; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; - -const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; - - return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); -}; - -/** - * isSameProtocol reports whether the two provided URLs use the same protocol. - * - * Both domains must already be in canonical form. - * @param {string|URL} original - * @param {string|URL} destination - */ -const isSameProtocol = function isSameProtocol(destination, original) { - const orig = new URL$1(original).protocol; - const dest = new URL$1(destination).protocol; - - return orig === dest; -}; - -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } - - Body.Promise = fetch.Promise; - - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; - - let response = null; - - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - destroyStream(request.body, error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; - - if (signal && signal.aborted) { - abort(); - return; - } - - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; - - // send request - const req = send(options); - let reqTimeout; - - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } - - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } - - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } - - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - - if (response && response.body) { - destroyStream(response.body, err); - } - - finalize(); - }); - - fixResponseChunkedTransferBadEnding(req, function (err) { - if (signal && signal.aborted) { - return; - } - - destroyStream(response.body, err); - }); - - /* c8 ignore next 18 */ - if (parseInt(process.version.substring(1)) < 14) { - // Before Node.js 14, pipeline() does not fully support async iterators and does not always - // properly handle when the socket close/end events are out of order. - req.on('socket', function (s) { - s.addListener('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = s.listenerCount('data') > 0; - - // if end happened before close but the socket didn't emit an error, do it now - if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - response.body.emit('error', err); - } - }); - }); - } - - req.on('response', function (res) { - clearTimeout(reqTimeout); - - const headers = createHeadersLenient(res.headers); - - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); - - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = location === null ? null : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); - finalize(); - return; - } - } - - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; - - if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { - for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { - requestOpts.headers.delete(name); - } - } - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } - - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } - - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } - - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - raw.on('end', function () { - // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. - if (!response) { - response = new Response(body, response_options); - resolve(response); - } - }); - return; - } - - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } - - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); - - writeToStream(req, request); - }); -} -function fixResponseChunkedTransferBadEnding(request, errorCallback) { - let socket; - - request.on('socket', function (s) { - socket = s; - }); - - request.on('response', function (response) { - const headers = response.headers; - - if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { - response.once('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = socket.listenerCount('data') > 0; - - if (hasDataListener && !hadError) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - errorCallback(err); - } - }); - } - }); -} - -function destroyStream(stream, err) { - if (stream.destroy) { - stream.destroy(err); - } else { - // node < 8 - stream.emit('error', err); - stream.end(); - } -} - -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; - -// expose Promise -fetch.Promise = global.Promise; - -module.exports = exports = fetch; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports.FetchError = FetchError; diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs deleted file mode 100644 index e67d788..0000000 --- a/node_modules/node-fetch/lib/index.mjs +++ /dev/null @@ -1,1774 +0,0 @@ -import Stream from 'stream'; -import http from 'http'; -import Url from 'url'; -import whatwgUrl from 'whatwg-url'; -import https from 'https'; -import zlib from 'zlib'; - -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; - -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); - -class Blob { - constructor() { - this[TYPE] = ''; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - - this[BUFFER] = Buffer.concat(buffers); - - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; - - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); - - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} - -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); - -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ - -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); - - this.message = message; - this.type = type; - - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; - -let convert; -try { - convert = require('encoding').convert; -} catch (e) {} - -const INTERNALS = Symbol('Body internals'); - -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; - -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} - -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, - - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, - - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, - - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; - - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; - -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); - -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; - -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - - this[INTERNALS].disturbed = true; - - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } - - let body = this.body; - - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } - - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; - - return new Body.Promise(function (resolve, reject) { - let resTimeout; - - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } - - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } - - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - - accumBytes += chunk.length; - accum.push(chunk); - }); - - body.on('end', function () { - if (abort) { - return; - } - - clearTimeout(resTimeout); - - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} - -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - - // html5 - if (!res && str) { - res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; - - this[MAP] = Object.create(null); - - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } - - return; - } - - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } - - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } - - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - - return this[MAP][key].join(', '); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } - - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } - - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } - - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } - - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } - - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } - - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); - -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; - - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} - -const INTERNAL = Symbol('internal'); - -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} - -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; - - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } - - this[INTERNAL].index = index + 1; - - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); - -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } - - return obj; -} - -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} - -const INTERNALS$1 = Symbol('Response internals'); - -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; - -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - Body.call(this, body, opts); - - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - - get url() { - return this[INTERNALS$1].url || ''; - } - - get status() { - return this[INTERNALS$1].status; - } - - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } - - get redirected() { - return this[INTERNALS$1].counter > 0; - } - - get statusText() { - return this[INTERNALS$1].statusText; - } - - get headers() { - return this[INTERNALS$1].headers; - } - - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} - -Body.mixIn(Response.prototype); - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); - -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); - -const INTERNALS$2 = Symbol('Request internals'); -const URL = Url.URL || whatwgUrl.URL; - -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; - -/** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ -function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); - } - - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); -} - -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} - -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} - -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - let parsedURL; - - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } - - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } - - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - - const headers = new Headers(init.headers || input.headers || {}); - - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; - - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } - - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } - - get method() { - return this[INTERNALS$2].method; - } - - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } - - get headers() { - return this[INTERNALS$2].headers; - } - - get redirect() { - return this[INTERNALS$2].redirect; - } - - get signal() { - return this[INTERNALS$2].signal; - } - - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} - -Body.mixIn(Request.prototype); - -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); - -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } - - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } - - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } - - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js - - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} - -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -const URL$1 = Url.URL || whatwgUrl.URL; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; - -const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; - - return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); -}; - -/** - * isSameProtocol reports whether the two provided URLs use the same protocol. - * - * Both domains must already be in canonical form. - * @param {string|URL} original - * @param {string|URL} destination - */ -const isSameProtocol = function isSameProtocol(destination, original) { - const orig = new URL$1(original).protocol; - const dest = new URL$1(destination).protocol; - - return orig === dest; -}; - -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } - - Body.Promise = fetch.Promise; - - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; - - let response = null; - - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - destroyStream(request.body, error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; - - if (signal && signal.aborted) { - abort(); - return; - } - - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; - - // send request - const req = send(options); - let reqTimeout; - - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } - - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } - - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } - - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - - if (response && response.body) { - destroyStream(response.body, err); - } - - finalize(); - }); - - fixResponseChunkedTransferBadEnding(req, function (err) { - if (signal && signal.aborted) { - return; - } - - destroyStream(response.body, err); - }); - - /* c8 ignore next 18 */ - if (parseInt(process.version.substring(1)) < 14) { - // Before Node.js 14, pipeline() does not fully support async iterators and does not always - // properly handle when the socket close/end events are out of order. - req.on('socket', function (s) { - s.addListener('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = s.listenerCount('data') > 0; - - // if end happened before close but the socket didn't emit an error, do it now - if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - response.body.emit('error', err); - } - }); - }); - } - - req.on('response', function (res) { - clearTimeout(reqTimeout); - - const headers = createHeadersLenient(res.headers); - - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); - - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = location === null ? null : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); - finalize(); - return; - } - } - - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; - - if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { - for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { - requestOpts.headers.delete(name); - } - } - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } - - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } - - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } - - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - raw.on('end', function () { - // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. - if (!response) { - response = new Response(body, response_options); - resolve(response); - } - }); - return; - } - - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } - - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); - - writeToStream(req, request); - }); -} -function fixResponseChunkedTransferBadEnding(request, errorCallback) { - let socket; - - request.on('socket', function (s) { - socket = s; - }); - - request.on('response', function (response) { - const headers = response.headers; - - if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { - response.once('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = socket.listenerCount('data') > 0; - - if (hasDataListener && !hadError) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - errorCallback(err); - } - }); - } - }); -} - -function destroyStream(stream, err) { - if (stream.destroy) { - stream.destroy(err); - } else { - // node < 8 - stream.emit('error', err); - stream.end(); - } -} - -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; - -// expose Promise -fetch.Promise = global.Promise; - -export default fetch; -export { Headers, Request, Response, FetchError }; diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json deleted file mode 100644 index 9aadd84..0000000 --- a/node_modules/node-fetch/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_from": "node-fetch@2.6.8", - "_id": "node-fetch@2.6.8", - "_inBundle": false, - "_integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", - "_location": "/node-fetch", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "node-fetch@2.6.8", - "name": "node-fetch", - "escapedName": "node-fetch", - "rawSpec": "2.6.8", - "saveSpec": null, - "fetchSpec": "2.6.8" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", - "_shasum": "a68d30b162bc1d8fd71a367e81b997e1f4d4937e", - "_spec": "node-fetch@2.6.8", - "_where": "C:\\code\\com.mill", - "author": { - "name": "David Frank" - }, - "browser": "./browser.js", - "bugs": { - "url": "https://github.com/bitinn/node-fetch/issues" - }, - "bundleDependencies": false, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "deprecated": false, - "description": "A light-weight module that brings window.fetch to node.js", - "devDependencies": { - "@ungap/url-search-params": "^0.1.2", - "abort-controller": "^1.1.0", - "abortcontroller-polyfill": "^1.3.0", - "babel-core": "^6.26.3", - "babel-plugin-istanbul": "^4.1.6", - "babel-plugin-transform-async-generator-functions": "^6.24.1", - "babel-polyfill": "^6.26.0", - "babel-preset-env": "1.4.0", - "babel-register": "^6.16.3", - "chai": "^3.5.0", - "chai-as-promised": "^7.1.1", - "chai-iterator": "^1.1.1", - "chai-string": "~1.3.0", - "codecov": "3.3.0", - "cross-env": "^5.2.0", - "form-data": "^2.3.3", - "is-builtin-module": "^1.0.0", - "mocha": "^5.0.0", - "nyc": "11.9.0", - "parted": "^0.1.1", - "promise": "^8.0.3", - "resumer": "0.0.0", - "rollup": "^0.63.4", - "rollup-plugin-babel": "^3.0.7", - "string-to-arraybuffer": "^1.0.2", - "teeny-request": "3.7.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "files": [ - "lib/index.js", - "lib/index.mjs", - "lib/index.es.js", - "browser.js" - ], - "homepage": "https://github.com/bitinn/node-fetch", - "keywords": [ - "fetch", - "http", - "promise" - ], - "license": "MIT", - "main": "lib/index.js", - "module": "lib/index.mjs", - "name": "node-fetch", - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - }, - "release": { - "branches": [ - "+([0-9]).x", - "main", - "next", - { - "name": "beta", - "prerelease": true - } - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/bitinn/node-fetch.git" - }, - "scripts": { - "build": "cross-env BABEL_ENV=rollup rollup -c", - "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json", - "prepare": "npm run build", - "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", - "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js" - }, - "version": "2.6.8" -} diff --git a/node_modules/tslib/.gitattributes b/node_modules/tslib/.gitattributes deleted file mode 100644 index 74f5f4a..0000000 --- a/node_modules/tslib/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.js linguist-language=TypeScript \ No newline at end of file diff --git a/node_modules/tslib/CopyrightNotice.txt b/node_modules/tslib/CopyrightNotice.txt deleted file mode 100644 index 0f6db1f..0000000 --- a/node_modules/tslib/CopyrightNotice.txt +++ /dev/null @@ -1,15 +0,0 @@ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - diff --git a/node_modules/tslib/LICENSE.txt b/node_modules/tslib/LICENSE.txt deleted file mode 100644 index 8746124..0000000 --- a/node_modules/tslib/LICENSE.txt +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/node_modules/tslib/README.md b/node_modules/tslib/README.md deleted file mode 100644 index ae595fe..0000000 --- a/node_modules/tslib/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# 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 --save tslib - -# TypeScript 2.3.2 or earlier -npm install --save 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.9.3/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). -* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)). - -# Documentation - -* [Quick tutorial](http://www.typescriptlang.org/Tutorial) -* [Programming handbook](http://www.typescriptlang.org/Handbook) -* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md) -* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/tslib/bower.json b/node_modules/tslib/bower.json deleted file mode 100644 index d3d8ec1..0000000 --- a/node_modules/tslib/bower.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "tslib", - "authors": [ - "Microsoft Corp." - ], - "homepage": "http://typescriptlang.org/", - "version": "1.9.3", - "license": "Apache-2.0", - "description": "Runtime library for TypeScript helper functions", - "keywords": [ - "TypeScript", - "Microsoft", - "compiler", - "language", - "javascript", - "tslib", - "runtime" - ], - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/tslib.git" - }, - "main": "tslib.js", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "docs", - "package.json", - ".npmignore", - ".gitignore", - ".gitattributes" - ] -} diff --git a/node_modules/tslib/docs/generator.md b/node_modules/tslib/docs/generator.md deleted file mode 100644 index 88ffb08..0000000 --- a/node_modules/tslib/docs/generator.md +++ /dev/null @@ -1,486 +0,0 @@ -# The `__generator` helper - -The `__generator` helper is a function designed to support TypeScript's down-level emit for -async functions when targeting ES5 and earlier. But how, exactly, does it work? - -Here's the body of the `__generator` helper: - -```js -__generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t; - return { next: verb(0), "throw": verb(1), "return": verb(2) }; - 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 = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [0, 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 }; - } -}; -``` - -And here's an example of it in use: - -```ts -// source -async function func(x) { - try { - await x; - } - catch (e) { - console.error(e); - } - finally { - console.log("finally"); - } -} - -// generated -function func(x) { - return __awaiter(this, void 0, void 0, function () { - var e_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 1, 3, 4]); - return [4 /*yield*/, x]; - case 1: - _a.sent(); - return [3 /*break*/, 4]; - case 2: - e_1 = _a.sent(); - console.error(e_1); - return [3 /*break*/, 4]; - case 3: - console.log("finally"); - return [7 /*endfinally*/]; - case 4: return [2 /*return*/]; - } - }); - }); -} -``` - -There is a lot going on in this function, so the following will break down what each part of the -`__generator` helper does and how it works. - -# Opcodes - -The `__generator` helper uses opcodes which represent various operations that are interpreted by -the helper to affect its internal state. The following table lists the various opcodes, their -arguments, and their purpose: - -| Opcode | Arguments | Purpose | -|----------------|-----------|--------------------------------------------------------------------------------------------------------------------------------| -| 0 (next) | *value* | Starts the generator, or resumes the generator with *value* as the result of the `AwaitExpression` where execution was paused. | -| 1 (throw) | *value* | Resumes the generator, throwing *value* at `AwaitExpression` where execution was paused. | -| 2 (return) | *value* | Exits the generator, executing any `finally` blocks starting at the `AwaitExpression` where execution was paused. | -| 3 (break) | *label* | Performs an unconditional jump to the specified label, executing any `finally` between the current instruction and the label. | -| 4 (yield) | *value* | Suspends the generator, setting the resume point at the next label and yielding the value. | -| 5 (yieldstar) | *value* | Suspends the generator, setting the resume point at the next label and delegating operations to the supplied value. | -| 6 (catch) | *error* | An internal instruction used to indicate an exception that was thrown from the body of the generator. | -| 7 (endfinally) | | Exits a finally block, resuming any previous operation (such as a break, return, throw, etc.) | - -# State -The `_`, `f`, `y`, and `t` variables make up the persistent state of the `__generator` function. Each variable -has a specific purpose, as described in the following sections: - -## The `_` variable -The `__generator` helper must share state between its internal `step` orchestration function and -the `body` function passed to the helper. - -```ts -var _ = { - label: 0, - sent: function() { - if (t[0] & 1) // NOTE: true for `throw`, but not `next` or `catch` - throw t[1]; - return sent[1]; - }, - trys: [], - ops: [] -}; -``` - -The following table describes the members of the `_` state object and their purpose: - -| Name | Description | -|---------|---------------------------------------------------------------------------------------------------------------------------| -| `label` | Specifies the next switch case to execute in the `body` function. | -| `sent` | Handles the completion result passed to the generator. | -| `trys` | A stack of **Protected Regions**, which are 4-tuples that describe the labels that make up a `try..catch..finally` block. | -| `ops` | A stack of pending operations used for `try..finally` blocks. | - -The `__generator` helper passes this state object to the `body` function for use with switching -between switch cases in the body, handling completions from `AwaitExpression`, etc. - -## The `f` variable -The `f` variable indicates whether the generator is currently executing, to prevent re-entry of -the same generator during its execution. - -## The `y` variable -The `y` variable stores the iterator passed to a `yieldstar` instruction to which operations should be delegated. - -## The `t` variable -The `t` variable is a temporary variable that stores one of the following values: - -- The completion value when resuming from a `yield` or `yield*`. -- The error value for a catch block. -- The current **Protected Region**. -- The verb (`next`, `throw`, or `return` method) to delegate to the expression of a `yield*`. -- The result of evaluating the verb delegated to the expression of a `yield*`. - -> NOTE: None of the above cases overlap. - -# Protected Regions -A **Protected Region** is a region within the `body` function that indicates a -`try..catch..finally` statement. It consists of a 4-tuple that contains 4 labels: - -| Offset | Description | -|--------|-----------------------------------------------------------------------------------------| -| 0 | *Required* The label that indicates the beginning of a `try..catch..finally` statement. | -| 1 | *Optional* The label that indicates the beginning of a `catch` clause. | -| 2 | *Optional* The label that indicates the beginning of a `finally` clause. | -| 3 | *Required* The label that indicates the end of the `try..catch..finally` statement. | - -# The generator object -The final step of the `__generator` helper is the allocation of an object that implements the -`Generator` protocol, to be used by the `__awaiter` helper: - -```ts -return { next: verb(0), "throw": verb(1), "return": verb(2) }; -function verb(n) { return function (v) { return step([n, v]); }; } -``` - -This object translates calls to `next`, `throw`, and `return` to the appropriate Opcodes and -invokes the `step` orchestration function to continue execution. The `throw` and `return` method -names are quoted to better support ES3. - -# Orchestration -The `step` function is the main orechestration mechanism for the `__generator` helper. It -interprets opcodes, handles **protected regions**, and communicates results back to the caller. - -Here's a closer look at the `step` function: - -```ts -function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [0, 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 }; -} -``` - -The main body of `step` exists in a `while` loop. This allows us to continually interpret -operations until we have reached some completion value, be it a `return`, `await`, or `throw`. - -## Preventing re-entry -The first part of the `step` function is used as a check to prevent re-entry into a currently -executing generator: - -```ts -if (f) throw new TypeError("Generator is already executing."); -``` - -## Running the generator -The main body of the `step` function consists of a `while` loop which continues to evaluate -instructions until the generator exits or is suspended: - -```ts -while (_) try ... -``` - -When the generator has run to completion, the `_` state variable will be cleared, forcing the loop -to exit. - -## Evaluating the generator body. -```ts -try { - ... - op = body.call(thisArg, _); -} -catch (e) { - op = [6, e]; - y = 0; -} -finally { - f = t = 0; -} -``` - -Depending on the current operation, we re-enter the generator body to start or continue execution. -Here we invoke `body` with `thisArg` as the `this` binding and the `_` state object as the only -argument. The result is a tuple that contains the next Opcode and argument. - -If evaluation of the body resulted in an exception, we convert this into an Opcode 6 ("catch") -operation to be handled in the next spin of the `while` loop. We also clear the `y` variable in -case it is set to ensure we are no longer delegating operations as the exception occurred in -user code *outside* of, or at the function boundary of, the delegated iterator (otherwise the -iterator would have handled the exception itself). - -After executing user code, we clear the `f` flag that indicates we are executing the generator, -as well as the `t` temporary value so that we don't hold onto values sent to the generator for -longer than necessary. - -Inside of the `try..finally` statement are a series of statements that are used to evaluate the -operations of the transformed generator body. - -The first thing we do is mark the generator as executing: - -```ts -if (f = 1, ...) -``` - -Despite the fact this expression is part of the head of an `if` statement, the comma operator -causes it to be evaluated and the result thrown out. This is a minification added purely to -reduce the overall footprint of the helper. - -## Delegating `yield*` - -The first two statements of the `try..finally` statement handle delegation for `yield*`: - -```ts -if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; -if (y = 0, t) op = [0, t.value]; -``` - -If the `y` variable is set, and `y` has a `next`, `throw`, or `return` method (depending on the -current operation), we invoke this method and store the return value (an IteratorResult) in `t`. - -If `t` indicates it is a yielded value (e.g. `t.done === false`), we return `t` to the caller. -If `t` indicates it is a returned value (e.g. `t.done === true`), we mark the operation with the -`next` Opcode, and the returned value. -If `y` did not have the appropriate method, or `t` was a returned value, we reset `y` to a falsey -value and continue processing the operation. - -## Handling operations - -The various Opcodes are handled in the following switch statement: - -```ts -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; -} -``` - -The following sections describe the various Opcodes: - -### Opcode 0 ("next") and Opcode 1 ("throw") -```ts -case 0: // next -case 1: // throw - t = op; - break; -``` - -Both Opcode 0 ("next") and Opcode 1 ("throw") have the same behavior. The current operation is -stored in the `t` variable and the `body` function is invoked. The `body` function should call -`_.sent()` which will evaluate the appropriate completion result. - -### Opcode 4 ("yield") -```ts -case 4: // yield - _.label++; - return { value: op[1], done: false }; -``` - -When we encounter Opcode 4 ("yield"), we increment the label by one to indicate the point at which -the generator will resume execution. We then return an `IteratorResult` whose `value` is the -yielded value, and `done` is `false`. - -### Opcode 5 ("yieldstar") -```ts -case 5: // yieldstar - _.label++; - y = op[1]; - op = [0]; - continue; -``` - -When we receive Opcode 5 ("yieldstar"), we increment the label by one to indicate the point at which -the generator will resume execution. We then store the iterator in `op[1]` in the `y` variable, and -set the operation to delegate to Opcode 0 ("next") with no value. Finally, we continue execution at -the top of the loop to start delegation. - -### Opcode 7 ("endfinally") -```ts -case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; -``` - -Opcode 7 ("endfinally") indicates that we have hit the end of a `finally` clause, and that the last -operation recorded before entering the `finally` block should be evaluated. - -### Opcode 2 ("return"), Opcode 3 ("break"), and Opcode 6 ("catch") -```ts -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; -} -``` - -The handling for Opcode 2 ("return"), Opcode 3 ("break") and Opcode 6 ("catch") is more -complicated, as we must obey the specified runtime semantics of generators. The first line in this -clause gets the current **Protected Region** if found and stores it in the `t` temp variable: - -```ts -if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && ...) ... -``` - -The remainder of this statement, as well as the following by several `if` statements test for more -complex conditions. The first of these is the following: - -```ts -if (!(t = ...) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; -} -``` - -If we encounter an Opcode 6 ("catch") or Opcode 2 ("return"), and we are not in a protected region, -then this operation completes the generator by setting the `_` variable to a falsey value. The -`continue` statement resumes execution at the top of the `while` statement, which will exit the loop -so that we continue execution at the statement following the loop. - -```ts -if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1]; - break; -} -``` - -The `if` statement above handles Opcode 3 ("break") when we are either not in a **protected region**, or -are performing an unconditional jump to a label inside of the current **protected region**. In this case -we can unconditionally jump to the specified label. - -```ts -if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; -} -``` - -The `if` statement above handles Opcode 6 ("catch") when inside the `try` block of a **protected -region**. In this case we jump to the `catch` block, if present. We replace the value of `t` with -the operation so that the exception can be read as the first statement of the transformed `catch` -clause of the transformed generator body. - -```ts -if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; -} -``` - -This `if` statement handles all Opcodes when in a **protected region** with a `finally` clause. -As long as we are not already inside the `finally` clause, we jump to the `finally` clause and -push the pending operation onto the `_.ops` stack. This allows us to resume execution of the -pending operation once we have completed execution of the `finally` clause, as long as it does not -supersede this operation with its own completion value. - -```ts -if (t[2]) - _.ops.pop(); -``` - -Any other completion value inside of a `finally` clause will supersede the pending completion value -from the `try` or `catch` clauses. The above `if` statement pops the pending completion from the -stack. - -```ts -_.trys.pop(); -continue; -``` - -The remaining statements handle the point at which we exit a **protected region**. Here we pop the -current **protected region** from the stack and spin the `while` statement to evaluate the current -operation again in the next **protected region** or at the function boundary. - -## Handling a completed generator -Once the generator has completed, the `_` state variable will be falsey. As a result, the `while` -loop will terminate and hand control off to the final statement of the orchestration function, -which deals with how a completed generator is evaluated: - -```ts -if (op[0] & 5) - throw op[1]; -return { value: op[0] ? op[1] : void 0, done: true }; -``` - -If the caller calls `throw` on the generator it will send Opcode 1 ("throw"). If an exception -is uncaught within the body of the generator, it will send Opcode 6 ("catch"). As the generator has -completed, it throws the exception. Both of these cases are caught by the bitmask `5`, which does -not collide with the only two other valid completion Opcodes. - -If the caller calls `next` on the generator, it will send Opcode 0 ("next"). As the generator has -completed, it returns an `IteratorResult` where `value` is `undefined` and `done` is true. - -If the caller calls `return` on the generator, it will send Opcode 2 ("return"). As the generator -has completed, it returns an `IteratorResult` where `value` is the value provided to `return`, and -`done` is true. \ No newline at end of file diff --git a/node_modules/tslib/package.json b/node_modules/tslib/package.json deleted file mode 100644 index fbfe30b..0000000 --- a/node_modules/tslib/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_args": [ - [ - "tslib@1.9.3", - "C:\\code\\com.mill" - ] - ], - "_from": "tslib@1.9.3", - "_id": "tslib@1.9.3", - "_inBundle": false, - "_integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY=", - "_location": "/tslib", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "tslib@1.9.3", - "name": "tslib", - "escapedName": "tslib", - "rawSpec": "1.9.3", - "saveSpec": null, - "fetchSpec": "1.9.3" - }, - "_requiredBy": [ - "/@sentry/core", - "/@sentry/node", - "/@sentry/utils", - "/rxjs" - ], - "_resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/tslib/-/tslib-1.9.3.tgz", - "_spec": "1.9.3", - "_where": "C:\\code\\com.mill", - "author": { - "name": "Microsoft Corp." - }, - "bugs": { - "url": "https://github.com/Microsoft/TypeScript/issues" - }, - "description": "Runtime library for TypeScript helper functions", - "homepage": "http://typescriptlang.org/", - "jsnext:main": "tslib.es6.js", - "keywords": [ - "TypeScript", - "Microsoft", - "compiler", - "language", - "javascript", - "tslib", - "runtime" - ], - "license": "Apache-2.0", - "main": "tslib.js", - "module": "tslib.es6.js", - "name": "tslib", - "repository": { - "type": "git", - "url": "git+https://github.com/Microsoft/tslib.git" - }, - "typings": "tslib.d.ts", - "version": "1.9.3" -} diff --git a/node_modules/tslib/tslib.d.ts b/node_modules/tslib/tslib.d.ts deleted file mode 100644 index c4a0e11..0000000 --- a/node_modules/tslib/tslib.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -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 __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(mod: T): T; -export declare function __importDefault(mod: T): T | { default: T }; diff --git a/node_modules/tslib/tslib.es6.html b/node_modules/tslib/tslib.es6.html deleted file mode 100644 index b122e41..0000000 --- a/node_modules/tslib/tslib.es6.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/tslib/tslib.es6.js b/node_modules/tslib/tslib.es6.js deleted file mode 100644 index 6da273e..0000000 --- a/node_modules/tslib/tslib.es6.js +++ /dev/null @@ -1,186 +0,0 @@ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -/* 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) - 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) { - 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) : new P(function (resolve) { resolve(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 __exportStar(m, exports) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} - -export function __values(o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; - if (m) return m.call(o); - return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; -} - -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 __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 }; -} diff --git a/node_modules/tslib/tslib.html b/node_modules/tslib/tslib.html deleted file mode 100644 index 44c9ba5..0000000 --- a/node_modules/tslib/tslib.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/tslib/tslib.js b/node_modules/tslib/tslib.js deleted file mode 100644 index b0b1ff3..0000000 --- a/node_modules/tslib/tslib.js +++ /dev/null @@ -1,243 +0,0 @@ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -/* 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 __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -(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) - 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) { - 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) : new P(function (resolve) { resolve(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 }; - } - }; - - __exportStar = function (m, exports) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - }; - - __values = function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; - if (m) return m.call(o); - return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - }; - - __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; - }; - - __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 }; - }; - - 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("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); -}); From 061c211c8a65349539da997cd9d3b4572240709b Mon Sep 17 00:00:00 2001 From: Rune Vaernes Date: Mon, 23 Jan 2023 13:30:06 +0100 Subject: [PATCH 4/5] Fixed log for SDKv3 --- app.js | 7 +- drivers/mill/device.js | 45 ++++--- drivers/mill/driver.js | 10 +- lib/mill.js | 2 +- lib/util.js | 47 ++++++- package-lock.json | 293 ++++++++++++++++++++++++++++------------- 6 files changed, 282 insertions(+), 122 deletions(-) diff --git a/app.js b/app.js index 0e939a9..86b17e3 100644 --- a/app.js +++ b/app.js @@ -1,15 +1,14 @@ // eslint-disable-next-line import/no-unresolved const Homey = require('homey'); const Mill = require('./lib/mill'); - +const {debug} = require('./../../lib/util'); class MillApp extends Homey.App { onInit() { this.millApi = new Mill(); this.user = null; this.isAuthenticated = false; this.isAuthenticating = false; - - this.log(`${Homey.manifest.id} is running..`); + debug(this.homey,`${Homey.manifest.id} is running..`); } async connectToMill() { @@ -25,7 +24,7 @@ class MillApp extends Homey.App { this.isAuthenticating = true; this.user = await this.millApi.login(username, password) || null; this.isAuthenticated = true; - this.log('Mill authenticated'); + debug(this.homey,'Mill authenticated'); return true; } finally { this.isAuthenticating = false; diff --git a/drivers/mill/device.js b/drivers/mill/device.js index 7b74b36..1c0415f 100644 --- a/drivers/mill/device.js +++ b/drivers/mill/device.js @@ -1,12 +1,14 @@ // eslint-disable-next-line import/no-unresolved const Homey = require('homey'); const Room = require('./../../lib/models'); +const { Log } = require('./../../lib/log'); +const {debug,error} = require('./../../lib/util'); class MillDevice extends Homey.Device { onInit() { this.deviceId = this.getData().id; - this.log(`[${this.getName()}] ${this.getClass()} (${this.deviceId}) initialized`); + debug(this.homey,`[${this.getName()}] ${this.getClass()} (${this.deviceId}) initialized`); // Add new capailities for devices that don't have them yet if (!this.getCapabilities().includes('onoff')) { @@ -41,7 +43,7 @@ class MillDevice extends Homey.Device { this.setProgramAction = this.homey.flow.getActionCard('mill_set_mode'); this.setProgramAction .registerRunListener((args) => { - this.log(`[${args.device.getName()}] Flow changed mode to ${args.mill_mode}`); + debug(this.homey,`[${args.device.getName()}] Flow changed mode to ${args.mill_mode}`); return args.device.setThermostatMode(args.mill_mode); }); @@ -51,7 +53,7 @@ class MillDevice extends Homey.Device { } async refreshState() { - this.log(`[${this.getName()}] Refreshing state`); + debug(this.homey,`[${this.getName()}] Refreshing state`); if (this.refreshTimeout) { clearTimeout(this.refreshTimeout); @@ -63,16 +65,17 @@ class MillDevice extends Homey.Device { await this.refreshMillService(); this.setAvailable(); } else { - this.log(`[${this.getName()}] Mill not connected`); + debug(this.homey,`[${this.getName()}] Mill not connected`); this.setUnavailable(); await this.homey.app.connectToMill().then(() => { this.scheduleRefresh(10); }).catch((err) => { - this.error('Error caught while refreshing state', err); + error(this.homey,'Error caught while refreshing state', err); }); } } catch (e) { - this.error('Exception caught', e); + error(this.homey,'Exception caught', e); + Log.captureException(e); } finally { if (this.refreshTimeout === null) { this.scheduleRefresh(); @@ -83,7 +86,7 @@ class MillDevice extends Homey.Device { scheduleRefresh(interval) { const refreshInterval = interval || this.homey.settings.get('interval'); this.refreshTimeout = setTimeout(this.refreshState.bind(this), refreshInterval * 1000); - this.log(`[${this.getName()}] Next refresh in ${refreshInterval} seconds`); + debug(this.homey,`[${this.getName()}] Next refresh in ${refreshInterval} seconds`); } async refreshMillService() { @@ -91,7 +94,7 @@ class MillDevice extends Homey.Device { return millApi.listDevices(this.getData().id) .then((room) => { - this.log(`[${this.getName()}] Mill state refreshed`, { + debug(this.homey,`[${this.getName()}] Mill state refreshed`, { comfortTemp: room.comfortTemp, awayTemp: room.awayTemp, holidayTemp: room.holidayTemp, @@ -104,7 +107,7 @@ class MillDevice extends Homey.Device { if (room.programMode !== undefined) { if (this.room && !this.room.modesMatch(room) && this.room.modeName !== room.modeName) { - this.log(`[${this.getName()}] Triggering mode change from ${this.room.modeName} to ${room.modeName}`); + debug(this.homey,`[${this.getName()}] Triggering mode change from ${this.room.modeName} to ${room.modeName}`); // not needed, setCapabilityValue will trigger // this.modeChangedTrigger.trigger(this, { mill_mode: room.modeName }) // .catch(this.error); @@ -130,40 +133,40 @@ class MillDevice extends Homey.Device { jobs.push(this.setCapabilityValue('target_temperature', room.targetTemp)); } return Promise.all(jobs).catch((err) => { - this.error(err); + Log.captureException(err); }); } }).catch((err) => { - this.error(`[${this.getName()}] Error caught while refreshing state`, err); + error(this.homey,`[${this.getName()}] Error caught while refreshing state`, err); }); } onAdded() { - this.log('device added', this.getState()); + debug(this.homey,'device added', this.getState()); } onDeleted() { clearTimeout(this.refreshTimeout); - this.log('device deleted', this.getState()); + debug(this.homey,'device deleted', this.getState()); } onCapabilityTargetTemperature(value, opts, callback) { - this.log(`onCapabilityTargetTemperature(${value})`); + debug(this.homey,`onCapabilityTargetTemperature(${value})`); const temp = Math.ceil(value); if (temp !== value && this.room.modeName !== 'Off') { // half degrees isn't supported by Mill, need to round it up this.setCapabilityValue('target_temperature', temp); - this.log(`onCapabilityTargetTemperature(${value}=>${temp})`); + debug(this.homey,`onCapabilityTargetTemperature(${value}=>${temp})`); } const millApi = this.homey.app.getMillApi(); this.room.targetTemp = temp; millApi.changeRoomTemperature(this.deviceId, this.room) .then(() => { - this.log(`onCapabilityTargetTemperature(${temp}) done`); - this.log(`[${this.getName()}] Changed temp to ${temp}: currentMode: ${this.room.currentMode}/${this.room.programMode}, comfortTemp: ${this.room.comfortTemp}, awayTemp: ${this.room.awayTemp}, avgTemp: ${this.room.avgTemp}, sleepTemp: ${this.room.sleepTemp}`); + debug(this.homey,`onCapabilityTargetTemperature(${temp}) done`); + debug(this.homey,`[${this.getName()}] Changed temp to ${temp}: currentMode: ${this.room.currentMode}/${this.room.programMode}, comfortTemp: ${this.room.comfortTemp}, awayTemp: ${this.room.awayTemp}, avgTemp: ${this.room.avgTemp}, sleepTemp: ${this.room.sleepTemp}`); callback(null, temp); }).catch((err) => { - this.log(`onCapabilityTargetTemperature(${temp}) error`); - this.log(`[${this.getName()}] Change temp to ${temp} resultet in error`, err); + debug(this.homey,`onCapabilityTargetTemperature(${temp}) error`); + debug(this.homey,`[${this.getName()}] Change temp to ${temp} resultet in error`, err); callback(err); }); } @@ -179,10 +182,10 @@ class MillDevice extends Homey.Device { jobs.push(millApi.changeRoomMode(this.deviceId, this.room.currentMode)); Promise.all(jobs).then(() => { - debug(`[${this.getName()}] Changed mode to ${value}: currentMode: ${this.room.currentMode}/${this.room.programMode}, comfortTemp: ${this.room.comfortTemp}, awayTemp: ${this.room.awayTemp}, avgTemp: ${this.room.avgTemp}, sleepTemp: ${this.room.sleepTemp}`); + debug(this.homey,`[${this.getName()}] Changed mode to ${value}: currentMode: ${this.room.currentMode}/${this.room.programMode}, comfortTemp: ${this.room.comfortTemp}, awayTemp: ${this.room.awayTemp}, avgTemp: ${this.room.avgTemp}, sleepTemp: ${this.room.sleepTemp}`); resolve(value); }).catch((err) => { - this.error(`[${this.getName()}] Change mode to ${value} resulted in error`, err); + error(this.homey,`[${this.getName()}] Change mode to ${value} resulted in error`, err); reject(err); }); }); diff --git a/drivers/mill/driver.js b/drivers/mill/driver.js index 84a674c..4121330 100644 --- a/drivers/mill/driver.js +++ b/drivers/mill/driver.js @@ -1,6 +1,6 @@ // eslint-disable-next-line import/no-unresolved const Homey = require('homey'); - +const {debug,error} = require('./../../lib/util'); class MillDriver extends Homey.Driver { async onInit() { } @@ -8,17 +8,17 @@ class MillDriver extends Homey.Driver { async onPairListDevices(data, callback) { if (!Homey.app.isConnected()) { // eslint-disable-next-line no-underscore-dangle - this.log('Unable to pair, not authenticated'); + debug(this.homey,'Unable to pair, not authenticated'); callback(new Error(Homey.__('pair.messages.notAuthorized'))); } else { - this.log('Pairing'); + debug(this.homey,'Pairing'); const millApi = Homey.app.getMillApi(); const homes = await millApi.listHomes(); - this.log(`Found following homes: ${homes.homeList.map(home => `${home.homeName} (${home.homeId})`).join(', ')}`); + debug(this.homey,`Found following homes: ${homes.homeList.map(home => `${home.homeName} (${home.homeId})`).join(', ')}`); const rooms = await Promise.all(homes.homeList.map(async (home) => { const rooms = await millApi.listRooms(home.homeId); - this.log(`Found following rooms in ${home.homeName}: ${rooms.roomInfo.map(room => `${room.roomName} (${room.roomId})`).join(', ')}`); + debug(this.homey,`Found following rooms in ${home.homeName}: ${rooms.roomInfo.map(room => `${room.roomName} (${room.roomId})`).join(', ')}`); return rooms.roomInfo.map(room => ( { diff --git a/lib/mill.js b/lib/mill.js index 338dd95..d7bb06b 100644 --- a/lib/mill.js +++ b/lib/mill.js @@ -1,6 +1,6 @@ const crypto = require('crypto'); const Room = require('./models'); -const fetchJSON = require('./util'); +const {fetchJSON} = require('./util'); const TOKEN_SAFE_ZONE = 5 * 60 * 1000; diff --git a/lib/util.js b/lib/util.js index c33dde8..93cc678 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,6 +1,49 @@ // eslint-disable-next-line import/no-unresolved const fetch = require('node-fetch'); +const log = (app,severity, message, data) => { + // Homey will not be available in tests + try { Homey = require('homey'); } catch (e) {} + if (!Homey) { + console.log(`${severity}: ${message}`, data || ''); + return; + } + const debug = app.settings.get('debug'); + if ( debug ) { + const debugLog = app.settings.get('debugLog') || []; + const entry = { registered: new Date().toLocaleString(), severity, message }; + if (data) { + if (typeof data === 'string') { + entry.data = { data }; + } else if (data.message) { + entry.data = { error: data.message, stacktrace: data.stack }; + } else { + entry.data = data; + } + } + + debugLog.push(entry); + if (debugLog.length > 100) { + debugLog.splice(0, 1); + } + app.log(`${severity}: ${message}`, data || ''); + app.settings.set('debugLog', debugLog); + app.realtime('debugLog', entry); + } +}; + +const debug = (app, message, data) => { + log(app,'DEBUG', message, data); +}; + +const warn = (app,message, data) => { + log(app,'WARN', message, data); +}; + +const error = (app,message, data) => { + log(app,'ERROR', message, data); +}; + const fetchJSON = async (endpoint, options) => { try { const result = await fetch(endpoint, options); @@ -12,5 +55,7 @@ const fetchJSON = async (endpoint, options) => { }; } }; -module.exports = fetchJSON; +module.exports = { + debug, warn, error, fetchJSON +}; diff --git a/package-lock.json b/package-lock.json index 5ad7010..03066ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,6 +74,22 @@ "integrity": "sha1-HBJhu+qhCoBVu8XYq4S3sq/IRqA=", "dev": true }, + "@types/node": { + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", + "dev": true + }, + "@types/node-fetch": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz", + "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==", + "dev": true, + "requires": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, "acorn": { "version": "7.1.1", "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/acorn/-/acorn-7.1.1.tgz", @@ -110,9 +126,9 @@ } }, "ajv": { - "version": "6.12.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha1-BtYLlth7hFSlrauobnhU2mKdtLc=", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -145,9 +161,9 @@ } }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -219,10 +235,16 @@ "integrity": "sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k=", "dev": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "binary-extensions": { @@ -233,8 +255,8 @@ }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -264,8 +286,8 @@ }, "camelcase": { "version": "5.3.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "chai": { @@ -404,10 +426,19 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, "concat-map": { "version": "0.0.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "confusing-browser-globals": { @@ -459,8 +490,8 @@ }, "decamelize": { "version": "1.2.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true }, "deep-eql": { @@ -487,6 +518,12 @@ "object-keys": "^1.0.12" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, "diff": { "version": "3.5.0", "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/diff/-/diff-3.5.0.tgz", @@ -608,9 +645,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "ms": { @@ -735,6 +772,14 @@ "dev": true, "requires": { "path-parse": "^1.0.6" + }, + "dependencies": { + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + } } } } @@ -831,15 +876,15 @@ } }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha1-VFFFB3xQFJHjOxXsQIwpQ3bpSuQ=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { @@ -920,6 +965,17 @@ "integrity": "sha1-aeV8qo8OrLwoHS4stFjUb9tEngg=", "dev": true }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -972,9 +1028,9 @@ } }, "glob-parent": { - "version": "5.1.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha1-X0wdHnSNMM1zrSlEs1d6gbCB6MI=", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -1029,9 +1085,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha1-dTm9S8Hg4KiVgVouAmJCCxKFhIg=", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "https-proxy-agent": { @@ -1168,18 +1224,18 @@ "dev": true }, "lodash": { - "version": "4.17.15", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, "supports-color": { @@ -1319,8 +1375,8 @@ }, "json-schema-traverse": { "version": "0.4.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { @@ -1368,9 +1424,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "log-symbols": { @@ -1393,6 +1449,21 @@ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", "dev": true }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, "mimic-fn": { "version": "2.1.0", "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -1400,27 +1471,27 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "0.0.8", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.6" } }, "mocha": { @@ -1474,6 +1545,30 @@ "path-exists": "^3.0.0" } }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, "ms": { "version": "2.1.1", "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/ms/-/ms-2.1.1.tgz", @@ -1518,6 +1613,16 @@ "requires": { "has-flag": "^3.0.0" } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, @@ -1635,6 +1740,14 @@ "dev": true, "requires": { "path-parse": "^1.0.6" + }, + "dependencies": { + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + } } } } @@ -1805,9 +1918,9 @@ "dev": true }, "path-parse": { - "version": "1.0.6", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-type": { @@ -1820,9 +1933,9 @@ } }, "pathval": { - "version": "1.1.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "picomatch": { @@ -1876,9 +1989,9 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true }, "read-pkg": { @@ -2143,17 +2256,17 @@ }, "strip-ansi": { "version": "5.2.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true } } @@ -2204,9 +2317,9 @@ "dev": true }, "lodash": { - "version": "4.17.15", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "string-width": { @@ -2284,9 +2397,9 @@ "dev": true }, "uri-js": { - "version": "4.2.2", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -2339,29 +2452,29 @@ }, "wide-align": { "version": "1.1.3", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { "string-width": "^1.0.2 || 2" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", "dev": true }, "string-width": { "version": "2.1.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -2370,8 +2483,8 @@ }, "strip-ansi": { "version": "4.0.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", "dev": true, "requires": { "ansi-regex": "^3.0.0" @@ -2437,9 +2550,9 @@ } }, "y18n": { - "version": "4.0.0", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yargs": { @@ -2535,9 +2648,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://vimond.jfrog.io/vimond/api/npm/npm-virtual/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha1-0mBYUyqgbTZf4JH2ofwGsvfl7KA=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", From b39083a0ea059b25832c23a67c19cff6175d122d Mon Sep 17 00:00:00 2001 From: Rune Vaernes Date: Mon, 23 Jan 2023 14:29:10 +0100 Subject: [PATCH 5/5] Fixed SDKv3 realtime --- lib/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.js b/lib/util.js index 93cc678..937b084 100644 --- a/lib/util.js +++ b/lib/util.js @@ -28,7 +28,7 @@ const log = (app,severity, message, data) => { } app.log(`${severity}: ${message}`, data || ''); app.settings.set('debugLog', debugLog); - app.realtime('debugLog', entry); + app.api.realtime('debugLog', entry); } };

- - + + Sentry -