slnodejs 6.1.205 → 6.1.217
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 +98 -35
- package/browser-agent/dist/browser-agent-all.min.js +20 -20
- package/browser-agent/package.json +1 -1
- package/package.json +3 -2
- package/tsOutputs/build-scanner/build-diff-process.js +1 -0
- package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +22 -2
- package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
- package/tsOutputs/cli-parse/cli.js +84 -60
- package/tsOutputs/cli-parse/cli.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +6 -3
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-end-executor.js +13 -0
- package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +16 -9
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.d.ts +1 -1
- package/tsOutputs/common/agent-events/cockpit-notifier.js +2 -2
- package/tsOutputs/common/agent-events/cockpit-notifier.js.map +1 -1
- package/tsOutputs/common/cli-progress.js +31 -0
- package/tsOutputs/common/cli-progress.js.map +1 -0
- package/tsOutputs/common/footprints-process-v6/hits-collector.d.ts +6 -6
- package/tsOutputs/common/footprints-process-v6/hits-collector.js +56 -15
- package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
- package/tsOutputs/common/footprints-process-v6/index.d.ts +2 -2
- package/tsOutputs/common/footprints-process-v6/index.js +40 -18
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/mocha-reporter/index.js +1 -1
- package/tsOutputs/test-listener/factory.d.ts +1 -0
- package/tsOutputs/test-listener/factory.js +6 -1
- package/tsOutputs/test-listener/factory.js.map +1 -1
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.d.ts +10 -0
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js +159 -0
- package/tsOutputs/test-listener/footprints-process/ts-node-hits-collector.js.map +1 -0
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +10 -5
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.d.ts +1 -1
- package/tsOutputs/test-listener/remote-agent.js +16 -4
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
|
@@ -46750,9 +46750,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46750
46750
|
CockpitNotifier.verifyControllerInitialized();
|
|
46751
46751
|
CockpitNotifier.controller.submitErrorsBatch(messages);
|
|
46752
46752
|
};
|
|
46753
|
-
CockpitNotifier.sendEvent = function (code) {
|
|
46753
|
+
CockpitNotifier.sendEvent = function (code, data) {
|
|
46754
46754
|
CockpitNotifier.verifyControllerInitialized();
|
|
46755
|
-
CockpitNotifier.controller.submitEvent(code);
|
|
46755
|
+
CockpitNotifier.controller.submitEvent(code, data);
|
|
46756
46756
|
};
|
|
46757
46757
|
CockpitNotifier.sendEventOnce = function (code) {
|
|
46758
46758
|
CockpitNotifier.verifyControllerInitialized();
|
|
@@ -49195,6 +49195,42 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
49195
49195
|
|
|
49196
49196
|
},{"../agent-events/agent-events-conracts":289,"../agent-events/cockpit-notifier":294,"./buffer-size-helper":316,"events":110}],318:[function(require,module,exports){
|
|
49197
49197
|
(function (global){(function (){
|
|
49198
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
49199
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
49200
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
49201
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
49202
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
49203
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
49204
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
49205
|
+
});
|
|
49206
|
+
};
|
|
49207
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
49208
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
49209
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
49210
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49211
|
+
function step(op) {
|
|
49212
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
49213
|
+
while (_) try {
|
|
49214
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49215
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
49216
|
+
switch (op[0]) {
|
|
49217
|
+
case 0: case 1: t = op; break;
|
|
49218
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
49219
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
49220
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
49221
|
+
default:
|
|
49222
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
49223
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
49224
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
49225
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
49226
|
+
if (t[2]) _.ops.pop();
|
|
49227
|
+
_.trys.pop(); continue;
|
|
49228
|
+
}
|
|
49229
|
+
op = body.call(thisArg, _);
|
|
49230
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49231
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49232
|
+
}
|
|
49233
|
+
};
|
|
49198
49234
|
(function (factory) {
|
|
49199
49235
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
49200
49236
|
var v = factory(require, exports);
|
|
@@ -49217,21 +49253,26 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
49217
49253
|
this.latestCoverageSnapshot = {};
|
|
49218
49254
|
}
|
|
49219
49255
|
HitsCollector.prototype.getHitElements = function () {
|
|
49220
|
-
|
|
49221
|
-
|
|
49222
|
-
|
|
49223
|
-
|
|
49224
|
-
|
|
49225
|
-
|
|
49226
|
-
|
|
49227
|
-
|
|
49228
|
-
|
|
49229
|
-
|
|
49230
|
-
|
|
49231
|
-
|
|
49232
|
-
|
|
49233
|
-
|
|
49234
|
-
|
|
49256
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
49257
|
+
var hitFilesData, globalCoverage, filename, _a, fileCoverageSnapshot, currentFileCoverage, shouldResolveRelativePath, hitMethods, hitBranches;
|
|
49258
|
+
return __generator(this, function (_b) {
|
|
49259
|
+
hitFilesData = [];
|
|
49260
|
+
globalCoverage = this.getGlobalCoverageObject();
|
|
49261
|
+
if (sl_env_vars_1.SlEnvVars.isUseNewUniqueId()) {
|
|
49262
|
+
new original_module_loader_1.OriginalModuleLoader(globalCoverage, this.logger).load();
|
|
49263
|
+
}
|
|
49264
|
+
for (filename in globalCoverage) {
|
|
49265
|
+
_a = this.getFileCoverageObjects(filename), fileCoverageSnapshot = _a.fileCoverageSnapshot, currentFileCoverage = _a.currentFileCoverage, shouldResolveRelativePath = _a.shouldResolveRelativePath;
|
|
49266
|
+
hitMethods = this.getHitMethods(currentFileCoverage, fileCoverageSnapshot);
|
|
49267
|
+
hitBranches = this.getHitBranches(currentFileCoverage, fileCoverageSnapshot);
|
|
49268
|
+
if (hitMethods.length || hitBranches.length) {
|
|
49269
|
+
hitFilesData.push({ filename: filename, hitMethods: hitMethods, hitBranches: hitBranches, shouldResolveRelativePath: shouldResolveRelativePath });
|
|
49270
|
+
}
|
|
49271
|
+
}
|
|
49272
|
+
this.updateCoverageSnapshot(globalCoverage);
|
|
49273
|
+
return [2, hitFilesData];
|
|
49274
|
+
});
|
|
49275
|
+
});
|
|
49235
49276
|
};
|
|
49236
49277
|
Object.defineProperty(HitsCollector.prototype, "latestCoverageSnapshot", {
|
|
49237
49278
|
get: function () {
|
|
@@ -49614,22 +49655,33 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49614
49655
|
}
|
|
49615
49656
|
FootprintsProcess.prototype.enqueueCurrentFootprints = function (execution, testName, isFinalFootprints) {
|
|
49616
49657
|
if (isFinalFootprints === void 0) { isFinalFootprints = false; }
|
|
49617
|
-
this
|
|
49618
|
-
|
|
49619
|
-
|
|
49620
|
-
|
|
49621
|
-
|
|
49622
|
-
|
|
49623
|
-
|
|
49624
|
-
|
|
49625
|
-
|
|
49626
|
-
|
|
49627
|
-
|
|
49628
|
-
|
|
49629
|
-
|
|
49630
|
-
|
|
49631
|
-
|
|
49632
|
-
|
|
49658
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
49659
|
+
var hitFilesData, convertedHits;
|
|
49660
|
+
return __generator(this, function (_a) {
|
|
49661
|
+
switch (_a.label) {
|
|
49662
|
+
case 0:
|
|
49663
|
+
this.currentExecutionBsid = execution.buildSessionId;
|
|
49664
|
+
this.collectionInterval.next();
|
|
49665
|
+
return [4, this.hitsCollector.getHitElements()];
|
|
49666
|
+
case 1:
|
|
49667
|
+
hitFilesData = _a.sent();
|
|
49668
|
+
if (hitFilesData.length) {
|
|
49669
|
+
this.logger.info("Collecting hits for '" + hitFilesData.length + "' files");
|
|
49670
|
+
convertedHits = this.hitsConverter.convertHits(hitFilesData);
|
|
49671
|
+
this.footprintsBuffer.addHit(convertedHits, this.collectionInterval.toJson(), execution.executionId, testName, this.isInitFootprints(), isFinalFootprints);
|
|
49672
|
+
}
|
|
49673
|
+
else {
|
|
49674
|
+
this.logger.info('No files were hits, not collecting footprints');
|
|
49675
|
+
}
|
|
49676
|
+
if (this.isRunning && this.cfg.sendFootprints.value && this.cfg.enabled.value) {
|
|
49677
|
+
this.ensureKeepaliveThreadRunning();
|
|
49678
|
+
this.sendToServerWatchdog.start();
|
|
49679
|
+
}
|
|
49680
|
+
this.footprintsEnqueueOnce = true;
|
|
49681
|
+
return [2];
|
|
49682
|
+
}
|
|
49683
|
+
});
|
|
49684
|
+
});
|
|
49633
49685
|
};
|
|
49634
49686
|
FootprintsProcess.prototype.updateConfig = function (updatedCfg) {
|
|
49635
49687
|
this.cfg = updatedCfg;
|
|
@@ -49772,8 +49824,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49772
49824
|
};
|
|
49773
49825
|
FootprintsProcess.prototype.enqueueAndSubmit = function (executionData, isFinalFootprints) {
|
|
49774
49826
|
if (isFinalFootprints === void 0) { isFinalFootprints = false; }
|
|
49775
|
-
this
|
|
49776
|
-
|
|
49827
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
49828
|
+
return __generator(this, function (_a) {
|
|
49829
|
+
switch (_a.label) {
|
|
49830
|
+
case 0: return [4, this.enqueueCurrentFootprints(executionData, null, isFinalFootprints)];
|
|
49831
|
+
case 1:
|
|
49832
|
+
_a.sent();
|
|
49833
|
+
return [4, this.submitQueuedFootprints(executionData)];
|
|
49834
|
+
case 2:
|
|
49835
|
+
_a.sent();
|
|
49836
|
+
return [2];
|
|
49837
|
+
}
|
|
49838
|
+
});
|
|
49839
|
+
});
|
|
49777
49840
|
};
|
|
49778
49841
|
FootprintsProcess.prototype.flushCurrentFootprints = function (isFinalFootprints) {
|
|
49779
49842
|
if (isFinalFootprints === void 0) { isFinalFootprints = false; }
|