@opentap/runner-client 2.19.0-alpha.1.4 → 2.20.0-alpha.1.2

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.
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __extends = (this && this.__extends) || (function () {
2
3
  var extendStatics = function (d, b) {
3
4
  extendStatics = Object.setPrototypeOf ||
@@ -13,8 +14,10 @@ var __extends = (this && this.__extends) || (function () {
13
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
15
  };
15
16
  })();
16
- import { Image, RepositoryPackageReference, Session } from './DTOs';
17
- import { BaseClient } from './BaseClient';
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RunnerClient = void 0;
19
+ var DTOs_1 = require("./DTOs");
20
+ var BaseClient_1 = require("./BaseClient");
18
21
  var RunnerClient = /** @class */ (function (_super) {
19
22
  __extends(RunnerClient, _super);
20
23
  function RunnerClient(baseSubject, options) {
@@ -26,7 +29,7 @@ var RunnerClient = /** @class */ (function (_super) {
26
29
  created with the base image and base settings. */
27
30
  startSession: function (testPlanRepositoryReference, timeout) {
28
31
  return _this.request('StartDefaultSession', testPlanRepositoryReference !== null && testPlanRepositoryReference !== void 0 ? testPlanRepositoryReference : null, { timeout: timeout })
29
- .then(function (sessionJs) { return Session.fromJS(sessionJs); })
32
+ .then(function (sessionJs) { return DTOs_1.Session.fromJS(sessionJs); })
30
33
  .then(_this.success())
31
34
  .catch(_this.error());
32
35
  },
@@ -41,7 +44,7 @@ var RunnerClient = /** @class */ (function (_super) {
41
44
  imageOverride: imageOverride !== null && imageOverride !== void 0 ? imageOverride : null,
42
45
  };
43
46
  return _this.request('StartDefaultSessionOverrideImage', defaultSessionRequest, { timeout: timeout })
44
- .then(function (sessionJs) { return Session.fromJS(sessionJs); })
47
+ .then(function (sessionJs) { return DTOs_1.Session.fromJS(sessionJs); })
45
48
  .then(_this.success())
46
49
  .catch(_this.error());
47
50
  },
@@ -49,7 +52,7 @@ var RunnerClient = /** @class */ (function (_super) {
49
52
  creation process */
50
53
  getImage: function () {
51
54
  return _this.request('GetDefaultImage')
52
- .then(function (imageJs) { return Image.fromJS(imageJs); })
55
+ .then(function (imageJs) { return DTOs_1.Image.fromJS(imageJs); })
53
56
  .then(_this.success())
54
57
  .catch(_this.error());
55
58
  },
@@ -57,7 +60,7 @@ var RunnerClient = /** @class */ (function (_super) {
57
60
  base image */
58
61
  setImage: function (image) {
59
62
  return _this.request('SetDefaultImage', image)
60
- .then(function (imageJs) { return Image.fromJS(imageJs); })
63
+ .then(function (imageJs) { return DTOs_1.Image.fromJS(imageJs); })
61
64
  .then(_this.success())
62
65
  .catch(_this.error());
63
66
  },
@@ -66,7 +69,7 @@ var RunnerClient = /** @class */ (function (_super) {
66
69
  getSettings: function () {
67
70
  return _this.request('GetDefaultSettings')
68
71
  .then(function (repositoryPackageReferenceJs) {
69
- return repositoryPackageReferenceJs ? RepositoryPackageReference.fromJS(repositoryPackageReferenceJs) : undefined;
72
+ return repositoryPackageReferenceJs ? DTOs_1.RepositoryPackageReference.fromJS(repositoryPackageReferenceJs) : undefined;
70
73
  })
71
74
  .then(_this.success())
72
75
  .catch(_this.error());
@@ -87,7 +90,7 @@ var RunnerClient = /** @class */ (function (_super) {
87
90
  RunnerClient.prototype.getImage = function (imageId) {
88
91
  return (imageId === null || imageId === void 0 ? void 0 : imageId.length) > 0
89
92
  ? this.request('GetImage', imageId)
90
- .then(function (imageJs) { return Image.fromJS(imageJs); })
93
+ .then(function (imageJs) { return DTOs_1.Image.fromJS(imageJs); })
91
94
  .then(this.success())
92
95
  .catch(this.error())
93
96
  : Promise.reject('imageId is not defined');
@@ -98,7 +101,7 @@ var RunnerClient = /** @class */ (function (_super) {
98
101
  */
99
102
  RunnerClient.prototype.getImages = function () {
100
103
  return this.request('GetImages')
101
- .then(function (imageArrayJs) { return imageArrayJs.map(function (imageJs) { return Image.fromJS(imageJs); }); })
104
+ .then(function (imageArrayJs) { return imageArrayJs.map(function (imageJs) { return DTOs_1.Image.fromJS(imageJs); }); })
102
105
  .then(this.success())
103
106
  .catch(this.error());
104
107
  };
@@ -108,7 +111,7 @@ var RunnerClient = /** @class */ (function (_super) {
108
111
  */
109
112
  RunnerClient.prototype.getSessions = function () {
110
113
  return this.request('GetSessions')
111
- .then(function (sessionArrayJs) { return sessionArrayJs.map(function (sessionJs) { return Session.fromJS(sessionJs); }); })
114
+ .then(function (sessionArrayJs) { return sessionArrayJs.map(function (sessionJs) { return DTOs_1.Session.fromJS(sessionJs); }); })
112
115
  .then(this.success())
113
116
  .catch(this.error());
114
117
  };
@@ -121,7 +124,7 @@ var RunnerClient = /** @class */ (function (_super) {
121
124
  RunnerClient.prototype.resolveImage = function (images, timeout) {
122
125
  return (images === null || images === void 0 ? void 0 : images.length) > 0
123
126
  ? this.request('ResolveImage', images, { timeout: timeout })
124
- .then(function (imageJs) { return Image.fromJS(imageJs); })
127
+ .then(function (imageJs) { return DTOs_1.Image.fromJS(imageJs); })
125
128
  .then(this.success())
126
129
  .catch(this.error())
127
130
  : Promise.reject('images list is not defined or is empty');
@@ -135,7 +138,7 @@ var RunnerClient = /** @class */ (function (_super) {
135
138
  RunnerClient.prototype.resolveImageDryRun = function (images, timeout) {
136
139
  return (images === null || images === void 0 ? void 0 : images.length) > 0
137
140
  ? this.request('ResolveImageDryRun', images, { timeout: timeout })
138
- .then(function (imageJs) { return Image.fromJS(imageJs); })
141
+ .then(function (imageJs) { return DTOs_1.Image.fromJS(imageJs); })
139
142
  .then(this.success())
140
143
  .catch(this.error())
141
144
  : Promise.reject('images list is not defined or is empty');
@@ -156,7 +159,7 @@ var RunnerClient = /** @class */ (function (_super) {
156
159
  */
157
160
  RunnerClient.prototype.startSession = function () {
158
161
  return this.request('StartSession')
159
- .then(function (sessionJs) { return Session.fromJS(sessionJs); })
162
+ .then(function (sessionJs) { return DTOs_1.Session.fromJS(sessionJs); })
160
163
  .then(this.success())
161
164
  .catch(this.error());
162
165
  };
@@ -166,7 +169,7 @@ var RunnerClient = /** @class */ (function (_super) {
166
169
  */
167
170
  RunnerClient.prototype.getSessionManagerImage = function () {
168
171
  return this.request('GetSessionManagerImage')
169
- .then(function (imageJs) { return Image.fromJS(imageJs); })
172
+ .then(function (imageJs) { return DTOs_1.Image.fromJS(imageJs); })
170
173
  .then(this.success())
171
174
  .catch(this.error());
172
175
  };
@@ -178,7 +181,7 @@ var RunnerClient = /** @class */ (function (_super) {
178
181
  RunnerClient.prototype.startImageSession = function (image) {
179
182
  return image
180
183
  ? this.request('StartImageSession', image)
181
- .then(function (sessionJs) { return Session.fromJS(sessionJs); })
184
+ .then(function (sessionJs) { return DTOs_1.Session.fromJS(sessionJs); })
182
185
  .then(this.success())
183
186
  .catch(this.error())
184
187
  : Promise.reject('image is not defined');
@@ -192,5 +195,5 @@ var RunnerClient = /** @class */ (function (_super) {
192
195
  return this.request('UpdateRunner', runnerUpdateRequest).then(this.success()).catch(this.error());
193
196
  };
194
197
  return RunnerClient;
195
- }(BaseClient));
196
- export { RunnerClient };
198
+ }(BaseClient_1.BaseClient));
199
+ exports.RunnerClient = RunnerClient;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __extends = (this && this.__extends) || (function () {
2
3
  var extendStatics = function (d, b) {
3
4
  extendStatics = Object.setPrototypeOf ||
@@ -24,10 +25,11 @@ var __assign = (this && this.__assign) || function () {
24
25
  };
25
26
  return __assign.apply(this, arguments);
26
27
  };
27
- import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, Result, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog, } from './DTOs';
28
- import { JSONCodec } from 'nats.ws';
29
- import { BaseClient } from './BaseClient';
30
- import { Subject } from 'rxjs';
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.SessionClient = void 0;
30
+ var DTOs_1 = require("./DTOs");
31
+ var nats_ws_1 = require("nats.ws");
32
+ var BaseClient_1 = require("./BaseClient");
31
33
  var SessionClient = /** @class */ (function (_super) {
32
34
  __extends(SessionClient, _super);
33
35
  function SessionClient(baseSubject, options) {
@@ -47,9 +49,9 @@ var SessionClient = /** @class */ (function (_super) {
47
49
  return;
48
50
  }
49
51
  try {
50
- var jsonCodec = JSONCodec();
52
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
51
53
  var logListJson = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
52
- var logList = LogList.fromJS(logListJson);
54
+ var logList = DTOs_1.LogList.fromJS(logListJson);
53
55
  sessionLogsHandler(logList, error);
54
56
  }
55
57
  catch (error) {
@@ -69,9 +71,9 @@ var SessionClient = /** @class */ (function (_super) {
69
71
  return;
70
72
  }
71
73
  try {
72
- var jsonCodec = JSONCodec();
74
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
73
75
  var sessionEventJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
74
- var sessionEvent = SessionEvent.fromJS(sessionEventJs);
76
+ var sessionEvent = DTOs_1.SessionEvent.fromJS(sessionEventJs);
75
77
  eventHandler(sessionEvent, error);
76
78
  }
77
79
  catch (error) {
@@ -88,45 +90,36 @@ var SessionClient = /** @class */ (function (_super) {
88
90
  * @returns Subscription array: Result and Test Run subscriptions
89
91
  */
90
92
  SessionClient.prototype.connectSessionResults = function (resultHandler, testRunHandler, options) {
91
- var jsonCodec = JSONCodec();
92
- var resultSubject = new Subject();
93
- var testRunSubject = new Subject();
94
- resultSubject.subscribe(function (_a) {
95
- var error = _a.error, msg = _a.msg;
96
- if (error) {
97
- resultHandler(undefined, error);
98
- return;
99
- }
100
- try {
101
- var resultJs = jsonCodec.decode(msg === null || msg === void 0 ? void 0 : msg.data);
102
- var result = Result.fromJS(resultJs);
103
- resultHandler(result, error);
104
- }
105
- catch (error) {
106
- resultHandler(undefined, error);
107
- }
108
- });
109
- testRunSubject.subscribe(function (_a) {
110
- var error = _a.error, msg = _a.msg;
111
- if (error) {
112
- testRunHandler(undefined, error);
113
- return;
114
- }
115
- try {
116
- var testRunJs = jsonCodec.decode(msg === null || msg === void 0 ? void 0 : msg.data);
117
- var testRun = TestRun.fromJS(testRunJs);
118
- testRunHandler(testRun, error);
119
- }
120
- catch (error) {
121
- testRunHandler(undefined, error);
122
- }
123
- });
124
93
  return [
125
- this.subscribe('OnResult', __assign(__assign({}, options), { callback: function (error, msg) {
126
- resultSubject.next({ error: error, msg: msg });
94
+ this.subscribe('OnResult', __assign(__assign({}, options), { callback: function (error, encodedMessage) {
95
+ if (error) {
96
+ resultHandler(undefined, error);
97
+ return;
98
+ }
99
+ try {
100
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
101
+ var resultJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
102
+ var result = DTOs_1.Result.fromJS(resultJs);
103
+ resultHandler(result, error);
104
+ }
105
+ catch (error) {
106
+ resultHandler(undefined, error);
107
+ }
127
108
  } })),
128
- this.subscribe('OnTestRun', __assign(__assign({}, options), { callback: function (error, msg) {
129
- testRunSubject.next({ error: error, msg: msg });
109
+ this.subscribe('OnTestRun', __assign(__assign({}, options), { callback: function (error, encodedMessage) {
110
+ if (error) {
111
+ testRunHandler(undefined, error);
112
+ return;
113
+ }
114
+ try {
115
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
116
+ var testRunJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
117
+ var testRun = DTOs_1.TestRun.fromJS(testRunJs);
118
+ testRunHandler(testRun, error);
119
+ }
120
+ catch (error) {
121
+ testRunHandler(undefined, error);
122
+ }
130
123
  } })),
131
124
  ];
132
125
  };
@@ -150,7 +143,7 @@ var SessionClient = /** @class */ (function (_super) {
150
143
  SessionClient.prototype.getSessionLogs = function (id, levels, excludedSources, filterText, offset, limit) {
151
144
  var getSessionLogsRequest = { id: id, levels: levels, excludedSources: excludedSources, filterText: filterText, offset: offset, limit: limit };
152
145
  return this.request('GetSessionLogs', getSessionLogsRequest)
153
- .then(function (logListJs) { return LogList.fromJS(logListJs); })
146
+ .then(function (logListJs) { return DTOs_1.LogList.fromJS(logListJs); })
154
147
  .then(this.success())
155
148
  .catch(this.error());
156
149
  };
@@ -197,7 +190,7 @@ var SessionClient = /** @class */ (function (_super) {
197
190
  */
198
191
  SessionClient.prototype.getStatus = function (timeout) {
199
192
  return this.request('GetStatus', timeout)
200
- .then(function (runStatusJs) { return RunStatus.fromJS(runStatusJs); })
193
+ .then(function (runStatusJs) { return DTOs_1.RunStatus.fromJS(runStatusJs); })
201
194
  .then(this.success())
202
195
  .catch(this.error());
203
196
  };
@@ -254,7 +247,7 @@ var SessionClient = /** @class */ (function (_super) {
254
247
  */
255
248
  SessionClient.prototype.resourcesOpen = function () {
256
249
  return this.request('ResourcesOpen')
257
- .then(function (testPlanJs) { return TestPlan.fromJS(testPlanJs); })
250
+ .then(function (testPlanJs) { return DTOs_1.TestPlan.fromJS(testPlanJs); })
258
251
  .then(this.success())
259
252
  .catch(this.error());
260
253
  };
@@ -264,7 +257,7 @@ var SessionClient = /** @class */ (function (_super) {
264
257
  */
265
258
  SessionClient.prototype.resourcesClose = function () {
266
259
  return this.request('ResourcesClose')
267
- .then(function (testPlanJs) { return TestPlan.fromJS(testPlanJs); })
260
+ .then(function (testPlanJs) { return DTOs_1.TestPlan.fromJS(testPlanJs); })
268
261
  .then(this.success())
269
262
  .catch(this.error());
270
263
  };
@@ -275,7 +268,7 @@ var SessionClient = /** @class */ (function (_super) {
275
268
  */
276
269
  SessionClient.prototype.getSettings = function (contextId) {
277
270
  return this.request('GetSettings', contextId)
278
- .then(function (settingArrayJs) { return settingArrayJs.map(function (settingJs) { return Setting.fromJS(settingJs); }); })
271
+ .then(function (settingArrayJs) { return settingArrayJs.map(function (settingJs) { return DTOs_1.Setting.fromJS(settingJs); }); })
279
272
  .then(this.success())
280
273
  .catch(this.error());
281
274
  };
@@ -288,7 +281,7 @@ var SessionClient = /** @class */ (function (_super) {
288
281
  SessionClient.prototype.setSettings = function (contextId, settings) {
289
282
  var setSettingsRequest = { contextId: contextId, settings: settings };
290
283
  return this.request('SetSettings', setSettingsRequest)
291
- .then(function (settingArrayJs) { return settingArrayJs.map(function (settingJs) { return Setting.fromJS(settingJs); }); })
284
+ .then(function (settingArrayJs) { return settingArrayJs.map(function (settingJs) { return DTOs_1.Setting.fromJS(settingJs); }); })
292
285
  .then(this.success())
293
286
  .catch(this.error());
294
287
  };
@@ -299,7 +292,7 @@ var SessionClient = /** @class */ (function (_super) {
299
292
  */
300
293
  SessionClient.prototype.getTestPlan = function (properties) {
301
294
  return this.request('GetTestPlan', properties)
302
- .then(function (testPlanJs) { return TestPlan.fromJS(testPlanJs); })
295
+ .then(function (testPlanJs) { return DTOs_1.TestPlan.fromJS(testPlanJs); })
303
296
  .then(this.success())
304
297
  .catch(this.error());
305
298
  };
@@ -310,7 +303,7 @@ var SessionClient = /** @class */ (function (_super) {
310
303
  */
311
304
  SessionClient.prototype.setTestPlan = function (plan) {
312
305
  return this.request('SetTestPlan', plan)
313
- .then(function (testPlanJs) { return TestPlan.fromJS(testPlanJs); })
306
+ .then(function (testPlanJs) { return DTOs_1.TestPlan.fromJS(testPlanJs); })
314
307
  .then(this.success())
315
308
  .catch(this.error());
316
309
  };
@@ -329,7 +322,7 @@ var SessionClient = /** @class */ (function (_super) {
329
322
  SessionClient.prototype.getValidationErrors = function () {
330
323
  return this.request('GetValidationErrors')
331
324
  .then(function (testStepValidationErrorArrayJs) {
332
- return testStepValidationErrorArrayJs.map(function (testStepValidationErrorJs) { return TestStepValidationError.fromJS(testStepValidationErrorJs); });
325
+ return testStepValidationErrorArrayJs.map(function (testStepValidationErrorJs) { return DTOs_1.TestStepValidationError.fromJS(testStepValidationErrorJs); });
333
326
  })
334
327
  .then(this.success())
335
328
  .catch(this.error());
@@ -341,7 +334,7 @@ var SessionClient = /** @class */ (function (_super) {
341
334
  */
342
335
  SessionClient.prototype.commonStepSettings = function (commonSettings) {
343
336
  return this.request('CommonStepSettings', commonSettings)
344
- .then(function (commonSettingsJs) { return CommonSettings.fromJS(commonSettingsJs); })
337
+ .then(function (commonSettingsJs) { return DTOs_1.CommonSettings.fromJS(commonSettingsJs); })
345
338
  .then(this.success())
346
339
  .catch(this.error());
347
340
  };
@@ -354,7 +347,7 @@ var SessionClient = /** @class */ (function (_super) {
354
347
  SessionClient.prototype.commonStepSettingsContextMenu = function (propertyName, commonContext) {
355
348
  var commonStepSettingsContextRequest = { propertyName: propertyName, commonContext: commonContext };
356
349
  return this.request('CommonStepSettingsContextMenu', commonStepSettingsContextRequest)
357
- .then(function (commonContextJs) { return CommonContext.fromJS(commonContextJs); })
350
+ .then(function (commonContextJs) { return DTOs_1.CommonContext.fromJS(commonContextJs); })
358
351
  .then(this.success())
359
352
  .catch(this.error());
360
353
  };
@@ -372,7 +365,7 @@ var SessionClient = /** @class */ (function (_super) {
372
365
  */
373
366
  SessionClient.prototype.getUserInput = function (id) {
374
367
  return this.request('GetUserInput', id)
375
- .then(function (interactionJs) { return Interaction.fromJS(interactionJs); })
368
+ .then(function (interactionJs) { return DTOs_1.Interaction.fromJS(interactionJs); })
376
369
  .then(this.success())
377
370
  .catch(this.error());
378
371
  };
@@ -383,7 +376,7 @@ var SessionClient = /** @class */ (function (_super) {
383
376
  */
384
377
  SessionClient.prototype.setUserInput = function (interaction) {
385
378
  return this.request('SetUserInput', interaction)
386
- .then(function (interactionJs) { return Interaction.fromJS(interactionJs); })
379
+ .then(function (interactionJs) { return DTOs_1.Interaction.fromJS(interactionJs); })
387
380
  .then(this.success())
388
381
  .catch(this.error());
389
382
  };
@@ -399,7 +392,7 @@ var SessionClient = /** @class */ (function (_super) {
399
392
  propertyName: propertyName,
400
393
  };
401
394
  return this.request('GetContextMenu', propertyReferenceRequest)
402
- .then(function (settingArrayJs) { return settingArrayJs.map(function (settingJs) { return Setting.fromJS(settingJs); }); })
395
+ .then(function (settingArrayJs) { return settingArrayJs.map(function (settingJs) { return DTOs_1.Setting.fromJS(settingJs); }); })
403
396
  .then(this.success())
404
397
  .catch(this.error());
405
398
  };
@@ -417,7 +410,7 @@ var SessionClient = /** @class */ (function (_super) {
417
410
  contextMenu: contextMenu,
418
411
  };
419
412
  return this.request('SetContextMenu', setContextMenuRequest)
420
- .then(function (settingArrayJs) { return settingArrayJs.map(function (settingJs) { return Setting.fromJS(settingJs); }); })
413
+ .then(function (settingArrayJs) { return settingArrayJs.map(function (settingJs) { return DTOs_1.Setting.fromJS(settingJs); }); })
421
414
  .then(this.success())
422
415
  .catch(this.error());
423
416
  };
@@ -433,7 +426,7 @@ var SessionClient = /** @class */ (function (_super) {
433
426
  propertyName: propertyName,
434
427
  };
435
428
  return this.request('GetDataGrid', propertyReferenceRequest)
436
- .then(function (dataGridControlJs) { return DataGridControl.fromJS(dataGridControlJs); })
429
+ .then(function (dataGridControlJs) { return DTOs_1.DataGridControl.fromJS(dataGridControlJs); })
437
430
  .then(this.success())
438
431
  .catch(this.error());
439
432
  };
@@ -444,7 +437,7 @@ var SessionClient = /** @class */ (function (_super) {
444
437
  SessionClient.prototype.setDataGrid = function (contextId, propertyName, dataGridControl) {
445
438
  var setDataGridRequest = { contextId: contextId, propertyName: propertyName, dataGridControl: dataGridControl };
446
439
  return this.request('SetDataGrid', setDataGridRequest)
447
- .then(function (dataGridControlJs) { return DataGridControl.fromJS(dataGridControlJs); })
440
+ .then(function (dataGridControlJs) { return DTOs_1.DataGridControl.fromJS(dataGridControlJs); })
448
441
  .then(this.success())
449
442
  .catch(this.error());
450
443
  };
@@ -462,7 +455,7 @@ var SessionClient = /** @class */ (function (_super) {
462
455
  typeName: typeName,
463
456
  };
464
457
  return this.request('AddDataGridItemType', addDataGridItemTypeRequest)
465
- .then(function (dataGridControlJs) { return DataGridControl.fromJS(dataGridControlJs); })
458
+ .then(function (dataGridControlJs) { return DTOs_1.DataGridControl.fromJS(dataGridControlJs); })
466
459
  .then(this.success())
467
460
  .catch(this.error());
468
461
  };
@@ -478,7 +471,7 @@ var SessionClient = /** @class */ (function (_super) {
478
471
  propertyName: propertyName,
479
472
  };
480
473
  return this.request('AddDataGridItem', propertyReferenceRequest)
481
- .then(function (dataGridControlJs) { return DataGridControl.fromJS(dataGridControlJs); })
474
+ .then(function (dataGridControlJs) { return DTOs_1.DataGridControl.fromJS(dataGridControlJs); })
482
475
  .then(this.success())
483
476
  .catch(this.error());
484
477
  };
@@ -494,7 +487,7 @@ var SessionClient = /** @class */ (function (_super) {
494
487
  propertyName: propertyName,
495
488
  };
496
489
  return this.request('GetDataGridTypes', propertyReferenceRequest)
497
- .then(function (listItemTypeArrayJs) { return listItemTypeArrayJs.map(function (listItemTypeJs) { return ListItemType.fromJS(listItemTypeJs); }); })
490
+ .then(function (listItemTypeArrayJs) { return listItemTypeArrayJs.map(function (listItemTypeJs) { return DTOs_1.ListItemType.fromJS(listItemTypeJs); }); })
498
491
  .then(this.success())
499
492
  .catch(this.error());
500
493
  };
@@ -504,7 +497,7 @@ var SessionClient = /** @class */ (function (_super) {
504
497
  */
505
498
  SessionClient.prototype.getStepTypes = function () {
506
499
  return this.request('GetStepTypes')
507
- .then(function (testStepTypeArrayJs) { return testStepTypeArrayJs.map(function (testStepTypeJs) { return TestStepType.fromJS(testStepTypeJs); }); })
500
+ .then(function (testStepTypeArrayJs) { return testStepTypeArrayJs.map(function (testStepTypeJs) { return DTOs_1.TestStepType.fromJS(testStepTypeJs); }); })
508
501
  .then(this.success())
509
502
  .catch(this.error());
510
503
  };
@@ -519,7 +512,7 @@ var SessionClient = /** @class */ (function (_super) {
519
512
  */
520
513
  SessionClient.prototype.getBreakpoints = function () {
521
514
  return this.request('GetBreakpoints')
522
- .then(function (breakPointsJs) { return BreakPoints.fromJS(breakPointsJs); })
515
+ .then(function (breakPointsJs) { return DTOs_1.BreakPoints.fromJS(breakPointsJs); })
523
516
  .then(this.success())
524
517
  .catch(this.error());
525
518
  };
@@ -530,7 +523,7 @@ var SessionClient = /** @class */ (function (_super) {
530
523
  */
531
524
  SessionClient.prototype.setBreakpoints = function (breakPointsDto) {
532
525
  return this.request('SetBreakpoints', breakPointsDto)
533
- .then(function (breakPointsJs) { return BreakPoints.fromJS(breakPointsJs); })
526
+ .then(function (breakPointsJs) { return DTOs_1.BreakPoints.fromJS(breakPointsJs); })
534
527
  .then(this.success())
535
528
  .catch(this.error());
536
529
  };
@@ -548,7 +541,7 @@ var SessionClient = /** @class */ (function (_super) {
548
541
  */
549
542
  SessionClient.prototype.runTestPlan = function (parameters) {
550
543
  return this.request('RunTestPlan', parameters)
551
- .then(function (runStatusJs) { return RunStatus.fromJS(runStatusJs); })
544
+ .then(function (runStatusJs) { return DTOs_1.RunStatus.fromJS(runStatusJs); })
552
545
  .then(this.success())
553
546
  .catch(this.error());
554
547
  };
@@ -569,7 +562,7 @@ var SessionClient = /** @class */ (function (_super) {
569
562
  */
570
563
  SessionClient.prototype.getImage = function () {
571
564
  return this.request('GetImage')
572
- .then(function (imageJs) { return Image.fromJS(imageJs); })
565
+ .then(function (imageJs) { return DTOs_1.Image.fromJS(imageJs); })
573
566
  .then(this.success())
574
567
  .catch(this.error());
575
568
  };
@@ -584,7 +577,7 @@ var SessionClient = /** @class */ (function (_super) {
584
577
  */
585
578
  SessionClient.prototype.getWatchDog = function () {
586
579
  return this.request('GetWatchDog')
587
- .then(function (watchDogJs) { return WatchDog.fromJS(watchDogJs); })
580
+ .then(function (watchDogJs) { return DTOs_1.WatchDog.fromJS(watchDogJs); })
588
581
  .then(this.success())
589
582
  .catch(this.error());
590
583
  };
@@ -594,7 +587,7 @@ var SessionClient = /** @class */ (function (_super) {
594
587
  */
595
588
  SessionClient.prototype.setWatchDog = function (watchDog) {
596
589
  return this.request('SetWatchDog', watchDog)
597
- .then(function (watchDogJs) { return WatchDog.fromJS(watchDogJs); })
590
+ .then(function (watchDogJs) { return DTOs_1.WatchDog.fromJS(watchDogJs); })
598
591
  .then(this.success())
599
592
  .catch(this.error());
600
593
  };
@@ -605,5 +598,5 @@ var SessionClient = /** @class */ (function (_super) {
605
598
  return this.request('GetSettingsTypes').then(this.success()).catch(this.error());
606
599
  };
607
600
  return SessionClient;
608
- }(BaseClient));
609
- export { SessionClient };
601
+ }(BaseClient_1.BaseClient));
602
+ exports.SessionClient = SessionClient;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __extends = (this && this.__extends) || (function () {
2
3
  var extendStatics = function (d, b) {
3
4
  extendStatics = Object.setPrototypeOf ||
@@ -24,9 +25,11 @@ var __assign = (this && this.__assign) || function () {
24
25
  };
25
26
  return __assign.apply(this, arguments);
26
27
  };
27
- import { JSONCodec } from 'nats.ws';
28
- import { RunnerEvent, TestPlanRunCompletedEventArgs, TestPlanRunStartEventArgs, TestStepRunCompletedEventArgs, TestStepRunStartEventArgs, } from './DTOs';
29
- import { BaseClient } from './BaseClient';
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.SystemClient = void 0;
30
+ var nats_ws_1 = require("nats.ws");
31
+ var DTOs_1 = require("./DTOs");
32
+ var BaseClient_1 = require("./BaseClient");
30
33
  var SystemClient = /** @class */ (function (_super) {
31
34
  __extends(SystemClient, _super);
32
35
  function SystemClient(baseSubject, options) {
@@ -47,7 +50,7 @@ var SystemClient = /** @class */ (function (_super) {
47
50
  return;
48
51
  }
49
52
  try {
50
- var jsonCodec = JSONCodec();
53
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
51
54
  var data = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
52
55
  listener(null, data);
53
56
  }
@@ -72,8 +75,8 @@ var SystemClient = /** @class */ (function (_super) {
72
75
  return;
73
76
  }
74
77
  try {
75
- var jsonCodec = JSONCodec();
76
- var data = RunnerEvent.fromJS(jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data));
78
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
79
+ var data = DTOs_1.RunnerEvent.fromJS(jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data));
77
80
  listener(null, data);
78
81
  }
79
82
  catch (error) {
@@ -98,9 +101,9 @@ var SystemClient = /** @class */ (function (_super) {
98
101
  return;
99
102
  }
100
103
  try {
101
- var jsonCodec = JSONCodec();
104
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
102
105
  var testStepRunStartEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
103
- var testStepRunStartEventArgs = TestStepRunStartEventArgs.fromJS(testStepRunStartEventArgsJs);
106
+ var testStepRunStartEventArgs = DTOs_1.TestStepRunStartEventArgs.fromJS(testStepRunStartEventArgsJs);
104
107
  listener(null, testStepRunStartEventArgs);
105
108
  }
106
109
  catch (error) {
@@ -125,9 +128,9 @@ var SystemClient = /** @class */ (function (_super) {
125
128
  return;
126
129
  }
127
130
  try {
128
- var jsonCodec = JSONCodec();
131
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
129
132
  var testStepRunCompletedEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
130
- var testStepRunCompletedEventArgs = TestStepRunCompletedEventArgs.fromJS(testStepRunCompletedEventArgsJs);
133
+ var testStepRunCompletedEventArgs = DTOs_1.TestStepRunCompletedEventArgs.fromJS(testStepRunCompletedEventArgsJs);
131
134
  listener(null, testStepRunCompletedEventArgs);
132
135
  }
133
136
  catch (error) {
@@ -152,9 +155,9 @@ var SystemClient = /** @class */ (function (_super) {
152
155
  return;
153
156
  }
154
157
  try {
155
- var jsonCodec = JSONCodec();
158
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
156
159
  var testPlanRunStartEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
157
- var testPlanRunStartEventArgs = TestPlanRunStartEventArgs.fromJS(testPlanRunStartEventArgsJs);
160
+ var testPlanRunStartEventArgs = DTOs_1.TestPlanRunStartEventArgs.fromJS(testPlanRunStartEventArgsJs);
158
161
  listener(null, testPlanRunStartEventArgs);
159
162
  }
160
163
  catch (error) {
@@ -179,9 +182,9 @@ var SystemClient = /** @class */ (function (_super) {
179
182
  return;
180
183
  }
181
184
  try {
182
- var jsonCodec = JSONCodec();
185
+ var jsonCodec = (0, nats_ws_1.JSONCodec)();
183
186
  var testPlanRunCompletedEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
184
- var testPlanRunCompletedEventArgs = TestPlanRunCompletedEventArgs.fromJS(testPlanRunCompletedEventArgsJs);
187
+ var testPlanRunCompletedEventArgs = DTOs_1.TestPlanRunCompletedEventArgs.fromJS(testPlanRunCompletedEventArgsJs);
185
188
  listener(null, testPlanRunCompletedEventArgs);
186
189
  }
187
190
  catch (error) {
@@ -190,5 +193,5 @@ var SystemClient = /** @class */ (function (_super) {
190
193
  } }));
191
194
  };
192
195
  return SystemClient;
193
- }(BaseClient));
194
- export { SystemClient };
196
+ }(BaseClient_1.BaseClient));
197
+ exports.SystemClient = SystemClient;
package/lib/index.js CHANGED
@@ -1,5 +1,25 @@
1
- export { RunnerClient } from './RunnerClient';
2
- export { SessionClient } from './SessionClient';
3
- export { SystemClient } from './SystemClient';
4
- export * from './DTOs';
5
- export * from 'nats.ws';
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.SystemClient = exports.SessionClient = exports.RunnerClient = void 0;
18
+ var RunnerClient_1 = require("./RunnerClient");
19
+ Object.defineProperty(exports, "RunnerClient", { enumerable: true, get: function () { return RunnerClient_1.RunnerClient; } });
20
+ var SessionClient_1 = require("./SessionClient");
21
+ Object.defineProperty(exports, "SessionClient", { enumerable: true, get: function () { return SessionClient_1.SessionClient; } });
22
+ var SystemClient_1 = require("./SystemClient");
23
+ Object.defineProperty(exports, "SystemClient", { enumerable: true, get: function () { return SystemClient_1.SystemClient; } });
24
+ __exportStar(require("./DTOs"), exports);
25
+ __exportStar(require("nats.ws"), exports);
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.19.0-alpha.1.4",
3
+ "version": "2.20.0-alpha.1.2",
4
4
  "description": "This is the web client for the OpenTAP Runner.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -40,10 +40,9 @@
40
40
  "typescript": "^4.8.2"
41
41
  },
42
42
  "dependencies": {
43
- "events": "^3.3.0",
44
43
  "nats.ws": "^1.9.0",
45
- "rxjs": "^7.8.1",
46
- "uuid": "^9.0.0"
44
+ "uuid": "^9.0.0",
45
+ "events": "^3.3.0"
47
46
  },
48
47
  "lint-staged": {
49
48
  "*.{ts,js,html}": [