slnodejs 6.0.38 → 6.1.75
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 +139 -89
- package/browser-agent/dist/browser-agent-all.min.js +30 -30
- package/browser-agent/package.json +2 -2
- package/package.json +6 -5
- package/tsOutputs/api.d.ts +2 -0
- package/tsOutputs/api.js +2 -1
- package/tsOutputs/build-scanner/ast-utils.js +3 -3
- package/tsOutputs/build-scanner/ast-utils.js.map +1 -1
- package/tsOutputs/build-scanner/build-diff-process.js +15 -9
- package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
- package/tsOutputs/build-scanner/file-system/actual-file.js +38 -18
- package/tsOutputs/build-scanner/file-system/actual-file.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/file-instrumenter.js +6 -6
- package/tsOutputs/build-scanner/instrumentation/file-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/markup-file-instrumenter.js +4 -7
- package/tsOutputs/build-scanner/instrumentation/markup-file-instrumenter.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/dry-run-files-mapping.js +1 -1
- package/tsOutputs/build-scanner/js_diff/dry-run-files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/file-signature.js +7 -4
- package/tsOutputs/build-scanner/js_diff/file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/files-mapping.js +11 -24
- package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/generated-file-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js +3 -0
- package/tsOutputs/build-scanner/js_diff/guess-method-location.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js +3 -1
- package/tsOutputs/build-scanner/js_diff/method-signature.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js +61 -0
- package/tsOutputs/build-scanner/js_diff/sl-mapper.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js +1 -1
- package/tsOutputs/build-scanner/js_diff/source-data-enricher.js.map +1 -1
- package/tsOutputs/build-scanner/mappings/contracts.js +3 -0
- package/tsOutputs/build-scanner/mappings/contracts.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +214 -0
- package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/file-element-utils.js +47 -0
- package/tsOutputs/build-scanner/mappings/file-element-utils.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/file-enricher.js +207 -0
- package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/files-data-container.js +52 -0
- package/tsOutputs/build-scanner/mappings/files-data-container.js.map +1 -0
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js +80 -0
- package/tsOutputs/build-scanner/mappings/scm-file-fixer.js.map +1 -0
- 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/cli.js +7 -7
- package/tsOutputs/cli-parse/cli.js.map +1 -1
- package/tsOutputs/cli-parse/constants/constants.js +9 -9
- package/tsOutputs/cli-parse/constants/constants.js.map +1 -1
- package/tsOutputs/cli-parse/custom-commander.js +2 -2
- package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +35 -26
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/base-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/build-mapping-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +12 -10
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-validation.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js +77 -17
- package/tsOutputs/cli-parse/executors/dry-run/footprints-data.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js +14 -9
- package/tsOutputs/cli-parse/executors/dry-run/helper-methods.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-runner-build-session-data-builder.js +1 -1
- package/tsOutputs/cli-parse/executors/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/cli-parse/utils.js +2 -2
- package/tsOutputs/cli-parse/utils.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.js +6 -6
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.js +1 -1
- package/tsOutputs/common/agent-events/sensitive-data-filter.js +1 -1
- package/tsOutputs/common/agent-events/sensitive-data-filter.js.map +1 -1
- package/tsOutputs/common/agent-instance-data.js +1 -1
- package/tsOutputs/common/agent-instance-data.js.map +1 -1
- package/tsOutputs/common/config-process/config.js +1 -1
- package/tsOutputs/common/config-process/config.js.map +1 -1
- package/tsOutputs/common/constants/constants.js +1 -1
- package/tsOutputs/common/constants/constants.js.map +1 -1
- package/tsOutputs/common/coverage-elements/new-id-resolver.js +4 -4
- package/tsOutputs/common/coverage-elements/new-id-resolver.js.map +1 -1
- package/tsOutputs/common/coverage-elements/unique-id-converter.js +4 -4
- package/tsOutputs/common/coverage-elements/unique-id-converter.js.map +1 -1
- package/tsOutputs/common/events-process/index.js +2 -2
- package/tsOutputs/common/events-process/index.js.map +1 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +2 -2
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/hits-converter.js +10 -1
- package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.js +6 -6
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/location-formatter.js +2 -2
- package/tsOutputs/common/footprints-process-v6/location-formatter.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/source-map-data.js +6 -6
- package/tsOutputs/common/footprints-process-v6/source-map-data.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.d.ts +1 -0
- package/tsOutputs/common/http/backend-proxy.js +10 -0
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.d.ts +78 -1
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/http-client.js +15 -11
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/common/http/sl-routes.js +1 -1
- package/tsOutputs/common/http/sl-routes.js.map +1 -1
- package/tsOutputs/common/ignored-files-handler.js +1 -1
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/logger.js +2 -2
- package/tsOutputs/common/logger.js.map +1 -1
- package/tsOutputs/common/scm/git-cloner.js +138 -0
- package/tsOutputs/common/scm/git-cloner.js.map +1 -0
- package/tsOutputs/common/scm/git-format-builder.js +1 -1
- package/tsOutputs/common/short-name-to-file-mapper.js +3 -3
- package/tsOutputs/common/short-name-to-file-mapper.js.map +1 -1
- package/tsOutputs/common/source-map-handler.js +7 -7
- package/tsOutputs/common/source-map-handler.js.map +1 -1
- package/tsOutputs/common/source-map-reader.js +7 -7
- package/tsOutputs/common/source-map-reader.js.map +1 -1
- package/tsOutputs/common/state-tracker-fpv6.js +1 -1
- package/tsOutputs/common/state-tracker-fpv6.js.map +1 -1
- package/tsOutputs/common/state-tracker.js +5 -8
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/common/utils/abstract-data-builder.js +1 -1
- package/tsOutputs/common/utils/abstract-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/build-session-data-builder.js +3 -3
- package/tsOutputs/common/utils/build-session-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/files-utils.d.ts +1 -0
- package/tsOutputs/common/utils/files-utils.js +9 -0
- package/tsOutputs/common/utils/files-utils.js.map +1 -1
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js +3 -3
- package/tsOutputs/common/utils/test-utils/mock-server-utils/mock-server-proxy.js.map +1 -1
- package/tsOutputs/common/utils/token-data-builder.js +2 -2
- package/tsOutputs/common/utils/token-data-builder.js.map +1 -1
- package/tsOutputs/common/utils/validation-utils.js +2 -2
- package/tsOutputs/common/utils/validation-utils.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +1 -1
- package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +9 -2
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js +1 -1
- package/tsOutputs/test-listener/nyc-report-executor.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js +1 -1
- package/tsOutputs/test-listener/state-tracker-process/index.js.map +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js +1 -1
- package/tsOutputs/test-listener/state-tracker-process/state-tracker-proxy.js.map +1 -1
- package/tsOutputs/test-listener/test-recommendation-handler.js +4 -4
- package/tsOutputs/test-listener/test-recommendation-handler.js.map +1 -1
- package/tsOutputs/test-listener/upload-report-handler.js +1 -1
- package/tsOutputs/test-listener/upload-report-handler.js.map +1 -1
- package/tsOutputs/build-scanner/git-format-builder.js +0 -69
- package/tsOutputs/build-scanner/git-format-builder.js.map +0 -1
|
@@ -18346,6 +18346,7 @@ CipherBase.prototype._toString = function (value, enc, fin) {
|
|
|
18346
18346
|
module.exports = CipherBase
|
|
18347
18347
|
|
|
18348
18348
|
},{"inherits":145,"safe-buffer":209,"stream":229,"string_decoder":234}],74:[function(require,module,exports){
|
|
18349
|
+
(function (Buffer){(function (){
|
|
18349
18350
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
18350
18351
|
//
|
|
18351
18352
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -18448,13 +18449,14 @@ function isPrimitive(arg) {
|
|
|
18448
18449
|
}
|
|
18449
18450
|
exports.isPrimitive = isPrimitive;
|
|
18450
18451
|
|
|
18451
|
-
exports.isBuffer =
|
|
18452
|
+
exports.isBuffer = Buffer.isBuffer;
|
|
18452
18453
|
|
|
18453
18454
|
function objectToString(o) {
|
|
18454
18455
|
return Object.prototype.toString.call(o);
|
|
18455
18456
|
}
|
|
18456
18457
|
|
|
18457
|
-
},{"
|
|
18458
|
+
}).call(this)}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
|
|
18459
|
+
},{"../../is-buffer/index.js":146}],75:[function(require,module,exports){
|
|
18458
18460
|
(function (Buffer){(function (){
|
|
18459
18461
|
var elliptic = require('elliptic')
|
|
18460
18462
|
var BN = require('bn.js')
|
|
@@ -23769,30 +23771,36 @@ utils.intFromLE = intFromLE;
|
|
|
23769
23771
|
arguments[4][15][0].apply(exports,arguments)
|
|
23770
23772
|
},{"buffer":23,"dup":15}],109:[function(require,module,exports){
|
|
23771
23773
|
module.exports={
|
|
23772
|
-
"
|
|
23774
|
+
"_args": [
|
|
23775
|
+
[
|
|
23776
|
+
"elliptic@6.5.4",
|
|
23777
|
+
"/var/lib/jenkins/workspace/SL.OnPremise.Agent.JavaScript/browser-agent"
|
|
23778
|
+
]
|
|
23779
|
+
],
|
|
23780
|
+
"_development": true,
|
|
23781
|
+
"_from": "elliptic@6.5.4",
|
|
23773
23782
|
"_id": "elliptic@6.5.4",
|
|
23774
23783
|
"_inBundle": false,
|
|
23775
23784
|
"_integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
|
|
23776
23785
|
"_location": "/elliptic",
|
|
23777
23786
|
"_phantomChildren": {},
|
|
23778
23787
|
"_requested": {
|
|
23779
|
-
"type": "
|
|
23788
|
+
"type": "version",
|
|
23780
23789
|
"registry": true,
|
|
23781
|
-
"raw": "elliptic
|
|
23790
|
+
"raw": "elliptic@6.5.4",
|
|
23782
23791
|
"name": "elliptic",
|
|
23783
23792
|
"escapedName": "elliptic",
|
|
23784
|
-
"rawSpec": "
|
|
23793
|
+
"rawSpec": "6.5.4",
|
|
23785
23794
|
"saveSpec": null,
|
|
23786
|
-
"fetchSpec": "
|
|
23795
|
+
"fetchSpec": "6.5.4"
|
|
23787
23796
|
},
|
|
23788
23797
|
"_requiredBy": [
|
|
23789
23798
|
"/browserify-sign",
|
|
23790
23799
|
"/create-ecdh"
|
|
23791
23800
|
],
|
|
23792
23801
|
"_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
|
|
23793
|
-
"
|
|
23794
|
-
"
|
|
23795
|
-
"_where": "/var/lib/jenkins/workspace/SL.OnPremise.Agents.JavaScript/browser-agent/node_modules/browserify-sign",
|
|
23802
|
+
"_spec": "6.5.4",
|
|
23803
|
+
"_where": "/var/lib/jenkins/workspace/SL.OnPremise.Agent.JavaScript/browser-agent",
|
|
23796
23804
|
"author": {
|
|
23797
23805
|
"name": "Fedor Indutny",
|
|
23798
23806
|
"email": "fedor@indutny.com"
|
|
@@ -23800,7 +23808,6 @@ module.exports={
|
|
|
23800
23808
|
"bugs": {
|
|
23801
23809
|
"url": "https://github.com/indutny/elliptic/issues"
|
|
23802
23810
|
},
|
|
23803
|
-
"bundleDependencies": false,
|
|
23804
23811
|
"dependencies": {
|
|
23805
23812
|
"bn.js": "^4.11.9",
|
|
23806
23813
|
"brorand": "^1.1.0",
|
|
@@ -23810,7 +23817,6 @@ module.exports={
|
|
|
23810
23817
|
"minimalistic-assert": "^1.0.1",
|
|
23811
23818
|
"minimalistic-crypto-utils": "^1.0.1"
|
|
23812
23819
|
},
|
|
23813
|
-
"deprecated": false,
|
|
23814
23820
|
"description": "EC cryptography",
|
|
23815
23821
|
"devDependencies": {
|
|
23816
23822
|
"brfs": "^2.0.2",
|
|
@@ -43448,7 +43454,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
43448
43454
|
return [3, 4];
|
|
43449
43455
|
case 3:
|
|
43450
43456
|
e_1 = _a.sent();
|
|
43451
|
-
this.logger.error("Failed to submit footprint sync '"
|
|
43457
|
+
this.logger.error("Failed to submit footprint sync '".concat(e_1.message, "'"));
|
|
43452
43458
|
return [3, 4];
|
|
43453
43459
|
case 4: return [2];
|
|
43454
43460
|
}
|
|
@@ -43609,7 +43615,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
43609
43615
|
this.footprintsQueueSender.sendAllSync();
|
|
43610
43616
|
}
|
|
43611
43617
|
catch (e) {
|
|
43612
|
-
this.logger.error("Failed to submit footprint sync '"
|
|
43618
|
+
this.logger.error("Failed to submit footprint sync '".concat(e.message, "'"));
|
|
43613
43619
|
}
|
|
43614
43620
|
};
|
|
43615
43621
|
BrowserAgentInstance.prototype.isStarted = function () {
|
|
@@ -43707,7 +43713,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
43707
43713
|
};
|
|
43708
43714
|
BrowserAgent.prototype.createInstance = function (configuration) {
|
|
43709
43715
|
if (this.instanceAddedForBsid[configuration.buildSessionId]) {
|
|
43710
|
-
this.logger.info("Already has instance for bsid '"
|
|
43716
|
+
this.logger.info("Already has instance for bsid '".concat(configuration.buildSessionId, "'"));
|
|
43711
43717
|
return;
|
|
43712
43718
|
}
|
|
43713
43719
|
try {
|
|
@@ -43718,11 +43724,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
43718
43724
|
this.instances.push(browserAgent);
|
|
43719
43725
|
}
|
|
43720
43726
|
else {
|
|
43721
|
-
this.logger.error("Invalid configuration for app: "
|
|
43727
|
+
this.logger.error("Invalid configuration for app: ".concat(configuration.appName, ",\n build: ").concat(configuration.buildName, ", branch: ").concat(configuration.branchName, "\n Sealights agent disabled"));
|
|
43722
43728
|
}
|
|
43723
43729
|
}
|
|
43724
43730
|
catch (e) {
|
|
43725
|
-
this.logger.error("Error while creating agent for app: "
|
|
43731
|
+
this.logger.error("Error while creating agent for app: ".concat(configuration.appName, ", build: ").concat(configuration.buildName, ",\n branch: ").concat(configuration.branchName, ". Error ").concat(e));
|
|
43726
43732
|
}
|
|
43727
43733
|
};
|
|
43728
43734
|
BrowserAgent.prototype.start = function () {
|
|
@@ -43850,7 +43856,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
43850
43856
|
}
|
|
43851
43857
|
callback = function (err) {
|
|
43852
43858
|
if (err) {
|
|
43853
|
-
_this.logger.error("Failed to submit final events, Error : '"
|
|
43859
|
+
_this.logger.error("Failed to submit final events, Error : '".concat(err, "'"));
|
|
43854
43860
|
}
|
|
43855
43861
|
};
|
|
43856
43862
|
while (this.eventsQueue.getQueueSize() > 0) {
|
|
@@ -43906,7 +43912,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
43906
43912
|
BrowserHitsCollector.prototype.getGlobalCoverageObject = function () {
|
|
43907
43913
|
if (!this.globalCoverageObject) {
|
|
43908
43914
|
var coverageObject = '$SealightsCoverage';
|
|
43909
|
-
var coverageObjectForBSID = coverageObject
|
|
43915
|
+
var coverageObjectForBSID = "".concat(coverageObject, "_").concat(this.buildSessionId);
|
|
43910
43916
|
this.globalCoverageObject = window[coverageObjectForBSID] || window[coverageObject];
|
|
43911
43917
|
}
|
|
43912
43918
|
return this.globalCoverageObject;
|
|
@@ -43982,7 +43988,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
43982
43988
|
}
|
|
43983
43989
|
CodeCoverageManager.prototype.findCoverageContainer = function () {
|
|
43984
43990
|
var coverageObject = '$SealightsCoverage';
|
|
43985
|
-
var coverageObjectForBSID = coverageObject
|
|
43991
|
+
var coverageObjectForBSID = "".concat(coverageObject, "_").concat(this.configuration.buildSessionId);
|
|
43986
43992
|
return window[coverageObjectForBSID] || window[coverageObject];
|
|
43987
43993
|
};
|
|
43988
43994
|
CodeCoverageManager.prototype.getFootprints = function (testInfo) {
|
|
@@ -44766,7 +44772,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
44766
44772
|
this.window.slMappings = this.window.slMappings || {};
|
|
44767
44773
|
if (!this.window.slMappings[this.configuration.buildSessionId]) {
|
|
44768
44774
|
this.lightBackendProxy.getSlMappingFromServer(this.configuration.buildSessionId).then(function (mapping) { return _this.window.slMappings[_this.configuration.buildSessionId] = mapping; }, function (err) {
|
|
44769
|
-
var errMsg = "Error while trying to load slMapping from server '"
|
|
44775
|
+
var errMsg = "Error while trying to load slMapping from server '".concat(err, "'");
|
|
44770
44776
|
_this.logger.error(errMsg);
|
|
44771
44777
|
cockpit_notifier_1.CockpitNotifier.sendGenericMessage(errMsg);
|
|
44772
44778
|
_this.window.slMappings[_this.configuration.buildSessionId] = {};
|
|
@@ -45961,7 +45967,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
45961
45967
|
}
|
|
45962
45968
|
NoopJsonClient.prototype.send = function (url, data, onSuccess, onError, async, httpMethod, contentType) {
|
|
45963
45969
|
if (async === void 0) { async = true; }
|
|
45964
|
-
this.logger.info("noop json client not executing http request for url '"
|
|
45970
|
+
this.logger.info("noop json client not executing http request for url '".concat(url));
|
|
45965
45971
|
onSuccess({});
|
|
45966
45972
|
};
|
|
45967
45973
|
return NoopJsonClient;
|
|
@@ -46108,7 +46114,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46108
46114
|
return [3, 4];
|
|
46109
46115
|
case 3:
|
|
46110
46116
|
err_1 = _a.sent();
|
|
46111
|
-
errMsg = "Error while trying to load slMapping from server '"
|
|
46117
|
+
errMsg = "Error while trying to load slMapping from server '".concat(err_1, "'");
|
|
46112
46118
|
this.logger.error(errMsg);
|
|
46113
46119
|
cockpit_notifier_1.CockpitNotifier.sendGenericMessage(errMsg);
|
|
46114
46120
|
this.window.slMappings[buildSessionId] = {};
|
|
@@ -46183,8 +46189,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46183
46189
|
StateTracker.prototype.checkForActiveExecution = function (async) {
|
|
46184
46190
|
var _this = this;
|
|
46185
46191
|
if (async === void 0) { async = true; }
|
|
46186
|
-
var url = this.configuration.server +
|
|
46187
|
-
this.logger.info("[TO TST] - checkMappingStatus. Url '"
|
|
46192
|
+
var url = this.configuration.server + "/v4/testExecution/".concat(this.configuration.labId);
|
|
46193
|
+
this.logger.info("[TO TST] - checkMappingStatus. Url '".concat(url, "'."));
|
|
46188
46194
|
var onSuccess = function (data) {
|
|
46189
46195
|
_this.logger.info('[ACTIVE EXECUTION] Checking for active execution. No errors');
|
|
46190
46196
|
if (data == null) {
|
|
@@ -46201,7 +46207,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46201
46207
|
_this.hasActiveExecution = true;
|
|
46202
46208
|
}
|
|
46203
46209
|
else if (data.execution.status == contracts_1.ExecutionStatus.InProgress) {
|
|
46204
|
-
_this.logger.info("[ACTIVE EXECUTION] Active execution for labid '"
|
|
46210
|
+
_this.logger.info("[ACTIVE EXECUTION] Active execution for labid '".concat(_this.configuration.labId, "'"));
|
|
46205
46211
|
_this.hasActiveExecution = true;
|
|
46206
46212
|
}
|
|
46207
46213
|
else {
|
|
@@ -46650,11 +46656,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46650
46656
|
return [4, this.backendProxy.submitAgentEvent(request)];
|
|
46651
46657
|
case 2:
|
|
46652
46658
|
_a.sent();
|
|
46653
|
-
this._logger.info("Submitted '"
|
|
46659
|
+
this._logger.info("Submitted '".concat(request.events.length, "' events successfully"));
|
|
46654
46660
|
return [2, true];
|
|
46655
46661
|
case 3:
|
|
46656
46662
|
e_1 = _a.sent();
|
|
46657
|
-
this._logger.warn("Failed to submit '"
|
|
46663
|
+
this._logger.warn("Failed to submit '".concat(request.events.length, "' events. Error ").concat(e_1));
|
|
46658
46664
|
return [2, false];
|
|
46659
46665
|
case 4: return [2];
|
|
46660
46666
|
}
|
|
@@ -46706,10 +46712,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46706
46712
|
AgentEventsController.prototype.submitEvent = function (code) {
|
|
46707
46713
|
var _this = this;
|
|
46708
46714
|
this.submittedEventsMap.set(code, true);
|
|
46709
|
-
this._logger.debug("About to send event with code '"
|
|
46715
|
+
this._logger.debug("About to send event with code '".concat(code, "', current time: ").concat((0, system_date_1.getSystemDateValueOf)()));
|
|
46710
46716
|
var event = this.buildEvent(code);
|
|
46711
46717
|
this.submitAgentEventRequest(event).then(function () {
|
|
46712
|
-
return _this._logger.debug("Event with code '"
|
|
46718
|
+
return _this._logger.debug("Event with code '".concat(code, "' submitted successfully"));
|
|
46713
46719
|
});
|
|
46714
46720
|
};
|
|
46715
46721
|
AgentEventsController.prototype.submitEventOnce = function (code) {
|
|
@@ -46732,11 +46738,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46732
46738
|
return;
|
|
46733
46739
|
}
|
|
46734
46740
|
var events = messages.map(function (msg) { return _this.buildEvent(agent_events_conracts_1.AgentEventCode.GENERIC_ERROR, msg); });
|
|
46735
|
-
this.submitAgentEventRequest(events).then(function () { return _this.logger.debug("'"
|
|
46741
|
+
this.submitAgentEventRequest(events).then(function () { return _this.logger.debug("'".concat(events.length, "' events were submitted successfully")); });
|
|
46736
46742
|
};
|
|
46737
46743
|
AgentEventsController.prototype.sendMessage = function (message, code) {
|
|
46738
46744
|
var _this = this;
|
|
46739
|
-
this.logger.debug("About to send message '"
|
|
46745
|
+
this.logger.debug("About to send message '".concat(message, "' with code '").concat(code, "', current time: ").concat((0, system_date_1.getSystemDateValueOf)()));
|
|
46740
46746
|
var messageEvent = this.buildEvent(code, message);
|
|
46741
46747
|
this.submitAgentEventRequest(messageEvent).then(function () {
|
|
46742
46748
|
return _this.logger.debug('Message submitted successfully');
|
|
@@ -47099,7 +47105,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47099
47105
|
};
|
|
47100
47106
|
CockpitNotifier.verifyControllerInitialized = function () {
|
|
47101
47107
|
if (!CockpitNotifier.controller && !CockpitNotifier.isDryRunMode) {
|
|
47102
|
-
throw new Error('\'Agent started\' event
|
|
47108
|
+
throw new Error('\'Agent started\' event was not sent. Disabling!');
|
|
47103
47109
|
}
|
|
47104
47110
|
};
|
|
47105
47111
|
CockpitNotifier.reset = function () {
|
|
@@ -47301,7 +47307,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47301
47307
|
for (var _i = 0, _a = Object.entries(secretKeysRegexes); _i < _a.length; _i++) {
|
|
47302
47308
|
var _b = _a[_i], key = _b[0], regex = _b[1];
|
|
47303
47309
|
if (new RegExp(regex).test(value)) {
|
|
47304
|
-
logger.debug("Value for key "
|
|
47310
|
+
logger.debug("Value for key ".concat(envVar, " filtered out since it suspected to contains data fpr ").concat(key));
|
|
47305
47311
|
return true;
|
|
47306
47312
|
}
|
|
47307
47313
|
}
|
|
@@ -47348,7 +47354,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47348
47354
|
return parsed.version;
|
|
47349
47355
|
}
|
|
47350
47356
|
catch (e) {
|
|
47351
|
-
console.warn("Failed to resolve agent version, Error: '"
|
|
47357
|
+
console.warn("Failed to resolve agent version, Error: '".concat(e));
|
|
47352
47358
|
return null;
|
|
47353
47359
|
}
|
|
47354
47360
|
}
|
|
@@ -47822,7 +47828,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
47822
47828
|
_this.extendedFootprints = new config_system_1.BooleanConfigKey(false, false);
|
|
47823
47829
|
_this.projectRoot = new config_system_1.StringConfigKey(false);
|
|
47824
47830
|
_this.enforceFullRun = new config_system_1.BooleanConfigKey(false, false);
|
|
47825
|
-
_this.footprintsEnableV6 = new config_system_1.BooleanConfigKey(false,
|
|
47831
|
+
_this.footprintsEnableV6 = new config_system_1.BooleanConfigKey(false, true);
|
|
47826
47832
|
_this.footprintsBufferThresholdMb = new config_system_1.NumberConfigKey(false, 10);
|
|
47827
47833
|
_this.executionQueryIntervalSecs = new config_system_1.NumberConfigKey(false, 10);
|
|
47828
47834
|
_this.footprintsQueueSize = new config_system_1.NumberConfigKey(false, 2);
|
|
@@ -48009,7 +48015,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
48009
48015
|
Constants.CALLBACK = 'callback';
|
|
48010
48016
|
Constants.PULL_REQUEST_PARAMS = 'pullRequestParams';
|
|
48011
48017
|
Constants.SL_WINDOW_OBJECT = 'window.$Sealights';
|
|
48012
|
-
Constants.SKIP_BROWSER_AGENT = Constants.SL_WINDOW_OBJECT
|
|
48018
|
+
Constants.SKIP_BROWSER_AGENT = "".concat(Constants.SL_WINDOW_OBJECT, ".skipSlAgent");
|
|
48013
48019
|
Constants.Messages = (_a = (function () {
|
|
48014
48020
|
function class_1() {
|
|
48015
48021
|
}
|
|
@@ -48449,9 +48455,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
48449
48455
|
return;
|
|
48450
48456
|
}
|
|
48451
48457
|
if (!moduleData.uniqueIdsMap) {
|
|
48452
|
-
logger.debug("building uniqueids map for "
|
|
48458
|
+
logger.debug("building uniqueids map for ".concat(moduleData.path));
|
|
48453
48459
|
var before_1 = (0, system_date_1.getSystemDateValueOf)();
|
|
48454
|
-
logger.debug("file "
|
|
48460
|
+
logger.debug("file ".concat(moduleData.path, " not contains uniqueIdMaps, trying to reload"));
|
|
48455
48461
|
createSLMapping(moduleData.path, relativePath, coverageObject, logger);
|
|
48456
48462
|
var after_1 = (0, system_date_1.getSystemDateValueOf)();
|
|
48457
48463
|
logger.debug('*******************************create unique id map ******************************************');
|
|
@@ -48460,7 +48466,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
48460
48466
|
}
|
|
48461
48467
|
var newUniqueId = moduleData.uniqueIdsMap[uniqueIdKey];
|
|
48462
48468
|
if (!newUniqueId) {
|
|
48463
|
-
logger.error("could not generate new uniqueId for '"
|
|
48469
|
+
logger.error("could not generate new uniqueId for '".concat(uniqueIdKey, "'"));
|
|
48464
48470
|
}
|
|
48465
48471
|
return newUniqueId;
|
|
48466
48472
|
}
|
|
@@ -48469,7 +48475,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
48469
48475
|
var withLeftSlashes = files_utils_1.FilesUtils.adjustPathSlashes(moduleName);
|
|
48470
48476
|
var moduleData = coverageObject[moduleName] || coverageObject[withLeftSlashes];
|
|
48471
48477
|
if (!moduleData) {
|
|
48472
|
-
logger.warn("Coverage object not contains data for "
|
|
48478
|
+
logger.warn("Coverage object not contains data for ".concat(moduleName, " or ").concat(withLeftSlashes));
|
|
48473
48479
|
}
|
|
48474
48480
|
return moduleData;
|
|
48475
48481
|
}
|
|
@@ -48734,8 +48740,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
48734
48740
|
this.removeDuplicateElements(this._methodsArray);
|
|
48735
48741
|
this.removeDuplicateElements(this._branchesArray);
|
|
48736
48742
|
this.sortElements();
|
|
48737
|
-
this.logger.debug("sorted "
|
|
48738
|
-
this.logger.debug("sorted "
|
|
48743
|
+
this.logger.debug("sorted ".concat(this._branchesArray.length, " branches"));
|
|
48744
|
+
this.logger.debug("sorted ".concat(this._methodsArray.length, " methods"));
|
|
48739
48745
|
this.fillUniqueIdsMap();
|
|
48740
48746
|
};
|
|
48741
48747
|
UniqueIdConverter.prototype.setAndInitFile = function (file) {
|
|
@@ -48776,7 +48782,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
48776
48782
|
var currentIndex = indexesArray[i];
|
|
48777
48783
|
var currentElement = array[currentIndex];
|
|
48778
48784
|
currentElement.uniqueId = currentElement.filename + delimiter + line + ',' + i;
|
|
48779
|
-
this.logger.debug("[UniqueIdConverter] uniqueId "
|
|
48785
|
+
this.logger.debug("[UniqueIdConverter] uniqueId ".concat(currentElement.uniqueIdKey, " converted to \n ").concat(currentElement.uniqueId));
|
|
48780
48786
|
this._uniqueIdsMap[currentElement.uniqueIdKey] = currentElement.uniqueId;
|
|
48781
48787
|
if (currentElement.uniqueIdKey_decl) {
|
|
48782
48788
|
this._uniqueIdsMap[currentElement.uniqueIdKey_decl] = currentElement.uniqueId;
|
|
@@ -48886,7 +48892,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
48886
48892
|
if (branch.isStartsAfter(method) && branch.isEndsAfter(method)) {
|
|
48887
48893
|
return 1;
|
|
48888
48894
|
}
|
|
48889
|
-
this.logger.warn("branch started at '"
|
|
48895
|
+
this.logger.warn("branch started at '".concat(branch.startPosition.line, ",").concat(branch.startPosition.column, "' in file '").concat(this._filename, "' located across methods, probably some error"));
|
|
48890
48896
|
return 0;
|
|
48891
48897
|
};
|
|
48892
48898
|
UniqueIdConverter.prototype.aggregateElementsByLine = function (elements) {
|
|
@@ -49134,7 +49140,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49134
49140
|
_this.removeRequest(promise);
|
|
49135
49141
|
});
|
|
49136
49142
|
promise.catch(function (err) {
|
|
49137
|
-
_this._logger.warn("Error while submitting events, "
|
|
49143
|
+
_this._logger.warn("Error while submitting events, ".concat(err));
|
|
49138
49144
|
_this._eventsQueue.requeue(items);
|
|
49139
49145
|
_this.removeRequest(promise);
|
|
49140
49146
|
});
|
|
@@ -49158,7 +49164,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49158
49164
|
case 3: return [3, 5];
|
|
49159
49165
|
case 4:
|
|
49160
49166
|
e_2 = _a.sent();
|
|
49161
|
-
this._logger.warn("Error while sending events synchronously. "
|
|
49167
|
+
this._logger.warn("Error while sending events synchronously. ".concat(e_2));
|
|
49162
49168
|
return [3, 5];
|
|
49163
49169
|
case 5: return [2];
|
|
49164
49170
|
}
|
|
@@ -49774,7 +49780,16 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
49774
49780
|
return hit.loc.start;
|
|
49775
49781
|
};
|
|
49776
49782
|
HitsConverter.prototype.getLeaveStartLoc = function (hit, leaveIdx) {
|
|
49777
|
-
|
|
49783
|
+
var parentPosition = hit.branchData.loc.start;
|
|
49784
|
+
var position = hit.branchData.locations[leaveIdx].start;
|
|
49785
|
+
var newInstrumentation = (parentPosition.line != position.line) || (parentPosition.column != position.column);
|
|
49786
|
+
if (hit.branchData.type === 'if') {
|
|
49787
|
+
var message = newInstrumentation ? 'Instrumented done by istanbul-lib-instrumenter greater or equal than 5.1.0 enforcing parent positions for the else leave' :
|
|
49788
|
+
'Instrumented done by istanbul-lib-instrumenter lower than 5.1.0 using parent positions for the else leave';
|
|
49789
|
+
this.logger.debug(message);
|
|
49790
|
+
return parentPosition;
|
|
49791
|
+
}
|
|
49792
|
+
return position;
|
|
49778
49793
|
};
|
|
49779
49794
|
HitsConverter.prototype.createBranchIds = function (hitFunctions, relativePath, absolutePath) {
|
|
49780
49795
|
var _this = this;
|
|
@@ -49903,7 +49918,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49903
49918
|
this.collectionInterval.next();
|
|
49904
49919
|
var hitFilesData = this.hitsCollector.getHitElements();
|
|
49905
49920
|
if (hitFilesData.length) {
|
|
49906
|
-
this.logger.info("Collecting hits for '"
|
|
49921
|
+
this.logger.info("Collecting hits for '".concat(hitFilesData.length, "' files"));
|
|
49907
49922
|
var convertedHits = this.hitsConverter.convertHits(hitFilesData);
|
|
49908
49923
|
this.footprintsBuffer.addHit(convertedHits, this.collectionInterval.toJson(), executionId, testName, this.isInitFootprints(), isFinalFootprints);
|
|
49909
49924
|
}
|
|
@@ -49948,11 +49963,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49948
49963
|
return [4, this.backendProxy.submitFootprintsV6(packet, this.currentExecutionBsid, this.stateTracker.getTestStage(), this.cfg.buildSessionId.value)];
|
|
49949
49964
|
case 2:
|
|
49950
49965
|
_a.sent();
|
|
49951
|
-
this.logger.info("Footprints packet submitted successfully. packet contains "
|
|
49966
|
+
this.logger.info("Footprints packet submitted successfully. packet contains ".concat(packet.methods.length, " methods, ").concat(packet.branches.length, " branches in ").concat(packet.executions.length, " executions"));
|
|
49952
49967
|
return [3, 5];
|
|
49953
49968
|
case 3:
|
|
49954
49969
|
e_1 = _a.sent();
|
|
49955
|
-
this.logger.error("Error while submitting footprints '"
|
|
49970
|
+
this.logger.error("Error while submitting footprints '".concat(e_1, "'"));
|
|
49956
49971
|
cockpit_notifier_1.CockpitNotifier.sendEvent(agent_events_conracts_1.AgentEventCode.FOOTPRINTS_LOSS);
|
|
49957
49972
|
return [3, 5];
|
|
49958
49973
|
case 4:
|
|
@@ -50040,15 +50055,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50040
50055
|
_this.submitQueuedFootprints();
|
|
50041
50056
|
});
|
|
50042
50057
|
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_BSID_CHANGED, function (prevExecution, newBuildSession) {
|
|
50043
|
-
_this.logger.warn("Execution points to different build session '"
|
|
50058
|
+
_this.logger.warn("Execution points to different build session '".concat(newBuildSession, "'. Collecting and submitting previous footprints"));
|
|
50044
50059
|
_this.enqueueAndSubmit(prevExecution);
|
|
50045
50060
|
});
|
|
50046
50061
|
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_ID_CHANGED, function (prevExecution, newExecutionId) {
|
|
50047
|
-
_this.logger.warn("Execution id changed to'"
|
|
50062
|
+
_this.logger.warn("Execution id changed to'".concat(newExecutionId, "'. Collecting previous footprints"));
|
|
50048
50063
|
_this.enqueueCurrentFootprints(prevExecution.executionId, null, prevExecution.buildSessionId);
|
|
50049
50064
|
});
|
|
50050
50065
|
this.stateTracker.on(state_tracker_1.StateTracker.TEST_STAGE_CHANGED, function (prevExecution, newTestStage) {
|
|
50051
|
-
_this.logger.warn("Execution points to different test stage '"
|
|
50066
|
+
_this.logger.warn("Execution points to different test stage '".concat(newTestStage, "'. Collecting and submitting previous footprints"));
|
|
50052
50067
|
_this.enqueueAndSubmit(prevExecution);
|
|
50053
50068
|
});
|
|
50054
50069
|
};
|
|
@@ -50112,7 +50127,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50112
50127
|
else if (position.hasOwnProperty('l') && position.hasOwnProperty('c')) {
|
|
50113
50128
|
return position.l + ',' + position.c;
|
|
50114
50129
|
}
|
|
50115
|
-
logger.error("Position is not in a valid format got '"
|
|
50130
|
+
logger.error("Position is not in a valid format got '".concat(tryStringifyPosition(position), "', returning -1 for line and column"));
|
|
50116
50131
|
return '-1,-1';
|
|
50117
50132
|
}
|
|
50118
50133
|
exports.formatLocation = formatLocation;
|
|
@@ -50121,7 +50136,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50121
50136
|
return JSON.stringify(position);
|
|
50122
50137
|
}
|
|
50123
50138
|
catch (e) {
|
|
50124
|
-
"failed to stringify position '"
|
|
50139
|
+
"failed to stringify position '".concat(e, "'");
|
|
50125
50140
|
}
|
|
50126
50141
|
}
|
|
50127
50142
|
});
|
|
@@ -50438,6 +50453,16 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50438
50453
|
});
|
|
50439
50454
|
});
|
|
50440
50455
|
};
|
|
50456
|
+
BackendProxy.prototype.submitBlobAsync = function (body, buildSessionId, blobId) {
|
|
50457
|
+
var _this = this;
|
|
50458
|
+
var url = sl_routes_1.SLRoutes.blobs(buildSessionId, blobId);
|
|
50459
|
+
return new Promise(function (res, rej) {
|
|
50460
|
+
_this.client.post(body, url, function (error) {
|
|
50461
|
+
rej(error);
|
|
50462
|
+
}, true, contracts_1.ContentType.OCTET_STREAM);
|
|
50463
|
+
res(null);
|
|
50464
|
+
});
|
|
50465
|
+
};
|
|
50441
50466
|
BackendProxy.prototype.submitBlob = function (body, buildSessionId, blobId, callback) {
|
|
50442
50467
|
var url = sl_routes_1.SLRoutes.blobs(buildSessionId, blobId);
|
|
50443
50468
|
this.client.post(body, url, callback, true, contracts_1.ContentType.OCTET_STREAM);
|
|
@@ -50867,7 +50892,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
50867
50892
|
var opts = this.createDefaultOptions(urlPath);
|
|
50868
50893
|
var id = uuid();
|
|
50869
50894
|
var onRequestCallback = this.createOnRequestCallback(http_verb_1.HttpVerb.POST, id, callback);
|
|
50870
|
-
this.logger.info("Sending "
|
|
50895
|
+
this.logger.info("Sending ".concat(http_verb_1.HttpVerb.POST, " request. Url: '").concat(opts.url, "', requestId: '").concat(id, "'"));
|
|
50871
50896
|
var req = request.post(opts, onRequestCallback);
|
|
50872
50897
|
var form = req.form();
|
|
50873
50898
|
form.append('file', JSON.stringify(agentData), {
|
|
@@ -50880,7 +50905,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
50880
50905
|
});
|
|
50881
50906
|
}
|
|
50882
50907
|
catch (err) {
|
|
50883
|
-
this.logger.error("Failed sending Http "
|
|
50908
|
+
this.logger.error("Failed sending Http ".concat(http_verb_1.HttpVerb.POST, " request to:'").concat(urlPath, "'. Error: '").concat(err, "'"));
|
|
50884
50909
|
return callback(err, null, null);
|
|
50885
50910
|
}
|
|
50886
50911
|
};
|
|
@@ -50919,7 +50944,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
50919
50944
|
}
|
|
50920
50945
|
var id = uuid();
|
|
50921
50946
|
var onRequestCallback = this.createOnRequestCallback(httpVerb, id, callback, isNotFoundAcceptable);
|
|
50922
|
-
this.logger.info("Sending "
|
|
50947
|
+
this.logger.info("Sending ".concat(httpVerb, " request. Url: '").concat(opts.url, "', requestId: '").concat(id, "'"));
|
|
50923
50948
|
if (httpVerb === http_verb_1.HttpVerb.GET) {
|
|
50924
50949
|
opts.json = true;
|
|
50925
50950
|
request.get(opts, onRequestCallback);
|
|
@@ -50939,11 +50964,11 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
50939
50964
|
request.put(opts, onRequestCallback);
|
|
50940
50965
|
}
|
|
50941
50966
|
else {
|
|
50942
|
-
new Error(httpVerb
|
|
50967
|
+
new Error("".concat(httpVerb, " is not implemented yet."));
|
|
50943
50968
|
}
|
|
50944
50969
|
}
|
|
50945
50970
|
catch (err) {
|
|
50946
|
-
this.logger.error("Failed sending Http "
|
|
50971
|
+
this.logger.error("Failed sending Http ".concat(httpVerb, " request to:'").concat(urlPath, "'. Error: '").concat(err, "'"));
|
|
50947
50972
|
return callback(err, null, null);
|
|
50948
50973
|
}
|
|
50949
50974
|
};
|
|
@@ -50956,23 +50981,26 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
50956
50981
|
var statusCode = -1;
|
|
50957
50982
|
if (requestResponse != null) {
|
|
50958
50983
|
statusCode = requestResponse.statusCode;
|
|
50959
|
-
_this.logger.warn("Got "
|
|
50984
|
+
_this.logger.warn("Got ".concat(statusCode, " in '").concat(httpVerb, "' request. Request id:'").concat(requestId, "', Transaction ID:'").concat(txId, "'."));
|
|
50960
50985
|
}
|
|
50961
50986
|
if (err) {
|
|
50962
|
-
err = new Error("HttpClient failed. Error: "
|
|
50987
|
+
err = new Error("HttpClient failed. Error: ".concat(err.message, ", StatusCode: ").concat(statusCode, ", Stack: ").concat(err.stack));
|
|
50963
50988
|
}
|
|
50964
50989
|
else if (statusCode === 404 && isNotFoundAcceptable) {
|
|
50965
50990
|
err = null;
|
|
50966
50991
|
}
|
|
50967
50992
|
else {
|
|
50968
|
-
var errorMessage = "Server returned "
|
|
50993
|
+
var errorMessage = "Server returned: ".concat(statusCode, " status code in '").concat(httpVerb, "' request. Transaction ID:'").concat(txId, "'.");
|
|
50969
50994
|
if (body)
|
|
50970
|
-
errorMessage +=
|
|
50995
|
+
errorMessage += Object.entries(JSON.parse(body)).map(function (_a) {
|
|
50996
|
+
var key = _a[0], val = _a[1];
|
|
50997
|
+
return "\n\t".concat(key, ": ").concat(val);
|
|
50998
|
+
}).join('');
|
|
50971
50999
|
err = new Error(errorMessage);
|
|
50972
51000
|
}
|
|
50973
51001
|
return callback(err, body, statusCode);
|
|
50974
51002
|
}
|
|
50975
|
-
_this.logger.debug("'"
|
|
51003
|
+
_this.logger.debug("'".concat(httpVerb, "' request was completed successfully. Request id:'").concat(requestId, "'. statusCode: ").concat(requestResponse.statusCode, " body: ").concat(body, ", Transaction ID: ").concat(txId));
|
|
50976
51004
|
if (body && body.length > 0 && typeof body == 'string') {
|
|
50977
51005
|
body = JSON.parse(body);
|
|
50978
51006
|
}
|
|
@@ -51006,7 +51034,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
51006
51034
|
timeout = 60 * 1000 * 2;
|
|
51007
51035
|
}
|
|
51008
51036
|
timeout = Number(timeout);
|
|
51009
|
-
this.logger.debug("Http timeout value is '"
|
|
51037
|
+
this.logger.debug("Http timeout value is '".concat(timeout, "'."));
|
|
51010
51038
|
return timeout;
|
|
51011
51039
|
};
|
|
51012
51040
|
return HttpClient;
|
|
@@ -51156,7 +51184,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
51156
51184
|
};
|
|
51157
51185
|
SLRoutes.recommendedAgentV2 = function (component, customerId, appName, branchName, testStage) {
|
|
51158
51186
|
if (!component) {
|
|
51159
|
-
throw new Error("'component' "
|
|
51187
|
+
throw new Error("'component' ".concat(constants_1.Constants.Messages.CANNOT_BE_NULL_OR_UNDEFINED, "."));
|
|
51160
51188
|
}
|
|
51161
51189
|
var result = SLRoutes.agentsV2() + SLRoutes.toUri(component) + SLRoutes.toUri(SLRoutes.RECOMMENDED_VERSION);
|
|
51162
51190
|
var query = {
|
|
@@ -51380,14 +51408,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51380
51408
|
if (v !== undefined) module.exports = v;
|
|
51381
51409
|
}
|
|
51382
51410
|
else if (typeof define === "function" && define.amd) {
|
|
51383
|
-
define(["require", "exports", "events", "
|
|
51411
|
+
define(["require", "exports", "events", "./constants/sl-env-vars", "./utils/validation-utils", "./agent-events/cockpit-notifier", "./agent-events/agent-events-conracts"], factory);
|
|
51384
51412
|
}
|
|
51385
51413
|
})(function (require, exports) {
|
|
51386
51414
|
"use strict";
|
|
51387
51415
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51388
51416
|
exports.StateTracker = void 0;
|
|
51389
51417
|
var events = require("events");
|
|
51390
|
-
var timers_1 = require("timers");
|
|
51391
51418
|
var sl_env_vars_1 = require("./constants/sl-env-vars");
|
|
51392
51419
|
var validation_utils_1 = require("./utils/validation-utils");
|
|
51393
51420
|
var cockpit_notifier_1 = require("./agent-events/cockpit-notifier");
|
|
@@ -51433,9 +51460,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51433
51460
|
_this.checkTestStatusAtServer();
|
|
51434
51461
|
});
|
|
51435
51462
|
if (this.cfg.shouldCheckForActiveExecutionOnStartUp.value) {
|
|
51436
|
-
|
|
51437
|
-
_this.checkTestStatusAtServer(false);
|
|
51438
|
-
}, 0);
|
|
51463
|
+
this.checkTestStatusAtServer(false);
|
|
51439
51464
|
}
|
|
51440
51465
|
};
|
|
51441
51466
|
StateTracker.prototype.checkTestStatusAtServer = function (async) {
|
|
@@ -51450,7 +51475,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51450
51475
|
_this.notifyCockpit(response.execution);
|
|
51451
51476
|
_this._currentExecution = response.execution;
|
|
51452
51477
|
}).catch(function (err) {
|
|
51453
|
-
_this.logger.warn("Error while checking test execution status "
|
|
51478
|
+
_this.logger.warn("Error while checking test execution status ".concat(err));
|
|
51454
51479
|
});
|
|
51455
51480
|
}
|
|
51456
51481
|
};
|
|
@@ -51464,7 +51489,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51464
51489
|
return this._currentExecution != null;
|
|
51465
51490
|
};
|
|
51466
51491
|
StateTracker.prototype.shouldCollectHits = function () {
|
|
51467
|
-
return this.hasMappingAtServer()
|
|
51492
|
+
return this.hasMappingAtServer();
|
|
51468
51493
|
};
|
|
51469
51494
|
Object.defineProperty(StateTracker.prototype, "currentExecution", {
|
|
51470
51495
|
get: function () {
|
|
@@ -51531,7 +51556,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51531
51556
|
callback();
|
|
51532
51557
|
}
|
|
51533
51558
|
catch (err) {
|
|
51534
|
-
this.logger.error("Error while stopping StateTracker. '"
|
|
51559
|
+
this.logger.error("Error while stopping StateTracker. '".concat(err, "'"));
|
|
51535
51560
|
return callback();
|
|
51536
51561
|
}
|
|
51537
51562
|
};
|
|
@@ -51576,7 +51601,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51576
51601
|
return [3, 3];
|
|
51577
51602
|
case 2:
|
|
51578
51603
|
e_1 = _a.sent();
|
|
51579
|
-
this.logger.error("Failed to create execution, error '"
|
|
51604
|
+
this.logger.error("Failed to create execution, error '".concat(e_1, "'. Footprints will not be sent"));
|
|
51580
51605
|
return [3, 3];
|
|
51581
51606
|
case 3: return [2];
|
|
51582
51607
|
}
|
|
@@ -51623,7 +51648,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51623
51648
|
exports.StateTracker = StateTracker;
|
|
51624
51649
|
});
|
|
51625
51650
|
|
|
51626
|
-
},{"./agent-events/agent-events-conracts":289,"./agent-events/cockpit-notifier":294,"./constants/sl-env-vars":305,"./utils/validation-utils":336,"events":110
|
|
51651
|
+
},{"./agent-events/agent-events-conracts":289,"./agent-events/cockpit-notifier":294,"./constants/sl-env-vars":305,"./utils/validation-utils":336,"events":110}],332:[function(require,module,exports){
|
|
51627
51652
|
(function (factory) {
|
|
51628
51653
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
51629
51654
|
var v = factory(require, exports);
|
|
@@ -51675,6 +51700,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51675
51700
|
originalFilename = path.resolve(generatedDir, originalFilename);
|
|
51676
51701
|
return originalFilename;
|
|
51677
51702
|
};
|
|
51703
|
+
FilesUtils.prototype.fixPathAndSpecialChar = function (path) {
|
|
51704
|
+
if (path) {
|
|
51705
|
+
if (path[0] === '/' || path[0] === '\\') {
|
|
51706
|
+
return path.substr(1).split('\\').join('/');
|
|
51707
|
+
}
|
|
51708
|
+
return path.split('\\').join('/');
|
|
51709
|
+
}
|
|
51710
|
+
return path;
|
|
51711
|
+
};
|
|
51678
51712
|
FilesUtils.adjustPathSlashes = function (filePath) {
|
|
51679
51713
|
filePath = (filePath || '').replace(/\\/g, '/');
|
|
51680
51714
|
return filePath;
|
|
@@ -51783,10 +51817,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51783
51817
|
}
|
|
51784
51818
|
ValidationUtils.verifyNotNullOrEmpty = function (value, paramName) {
|
|
51785
51819
|
if (value === undefined || value === null) {
|
|
51786
|
-
throw new Error(paramName
|
|
51820
|
+
throw new Error("".concat(paramName, " ").concat(constants_1.Constants.Messages.CANNOT_BE_NULL_OR_UNDEFINED, "."));
|
|
51787
51821
|
}
|
|
51788
51822
|
if (typeof (value) === 'string' && value.length === 0) {
|
|
51789
|
-
throw new Error(paramName
|
|
51823
|
+
throw new Error("".concat(paramName, " ").concat(constants_1.Constants.Messages.CANNOT_BE_EMPTY_STRING, "."));
|
|
51790
51824
|
}
|
|
51791
51825
|
};
|
|
51792
51826
|
return ValidationUtils;
|
|
@@ -64861,9 +64895,7 @@ function escapeJsonPtr(str) {
|
|
|
64861
64895
|
/**
|
|
64862
64896
|
* JSONSchema Validator - Validates JavaScript objects using JSON Schemas
|
|
64863
64897
|
* (http://www.json.com/json-schema-proposal/)
|
|
64864
|
-
*
|
|
64865
|
-
* Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
|
|
64866
|
-
* Licensed under the MIT (MIT-LICENSE.txt) license.
|
|
64898
|
+
* Licensed under AFL-2.1 OR BSD-3-Clause
|
|
64867
64899
|
To use the validator call the validate function with an instance object and an optional schema object.
|
|
64868
64900
|
If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
|
|
64869
64901
|
that schema will be used to validate and the schema parameter is not necessary (if both exist,
|
|
@@ -64967,7 +64999,7 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O
|
|
|
64967
64999
|
!(value instanceof Array && type == 'array') &&
|
|
64968
65000
|
!(value instanceof Date && type == 'date') &&
|
|
64969
65001
|
!(type == 'integer' && value%1===0)){
|
|
64970
|
-
return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}];
|
|
65002
|
+
return [{property:path,message:value + " - " + (typeof value) + " value found, but a " + type + " is required"}];
|
|
64971
65003
|
}
|
|
64972
65004
|
if(type instanceof Array){
|
|
64973
65005
|
var unionErrors=[];
|
|
@@ -65030,11 +65062,11 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O
|
|
|
65030
65062
|
if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){
|
|
65031
65063
|
addError("must be at least " + schema.minLength + " characters long");
|
|
65032
65064
|
}
|
|
65033
|
-
if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum &&
|
|
65065
|
+
if(typeof schema.minimum !== 'undefined' && typeof value == typeof schema.minimum &&
|
|
65034
65066
|
schema.minimum > value){
|
|
65035
65067
|
addError("must have a minimum value of " + schema.minimum);
|
|
65036
65068
|
}
|
|
65037
|
-
if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum &&
|
|
65069
|
+
if(typeof schema.maximum !== 'undefined' && typeof value == typeof schema.maximum &&
|
|
65038
65070
|
schema.maximum < value){
|
|
65039
65071
|
addError("must have a maximum value of " + schema.maximum);
|
|
65040
65072
|
}
|
|
@@ -65069,8 +65101,8 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O
|
|
|
65069
65101
|
}
|
|
65070
65102
|
|
|
65071
65103
|
for(var i in objTypeDef){
|
|
65072
|
-
if(objTypeDef.hasOwnProperty(i)){
|
|
65073
|
-
var value = instance[i];
|
|
65104
|
+
if(objTypeDef.hasOwnProperty(i) && i != '__proto__' && i != 'constructor'){
|
|
65105
|
+
var value = instance.hasOwnProperty(i) ? instance[i] : undefined;
|
|
65074
65106
|
// skip _not_ specified properties
|
|
65075
65107
|
if (value === undefined && options.existingOnly) continue;
|
|
65076
65108
|
var propDef = objTypeDef[i];
|
|
@@ -65091,7 +65123,7 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O
|
|
|
65091
65123
|
delete instance[i];
|
|
65092
65124
|
continue;
|
|
65093
65125
|
} else {
|
|
65094
|
-
errors.push({property:path,message:
|
|
65126
|
+
errors.push({property:path,message:"The property " + i +
|
|
65095
65127
|
" is not defined in the schema and the schema does not allow additional properties"});
|
|
65096
65128
|
}
|
|
65097
65129
|
}
|
|
@@ -67540,6 +67572,10 @@ module.exports={
|
|
|
67540
67572
|
"compressible": true,
|
|
67541
67573
|
"extensions": ["srx"]
|
|
67542
67574
|
},
|
|
67575
|
+
"application/spdx+json": {
|
|
67576
|
+
"source": "iana",
|
|
67577
|
+
"compressible": true
|
|
67578
|
+
},
|
|
67543
67579
|
"application/spirits-event+xml": {
|
|
67544
67580
|
"source": "iana",
|
|
67545
67581
|
"compressible": true
|
|
@@ -68021,6 +68057,10 @@ module.exports={
|
|
|
68021
68057
|
"application/vnd.afpc.modca-pagesegment": {
|
|
68022
68058
|
"source": "iana"
|
|
68023
68059
|
},
|
|
68060
|
+
"application/vnd.age": {
|
|
68061
|
+
"source": "iana",
|
|
68062
|
+
"extensions": ["age"]
|
|
68063
|
+
},
|
|
68024
68064
|
"application/vnd.ah-barcode": {
|
|
68025
68065
|
"source": "iana"
|
|
68026
68066
|
},
|
|
@@ -69862,6 +69902,10 @@ module.exports={
|
|
|
69862
69902
|
"source": "iana",
|
|
69863
69903
|
"extensions": ["taglet"]
|
|
69864
69904
|
},
|
|
69905
|
+
"application/vnd.nacamar.ybrid+json": {
|
|
69906
|
+
"source": "iana",
|
|
69907
|
+
"compressible": true
|
|
69908
|
+
},
|
|
69865
69909
|
"application/vnd.ncd.control": {
|
|
69866
69910
|
"source": "iana"
|
|
69867
69911
|
},
|
|
@@ -73196,6 +73240,7 @@ module.exports={
|
|
|
73196
73240
|
},
|
|
73197
73241
|
"image/vnd.microsoft.icon": {
|
|
73198
73242
|
"source": "iana",
|
|
73243
|
+
"compressible": true,
|
|
73199
73244
|
"extensions": ["ico"]
|
|
73200
73245
|
},
|
|
73201
73246
|
"image/vnd.mix": {
|
|
@@ -73205,6 +73250,7 @@ module.exports={
|
|
|
73205
73250
|
"source": "iana"
|
|
73206
73251
|
},
|
|
73207
73252
|
"image/vnd.ms-dds": {
|
|
73253
|
+
"compressible": true,
|
|
73208
73254
|
"extensions": ["dds"]
|
|
73209
73255
|
},
|
|
73210
73256
|
"image/vnd.ms-modi": {
|
|
@@ -73894,6 +73940,10 @@ module.exports={
|
|
|
73894
73940
|
"source": "iana",
|
|
73895
73941
|
"charset": "UTF-8"
|
|
73896
73942
|
},
|
|
73943
|
+
"text/vnd.familysearch.gedcom": {
|
|
73944
|
+
"source": "iana",
|
|
73945
|
+
"extensions": ["ged"]
|
|
73946
|
+
},
|
|
73897
73947
|
"text/vnd.ficlab.flt": {
|
|
73898
73948
|
"source": "iana"
|
|
73899
73949
|
},
|