slnodejs 6.1.163 → 6.1.166
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 +29 -17
- package/browser-agent/dist/browser-agent-all.min.js +24 -24
- package/browser-agent/package.json +1 -1
- package/package.json +1 -1
- package/tsOutputs/common/footprints-process-v6/index.d.ts +3 -3
- package/tsOutputs/common/footprints-process-v6/index.js +16 -13
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/state-tracker.d.ts +1 -0
- package/tsOutputs/common/state-tracker.js +11 -2
- package/tsOutputs/common/state-tracker.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.d.ts +2 -1
- package/tsOutputs/test-listener/remote-agent.js +14 -2
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
|
@@ -43067,7 +43067,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
43067
43067
|
this.footprintsProcess.stop(function () { });
|
|
43068
43068
|
};
|
|
43069
43069
|
BrowserAgentInstanceFpv6.prototype.submitFootprints = function () {
|
|
43070
|
-
this.footprintsProcess.submitQueuedFootprints();
|
|
43070
|
+
this.footprintsProcess.submitQueuedFootprints(this.stateTracker.currentExecution);
|
|
43071
43071
|
};
|
|
43072
43072
|
BrowserAgentInstanceFpv6.prototype.submitFootprintsSync = function () {
|
|
43073
43073
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -43079,7 +43079,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
43079
43079
|
return [4, this.footprintsProcess.flushCurrentFootprints()];
|
|
43080
43080
|
case 1:
|
|
43081
43081
|
_a.sent();
|
|
43082
|
-
return [4, this.footprintsProcess.submitQueuedFootprints()];
|
|
43082
|
+
return [4, this.footprintsProcess.submitQueuedFootprints(this.stateTracker.currentExecution)];
|
|
43083
43083
|
case 2:
|
|
43084
43084
|
_a.sent();
|
|
43085
43085
|
return [3, 4];
|
|
@@ -49569,15 +49569,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49569
49569
|
this.logger = logger;
|
|
49570
49570
|
this.delegateEvents();
|
|
49571
49571
|
}
|
|
49572
|
-
FootprintsProcess.prototype.enqueueCurrentFootprints = function (
|
|
49572
|
+
FootprintsProcess.prototype.enqueueCurrentFootprints = function (execution, testName, isFinalFootprints) {
|
|
49573
49573
|
if (isFinalFootprints === void 0) { isFinalFootprints = false; }
|
|
49574
|
-
this.currentExecutionBsid =
|
|
49574
|
+
this.currentExecutionBsid = execution.buildSessionId;
|
|
49575
49575
|
this.collectionInterval.next();
|
|
49576
49576
|
var hitFilesData = this.hitsCollector.getHitElements();
|
|
49577
49577
|
if (hitFilesData.length) {
|
|
49578
49578
|
this.logger.info("Collecting hits for '" + hitFilesData.length + "' files");
|
|
49579
49579
|
var convertedHits = this.hitsConverter.convertHits(hitFilesData);
|
|
49580
|
-
this.footprintsBuffer.addHit(convertedHits, this.collectionInterval.toJson(), executionId, testName, this.isInitFootprints(), isFinalFootprints);
|
|
49580
|
+
this.footprintsBuffer.addHit(convertedHits, this.collectionInterval.toJson(), execution.executionId, testName, this.isInitFootprints(), isFinalFootprints);
|
|
49581
49581
|
}
|
|
49582
49582
|
else {
|
|
49583
49583
|
this.logger.info('No files were hits, not collecting footprints');
|
|
@@ -49602,7 +49602,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49602
49602
|
FootprintsProcess.prototype.ensureKeepaliveThreadRunning = function () {
|
|
49603
49603
|
this.keepaliveWatchdog.start();
|
|
49604
49604
|
};
|
|
49605
|
-
FootprintsProcess.prototype.submitQueuedFootprints = function () {
|
|
49605
|
+
FootprintsProcess.prototype.submitQueuedFootprints = function (execution) {
|
|
49606
49606
|
return __awaiter(this, void 0, void 0, function () {
|
|
49607
49607
|
var packet, e_1;
|
|
49608
49608
|
return __generator(this, function (_a) {
|
|
@@ -49617,7 +49617,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49617
49617
|
_a.label = 1;
|
|
49618
49618
|
case 1:
|
|
49619
49619
|
_a.trys.push([1, 3, 4, 5]);
|
|
49620
|
-
return [4, this.backendProxy.submitFootprintsV6(packet,
|
|
49620
|
+
return [4, this.backendProxy.submitFootprintsV6(packet, execution.buildSessionId, execution.testStage, this.cfg.buildSessionId.value)];
|
|
49621
49621
|
case 2:
|
|
49622
49622
|
_a.sent();
|
|
49623
49623
|
this.logger.info("Footprints packet submitted successfully. packet contains " + packet.methods.length + " methods, " + packet.branches.length + " branches in " + packet.executions.length + " executions");
|
|
@@ -49694,14 +49694,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49694
49694
|
}
|
|
49695
49695
|
this.logger.debug('Test identifier changed, start enqueuing footprints process.');
|
|
49696
49696
|
var prevTestIdentifierParts = state_tracker_1.StateTracker.splitTestIdToExecutionAndTestName(previousTestIdentifier);
|
|
49697
|
-
this.enqueueCurrentFootprints(this.stateTracker.currentExecution
|
|
49697
|
+
this.enqueueCurrentFootprints(this.stateTracker.currentExecution, prevTestIdentifierParts.testName);
|
|
49698
49698
|
}
|
|
49699
49699
|
};
|
|
49700
49700
|
FootprintsProcess.prototype.delegateEvents = function () {
|
|
49701
49701
|
var _this = this;
|
|
49702
49702
|
this.sendToServerWatchdog.on(FootprintsProcess.ALARM_FIRED, function () {
|
|
49703
49703
|
_this.logger.debug('Start submitting footprints, triggered by send to server watchdog.');
|
|
49704
|
-
_this.submitQueuedFootprints();
|
|
49704
|
+
_this.submitQueuedFootprints(_this.stateTracker.currentExecution);
|
|
49705
49705
|
});
|
|
49706
49706
|
this.keepaliveWatchdog.on(FootprintsProcess.ALARM_FIRED, function () {
|
|
49707
49707
|
if (!_this.hasOngoingRequests() && !_this.footprintsBuffer.hasHitsInBuffer()) {
|
|
@@ -49709,7 +49709,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49709
49709
|
}
|
|
49710
49710
|
});
|
|
49711
49711
|
this.footprintsBuffer.on(footprints_buffer_1.FootprintsBuffer.BUFFER_FULL, function () {
|
|
49712
|
-
_this.submitQueuedFootprints();
|
|
49712
|
+
_this.submitQueuedFootprints(_this.stateTracker.currentExecution);
|
|
49713
49713
|
});
|
|
49714
49714
|
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_BSID_CHANGED, function (prevExecution, newBuildSession) {
|
|
49715
49715
|
_this.logger.warn("Execution points to different build session '" + newBuildSession + "'. Collecting and submitting previous footprints");
|
|
@@ -49717,17 +49717,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49717
49717
|
});
|
|
49718
49718
|
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_ID_CHANGED, function (prevExecution, newExecutionId) {
|
|
49719
49719
|
_this.logger.warn("Execution id changed to'" + newExecutionId + "'. Collecting previous footprints");
|
|
49720
|
-
_this.enqueueCurrentFootprints(prevExecution
|
|
49720
|
+
_this.enqueueCurrentFootprints(prevExecution, null);
|
|
49721
49721
|
});
|
|
49722
49722
|
this.stateTracker.on(state_tracker_1.StateTracker.TEST_STAGE_CHANGED, function (prevExecution, newTestStage) {
|
|
49723
49723
|
_this.logger.warn("Execution points to different test stage '" + newTestStage + "'. Collecting and submitting previous footprints");
|
|
49724
49724
|
_this.enqueueAndSubmit(prevExecution);
|
|
49725
49725
|
});
|
|
49726
|
+
this.stateTracker.on(state_tracker_1.StateTracker.EXECUTION_STATUS_PENDING_DELETE, function (execution) {
|
|
49727
|
+
_this.enqueueAndSubmit(execution);
|
|
49728
|
+
});
|
|
49726
49729
|
};
|
|
49727
49730
|
FootprintsProcess.prototype.enqueueAndSubmit = function (executionData, isFinalFootprints) {
|
|
49728
49731
|
if (isFinalFootprints === void 0) { isFinalFootprints = false; }
|
|
49729
|
-
this.enqueueCurrentFootprints(executionData
|
|
49730
|
-
this.submitQueuedFootprints();
|
|
49732
|
+
this.enqueueCurrentFootprints(executionData, null, isFinalFootprints);
|
|
49733
|
+
this.submitQueuedFootprints(executionData);
|
|
49731
49734
|
};
|
|
49732
49735
|
FootprintsProcess.prototype.flushCurrentFootprints = function (isFinalFootprints) {
|
|
49733
49736
|
if (isFinalFootprints === void 0) { isFinalFootprints = false; }
|
|
@@ -49735,11 +49738,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49735
49738
|
if (currentTestIdentifier) {
|
|
49736
49739
|
var testIdentifierParts = state_tracker_1.StateTracker.splitTestIdToExecutionAndTestName(currentTestIdentifier);
|
|
49737
49740
|
this.logger.debug('Enqueue footprints interval - start enqueuing process. currentTestIdentifier: \'%s\'', currentTestIdentifier);
|
|
49738
|
-
this.enqueueCurrentFootprints(this.stateTracker.currentExecution
|
|
49741
|
+
this.enqueueCurrentFootprints(this.stateTracker.currentExecution, testIdentifierParts.testName, isFinalFootprints);
|
|
49739
49742
|
}
|
|
49740
49743
|
else if (this.stateTracker.shouldCollectHits()) {
|
|
49741
49744
|
this.logger.debug('Enqueue footprints interval - start enqueuing process. anonymous footprints');
|
|
49742
|
-
this.enqueueCurrentFootprints(this.stateTracker.currentExecution
|
|
49745
|
+
this.enqueueCurrentFootprints(this.stateTracker.currentExecution, null, isFinalFootprints);
|
|
49743
49746
|
}
|
|
49744
49747
|
else {
|
|
49745
49748
|
this.logger.info('Enqueue footprints interval - no active execution. skip enqueuing process.');
|
|
@@ -51195,7 +51198,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51195
51198
|
return this._currentExecution != null;
|
|
51196
51199
|
};
|
|
51197
51200
|
StateTracker.prototype.shouldCollectHits = function () {
|
|
51198
|
-
return this.hasMappingAtServer();
|
|
51201
|
+
return this.hasMappingAtServer() && this.currentExecution.executionId !== this.pendingDeleteExecId;
|
|
51199
51202
|
};
|
|
51200
51203
|
Object.defineProperty(StateTracker.prototype, "currentExecution", {
|
|
51201
51204
|
get: function () {
|
|
@@ -51267,7 +51270,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51267
51270
|
}
|
|
51268
51271
|
};
|
|
51269
51272
|
StateTracker.prototype.getTestStage = function () {
|
|
51270
|
-
|
|
51273
|
+
var _a;
|
|
51274
|
+
return (_a = this.currentExecution) === null || _a === void 0 ? void 0 : _a.testStage;
|
|
51271
51275
|
};
|
|
51272
51276
|
StateTracker.splitTestIdToExecutionAndTestName = function (testId) {
|
|
51273
51277
|
testId = testId || '';
|
|
@@ -51318,6 +51322,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51318
51322
|
if (!executionData) {
|
|
51319
51323
|
return;
|
|
51320
51324
|
}
|
|
51325
|
+
if (executionData.status == StateTracker.EXECUTION_STATUS_PENDING_DELETE) {
|
|
51326
|
+
if (executionData.executionId !== this.pendingDeleteExecId) {
|
|
51327
|
+
this.currentExecution = executionData;
|
|
51328
|
+
this.emit(StateTracker.EXECUTION_STATUS_PENDING_DELETE, executionData);
|
|
51329
|
+
this.pendingDeleteExecId = executionData.executionId;
|
|
51330
|
+
}
|
|
51331
|
+
return;
|
|
51332
|
+
}
|
|
51321
51333
|
if (!this.currentExecution) {
|
|
51322
51334
|
return;
|
|
51323
51335
|
}
|