slnodejs 6.1.225 → 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 +21 -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/build-scanner/instrumentation/file-instrumenter.js +78 -22
- package/tsOutputs/build-scanner/instrumentation/file-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js +2 -2
- package/tsOutputs/build-scanner/instrumentation/instrumentation-utils.js.map +1 -1
- package/tsOutputs/cli-parse/child-process-wrapper.js +2 -2
- package/tsOutputs/cli-parse/child-process-wrapper.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +6 -10
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +4 -7
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +13 -6
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-conracts.d.ts +2 -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/agent-events/nodejs-env-info-builder.js +1 -0
- package/tsOutputs/common/agent-events/nodejs-env-info-builder.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";
|
|
@@ -46911,6 +46912,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
46911
46912
|
NodejsEnvInfoBuilder.prototype.fillData = function () {
|
|
46912
46913
|
this.info.indexJsonDeps = this.dependencies;
|
|
46913
46914
|
this.info.nodeVersion = process.versions.node;
|
|
46915
|
+
this.info.execArgv = process.execArgv;
|
|
46914
46916
|
};
|
|
46915
46917
|
NodejsEnvInfoBuilder.prototype.build = function () {
|
|
46916
46918
|
this.fillData();
|
|
@@ -47050,16 +47052,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47050
47052
|
if (v !== undefined) module.exports = v;
|
|
47051
47053
|
}
|
|
47052
47054
|
else if (typeof define === "function" && define.amd) {
|
|
47053
|
-
define(["require", "exports", "./config-system", "
|
|
47055
|
+
define(["require", "exports", "./config-system", "./config", "../constants/sl-env-vars", "fs", "jwt-decode"], factory);
|
|
47054
47056
|
}
|
|
47055
47057
|
})(function (require, exports) {
|
|
47056
47058
|
"use strict";
|
|
47057
47059
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47058
47060
|
exports.ConfigLoader = void 0;
|
|
47059
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");
|
|
47060
47064
|
var fs = require("fs");
|
|
47061
47065
|
var jwtDecode = require("jwt-decode");
|
|
47062
|
-
var config_1 = require("./config");
|
|
47063
47066
|
var ConfigLoader = (function () {
|
|
47064
47067
|
function ConfigLoader(logger) {
|
|
47065
47068
|
this.logger = logger;
|
|
@@ -47089,6 +47092,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47089
47092
|
if (agentCfg.token.hasValue) {
|
|
47090
47093
|
this.loadConfigFromToken(agentCfg, agentCfg.token.value);
|
|
47091
47094
|
}
|
|
47095
|
+
this.resolveUsingOtel(agentCfg);
|
|
47092
47096
|
this.printConfiguration(agentCfg);
|
|
47093
47097
|
return agentCfg;
|
|
47094
47098
|
};
|
|
@@ -47100,6 +47104,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47100
47104
|
this.logger.info('****************************************************');
|
|
47101
47105
|
this.logger.info(agentCfg.toJsonObject());
|
|
47102
47106
|
};
|
|
47107
|
+
ConfigLoader.prototype.resolveUsingOtel = function (agentCfg) {
|
|
47108
|
+
agentCfg.useOtel.value = sl_env_vars_1.SlEnvVars.shouldUseOtel();
|
|
47109
|
+
};
|
|
47103
47110
|
ConfigLoader.prototype.loadConfigFromToken = function (agentCfg, token) {
|
|
47104
47111
|
if (!token)
|
|
47105
47112
|
return null;
|
|
@@ -47130,7 +47137,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47130
47137
|
});
|
|
47131
47138
|
|
|
47132
47139
|
}).call(this)}).call(this,require('_process'))
|
|
47133
|
-
},{"./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){
|
|
47134
47141
|
(function (process){(function (){
|
|
47135
47142
|
(function (factory) {
|
|
47136
47143
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
@@ -47476,6 +47483,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47476
47483
|
_this.interval = new config_system_1.NumberConfigKey(false, 10000);
|
|
47477
47484
|
_this.testStatusCheckInterval = new config_system_1.NumberConfigKey(false, 30000);
|
|
47478
47485
|
_this.enabled = new config_system_1.BooleanConfigKey(false, true);
|
|
47486
|
+
_this.useOtel = new config_system_1.BooleanConfigKey(false, false);
|
|
47479
47487
|
_this.sendFootprints = new config_system_1.BooleanConfigKey(false, true);
|
|
47480
47488
|
_this.sendEvents = new config_system_1.BooleanConfigKey(false, true);
|
|
47481
47489
|
_this.sendLogs = new config_system_1.BooleanConfigKey(false, false);
|
|
@@ -47763,9 +47771,18 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47763
47771
|
SlEnvVars.getDisableHookDependencyGuard = function () {
|
|
47764
47772
|
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.DISABLE_HOOK_DEPENDENCY_GUARD);
|
|
47765
47773
|
};
|
|
47774
|
+
SlEnvVars.shouldUseOtel = function () {
|
|
47775
|
+
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.USE_OTEL_AGENT);
|
|
47776
|
+
};
|
|
47766
47777
|
SlEnvVars.useSlMapping = function () {
|
|
47767
47778
|
return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.USE_SL_MAPPING);
|
|
47768
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
|
+
};
|
|
47769
47786
|
var _a;
|
|
47770
47787
|
SlEnvVars.HTTP_TIMEOUT = 'SL_httpTimeout';
|
|
47771
47788
|
SlEnvVars.HTTP_MAX_ATTEMPTS = 'SL_HttpMaxAttempts';
|
|
@@ -47783,6 +47800,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47783
47800
|
SlEnvVars.FOOTPRINTS_BUFFER_THRESHOLD_MB = 'SL_footprintsBufferThresholdMb';
|
|
47784
47801
|
SlEnvVars.BLOCK_BROWSER_HTTP_TRAFFIC = 'SL_blockBrowserHttpTraffic';
|
|
47785
47802
|
SlEnvVars.DISABLE_HOOK_DEPENDENCY_GUARD = 'SL_disableHookDependencyGuard';
|
|
47803
|
+
SlEnvVars.USE_OTEL_AGENT = 'SL_useOtelAgent';
|
|
47786
47804
|
SlEnvVars.USE_SL_MAPPING = 'SL_useSlMapping';
|
|
47787
47805
|
SlEnvVars.CIA = (_a = (function () {
|
|
47788
47806
|
function class_1() {
|