@slicemachine/manager 0.26.3-alpha.jp-error-track-args.1 → 0.26.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.cjs +6 -6
- package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.js +4 -4
- package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.js.map +1 -1
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.cjs +4 -4
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.cjs.map +1 -1
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js +4 -4
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.cjs +5 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.js +5 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.cjs +5 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.js +5 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs +29 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js +29 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs +17 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js +17 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs +535 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js +535 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs +545 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js +545 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs +109 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js +109 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs +50 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js +50 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs +85 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js +85 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.cjs +7 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.js +7 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs +35 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js +35 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs +39 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js +39 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.cjs +5 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.js +5 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.cjs +5 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.js +5 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs +15 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js +15 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs +69 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js +69 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs +34 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js +34 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs +49 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js +49 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs +142 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js +142 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs +45 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js +45 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs +18 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs.map +1 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js +18 -0
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js.map +1 -0
- package/dist/lib/checkIsSentryEnabled.d.ts +9 -0
- package/dist/lib/sentryErrorHandlers.cjs +10 -0
- package/dist/lib/sentryErrorHandlers.cjs.map +1 -0
- package/dist/lib/sentryErrorHandlers.d.ts +1 -0
- package/dist/lib/sentryErrorHandlers.js +10 -0
- package/dist/lib/sentryErrorHandlers.js.map +1 -0
- package/dist/managers/customTypes/CustomTypesManager.cjs +7 -13
- package/dist/managers/customTypes/CustomTypesManager.cjs.map +1 -1
- package/dist/managers/customTypes/CustomTypesManager.js +7 -13
- package/dist/managers/customTypes/CustomTypesManager.js.map +1 -1
- package/package.json +2 -2
- package/src/lib/checkIsSentryEnabled.ts +12 -0
- package/src/lib/sentryErrorHandlers.ts +13 -0
- package/src/managers/customTypes/CustomTypesManager.ts +15 -16
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const tslib_es6 = require('./../../../_node_modules/tslib/tslib.es6.cjs');
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const http = require("http");
|
|
5
|
+
const https = require("https");
|
|
6
6
|
const base = require("../../../../analytics-core/lib/esm/transports/base.cjs");
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -20,8 +20,8 @@ function _interopNamespaceDefault(e) {
|
|
|
20
20
|
n.default = e;
|
|
21
21
|
return Object.freeze(n);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
const
|
|
23
|
+
const http__namespace = /* @__PURE__ */ _interopNamespaceDefault(http);
|
|
24
|
+
const https__namespace = /* @__PURE__ */ _interopNamespaceDefault(https);
|
|
25
25
|
var Http = (
|
|
26
26
|
/** @class */
|
|
27
27
|
function(_super) {
|
|
@@ -33,9 +33,9 @@ var Http = (
|
|
|
33
33
|
var _this = this;
|
|
34
34
|
var protocol;
|
|
35
35
|
if (serverUrl.startsWith("http://")) {
|
|
36
|
-
protocol =
|
|
36
|
+
protocol = http__namespace;
|
|
37
37
|
} else if (serverUrl.startsWith("https://")) {
|
|
38
|
-
protocol =
|
|
38
|
+
protocol = https__namespace;
|
|
39
39
|
} else {
|
|
40
40
|
throw new Error("Invalid server url");
|
|
41
41
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __extends } from './../../../_node_modules/tslib/tslib.es6.js';
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as http from "http";
|
|
3
|
+
import * as https from "https";
|
|
4
4
|
import { BaseTransport } from "../../../../analytics-core/lib/esm/transports/base.js";
|
|
5
5
|
var Http = (
|
|
6
6
|
/** @class */
|
|
@@ -13,9 +13,9 @@ var Http = (
|
|
|
13
13
|
var _this = this;
|
|
14
14
|
var protocol;
|
|
15
15
|
if (serverUrl.startsWith("http://")) {
|
|
16
|
-
protocol =
|
|
16
|
+
protocol = http;
|
|
17
17
|
} else if (serverUrl.startsWith("https://")) {
|
|
18
|
-
protocol =
|
|
18
|
+
protocol = https;
|
|
19
19
|
} else {
|
|
20
20
|
throw new Error("Invalid server url");
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sources":["../../../../../../../../../node_modules/@amplitude/analytics-node/lib/esm/transports/http.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport { BaseTransport } from '@amplitude/analytics-core';\nimport * as http from 'http';\nimport * as https from 'https';\nvar Http = /** @class */ (function (_super) {\n __extends(Http, _super);\n function Http() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Http.prototype.send = function (serverUrl, payload) {\n var _this = this;\n var protocol;\n if (serverUrl.startsWith('http://')) {\n protocol = http;\n }\n else if (serverUrl.startsWith('https://')) {\n protocol = https;\n }\n else {\n throw new Error('Invalid server url');\n }\n var url = new URL(serverUrl);\n var requestPayload = JSON.stringify(payload);\n var options = {\n headers: {\n 'Content-Type': 'application/json',\n 'Content-Length': Buffer.byteLength(requestPayload),\n },\n hostname: url.hostname,\n method: 'POST',\n path: url.pathname,\n port: url.port,\n protocol: url.protocol,\n };\n return new Promise(function (resolve) {\n var req = protocol.request(options, function (res) {\n res.setEncoding('utf8');\n var responsePayload = '';\n res.on('data', function (chunk) {\n responsePayload += chunk;\n });\n res.on('end', function () {\n if (res.complete && responsePayload.length > 0) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var parsedResponsePayload = JSON.parse(responsePayload);\n var result = _this.buildResponse(parsedResponsePayload);\n resolve(result);\n return;\n }\n catch (_a) {\n resolve(null);\n }\n }\n });\n });\n req.on('error', function () { return resolve(null); });\n req.end(requestPayload);\n });\n };\n return Http;\n}(BaseTransport));\nexport { Http };\n//# sourceMappingURL=http.js.map"],"names":["Http"
|
|
1
|
+
{"version":3,"file":"http.js","sources":["../../../../../../../../../node_modules/@amplitude/analytics-node/lib/esm/transports/http.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport { BaseTransport } from '@amplitude/analytics-core';\nimport * as http from 'http';\nimport * as https from 'https';\nvar Http = /** @class */ (function (_super) {\n __extends(Http, _super);\n function Http() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Http.prototype.send = function (serverUrl, payload) {\n var _this = this;\n var protocol;\n if (serverUrl.startsWith('http://')) {\n protocol = http;\n }\n else if (serverUrl.startsWith('https://')) {\n protocol = https;\n }\n else {\n throw new Error('Invalid server url');\n }\n var url = new URL(serverUrl);\n var requestPayload = JSON.stringify(payload);\n var options = {\n headers: {\n 'Content-Type': 'application/json',\n 'Content-Length': Buffer.byteLength(requestPayload),\n },\n hostname: url.hostname,\n method: 'POST',\n path: url.pathname,\n port: url.port,\n protocol: url.protocol,\n };\n return new Promise(function (resolve) {\n var req = protocol.request(options, function (res) {\n res.setEncoding('utf8');\n var responsePayload = '';\n res.on('data', function (chunk) {\n responsePayload += chunk;\n });\n res.on('end', function () {\n if (res.complete && responsePayload.length > 0) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var parsedResponsePayload = JSON.parse(responsePayload);\n var result = _this.buildResponse(parsedResponsePayload);\n resolve(result);\n return;\n }\n catch (_a) {\n resolve(null);\n }\n }\n });\n });\n req.on('error', function () { return resolve(null); });\n req.end(requestPayload);\n });\n };\n return Http;\n}(BaseTransport));\nexport { Http };\n//# sourceMappingURL=http.js.map"],"names":["Http"],"mappings":";;;;AAIG,IAAC;AAAA;AAAA,EAAsB,SAAU,QAAQ;AACxC,cAAUA,OAAM,MAAM;AACtB,aAASA,QAAO;AACZ,aAAO,WAAW,QAAQ,OAAO,MAAM,MAAM,SAAS,KAAK;AAAA,IAC/D;AACA,IAAAA,MAAK,UAAU,OAAO,SAAU,WAAW,SAAS;AAChD,UAAI,QAAQ;AACZ,UAAI;AACJ,UAAI,UAAU,WAAW,SAAS,GAAG;AACjC,mBAAW;AAAA,MACf,WACS,UAAU,WAAW,UAAU,GAAG;AACvC,mBAAW;AAAA,MACf,OACK;AACD,cAAM,IAAI,MAAM,oBAAoB;AAAA,MACxC;AACA,UAAI,MAAM,IAAI,IAAI,SAAS;AAC3B,UAAI,iBAAiB,KAAK,UAAU,OAAO;AAC3C,UAAI,UAAU;AAAA,QACV,SAAS;AAAA,UACL,gBAAgB;AAAA,UAChB,kBAAkB,OAAO,WAAW,cAAc;AAAA,QAClE;AAAA,QACY,UAAU,IAAI;AAAA,QACd,QAAQ;AAAA,QACR,MAAM,IAAI;AAAA,QACV,MAAM,IAAI;AAAA,QACV,UAAU,IAAI;AAAA,MAC1B;AACQ,aAAO,IAAI,QAAQ,SAAU,SAAS;AAClC,YAAI,MAAM,SAAS,QAAQ,SAAS,SAAU,KAAK;AAC/C,cAAI,YAAY,MAAM;AACtB,cAAI,kBAAkB;AACtB,cAAI,GAAG,QAAQ,SAAU,OAAO;AAC5B,+BAAmB;AAAA,UACvB,CAAC;AACD,cAAI,GAAG,OAAO,WAAY;AACtB,gBAAI,IAAI,YAAY,gBAAgB,SAAS,GAAG;AAC5C,kBAAI;AAEA,oBAAI,wBAAwB,KAAK,MAAM,eAAe;AACtD,oBAAI,SAAS,MAAM,cAAc,qBAAqB;AACtD,wBAAQ,MAAM;AACd;AAAA,cACJ,SACO,IAAI;AACP,wBAAQ,IAAI;AAAA,cAChB;AAAA,YACJ;AAAA,UACJ,CAAC;AAAA,QACL,CAAC;AACD,YAAI,GAAG,SAAS,WAAY;AAAE,iBAAO,QAAQ,IAAI;AAAA,QAAG,CAAC;AACrD,YAAI,IAAI,cAAc;AAAA,MAC1B,CAAC;AAAA,IACL;AACA,WAAOA;AAAA,EACX,EAAE,aAAa;AAAA;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const _commonjsHelpers = require("../../../../../../_virtual/_commonjsHelpers.cjs");
|
|
3
3
|
const http = require("../../../../../../_virtual/http.cjs");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const http$1 = require("http");
|
|
5
|
+
const https = require("https");
|
|
6
6
|
const require$$2 = require("url");
|
|
7
7
|
var __awaiter = _commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
8
8
|
function adopt(value) {
|
|
@@ -36,8 +36,8 @@ var __importDefault = _commonjsHelpers.commonjsGlobal && _commonjsHelpers.common
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(http.__exports, "__esModule", { value: true });
|
|
38
38
|
http.__exports.WrapperClient = http.__exports.FetchHttpClient = void 0;
|
|
39
|
-
const http_1 = __importDefault(
|
|
40
|
-
const https_1 = __importDefault(
|
|
39
|
+
const http_1 = __importDefault(http$1);
|
|
40
|
+
const https_1 = __importDefault(https);
|
|
41
41
|
const url_1 = __importDefault(require$$2);
|
|
42
42
|
const defaultHttpAgent = new https_1.default.Agent({
|
|
43
43
|
keepAlive: true
|
package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.cjs","sources":["../../../../../../../../../node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WrapperClient = exports.FetchHttpClient = void 0;\nconst http_1 = __importDefault(require(\"http\"));\nconst https_1 = __importDefault(require(\"https\"));\nconst url_1 = __importDefault(require(\"url\"));\nconst defaultHttpAgent = new https_1.default.Agent({\n keepAlive: true,\n});\nclass FetchHttpClient {\n constructor(httpAgent) {\n this.httpAgent = httpAgent || defaultHttpAgent;\n }\n /**\n * Wraps the http and https libraries in a fetch()-like interface\n * @param requestUrl\n * @param method HTTP Method (GET, POST, etc.)\n * @param headers HTTP Headers\n * @param Request body\n */\n request(requestUrl, method, headers, body, timeoutMillis) {\n return new Promise((resolve, reject) => {\n if (timeoutMillis === 0) {\n reject(Error('Response timed out'));\n return;\n }\n const urlParams = url_1.default.parse(requestUrl);\n const options = Object.assign(Object.assign({}, urlParams), { method: method, headers: headers, body: body, agent: this.httpAgent, timeout: timeoutMillis });\n const protocol = urlParams.protocol === 'http:' ? http_1.default : https_1.default;\n const req = protocol.request(options);\n req.on('response', (res) => {\n res.setEncoding('utf-8');\n let responseBody = '';\n res.on('data', (chunk) => {\n responseBody += chunk;\n });\n res.on('end', () => {\n resolve({\n status: res.statusCode,\n body: responseBody,\n });\n });\n });\n req.on('timeout', () => {\n req.destroy(Error('Socket connection timed out'));\n });\n req.on('error', (e) => {\n reject(e);\n });\n if (method !== 'GET' && body) {\n req.write(body);\n }\n req.end();\n });\n }\n}\nexports.FetchHttpClient = FetchHttpClient;\n/**\n * Wrap the exposed HttpClient in a CoreClient implementation to work with\n * FlagApi and EvaluationApi.\n */\nclass WrapperClient {\n constructor(client) {\n this.client = client;\n }\n request(request) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.client.request(request.requestUrl, request.method, request.headers, null, request.timeoutMillis);\n });\n }\n}\nexports.WrapperClient = WrapperClient;\n"],"names":["this","http"],"mappings":";;;;;;AACA,IAAI,YAAaA,iBAAAA,kBAAQA,gCAAK,aAAc,SAAU,SAAS,YAAY,GAAG,WAAW;AACrF,WAAS,MAAM,OAAO;AAAE,WAAO,iBAAiB,IAAI,QAAQ,IAAI,EAAE,SAAU,SAAS;AAAE,cAAQ,KAAK;AAAA,IAAE,CAAE;AAAA,EAAE;AAC1G,SAAO,KAAK,MAAM,IAAI,UAAU,SAAU,SAAS,QAAQ;AACvD,aAAS,UAAU,OAAO;AAAE,UAAI;AAAE,aAAK,UAAU,KAAK,KAAK,CAAC;AAAA,MAAE,SAAU,GAAG;AAAE,eAAO,CAAC;AAAA;IAAI;AACzF,aAAS,SAAS,OAAO;AAAE,UAAI;AAAE,aAAK,UAAU,OAAO,EAAE,KAAK,CAAC;AAAA,MAAE,SAAU,GAAG;AAAE,eAAO,CAAC;AAAA;IAAI;AAC5F,aAAS,KAAK,QAAQ;AAAE,aAAO,OAAO,QAAQ,OAAO,KAAK,IAAI,MAAM,OAAO,KAAK,EAAE,KAAK,WAAW,QAAQ;AAAA,IAAE;AAC5G,UAAM,YAAY,UAAU,MAAM,SAAS,cAAc,CAAA,CAAE,GAAG,MAAM;AAAA,EAC5E,CAAK;AACL;AACA,IAAI,kBAAmBA,iBAAAA,kBAAQA,iBAAAA,eAAK,mBAAoB,SAAU,KAAK;AACnE,SAAQ,OAAO,IAAI,aAAc,MAAM,EAAE,WAAW,IAAG;AAC3D;AACA,OAAO,eAAeC,KAAAA,WAAS,cAAc,EAAE,OAAO,KAAI,CAAE;AAC5DA,KAAAA,UAAA,gBAAwBA,KAAAA,UAAA,kBAA0B;AAClD,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"http.cjs","sources":["../../../../../../../../../node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WrapperClient = exports.FetchHttpClient = void 0;\nconst http_1 = __importDefault(require(\"http\"));\nconst https_1 = __importDefault(require(\"https\"));\nconst url_1 = __importDefault(require(\"url\"));\nconst defaultHttpAgent = new https_1.default.Agent({\n keepAlive: true,\n});\nclass FetchHttpClient {\n constructor(httpAgent) {\n this.httpAgent = httpAgent || defaultHttpAgent;\n }\n /**\n * Wraps the http and https libraries in a fetch()-like interface\n * @param requestUrl\n * @param method HTTP Method (GET, POST, etc.)\n * @param headers HTTP Headers\n * @param Request body\n */\n request(requestUrl, method, headers, body, timeoutMillis) {\n return new Promise((resolve, reject) => {\n if (timeoutMillis === 0) {\n reject(Error('Response timed out'));\n return;\n }\n const urlParams = url_1.default.parse(requestUrl);\n const options = Object.assign(Object.assign({}, urlParams), { method: method, headers: headers, body: body, agent: this.httpAgent, timeout: timeoutMillis });\n const protocol = urlParams.protocol === 'http:' ? http_1.default : https_1.default;\n const req = protocol.request(options);\n req.on('response', (res) => {\n res.setEncoding('utf-8');\n let responseBody = '';\n res.on('data', (chunk) => {\n responseBody += chunk;\n });\n res.on('end', () => {\n resolve({\n status: res.statusCode,\n body: responseBody,\n });\n });\n });\n req.on('timeout', () => {\n req.destroy(Error('Socket connection timed out'));\n });\n req.on('error', (e) => {\n reject(e);\n });\n if (method !== 'GET' && body) {\n req.write(body);\n }\n req.end();\n });\n }\n}\nexports.FetchHttpClient = FetchHttpClient;\n/**\n * Wrap the exposed HttpClient in a CoreClient implementation to work with\n * FlagApi and EvaluationApi.\n */\nclass WrapperClient {\n constructor(client) {\n this.client = client;\n }\n request(request) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.client.request(request.requestUrl, request.method, request.headers, null, request.timeoutMillis);\n });\n }\n}\nexports.WrapperClient = WrapperClient;\n"],"names":["this","http","require$$0","require$$1"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { commonjsGlobal } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
2
|
import { __exports as http } from "../../../../../../_virtual/http.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import http__default from "http";
|
|
4
|
+
import https__default from "https";
|
|
5
5
|
import require$$2 from "url";
|
|
6
6
|
var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
7
7
|
function adopt(value) {
|
|
@@ -35,8 +35,8 @@ var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || functi
|
|
|
35
35
|
};
|
|
36
36
|
Object.defineProperty(http, "__esModule", { value: true });
|
|
37
37
|
http.WrapperClient = http.FetchHttpClient = void 0;
|
|
38
|
-
const http_1 = __importDefault(
|
|
39
|
-
const https_1 = __importDefault(
|
|
38
|
+
const http_1 = __importDefault(http__default);
|
|
39
|
+
const https_1 = __importDefault(https__default);
|
|
40
40
|
const url_1 = __importDefault(require$$2);
|
|
41
41
|
const defaultHttpAgent = new https_1.default.Agent({
|
|
42
42
|
keepAlive: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sources":["../../../../../../../../../node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WrapperClient = exports.FetchHttpClient = void 0;\nconst http_1 = __importDefault(require(\"http\"));\nconst https_1 = __importDefault(require(\"https\"));\nconst url_1 = __importDefault(require(\"url\"));\nconst defaultHttpAgent = new https_1.default.Agent({\n keepAlive: true,\n});\nclass FetchHttpClient {\n constructor(httpAgent) {\n this.httpAgent = httpAgent || defaultHttpAgent;\n }\n /**\n * Wraps the http and https libraries in a fetch()-like interface\n * @param requestUrl\n * @param method HTTP Method (GET, POST, etc.)\n * @param headers HTTP Headers\n * @param Request body\n */\n request(requestUrl, method, headers, body, timeoutMillis) {\n return new Promise((resolve, reject) => {\n if (timeoutMillis === 0) {\n reject(Error('Response timed out'));\n return;\n }\n const urlParams = url_1.default.parse(requestUrl);\n const options = Object.assign(Object.assign({}, urlParams), { method: method, headers: headers, body: body, agent: this.httpAgent, timeout: timeoutMillis });\n const protocol = urlParams.protocol === 'http:' ? http_1.default : https_1.default;\n const req = protocol.request(options);\n req.on('response', (res) => {\n res.setEncoding('utf-8');\n let responseBody = '';\n res.on('data', (chunk) => {\n responseBody += chunk;\n });\n res.on('end', () => {\n resolve({\n status: res.statusCode,\n body: responseBody,\n });\n });\n });\n req.on('timeout', () => {\n req.destroy(Error('Socket connection timed out'));\n });\n req.on('error', (e) => {\n reject(e);\n });\n if (method !== 'GET' && body) {\n req.write(body);\n }\n req.end();\n });\n }\n}\nexports.FetchHttpClient = FetchHttpClient;\n/**\n * Wrap the exposed HttpClient in a CoreClient implementation to work with\n * FlagApi and EvaluationApi.\n */\nclass WrapperClient {\n constructor(client) {\n this.client = client;\n }\n request(request) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.client.request(request.requestUrl, request.method, request.headers, null, request.timeoutMillis);\n });\n }\n}\nexports.WrapperClient = WrapperClient;\n"],"names":["this","require$$0","require$$1"],"mappings":";;;;;AACA,IAAI,YAAaA,kBAAQA,eAAK,aAAc,SAAU,SAAS,YAAY,GAAG,WAAW;AACrF,WAAS,MAAM,OAAO;AAAE,WAAO,iBAAiB,IAAI,QAAQ,IAAI,EAAE,SAAU,SAAS;AAAE,cAAQ,KAAK;AAAA,IAAE,CAAE;AAAA,EAAE;AAC1G,SAAO,KAAK,MAAM,IAAI,UAAU,SAAU,SAAS,QAAQ;AACvD,aAAS,UAAU,OAAO;AAAE,UAAI;AAAE,aAAK,UAAU,KAAK,KAAK,CAAC;AAAA,MAAE,SAAU,GAAG;AAAE,eAAO,CAAC;AAAA;IAAI;AACzF,aAAS,SAAS,OAAO;AAAE,UAAI;AAAE,aAAK,UAAU,OAAO,EAAE,KAAK,CAAC;AAAA,MAAE,SAAU,GAAG;AAAE,eAAO,CAAC;AAAA;IAAI;AAC5F,aAAS,KAAK,QAAQ;AAAE,aAAO,OAAO,QAAQ,OAAO,KAAK,IAAI,MAAM,OAAO,KAAK,EAAE,KAAK,WAAW,QAAQ;AAAA,IAAE;AAC5G,UAAM,YAAY,UAAU,MAAM,SAAS,cAAc,CAAA,CAAE,GAAG,MAAM;AAAA,EAC5E,CAAK;AACL;AACA,IAAI,kBAAmBA,kBAAQA,eAAK,mBAAoB,SAAU,KAAK;AACnE,SAAQ,OAAO,IAAI,aAAc,MAAM,EAAE,WAAW,IAAG;AAC3D;AACA,OAAO,eAAe,MAAS,cAAc,EAAE,OAAO,KAAI,CAAE;AAC5D,KAAA,gBAAwB,KAAA,kBAA0B;AAClD,MAAM,SAAS,gBAAgBC,
|
|
1
|
+
{"version":3,"file":"http.js","sources":["../../../../../../../../../node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WrapperClient = exports.FetchHttpClient = void 0;\nconst http_1 = __importDefault(require(\"http\"));\nconst https_1 = __importDefault(require(\"https\"));\nconst url_1 = __importDefault(require(\"url\"));\nconst defaultHttpAgent = new https_1.default.Agent({\n keepAlive: true,\n});\nclass FetchHttpClient {\n constructor(httpAgent) {\n this.httpAgent = httpAgent || defaultHttpAgent;\n }\n /**\n * Wraps the http and https libraries in a fetch()-like interface\n * @param requestUrl\n * @param method HTTP Method (GET, POST, etc.)\n * @param headers HTTP Headers\n * @param Request body\n */\n request(requestUrl, method, headers, body, timeoutMillis) {\n return new Promise((resolve, reject) => {\n if (timeoutMillis === 0) {\n reject(Error('Response timed out'));\n return;\n }\n const urlParams = url_1.default.parse(requestUrl);\n const options = Object.assign(Object.assign({}, urlParams), { method: method, headers: headers, body: body, agent: this.httpAgent, timeout: timeoutMillis });\n const protocol = urlParams.protocol === 'http:' ? http_1.default : https_1.default;\n const req = protocol.request(options);\n req.on('response', (res) => {\n res.setEncoding('utf-8');\n let responseBody = '';\n res.on('data', (chunk) => {\n responseBody += chunk;\n });\n res.on('end', () => {\n resolve({\n status: res.statusCode,\n body: responseBody,\n });\n });\n });\n req.on('timeout', () => {\n req.destroy(Error('Socket connection timed out'));\n });\n req.on('error', (e) => {\n reject(e);\n });\n if (method !== 'GET' && body) {\n req.write(body);\n }\n req.end();\n });\n }\n}\nexports.FetchHttpClient = FetchHttpClient;\n/**\n * Wrap the exposed HttpClient in a CoreClient implementation to work with\n * FlagApi and EvaluationApi.\n */\nclass WrapperClient {\n constructor(client) {\n this.client = client;\n }\n request(request) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.client.request(request.requestUrl, request.method, request.headers, null, request.timeoutMillis);\n });\n }\n}\nexports.WrapperClient = WrapperClient;\n"],"names":["this","require$$0","require$$1"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/constants.js"],"sourcesContent":["const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n"],"names":[],"mappings":";;AAAK,MAAC,sBAAsB;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/constants.js"],"sourcesContent":["const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n"],"names":[],"mappings":"AAAK,MAAC,sBAAsB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-build.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/debug-build.js"],"sourcesContent":["/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n"],"names":[],"mappings":";;AAKK,MAAC,cAAe,OAAO,qBAAqB,eAAe;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-build.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/debug-build.js"],"sourcesContent":["/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n"],"names":[],"mappings":"AAKK,MAAC,cAAe,OAAO,qBAAqB,eAAe;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const debugBuild = require("./debug-build.cjs");
|
|
4
|
+
const worldwide = require("../../utils/esm/worldwide.cjs");
|
|
5
|
+
const syncpromise = require("../../utils/esm/syncpromise.cjs");
|
|
6
|
+
const logger = require("../../utils/esm/logger.cjs");
|
|
7
|
+
const is = require("../../utils/esm/is.cjs");
|
|
8
|
+
function getGlobalEventProcessors() {
|
|
9
|
+
return worldwide.getGlobalSingleton("globalEventProcessors", () => []);
|
|
10
|
+
}
|
|
11
|
+
function notifyEventProcessors(processors, event, hint, index = 0) {
|
|
12
|
+
return new syncpromise.SyncPromise((resolve, reject) => {
|
|
13
|
+
const processor = processors[index];
|
|
14
|
+
if (event === null || typeof processor !== "function") {
|
|
15
|
+
resolve(event);
|
|
16
|
+
} else {
|
|
17
|
+
const result = processor({ ...event }, hint);
|
|
18
|
+
debugBuild.DEBUG_BUILD && processor.id && result === null && logger.logger.log(`Event processor "${processor.id}" dropped event`);
|
|
19
|
+
if (is.isThenable(result)) {
|
|
20
|
+
void result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject);
|
|
21
|
+
} else {
|
|
22
|
+
void notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
exports.getGlobalEventProcessors = getGlobalEventProcessors;
|
|
28
|
+
exports.notifyEventProcessors = notifyEventProcessors;
|
|
29
|
+
//# sourceMappingURL=eventProcessors.cjs.map
|
package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventProcessors.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/eventProcessors.js"],"sourcesContent":["import { SyncPromise, logger, isThenable, getGlobalSingleton } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\n\n/**\n * Returns the global event processors.\n * @deprecated Global event processors will be removed in v8.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.\n */\nfunction addGlobalEventProcessor(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { addGlobalEventProcessor, getGlobalEventProcessors, notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n"],"names":["getGlobalSingleton","SyncPromise","DEBUG_BUILD","logger","isThenable"],"mappings":";;;;;;;AAOA,SAAS,2BAA2B;AAClC,SAAOA,UAAAA,mBAAmB,yBAAyB,MAAM,EAAE;AAC7D;AAcA,SAAS,sBACP,YACA,OACA,MACA,QAAQ,GACR;AACA,SAAO,IAAIC,YAAAA,YAAY,CAAC,SAAS,WAAW;AAC1C,UAAM,YAAY,WAAW,KAAK;AAClC,QAAI,UAAU,QAAQ,OAAO,cAAc,YAAY;AACrD,cAAQ,KAAK;AAAA,IACf,OAAO;AACL,YAAM,SAAS,UAAU,EAAE,GAAG,MAAK,GAAI,IAAI;AAE3CC,iBAAAA,eAAe,UAAU,MAAM,WAAW,QAAQC,OAAAA,OAAO,IAAI,oBAAoB,UAAU,EAAE,iBAAiB;AAE9G,UAAIC,GAAAA,WAAW,MAAM,GAAG;AACtB,aAAK,OACF,KAAK,WAAS,sBAAsB,YAAY,OAAO,MAAM,QAAQ,CAAC,EAAE,KAAK,OAAO,CAAC,EACrF,KAAK,MAAM,MAAM;AAAA,MACtB,OAAO;AACL,aAAK,sBAAsB,YAAY,QAAQ,MAAM,QAAQ,CAAC,EAC3D,KAAK,OAAO,EACZ,KAAK,MAAM,MAAM;AAAA,MACtB;AAAA,IACF;AAAA,EACF,CAAC;AACH;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DEBUG_BUILD } from "./debug-build.js";
|
|
2
|
+
import { getGlobalSingleton } from "../../utils/esm/worldwide.js";
|
|
3
|
+
import { SyncPromise } from "../../utils/esm/syncpromise.js";
|
|
4
|
+
import { logger } from "../../utils/esm/logger.js";
|
|
5
|
+
import { isThenable } from "../../utils/esm/is.js";
|
|
6
|
+
function getGlobalEventProcessors() {
|
|
7
|
+
return getGlobalSingleton("globalEventProcessors", () => []);
|
|
8
|
+
}
|
|
9
|
+
function notifyEventProcessors(processors, event, hint, index = 0) {
|
|
10
|
+
return new SyncPromise((resolve, reject) => {
|
|
11
|
+
const processor = processors[index];
|
|
12
|
+
if (event === null || typeof processor !== "function") {
|
|
13
|
+
resolve(event);
|
|
14
|
+
} else {
|
|
15
|
+
const result = processor({ ...event }, hint);
|
|
16
|
+
DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor "${processor.id}" dropped event`);
|
|
17
|
+
if (isThenable(result)) {
|
|
18
|
+
void result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject);
|
|
19
|
+
} else {
|
|
20
|
+
void notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
getGlobalEventProcessors,
|
|
27
|
+
notifyEventProcessors
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=eventProcessors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventProcessors.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/eventProcessors.js"],"sourcesContent":["import { SyncPromise, logger, isThenable, getGlobalSingleton } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\n\n/**\n * Returns the global event processors.\n * @deprecated Global event processors will be removed in v8.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.\n */\nfunction addGlobalEventProcessor(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { addGlobalEventProcessor, getGlobalEventProcessors, notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n"],"names":[],"mappings":";;;;;AAOA,SAAS,2BAA2B;AAClC,SAAO,mBAAmB,yBAAyB,MAAM,EAAE;AAC7D;AAcA,SAAS,sBACP,YACA,OACA,MACA,QAAQ,GACR;AACA,SAAO,IAAI,YAAY,CAAC,SAAS,WAAW;AAC1C,UAAM,YAAY,WAAW,KAAK;AAClC,QAAI,UAAU,QAAQ,OAAO,cAAc,YAAY;AACrD,cAAQ,KAAK;AAAA,IACf,OAAO;AACL,YAAM,SAAS,UAAU,EAAE,GAAG,MAAK,GAAI,IAAI;AAE3C,qBAAe,UAAU,MAAM,WAAW,QAAQ,OAAO,IAAI,oBAAoB,UAAU,EAAE,iBAAiB;AAE9G,UAAI,WAAW,MAAM,GAAG;AACtB,aAAK,OACF,KAAK,WAAS,sBAAsB,YAAY,OAAO,MAAM,QAAQ,CAAC,EAAE,KAAK,OAAO,CAAC,EACrF,KAAK,MAAM,MAAM;AAAA,MACtB,OAAO;AACL,aAAK,sBAAsB,YAAY,QAAQ,MAAM,QAAQ,CAAC,EAC3D,KAAK,OAAO,EACZ,KAAK,MAAM,MAAM;AAAA,MACtB;AAAA,IACF;AAAA,EACF,CAAC;AACH;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const hub = require("./hub.cjs");
|
|
4
|
+
const prepareEvent = require("./utils/prepareEvent.cjs");
|
|
5
|
+
function captureException(exception, hint) {
|
|
6
|
+
return hub.getCurrentHub().captureException(exception, prepareEvent.parseEventHintOrCaptureContext(hint));
|
|
7
|
+
}
|
|
8
|
+
function getClient() {
|
|
9
|
+
return hub.getCurrentHub().getClient();
|
|
10
|
+
}
|
|
11
|
+
function getCurrentScope() {
|
|
12
|
+
return hub.getCurrentHub().getScope();
|
|
13
|
+
}
|
|
14
|
+
exports.captureException = captureException;
|
|
15
|
+
exports.getClient = getClient;
|
|
16
|
+
exports.getCurrentScope = getCurrentScope;
|
|
17
|
+
//# sourceMappingURL=exports.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/exports.js"],"sourcesContent":["import { logger, uuid4, timestampInSeconds, isThenable, GLOBAL_OBJ } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { getCurrentHub, runWithAsyncContext, getIsolationScope } from './hub.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n exception,\n hint,\n) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param exception The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n *\n * @deprecated Use getCurrentScope() directly.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().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 */\n// eslint-disable-next-line deprecation/deprecation\nfunction addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().addBreadcrumb(breadcrumb, hint);\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 normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, deprecation/deprecation\nfunction setContext(name, context) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().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 */\n// eslint-disable-next-line deprecation/deprecation\nfunction setExtras(extras) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setExtras(extras);\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 normalized.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setExtra(key, extra) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setExtra(key, extra);\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 */\n// eslint-disable-next-line deprecation/deprecation\nfunction setTags(tags) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setTag(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().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 */\n// eslint-disable-next-line deprecation/deprecation\nfunction setUser(user) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().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\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n ...rest\n) {\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n if (!scope) {\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(callback);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(() => {\n // eslint-disable-next-line deprecation/deprecation\n hub.getStackTop().scope = scope ;\n return callback(scope );\n });\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n *\n * @param callback The callback in which the passed isolation scope is active. (Note: In environments without async\n * context strategy, the currently active isolation scope may change within execution of the callback.)\n * @returns The same value that `callback` returns.\n */\nfunction withIsolationScope(callback) {\n return runWithAsyncContext(() => {\n return callback(getIsolationScope());\n });\n}\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback.\n *\n * @param span Spans started in the context of the provided callback will be children of this span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n return withScope(scope => {\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(span);\n return callback(scope);\n });\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n // eslint-disable-next-line deprecation/deprecation\n) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\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 */\nasync function flush(timeout) {\n const client = 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 */\nasync function close(timeout) {\n const client = 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 * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nfunction lastEventId() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().lastEventId();\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getClient();\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n return !!getClient();\n}\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getScope();\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session);\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession(session);\n\n return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session) {\n closeSession(session);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n const client = getClient();\n // TODO (v8): Remove currentScope and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nfunction captureSession(end = false) {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\n\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, configureScope, endSession, flush, getClient, getCurrentScope, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, startTransaction, withActiveSpan, withIsolationScope, withMonitor, withScope };\n//# sourceMappingURL=exports.js.map\n"],"names":["getCurrentHub","parseEventHintOrCaptureContext"],"mappings":";;;;AAcA,SAAS,iBAEP,WACA,MACA;AAEA,SAAOA,IAAAA,cAAa,EAAG,iBAAiB,WAAWC,aAAAA,+BAA+B,IAAI,CAAC;AACzF;AAyVA,SAAS,YAAY;AAEnB,SAAOD,IAAAA,cAAa,EAAG,UAAS;AAClC;AAYA,SAAS,kBAAkB;AAEzB,SAAOA,IAAAA,cAAa,EAAG,SAAQ;AACjC;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getCurrentHub } from "./hub.js";
|
|
2
|
+
import { parseEventHintOrCaptureContext } from "./utils/prepareEvent.js";
|
|
3
|
+
function captureException(exception, hint) {
|
|
4
|
+
return getCurrentHub().captureException(exception, parseEventHintOrCaptureContext(hint));
|
|
5
|
+
}
|
|
6
|
+
function getClient() {
|
|
7
|
+
return getCurrentHub().getClient();
|
|
8
|
+
}
|
|
9
|
+
function getCurrentScope() {
|
|
10
|
+
return getCurrentHub().getScope();
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
captureException,
|
|
14
|
+
getClient,
|
|
15
|
+
getCurrentScope
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/exports.js"],"sourcesContent":["import { logger, uuid4, timestampInSeconds, isThenable, GLOBAL_OBJ } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { getCurrentHub, runWithAsyncContext, getIsolationScope } from './hub.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n exception,\n hint,\n) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param exception The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n *\n * @deprecated Use getCurrentScope() directly.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().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 */\n// eslint-disable-next-line deprecation/deprecation\nfunction addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().addBreadcrumb(breadcrumb, hint);\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 normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, deprecation/deprecation\nfunction setContext(name, context) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().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 */\n// eslint-disable-next-line deprecation/deprecation\nfunction setExtras(extras) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setExtras(extras);\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 normalized.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setExtra(key, extra) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setExtra(key, extra);\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 */\n// eslint-disable-next-line deprecation/deprecation\nfunction setTags(tags) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setTag(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().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 */\n// eslint-disable-next-line deprecation/deprecation\nfunction setUser(user) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().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\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n ...rest\n) {\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n if (!scope) {\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(callback);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(() => {\n // eslint-disable-next-line deprecation/deprecation\n hub.getStackTop().scope = scope ;\n return callback(scope );\n });\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n *\n * @param callback The callback in which the passed isolation scope is active. (Note: In environments without async\n * context strategy, the currently active isolation scope may change within execution of the callback.)\n * @returns The same value that `callback` returns.\n */\nfunction withIsolationScope(callback) {\n return runWithAsyncContext(() => {\n return callback(getIsolationScope());\n });\n}\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback.\n *\n * @param span Spans started in the context of the provided callback will be children of this span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n return withScope(scope => {\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(span);\n return callback(scope);\n });\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n // eslint-disable-next-line deprecation/deprecation\n) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\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 */\nasync function flush(timeout) {\n const client = 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 */\nasync function close(timeout) {\n const client = 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 * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nfunction lastEventId() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().lastEventId();\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getClient();\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n return !!getClient();\n}\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getScope();\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session);\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession(session);\n\n return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session) {\n closeSession(session);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n const client = getClient();\n // TODO (v8): Remove currentScope and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nfunction captureSession(end = false) {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\n\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, configureScope, endSession, flush, getClient, getCurrentScope, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, startTransaction, withActiveSpan, withIsolationScope, withMonitor, withScope };\n//# sourceMappingURL=exports.js.map\n"],"names":[],"mappings":";;AAcA,SAAS,iBAEP,WACA,MACA;AAEA,SAAO,cAAa,EAAG,iBAAiB,WAAW,+BAA+B,IAAI,CAAC;AACzF;AAyVA,SAAS,YAAY;AAEnB,SAAO,cAAa,EAAG,UAAS;AAClC;AAYA,SAAS,kBAAkB;AAEzB,SAAO,cAAa,EAAG,SAAQ;AACjC;","x_google_ignoreList":[0]}
|