slnodejs 6.1.192 → 6.1.206

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.
@@ -23622,7 +23622,7 @@ module.exports={
23622
23622
  "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
23623
23623
  "_shasum": "da37cebd31e79a1367e941b592ed1fbebd58abbb",
23624
23624
  "_spec": "elliptic@^6.5.3",
23625
- "_where": "/var/lib/jenkins/workspace/.OnPremise.Agent.JavaScript_main/browser-agent/node_modules/browserify-sign",
23625
+ "_where": "/var/lib/jenkins/workspace/.OnPremise.Agent.JavaScript_main@2/browser-agent/node_modules/browserify-sign",
23626
23626
  "author": {
23627
23627
  "name": "Fedor Indutny",
23628
23628
  "email": "fedor@indutny.com"
@@ -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
- this.shutDownRetries++;
46327
- if (this.startRequestStatus == StartRequestStatus.FAILED) {
46328
- this._logger.debug('Agent start not submitted - not sending shut down events');
46329
- return [2];
46330
- }
46331
- if (this.shutDownRetries > AgentEventsController.MAX_SHUTDOWN_RETRIES) {
46332
- this._logger.debug('Stop trying to send shutdown event after 60 seconds ');
46333
- return [2];
46334
- }
46335
- this._pingWatchdog.stop();
46336
- event = this.buildAgentShutdownEvent();
46337
- if (this.startRequestStatus == StartRequestStatus.PENDING) {
46338
- setTimeout(function () { return _this.submitAgentShutdownEvent.call(_this); }, 1000);
46339
- }
46340
- else {
46341
- return [2, this.submitAgentEventRequest(event)];
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 () {