@intuitionrobotics/testelot 0.41.68 → 0.41.71

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/core/Action.js CHANGED
@@ -16,19 +16,6 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- var __extends = (this && this.__extends) || (function () {
20
- var extendStatics = function (d, b) {
21
- extendStatics = Object.setPrototypeOf ||
22
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24
- return extendStatics(d, b);
25
- };
26
- return function (d, b) {
27
- extendStatics(d, b);
28
- function __() { this.constructor = d; }
29
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30
- };
31
- })();
32
19
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
20
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
21
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -38,40 +25,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
38
25
  step((generator = generator.apply(thisArg, _arguments || [])).next());
39
26
  });
40
27
  };
41
- var __generator = (this && this.__generator) || function (thisArg, body) {
42
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
43
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44
- function verb(n) { return function (v) { return step([n, v]); }; }
45
- function step(op) {
46
- if (f) throw new TypeError("Generator is already executing.");
47
- while (_) try {
48
- 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;
49
- if (y = 0, t) op = [op[0] & 2, t.value];
50
- switch (op[0]) {
51
- case 0: case 1: t = op; break;
52
- case 4: _.label++; return { value: op[1], done: false };
53
- case 5: _.label++; y = op[1]; op = [0]; continue;
54
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
55
- default:
56
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
57
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
58
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
59
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
60
- if (t[2]) _.ops.pop();
61
- _.trys.pop(); continue;
62
- }
63
- op = body.call(thisArg, _);
64
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
65
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
66
- }
67
- };
68
28
  Object.defineProperty(exports, "__esModule", { value: true });
69
29
  exports.Action = exports.Status = void 0;
70
30
  /**
71
31
  * Created by IR on 3/18/17.
72
32
  */
73
- var ts_common_1 = require("@intuitionrobotics/ts-common");
74
- var TestException_1 = require("./TestException");
33
+ const ts_common_1 = require("@intuitionrobotics/ts-common");
34
+ const TestException_1 = require("./TestException");
75
35
  var Status;
76
36
  (function (Status) {
77
37
  Status["Ready"] = "Ready";
@@ -80,202 +40,171 @@ var Status;
80
40
  Status["Success"] = "Success";
81
41
  Status["Error"] = "Error";
82
42
  })(Status = exports.Status || (exports.Status = {}));
83
- var Action = /** @class */ (function (_super) {
84
- __extends(Action, _super);
85
- function Action(actionType, tag) {
86
- var _this = _super.call(this, tag || "Testelot") || this;
87
- _this.uuid = ts_common_1.generateUUID();
88
- _this.label = "Unnamed Action";
89
- _this.policy = 1 /* SkipOnError */;
90
- _this.postExecutionDelay = 0;
91
- _this.status = Status.Ready;
92
- _this.actionType = actionType.name;
93
- return _this;
43
+ class Action extends ts_common_1.Logger {
44
+ constructor(actionType, tag) {
45
+ super(tag || "Testelot");
46
+ this.uuid = ts_common_1.generateUUID();
47
+ this.label = "Unnamed Action";
48
+ this.policy = 1 /* SkipOnError */;
49
+ this.postExecutionDelay = 0;
50
+ this.status = Status.Ready;
51
+ this.actionType = actionType.name;
94
52
  }
95
- Action.resolveTestsToRun = function () {
96
- var strings = process.argv.filter(function (arg) { return arg.includes("--test="); });
97
- console.log("raw: " + ts_common_1.__stringify(strings));
98
- this.testsToRun = strings.map(function (arg) { return arg.replace("--test=", ""); });
99
- console.log("Tests to run: " + ts_common_1.__stringify(this.testsToRun));
100
- };
101
- Action.prototype.expectToFail = function (_exceptionType, assertFailCondition) {
102
- this.shouldFailCondition = function (e) {
103
- var err = ts_common_1.isErrorOfType(e, _exceptionType);
53
+ static resolveTestsToRun() {
54
+ const strings = process.argv.filter((arg) => arg.includes("--test="));
55
+ console.log(`raw: ${ts_common_1.__stringify(strings)}`);
56
+ this.testsToRun = strings.map(arg => arg.replace("--test=", ""));
57
+ console.log(`Tests to run: ${ts_common_1.__stringify(this.testsToRun)}`);
58
+ }
59
+ expectToFail(_exceptionType, assertFailCondition) {
60
+ this.shouldFailCondition = (e) => {
61
+ const err = ts_common_1.isErrorOfType(e, _exceptionType);
104
62
  if (!err)
105
- throw new TestException_1.TestException("Test should have failed with an: " + _exceptionType.name);
63
+ throw new TestException_1.TestException(`Test should have failed with an: ${_exceptionType.name}`);
106
64
  return !assertFailCondition ? true : assertFailCondition(err);
107
65
  };
108
66
  return this;
109
- };
110
- Action.prototype.processReturnValue = function (returnValueProcessor) {
67
+ }
68
+ processReturnValue(returnValueProcessor) {
111
69
  this.assertFailCondition = returnValueProcessor;
112
70
  return this;
113
- };
114
- Action.prototype.isContainer = function () {
71
+ }
72
+ isContainer() {
115
73
  return false;
116
- };
117
- Action.prototype.hasParent = function () {
74
+ }
75
+ hasParent() {
118
76
  return !!this.parent;
119
- };
120
- Action.prototype.setErrorPolicy = function (policy) {
77
+ }
78
+ setErrorPolicy(policy) {
121
79
  this.policy = policy;
122
80
  return this;
123
- };
124
- Action.prototype.setParent = function (parent) {
81
+ }
82
+ setParent(parent) {
125
83
  this.parent = parent;
126
- };
127
- Action.prototype.setReporter = function (reporter) {
84
+ }
85
+ setReporter(reporter) {
128
86
  this.reporter = reporter;
129
- };
130
- Action.prototype.setWriteKey = function (writeKey) {
87
+ }
88
+ setWriteKey(writeKey) {
131
89
  this.writeKey = writeKey;
132
90
  return this;
133
- };
134
- Action.prototype.setReadKey = function (readKey) {
91
+ }
92
+ setReadKey(readKey) {
135
93
  this.readKey = readKey;
136
94
  return this;
137
- };
138
- Action.prototype.setPostExecutionDelay = function (postExecutionDelay) {
95
+ }
96
+ setPostExecutionDelay(postExecutionDelay) {
139
97
  this.postExecutionDelay = postExecutionDelay;
140
98
  return this;
141
- };
142
- Action.prototype.setLabel = function (label) {
99
+ }
100
+ setLabel(label) {
143
101
  this.label = label;
144
102
  return this;
145
- };
146
- Action.prototype.getStarted = function () {
103
+ }
104
+ getStarted() {
147
105
  return this._started;
148
- };
149
- Action.prototype.getEnded = function () {
106
+ }
107
+ getEnded() {
150
108
  return this._ended;
151
- };
152
- Action.prototype._executeSubAction = function (action) {
153
- return __awaiter(this, void 0, void 0, function () {
154
- return __generator(this, function (_a) {
155
- switch (_a.label) {
156
- case 0:
157
- action.setParent(this);
158
- action.setReporter(this.reporter);
159
- return [4 /*yield*/, action._execute()];
160
- case 1:
161
- _a.sent();
162
- return [2 /*return*/];
163
- }
164
- });
109
+ }
110
+ _executeSubAction(action) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ action.setParent(this);
113
+ action.setReporter(this.reporter);
114
+ yield action._execute();
165
115
  });
166
- };
167
- Action.prototype.resolveLabel = function (param) {
116
+ }
117
+ resolveLabel(param) {
168
118
  if (!this.label)
169
119
  return;
170
120
  return typeof this.label === "string" ? this.label : this.label(param);
171
- };
172
- Action.prototype._execute = function () {
121
+ }
122
+ _execute() {
173
123
  var _a, _b;
174
- return __awaiter(this, void 0, void 0, function () {
175
- var label, err, retValue, param, e_1;
176
- return __generator(this, function (_c) {
177
- switch (_c.label) {
178
- case 0:
179
- this._started = ts_common_1.currentTimeMillies();
180
- retValue = undefined;
181
- _c.label = 1;
182
- case 1:
183
- _c.trys.push([1, 6, 7, 8]);
184
- param = void 0;
185
- if (this.readKey)
186
- param = this.get(this.readKey);
187
- label = this.resolveLabel(param);
188
- if (Action.testsToRun.length > 0 && !Action.testsToRun.find(function (testToRun) { return (label || "").includes(testToRun); }))
189
- this.setStatus(Status.Skipped);
190
- else
191
- this.setStatus(Status.Ready);
192
- if (!(this.status === Status.Skipped)) return [3 /*break*/, 4];
193
- if (!this.isContainer()) return [3 /*break*/, 3];
194
- // @ts-ignore
195
- return [4 /*yield*/, this.execute()];
196
- case 2:
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ this._started = ts_common_1.currentTimeMillies();
126
+ let label;
127
+ let err;
128
+ let retValue = undefined;
129
+ try {
130
+ let param;
131
+ if (this.readKey)
132
+ param = this.get(this.readKey);
133
+ label = this.resolveLabel(param);
134
+ if (Action.testsToRun.length > 0 && !Action.testsToRun.find(testToRun => (label || "").includes(testToRun)))
135
+ this.setStatus(Status.Skipped);
136
+ else
137
+ this.setStatus(Status.Ready);
138
+ if (this.status === Status.Skipped) {
139
+ if (this.isContainer())
197
140
  // @ts-ignore
198
- _c.sent();
199
- _c.label = 3;
200
- case 3:
201
- label && this.reporter.logVerbose("skipped: " + label);
202
- this.reporter.onActionEnded(this);
203
- this._ended = ts_common_1.currentTimeMillies();
204
- return [2 /*return*/];
205
- case 4:
206
- if (this.isContainer())
207
- label && this.reporter.logVerbose("+ " + label);
208
- else {
209
- label && this.reporter.logVerbose("Running: " + label);
210
- if (this.readKey)
211
- this.reporter.logDebug("Using context: " + this.readKey.key);
212
- }
213
- this.reporter.onActionStarted(this);
214
- this.setStatus(Status.Running);
215
- return [4 /*yield*/, this.execute((param || ts_common_1.Void))];
216
- case 5:
217
- retValue = _c.sent();
218
- return [3 /*break*/, 8];
219
- case 6:
220
- e_1 = _c.sent();
221
- err = ((_a = this.shouldFailCondition) === null || _a === void 0 ? void 0 : _a.call(this, e_1)) ? undefined : e_1;
222
- return [3 /*break*/, 8];
223
- case 7:
224
- if (this.status !== Status.Skipped) {
225
- this.setStatus(err ? Status.Error : Status.Success);
226
- this.reporter.onActionEnded(this);
227
- if (err) {
228
- label && this.reporter.logError("Error in Action: " + label);
229
- this.reporter.logError(err);
230
- }
231
- else {
232
- // only set the ret value if we expect a success...
233
- if (this.writeKey && !this.shouldFailCondition) {
234
- this.set(this.writeKey, retValue);
235
- }
236
- (_b = this.assertFailCondition) === null || _b === void 0 ? void 0 : _b.call(this, retValue);
237
- // label && this.reporter.logVerbose(`ended: ${label}`);
238
- if (this.isContainer())
239
- label && this.reporter.logVerbose("- " + label);
240
- }
141
+ yield this.execute();
142
+ label && this.reporter.logVerbose(`skipped: ${label}`);
143
+ this.reporter.onActionEnded(this);
144
+ this._ended = ts_common_1.currentTimeMillies();
145
+ return;
146
+ }
147
+ if (this.isContainer())
148
+ label && this.reporter.logVerbose(`+ ${label}`);
149
+ else {
150
+ label && this.reporter.logVerbose(`Running: ${label}`);
151
+ if (this.readKey)
152
+ this.reporter.logDebug(`Using context: ${this.readKey.key}`);
153
+ }
154
+ this.reporter.onActionStarted(this);
155
+ this.setStatus(Status.Running);
156
+ retValue = yield this.execute((param || ts_common_1.Void));
157
+ }
158
+ catch (e) {
159
+ err = ((_a = this.shouldFailCondition) === null || _a === void 0 ? void 0 : _a.call(this, e)) ? undefined : e;
160
+ }
161
+ finally {
162
+ if (this.status !== Status.Skipped) {
163
+ this.setStatus(err ? Status.Error : Status.Success);
164
+ this.reporter.onActionEnded(this);
165
+ if (err) {
166
+ label && this.reporter.logError(`Error in Action: ${label}`);
167
+ this.reporter.logError(err);
168
+ }
169
+ else {
170
+ // only set the ret value if we expect a success...
171
+ if (this.writeKey && !this.shouldFailCondition) {
172
+ this.set(this.writeKey, retValue);
241
173
  }
242
- return [7 /*endfinally*/];
243
- case 8:
244
- if (!(this.postExecutionDelay > 0)) return [3 /*break*/, 10];
245
- return [4 /*yield*/, ts_common_1.timeout(this.postExecutionDelay)];
246
- case 9:
247
- _c.sent();
248
- _c.label = 10;
249
- case 10:
250
- this._ended = ts_common_1.currentTimeMillies();
251
- return [2 /*return*/];
174
+ (_b = this.assertFailCondition) === null || _b === void 0 ? void 0 : _b.call(this, retValue);
175
+ // label && this.reporter.logVerbose(`ended: ${label}`);
176
+ if (this.isContainer())
177
+ label && this.reporter.logVerbose(`- ${label}`);
178
+ }
252
179
  }
253
- });
180
+ }
181
+ if (this.postExecutionDelay > 0)
182
+ yield ts_common_1.timeout(this.postExecutionDelay);
183
+ this._ended = ts_common_1.currentTimeMillies();
254
184
  });
255
- };
256
- Action.prototype.setStatus = function (status) {
185
+ }
186
+ setStatus(status) {
257
187
  this.status = status;
258
- };
259
- Action.prototype.get = function (key) {
188
+ }
189
+ get(key) {
260
190
  if (!this.parent)
261
191
  return key.defaultValue;
262
192
  return this.parent.get(key);
263
- };
264
- Action.prototype.remove = function (key) {
193
+ }
194
+ remove(key) {
265
195
  if (!this.parent)
266
196
  return false;
267
197
  return this.parent.remove(key);
268
- };
269
- Action.prototype.set = function (key, value) {
198
+ }
199
+ set(key, value) {
270
200
  if (!this.parent)
271
201
  return;
272
202
  return this.parent.set(key, value);
273
- };
274
- Action.prototype.reset = function () {
203
+ }
204
+ reset() {
275
205
  //
276
- };
277
- Action.testsToRun = [];
278
- return Action;
279
- }(ts_common_1.Logger));
206
+ }
207
+ }
280
208
  exports.Action = Action;
209
+ Action.testsToRun = [];
281
210
  //# sourceMappingURL=Action.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/main/core/Action.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;GAEG;AACH,0DASsC;AAGtC,iD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AAC;qBACjD;iBACD;aACD;YAED,IAAI,IAAI,CAAC,kBAAkB,GAAG,CAAC;gBAC9B,MAAM,mBAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAExC,IAAI,CAAC,MAAM,GAAG,8BAAkB,EAAE,CAAC;;KACnC;IAED,SAAS,CAAC,MAAc;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAIM,GAAG,CAAY,GAA0B;QAC/C,IAAI,CAAC,IAAI,CAAC,MAAM;YACf,OAAO,GAAG,CAAC,YAAY,CAAC;QAEzB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAES,MAAM,CAAY,GAA0B;QACrD,IAAI,CAAC,IAAI,CAAC,MAAM;YACf,OAAO,KAAK,CAAC;QAEd,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAEM,GAAG,CAAY,GAA0B,EAAE,KAAgB;QACjE,IAAI,CAAC,IAAI,CAAC,MAAM;YACf,OAAO;QAER,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,KAAK;QACJ,EAAE;IACH,CAAC;;AAvNF,wBAwNC;AAtNe,iBAAU,GAAa,EAAE,CAAC"}
@@ -16,19 +16,6 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- var __extends = (this && this.__extends) || (function () {
20
- var extendStatics = function (d, b) {
21
- extendStatics = Object.setPrototypeOf ||
22
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24
- return extendStatics(d, b);
25
- };
26
- return function (d, b) {
27
- extendStatics(d, b);
28
- function __() { this.constructor = d; }
29
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30
- };
31
- })();
32
19
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
20
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
21
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -38,139 +25,88 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
38
25
  step((generator = generator.apply(thisArg, _arguments || [])).next());
39
26
  });
40
27
  };
41
- var __generator = (this && this.__generator) || function (thisArg, body) {
42
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
43
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44
- function verb(n) { return function (v) { return step([n, v]); }; }
45
- function step(op) {
46
- if (f) throw new TypeError("Generator is already executing.");
47
- while (_) try {
48
- 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;
49
- if (y = 0, t) op = [op[0] & 2, t.value];
50
- switch (op[0]) {
51
- case 0: case 1: t = op; break;
52
- case 4: _.label++; return { value: op[1], done: false };
53
- case 5: _.label++; y = op[1]; op = [0]; continue;
54
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
55
- default:
56
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
57
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
58
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
59
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
60
- if (t[2]) _.ops.pop();
61
- _.trys.pop(); continue;
62
- }
63
- op = body.call(thisArg, _);
64
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
65
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
66
- }
67
- };
68
28
  Object.defineProperty(exports, "__esModule", { value: true });
69
29
  exports.Action_Container = void 0;
70
30
  /**
71
31
  * Created by IR on 3/18/17.
72
32
  */
73
- var Action_1 = require("./Action");
74
- var ContainerContext_1 = require("./ContainerContext");
75
- var Action_Container = /** @class */ (function (_super) {
76
- __extends(Action_Container, _super);
77
- function Action_Container(type, tag) {
78
- var _this = _super.call(this, type, tag) || this;
79
- _this.context = new ContainerContext_1.TypedHashMap();
80
- _this.actions = [];
81
- _this.isProxy = false;
82
- return _this;
33
+ const Action_1 = require("./Action");
34
+ const ContainerContext_1 = require("./ContainerContext");
35
+ class Action_Container extends Action_1.Action {
36
+ constructor(type, tag) {
37
+ super(type, tag);
38
+ this.context = new ContainerContext_1.TypedHashMap();
39
+ this.actions = [];
40
+ this.isProxy = false;
83
41
  }
84
- Action_Container.prototype.isContainer = function () {
42
+ isContainer() {
85
43
  return true;
86
- };
87
- Action_Container.prototype.add = function () {
88
- var _a;
89
- var steps = [];
90
- for (var _i = 0; _i < arguments.length; _i++) {
91
- steps[_i] = arguments[_i];
92
- }
93
- (_a = this.actions).push.apply(_a, steps);
44
+ }
45
+ add(...steps) {
46
+ this.actions.push(...steps);
94
47
  return this;
95
- };
96
- Action_Container.prototype.setProxy = function (isProxy) {
48
+ }
49
+ setProxy(isProxy) {
97
50
  this.isProxy = isProxy;
98
51
  return this;
99
- };
100
- Action_Container.prototype.get = function (key) {
52
+ }
53
+ get(key) {
101
54
  if (this.isProxy)
102
- return _super.prototype.get.call(this, key);
103
- var value = this.context.get(key);
55
+ return super.get(key);
56
+ const value = this.context.get(key);
104
57
  if (value)
105
58
  return value;
106
- return _super.prototype.get.call(this, key);
107
- };
108
- Action_Container.prototype.remove = function (key) {
59
+ return super.get(key);
60
+ }
61
+ remove(key) {
109
62
  if (this.isProxy)
110
- return _super.prototype.remove.call(this, key);
111
- var value = this.context.delete(key);
63
+ return super.remove(key);
64
+ const value = this.context.delete(key);
112
65
  if (value)
113
66
  return value;
114
- return _super.prototype.remove.call(this, key);
115
- };
116
- Action_Container.prototype.set = function (key, value) {
67
+ return super.remove(key);
68
+ }
69
+ set(key, value) {
117
70
  if (this.isProxy)
118
- return _super.prototype.set.call(this, key, value);
119
- this.logDebug(" Storing: " + key.key + " => " + JSON.stringify(value));
120
- var prevValue = this.context.get(key);
71
+ return super.set(key, value);
72
+ this.logDebug(` Storing: ${key.key} => ${JSON.stringify(value)}`);
73
+ const prevValue = this.context.get(key);
121
74
  this.context.set(key, value);
122
75
  return prevValue;
123
- };
124
- Action_Container.prototype.getSteps = function () {
76
+ }
77
+ getSteps() {
125
78
  return this.actions;
126
- };
127
- Action_Container.prototype.reset = function () {
79
+ }
80
+ reset() {
128
81
  this.context.clear();
129
- _super.prototype.reset.call(this);
130
- this.actions.forEach(function (action) { return action.reset(); });
131
- };
132
- Action_Container.prototype.execute = function () {
133
- return __awaiter(this, void 0, void 0, function () {
134
- var _i, _a, action;
135
- return __generator(this, function (_b) {
136
- switch (_b.label) {
137
- case 0:
138
- _i = 0, _a = this.actions;
139
- _b.label = 1;
140
- case 1:
141
- if (!(_i < _a.length)) return [3 /*break*/, 4];
142
- action = _a[_i];
143
- if (this.status !== Action_1.Status.Running)
144
- action.setStatus(Action_1.Status.Skipped);
145
- return [4 /*yield*/, this._executeSubAction(action)];
146
- case 2:
147
- _b.sent();
148
- if (action.status !== Action_1.Status.Error)
149
- return [3 /*break*/, 3];
150
- // noinspection FallThroughInSwitchStatementJS
151
- switch (action.policy) {
152
- case 0 /* ContinueOnError */:
153
- return [3 /*break*/, 3];
154
- case 2 /* HaltOnError */:
155
- this.setErrorPolicy(1 /* SkipOnError */);
156
- this.setStatus(Action_1.Status.Error);
157
- case 1 /* SkipOnError */:
158
- this.setStatus(Action_1.Status.Skipped);
159
- break;
160
- }
161
- _b.label = 3;
162
- case 3:
163
- _i++;
164
- return [3 /*break*/, 1];
165
- case 4: return [2 /*return*/];
82
+ super.reset();
83
+ this.actions.forEach(action => action.reset());
84
+ }
85
+ execute() {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ for (const action of this.actions) {
88
+ if (this.status !== Action_1.Status.Running)
89
+ action.setStatus(Action_1.Status.Skipped);
90
+ yield this._executeSubAction(action);
91
+ if (action.status !== Action_1.Status.Error)
92
+ continue;
93
+ // noinspection FallThroughInSwitchStatementJS
94
+ switch (action.policy) {
95
+ case 0 /* ContinueOnError */:
96
+ continue;
97
+ case 2 /* HaltOnError */:
98
+ this.setErrorPolicy(1 /* SkipOnError */);
99
+ this.setStatus(Action_1.Status.Error);
100
+ case 1 /* SkipOnError */:
101
+ this.setStatus(Action_1.Status.Skipped);
102
+ break;
166
103
  }
167
- });
104
+ }
168
105
  });
169
- };
170
- Action_Container.prototype.isEmpty = function () {
106
+ }
107
+ isEmpty() {
171
108
  return this.actions && this.actions.length === 0;
172
- };
173
- return Action_Container;
174
- }(Action_1.Action));
109
+ }
110
+ }
175
111
  exports.Action_Container = Action_Container;
176
112
  //# sourceMappingURL=Action_Container.js.map