slnodejs 6.2.34 → 6.2.39

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.
@@ -1093,7 +1093,7 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
1093
1093
  value: true
1094
1094
  });
1095
1095
  exports.SL_AGENT_TYPE = exports.SL_AGENT_VERSION = void 0;
1096
- exports.SL_AGENT_VERSION = '6.2.34';
1096
+ exports.SL_AGENT_VERSION = '6.2.39';
1097
1097
  exports.SL_AGENT_TYPE = 'browser';
1098
1098
  });
1099
1099
 
@@ -8203,20 +8203,24 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
8203
8203
  this.invokeCallback(callback, err, body);
8204
8204
  });
8205
8205
  }
8206
+ buildEndExecutionBody(request) {
8207
+ const body = Object.assign(Object.assign({}, request.executionIds ? {
8208
+ executionIds: request.executionIds
8209
+ } : {}), request.endTime != null ? {
8210
+ endTime: request.endTime
8211
+ } : {});
8212
+ return Object.keys(body).length > 0 ? body : null;
8213
+ }
8206
8214
  endExecution(request, callback) {
8207
8215
  const url = sl_routes_1.SLRoutes.endExecution(request.customerId, request.appName, request.buildName, request.branchName, request.environment, request.testGroupId);
8208
- const body = request.executionIds ? {
8209
- executionIds: request.executionIds
8210
- } : null;
8216
+ const body = this.buildEndExecutionBody(request);
8211
8217
  this.client.delete(body, url, (err, body) => {
8212
8218
  this.invokeCallback(callback, err, body);
8213
8219
  });
8214
8220
  }
8215
8221
  endExecutionPromise(request) {
8216
8222
  const url = sl_routes_1.SLRoutes.endExecution(request.customerId, request.appName, request.buildName, request.branchName, request.environment, request.testGroupId);
8217
- const body = request.executionIds ? {
8218
- executionIds: request.executionIds
8219
- } : null;
8223
+ const body = this.buildEndExecutionBody(request);
8220
8224
  return new Promise((resolve, reject) => {
8221
8225
  this.client.delete(body, url, err => {
8222
8226
  err ? reject(err) : resolve();
@@ -9662,7 +9666,7 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
9662
9666
  var v = factory(require, exports);
9663
9667
  if (v !== undefined) module.exports = v;
9664
9668
  } else if (typeof define === "function" && define.amd) {
9665
- define(["require", "exports", "events", "./constants/sl-env-vars", "./utils/validation-utils", "./agent-events/cockpit-notifier", "./agent-events/agent-events-contracts"], factory);
9669
+ define(["require", "exports", "events", "./constants/sl-env-vars", "./utils/validation-utils", "./system-date", "./agent-events/cockpit-notifier", "./agent-events/agent-events-contracts"], factory);
9666
9670
  }
9667
9671
  })(function (require, exports) {
9668
9672
  "use strict";
@@ -9674,6 +9678,7 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
9674
9678
  const events = require("events");
9675
9679
  const sl_env_vars_1 = require("./constants/sl-env-vars");
9676
9680
  const validation_utils_1 = require("./utils/validation-utils");
9681
+ const system_date_1 = require("./system-date");
9677
9682
  const cockpit_notifier_1 = require("./agent-events/cockpit-notifier");
9678
9683
  const agent_events_contracts_1 = require("./agent-events/agent-events-contracts");
9679
9684
  const INITIAL_COLOR = '00000000-0000-0000-0000-000000000000/__init';
@@ -9944,7 +9949,8 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
9944
9949
  customerId: this.cfg.customerId.value,
9945
9950
  environment: this.cfg.labId.value || this.cfg.buildSessionId.value,
9946
9951
  executionIds: [this.currentExecution.executionId],
9947
- testGroupId: this.cfg.testGroupId.value
9952
+ testGroupId: this.cfg.testGroupId.value,
9953
+ endTime: (0, system_date_1.getSystemDateValueOfLocal)()
9948
9954
  });
9949
9955
  });
9950
9956
  }
@@ -10003,7 +10009,7 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
10003
10009
  StateTracker.NO_ACTIVE_EXECUTION = 'noActiveExecution';
10004
10010
  });
10005
10011
 
10006
- },{"./agent-events/agent-events-contracts":47,"./agent-events/cockpit-notifier":54,"./constants/sl-env-vars":69,"./utils/validation-utils":114,"events":311}],105:[function(require,module,exports){
10012
+ },{"./agent-events/agent-events-contracts":47,"./agent-events/cockpit-notifier":54,"./constants/sl-env-vars":69,"./system-date":105,"./utils/validation-utils":114,"events":311}],105:[function(require,module,exports){
10007
10013
  (function (factory) {
10008
10014
  if (typeof module === "object" && typeof module.exports === "object") {
10009
10015
  var v = factory(require, exports);