slnodejs 6.1.234 → 6.1.246
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/browser-agent/dist/browser-agent-all.js +20 -3
- package/browser-agent/dist/browser-agent-all.min.js +21 -21
- package/browser-agent/package.json +1 -1
- package/package.json +2 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +3 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +3 -1
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +8 -5
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-conracts.d.ts +1 -0
- package/tsOutputs/common/agent-events/agent-events-conracts.js +1 -0
- package/tsOutputs/common/agent-events/agent-events-conracts.js.map +1 -1
- package/tsOutputs/common/config-process/config-loader.d.ts +1 -0
- package/tsOutputs/common/config-process/config-loader.js +6 -1
- package/tsOutputs/common/config-process/config-loader.js.map +1 -1
- package/tsOutputs/common/config-process/config.d.ts +1 -0
- package/tsOutputs/common/config-process/config.js +1 -0
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.d.ts +4 -0
- package/tsOutputs/common/constants/sl-env-vars.js +11 -0
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/utils/process-utils.js +33 -0
- package/tsOutputs/common/utils/process-utils.js.map +1 -0
- package/tsOutputs/mocha-reporter/index.js +26 -1
- package/tsOutputs/mocha-reporter/index.js.map +1 -1
- package/tsOutputs/mocha-reporter/otel-agent.js +158 -0
- package/tsOutputs/mocha-reporter/otel-agent.js.map +1 -0
- package/tsOutputs/test-listener/agent-loader.js +15 -4
- package/tsOutputs/test-listener/agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/otel-agent-loader.js +98 -0
- package/tsOutputs/test-listener/otel-agent-loader.js.map +1 -0
|
@@ -46169,6 +46169,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46169
46169
|
AgentEventCode[AgentEventCode["UNSUPPORTED_RUNTIME"] = 4010] = "UNSUPPORTED_RUNTIME";
|
|
46170
46170
|
AgentEventCode[AgentEventCode["THIRD_PARTY_PACKAGE_DETECTED"] = 4011] = "THIRD_PARTY_PACKAGE_DETECTED";
|
|
46171
46171
|
AgentEventCode[AgentEventCode["THIRD_PARTY_FILE_DETECTED"] = 4012] = "THIRD_PARTY_FILE_DETECTED";
|
|
46172
|
+
AgentEventCode[AgentEventCode["OTEL_ERROR"] = 4013] = "OTEL_ERROR";
|
|
46172
46173
|
AgentEventCode[AgentEventCode["FOOTPRINTS_LOSS"] = 4999] = "FOOTPRINTS_LOSS";
|
|
46173
46174
|
AgentEventCode[AgentEventCode["LEAST_VERBOSE_LOG"] = 5001] = "LEAST_VERBOSE_LOG";
|
|
46174
46175
|
AgentEventCode[AgentEventCode["MOST_VERBOSE_LOG"] = 5999] = "MOST_VERBOSE_LOG";
|
|
@@ -47051,16 +47052,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47051
47052
|
if (v !== undefined) module.exports = v;
|
|
47052
47053
|
}
|
|
47053
47054
|
else if (typeof define === "function" && define.amd) {
|
|
47054
|
-
define(["require", "exports", "./config-system", "
|
|
47055
|
+
define(["require", "exports", "./config-system", "./config", "../constants/sl-env-vars", "fs", "jwt-decode"], factory);
|
|
47055
47056
|
}
|
|
47056
47057
|
})(function (require, exports) {
|
|
47057
47058
|
"use strict";
|
|
47058
47059
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47059
47060
|
exports.ConfigLoader = void 0;
|
|
47060
47061
|
var config_system_1 = require("./config-system");
|
|
47062
|
+
var config_1 = require("./config");
|
|
47063
|
+
var sl_env_vars_1 = require("../constants/sl-env-vars");
|
|
47061
47064
|
var fs = require("fs");
|
|
47062
47065
|
var jwtDecode = require("jwt-decode");
|
|
47063
|
-
var config_1 = require("./config");
|
|
47064
47066
|
var ConfigLoader = (function () {
|
|
47065
47067
|
function ConfigLoader(logger) {
|
|
47066
47068
|
this.logger = logger;
|
|
@@ -47090,6 +47092,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47090
47092
|
if (agentCfg.token.hasValue) {
|
|
47091
47093
|
this.loadConfigFromToken(agentCfg, agentCfg.token.value);
|
|
47092
47094
|
}
|
|
47095
|
+
this.resolveUsingOtel(agentCfg);
|
|
47093
47096
|
this.printConfiguration(agentCfg);
|
|
47094
47097
|
return agentCfg;
|
|
47095
47098
|
};
|
|
@@ -47101,6 +47104,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47101
47104
|
this.logger.info('****************************************************');
|
|
47102
47105
|
this.logger.info(agentCfg.toJsonObject());
|
|
47103
47106
|
};
|
|
47107
|
+
ConfigLoader.prototype.resolveUsingOtel = function (agentCfg) {
|
|
47108
|
+
agentCfg.useOtel.value = sl_env_vars_1.SlEnvVars.shouldUseOtel();
|
|
47109
|
+
};
|
|
47104
47110
|
ConfigLoader.prototype.loadConfigFromToken = function (agentCfg, token) {
|
|
47105
47111
|
if (!token)
|
|
47106
47112
|
return null;
|
|
@@ -47131,7 +47137,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47131
47137
|
});
|
|
47132
47138
|
|
|
47133
47139
|
}).call(this)}).call(this,require('_process'))
|
|
47134
|
-
},{"./config":302,"./config-system":301,"_process":179,"fs":69,"jwt-decode":441}],301:[function(require,module,exports){
|
|
47140
|
+
},{"../constants/sl-env-vars":305,"./config":302,"./config-system":301,"_process":179,"fs":69,"jwt-decode":441}],301:[function(require,module,exports){
|
|
47135
47141
|
(function (process){(function (){
|
|
47136
47142
|
(function (factory) {
|
|
47137
47143
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
@@ -47477,6 +47483,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47477
47483
|
_this.interval = new config_system_1.NumberConfigKey(false, 10000);
|
|
47478
47484
|
_this.testStatusCheckInterval = new config_system_1.NumberConfigKey(false, 30000);
|
|
47479
47485
|
_this.enabled = new config_system_1.BooleanConfigKey(false, true);
|
|
47486
|
+
_this.useOtel = new config_system_1.BooleanConfigKey(false, false);
|
|
47480
47487
|
_this.sendFootprints = new config_system_1.BooleanConfigKey(false, true);
|
|
47481
47488
|
_this.sendEvents = new config_system_1.BooleanConfigKey(false, true);
|
|
47482
47489
|
_this.sendLogs = new config_system_1.BooleanConfigKey(false, false);
|
|
@@ -47764,9 +47771,18 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47764
47771
|
SlEnvVars.getDisableHookDependencyGuard = function () {
|
|
47765
47772
|
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.DISABLE_HOOK_DEPENDENCY_GUARD);
|
|
47766
47773
|
};
|
|
47774
|
+
SlEnvVars.shouldUseOtel = function () {
|
|
47775
|
+
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.USE_OTEL_AGENT);
|
|
47776
|
+
};
|
|
47767
47777
|
SlEnvVars.useSlMapping = function () {
|
|
47768
47778
|
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.USE_SL_MAPPING);
|
|
47769
47779
|
};
|
|
47780
|
+
SlEnvVars.turnOtelOn = function () {
|
|
47781
|
+
process.env[SlEnvVars.USE_OTEL_AGENT] = 'true';
|
|
47782
|
+
};
|
|
47783
|
+
SlEnvVars.turnOtelOff = function () {
|
|
47784
|
+
process.env[SlEnvVars.USE_OTEL_AGENT] = 'false';
|
|
47785
|
+
};
|
|
47770
47786
|
var _a;
|
|
47771
47787
|
SlEnvVars.HTTP_TIMEOUT = 'SL_httpTimeout';
|
|
47772
47788
|
SlEnvVars.HTTP_MAX_ATTEMPTS = 'SL_HttpMaxAttempts';
|
|
@@ -47784,6 +47800,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47784
47800
|
SlEnvVars.FOOTPRINTS_BUFFER_THRESHOLD_MB = 'SL_footprintsBufferThresholdMb';
|
|
47785
47801
|
SlEnvVars.BLOCK_BROWSER_HTTP_TRAFFIC = 'SL_blockBrowserHttpTraffic';
|
|
47786
47802
|
SlEnvVars.DISABLE_HOOK_DEPENDENCY_GUARD = 'SL_disableHookDependencyGuard';
|
|
47803
|
+
SlEnvVars.USE_OTEL_AGENT = 'SL_useOtelAgent';
|
|
47787
47804
|
SlEnvVars.USE_SL_MAPPING = 'SL_useSlMapping';
|
|
47788
47805
|
SlEnvVars.CIA = (_a = (function () {
|
|
47789
47806
|
function class_1() {
|