slnodejs 6.1.199 → 6.1.207
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 +33 -21
- package/browser-agent/dist/browser-agent-all.min.js +21 -21
- package/browser-agent/package.json +1 -1
- package/package.json +7 -7
- package/tsOutputs/cli-parse/executors/base-executor.js +8 -5
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +2 -2
- package/tsOutputs/cli-parse/executors/build-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.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.d.ts +1 -0
- package/tsOutputs/common/agent-events/agent-events-controller.js +29 -18
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.js +2 -1
- package/tsOutputs/common/agent-events/agent-instance-info-builder.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
|
@@ -46240,6 +46240,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
46240
46240
|
var system_date_1 = require("../system-date");
|
|
46241
46241
|
var AgentEventsController = (function () {
|
|
46242
46242
|
function AgentEventsController(agentConfig, agentInstanceData, logger, backendProxy, tool, tags) {
|
|
46243
|
+
this.active = false;
|
|
46243
46244
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(agentConfig, 'agentConfig');
|
|
46244
46245
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(agentInstanceData, 'agentInstanceData');
|
|
46245
46246
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(logger, 'logger');
|
|
@@ -46259,6 +46260,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
46259
46260
|
return __generator(this, function (_a) {
|
|
46260
46261
|
switch (_a.label) {
|
|
46261
46262
|
case 0:
|
|
46263
|
+
this.active = true;
|
|
46262
46264
|
this.startRequestStatus = StartRequestStatus.PENDING;
|
|
46263
46265
|
event = this.buildAgentStartEvent(packageJsonFile || {});
|
|
46264
46266
|
return [4, this.submitAgentEventRequest(event)];
|
|
@@ -46282,6 +46284,10 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
46282
46284
|
return __generator(this, function (_a) {
|
|
46283
46285
|
switch (_a.label) {
|
|
46284
46286
|
case 0:
|
|
46287
|
+
if (!this.active) {
|
|
46288
|
+
this._logger.debug('Agent not active - not submitting event');
|
|
46289
|
+
return [2, false];
|
|
46290
|
+
}
|
|
46285
46291
|
request = {
|
|
46286
46292
|
agentId: this._agentInstanceData.agentId,
|
|
46287
46293
|
events: Array.isArray(event) ? event : [event],
|
|
@@ -46320,27 +46326,32 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
46320
46326
|
};
|
|
46321
46327
|
AgentEventsController.prototype.submitAgentShutdownEvent = function () {
|
|
46322
46328
|
return __awaiter(this, void 0, void 0, function () {
|
|
46323
|
-
var event;
|
|
46329
|
+
var event, result;
|
|
46324
46330
|
var _this = this;
|
|
46325
46331
|
return __generator(this, function (_a) {
|
|
46326
|
-
|
|
46327
|
-
|
|
46328
|
-
|
|
46329
|
-
|
|
46330
|
-
|
|
46331
|
-
|
|
46332
|
-
|
|
46333
|
-
|
|
46334
|
-
|
|
46335
|
-
|
|
46336
|
-
|
|
46337
|
-
|
|
46338
|
-
|
|
46339
|
-
|
|
46340
|
-
|
|
46341
|
-
|
|
46332
|
+
switch (_a.label) {
|
|
46333
|
+
case 0:
|
|
46334
|
+
this.shutDownRetries++;
|
|
46335
|
+
if (this.startRequestStatus == StartRequestStatus.FAILED) {
|
|
46336
|
+
this._logger.debug('Agent start not submitted - not sending shut down events');
|
|
46337
|
+
return [2];
|
|
46338
|
+
}
|
|
46339
|
+
if (this.shutDownRetries > AgentEventsController.MAX_SHUTDOWN_RETRIES) {
|
|
46340
|
+
this._logger.debug('Stop trying to send shutdown event after 60 seconds ');
|
|
46341
|
+
return [2];
|
|
46342
|
+
}
|
|
46343
|
+
this._pingWatchdog.stop();
|
|
46344
|
+
event = this.buildAgentShutdownEvent();
|
|
46345
|
+
if (!(this.startRequestStatus == StartRequestStatus.PENDING)) return [3, 1];
|
|
46346
|
+
setTimeout(function () { return _this.submitAgentShutdownEvent.call(_this); }, 1000);
|
|
46347
|
+
return [3, 3];
|
|
46348
|
+
case 1: return [4, this.submitAgentEventRequest(event)];
|
|
46349
|
+
case 2:
|
|
46350
|
+
result = _a.sent();
|
|
46351
|
+
this.active = false;
|
|
46352
|
+
return [2, result];
|
|
46353
|
+
case 3: return [2];
|
|
46342
46354
|
}
|
|
46343
|
-
return [2];
|
|
46344
46355
|
});
|
|
46345
46356
|
});
|
|
46346
46357
|
};
|
|
@@ -46532,7 +46543,8 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
46532
46543
|
};
|
|
46533
46544
|
AgentInstanceInfoBuilder.prototype.fillFromAgentConfig = function () {
|
|
46534
46545
|
this.info.buildSessionId = this.agentConfig.buildSessionId.value;
|
|
46535
|
-
this.info.labId = this.agentConfig.labId.value;
|
|
46546
|
+
this.info.labId = this.agentConfig.labId.value || this.agentConfig.buildSessionId.value;
|
|
46547
|
+
this.info.testStage = this.agentConfig.testStage.value;
|
|
46536
46548
|
this.info.agentConfig = this.agentConfig.toJsonObject();
|
|
46537
46549
|
};
|
|
46538
46550
|
AgentInstanceInfoBuilder.prototype.fillFromProcessObject = function () {
|
|
@@ -46738,9 +46750,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46738
46750
|
CockpitNotifier.verifyControllerInitialized();
|
|
46739
46751
|
CockpitNotifier.controller.submitErrorsBatch(messages);
|
|
46740
46752
|
};
|
|
46741
|
-
CockpitNotifier.sendEvent = function (code) {
|
|
46753
|
+
CockpitNotifier.sendEvent = function (code, data) {
|
|
46742
46754
|
CockpitNotifier.verifyControllerInitialized();
|
|
46743
|
-
CockpitNotifier.controller.submitEvent(code);
|
|
46755
|
+
CockpitNotifier.controller.submitEvent(code, data);
|
|
46744
46756
|
};
|
|
46745
46757
|
CockpitNotifier.sendEventOnce = function (code) {
|
|
46746
46758
|
CockpitNotifier.verifyControllerInitialized();
|