slnodejs 6.1.234 → 6.1.248
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 +31 -4
- package/browser-agent/dist/browser-agent-all.min.js +21 -21
- package/browser-agent/package.json +1 -1
- package/package.json +4 -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 +2 -0
- package/tsOutputs/common/config-process/config.js +2 -0
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.d.ts +6 -0
- package/tsOutputs/common/constants/sl-env-vars.js +15 -0
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.js +1 -1
- package/tsOutputs/common/footprints-process-v6/index.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/common/watchdog.d.ts +1 -0
- package/tsOutputs/common/watchdog.js +5 -0
- package/tsOutputs/common/watchdog.js.map +1 -1
- 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 +30 -5
- package/tsOutputs/test-listener/agent-loader.js.map +1 -1
- package/tsOutputs/test-listener/factory.d.ts +0 -1
- package/tsOutputs/test-listener/factory.js +1 -4
- package/tsOutputs/test-listener/factory.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);
|
|
@@ -47507,6 +47514,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47507
47514
|
_this.footprintsSendIntervalSecs = new config_system_1.NumberConfigKey(false, 10);
|
|
47508
47515
|
_this.footprintsCollectIntervalSecs = new config_system_1.NumberConfigKey(false, 10);
|
|
47509
47516
|
_this.shouldCheckForActiveExecutionOnStartUp = new config_system_1.BooleanConfigKey(false, true);
|
|
47517
|
+
_this.useTsNode = new config_system_1.BooleanConfigKey(false, false);
|
|
47510
47518
|
return _this;
|
|
47511
47519
|
}
|
|
47512
47520
|
return AgentConfig;
|
|
@@ -47764,9 +47772,21 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47764
47772
|
SlEnvVars.getDisableHookDependencyGuard = function () {
|
|
47765
47773
|
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.DISABLE_HOOK_DEPENDENCY_GUARD);
|
|
47766
47774
|
};
|
|
47775
|
+
SlEnvVars.shouldUseOtel = function () {
|
|
47776
|
+
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.USE_OTEL_AGENT);
|
|
47777
|
+
};
|
|
47767
47778
|
SlEnvVars.useSlMapping = function () {
|
|
47768
47779
|
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.USE_SL_MAPPING);
|
|
47769
47780
|
};
|
|
47781
|
+
SlEnvVars.turnOtelOn = function () {
|
|
47782
|
+
process.env[SlEnvVars.USE_OTEL_AGENT] = 'true';
|
|
47783
|
+
};
|
|
47784
|
+
SlEnvVars.turnOtelOff = function () {
|
|
47785
|
+
process.env[SlEnvVars.USE_OTEL_AGENT] = 'false';
|
|
47786
|
+
};
|
|
47787
|
+
SlEnvVars.useSpawnWrap = function () {
|
|
47788
|
+
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.SL_USE_SPAWN_WRAP);
|
|
47789
|
+
};
|
|
47770
47790
|
var _a;
|
|
47771
47791
|
SlEnvVars.HTTP_TIMEOUT = 'SL_httpTimeout';
|
|
47772
47792
|
SlEnvVars.HTTP_MAX_ATTEMPTS = 'SL_HttpMaxAttempts';
|
|
@@ -47784,7 +47804,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47784
47804
|
SlEnvVars.FOOTPRINTS_BUFFER_THRESHOLD_MB = 'SL_footprintsBufferThresholdMb';
|
|
47785
47805
|
SlEnvVars.BLOCK_BROWSER_HTTP_TRAFFIC = 'SL_blockBrowserHttpTraffic';
|
|
47786
47806
|
SlEnvVars.DISABLE_HOOK_DEPENDENCY_GUARD = 'SL_disableHookDependencyGuard';
|
|
47807
|
+
SlEnvVars.USE_OTEL_AGENT = 'SL_useOtelAgent';
|
|
47787
47808
|
SlEnvVars.USE_SL_MAPPING = 'SL_useSlMapping';
|
|
47809
|
+
SlEnvVars.SL_USE_SPAWN_WRAP = 'SL_useSpawnWrap';
|
|
47788
47810
|
SlEnvVars.CIA = (_a = (function () {
|
|
47789
47811
|
function class_1() {
|
|
47790
47812
|
}
|
|
@@ -49696,7 +49718,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49696
49718
|
}
|
|
49697
49719
|
if (this.isRunning && this.cfg.sendFootprints.value && this.cfg.enabled.value) {
|
|
49698
49720
|
this.ensureKeepaliveThreadRunning();
|
|
49699
|
-
this.sendToServerWatchdog.
|
|
49721
|
+
this.sendToServerWatchdog.startIfNotRunning();
|
|
49700
49722
|
}
|
|
49701
49723
|
this.footprintsEnqueueOnce = true;
|
|
49702
49724
|
return [2];
|
|
@@ -51852,6 +51874,11 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
51852
51874
|
this.stopped = false;
|
|
51853
51875
|
this.reset();
|
|
51854
51876
|
};
|
|
51877
|
+
Watchdog.prototype.startIfNotRunning = function () {
|
|
51878
|
+
if (this.stopped || !this.handle) {
|
|
51879
|
+
this.start();
|
|
51880
|
+
}
|
|
51881
|
+
};
|
|
51855
51882
|
Watchdog.prototype.getStatus = function () {
|
|
51856
51883
|
return {
|
|
51857
51884
|
pendingAlarmDuringSuspended: this.pendingAlarmDuringSuspended,
|