@opentap/runner-client 2.32.0 → 2.33.0-alpha.1.2.15769323728

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.
@@ -62,7 +62,7 @@ var BaseClient = /** @class */ (function () {
62
62
  this.domainAccess = new Map();
63
63
  this._headers = {};
64
64
  this.baseSubject = baseSubject;
65
- this.connectionOptions = __assign({}, options) || {};
65
+ this.connectionOptions = __assign({}, options);
66
66
  this.connectionOptions.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || DEFAULT_TIMEOUT;
67
67
  this.eventEmitter = new events_1.EventEmitter();
68
68
  }
@@ -1518,3 +1518,53 @@ export declare class AssetUpdatedEvent extends RunnerEvent implements IAssetUpda
1518
1518
  static fromJS(data: any): AssetUpdatedEvent;
1519
1519
  toJSON(data?: any): any;
1520
1520
  }
1521
+ export interface IRemoteConnection {
1522
+ endPoint: string;
1523
+ connected: boolean;
1524
+ rtt: string;
1525
+ }
1526
+ export declare class RemoteConnection implements IRemoteConnection {
1527
+ endPoint: string;
1528
+ connected: boolean;
1529
+ rtt: string;
1530
+ constructor(data?: IRemoteConnection);
1531
+ init(data?: any): void;
1532
+ static fromJS(data?: any): RemoteConnection;
1533
+ toJSON(data?: any): any;
1534
+ }
1535
+ export interface IStreamInfoStatus {
1536
+ runsMaxBytes: number;
1537
+ runsUsage: number;
1538
+ diskFree: number;
1539
+ }
1540
+ export declare class StreamInfoStatus implements IStreamInfoStatus {
1541
+ runsMaxBytes: number;
1542
+ runsUsage: number;
1543
+ diskFree: number;
1544
+ constructor(data?: IStreamInfoStatus);
1545
+ init(data?: any): void;
1546
+ static fromJS(data?: any): StreamInfoStatus;
1547
+ toJSON(data?: any): any;
1548
+ }
1549
+ export interface IRunnerStatus {
1550
+ version: string;
1551
+ runningAsService: boolean;
1552
+ runningInContainer: boolean;
1553
+ remoteConnection?: RemoteConnection;
1554
+ streamInfo?: StreamInfoStatus;
1555
+ ipAddress: string;
1556
+ hostame: string;
1557
+ }
1558
+ export declare class RunnerStatus implements IRunnerStatus {
1559
+ version: string;
1560
+ runningAsService: boolean;
1561
+ runningInContainer: boolean;
1562
+ remoteConnection?: RemoteConnection;
1563
+ streamInfo?: StreamInfoStatus;
1564
+ ipAddress: string;
1565
+ hostame: string;
1566
+ constructor(data?: IRunnerStatus);
1567
+ init(data?: any): void;
1568
+ static fromJS(data?: any): RunnerStatus;
1569
+ toJSON(data?: any): any;
1570
+ }
package/dist/cjs/DTOs.js CHANGED
@@ -17,7 +17,7 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.SessionStartInitiated = exports.SessionEventArgs = exports.SettingsTapPackage = exports.RepositorySettingsPackageDefinition = exports.RepositoryPackageDefinition = exports.RepositoryPackageReference = exports.ProfileGroup = exports.ListItemType = exports.ComponentSettings = exports.FileDescriptor = exports.Resource = exports.PluginTypeSelectorControl = exports.PictureControl = exports.PasswordControl = exports.MultiSelectControl = exports.DropdownControl = exports.EnabledControl = exports.DirectoryPathControl = exports.FilePathControl = exports.ComboBoxControl = exports.TextBoxControl = exports.DataGridControl = exports.DataGridReferenceControl = exports.CheckBoxControl = exports.AvailableValue = exports.ButtonsControl = exports.ButtonControl = exports.ExternalParameter = exports.MetaData = exports.DisplayAttribute = exports.VisualStatus = exports.UnitAttribute = exports.Icon = exports.ColumnDisplayName = exports.LayoutMode = exports.Layout = exports.Setting = exports.ComponentSettingsListItem = exports.AnnotatedObject = exports.ComponentSettingsList = exports.DisplayMode = exports.ComponentSettingsIdentifier = exports.ComponentSettingsBase = exports.Links = exports.Session = exports.ImageResolveErrorResponse = exports.NoResponderError = exports.ErrorResponse = exports.PackageSpecifier = exports.Image = void 0;
19
19
  exports.TestPlanExecutionStateChangedEventArgs = exports.TestPlanChangeEventArgs = exports.StoppedEventArgs = exports.StoppingEventArgs = exports.StartedEventArgs = exports.StartingEventArgs = exports.SessionTimeoutEventArgs = exports.SessionEventType = exports.SessionEvent = exports.MetricValue = exports.MetricsConfiguration = exports.SessionMetricInfo = exports.MetricsPollRate = exports.SessionMetricType = exports.SessionMetricKind = exports.ResultColumn = exports.Result = exports.LogEvent = exports.TestStepRun = exports.TestRun = exports.WatchDog = exports.Parameter = exports.BreakPoints = exports.InstalledFile = exports.Interaction = exports.CommonContext = exports.CommonSettings = exports.ValidationError = exports.TestStepValidationError = exports.TestStepCopy = exports.TestStepType = exports.TestStep = exports.TestPlan = exports.ExecutionState = exports.Verdict = exports.RunStatus = exports.MissingLicenseResponse = exports.LogEntry = exports.LogList = exports.ApiException = exports.ImageCreationFailed = exports.ImageCreated = exports.ImageCreating = exports.ImageEventArgs = exports.SessionInactivityLimitHit = exports.SessionShutdownFailed = exports.SessionShutdown = exports.SessionShutdownInitiated = exports.SessionStartFailed = exports.SessionStarted = void 0;
20
- exports.AssetUpdatedEvent = exports.MetadataUpdatedEvent = exports.RunnerDeletedEvent = exports.RunnerUpdatedEvent = exports.RunnerRegisteredEvent = exports.RunnerEvent = exports.TestPlanRunCompletedEventArgs = exports.TestPlanRunStartEventArgs = exports.TestPlanRunEvent = exports.TestStepRunCompletedEventArgs = exports.TestStepRunStartEventArgs = exports.TestStepRunEvent = exports.OnTestStepRun = exports.OnTestPlanRun = exports.MetricsConfigurationChangedEventArgs = exports.HeartbeatEventArgs = exports.TestPlanSettingsChangedEventArgs = exports.UserInputRequestCompletedEventArgs = exports.UserInputRequestEventArgs = exports.BreakEventArgs = exports.TestStepChangeEventArgs = exports.SettingsChangedEventArgs = void 0;
20
+ exports.RunnerStatus = exports.StreamInfoStatus = exports.RemoteConnection = exports.AssetUpdatedEvent = exports.MetadataUpdatedEvent = exports.RunnerDeletedEvent = exports.RunnerUpdatedEvent = exports.RunnerRegisteredEvent = exports.RunnerEvent = exports.TestPlanRunCompletedEventArgs = exports.TestPlanRunStartEventArgs = exports.TestPlanRunEvent = exports.TestStepRunCompletedEventArgs = exports.TestStepRunStartEventArgs = exports.TestStepRunEvent = exports.OnTestStepRun = exports.OnTestPlanRun = exports.MetricsConfigurationChangedEventArgs = exports.HeartbeatEventArgs = exports.TestPlanSettingsChangedEventArgs = exports.UserInputRequestCompletedEventArgs = exports.UserInputRequestEventArgs = exports.BreakEventArgs = exports.TestStepChangeEventArgs = exports.SettingsChangedEventArgs = void 0;
21
21
  var Image = /** @class */ (function () {
22
22
  function Image(data) {
23
23
  this.packages = [];
@@ -4237,3 +4237,120 @@ var AssetUpdatedEvent = /** @class */ (function (_super) {
4237
4237
  return AssetUpdatedEvent;
4238
4238
  }(RunnerEvent));
4239
4239
  exports.AssetUpdatedEvent = AssetUpdatedEvent;
4240
+ var RemoteConnection = /** @class */ (function () {
4241
+ function RemoteConnection(data) {
4242
+ this.endPoint = '';
4243
+ this.connected = false;
4244
+ this.rtt = '';
4245
+ if (data) {
4246
+ for (var property in data) {
4247
+ if (Object.prototype.hasOwnProperty.call(data, property))
4248
+ this[property] = data[property];
4249
+ }
4250
+ }
4251
+ }
4252
+ RemoteConnection.prototype.init = function (data) {
4253
+ var _a, _b, _c;
4254
+ if (data) {
4255
+ this.endPoint = (_a = data['EndPoint']) !== null && _a !== void 0 ? _a : '';
4256
+ this.connected = (_b = data['Connected']) !== null && _b !== void 0 ? _b : false;
4257
+ this.rtt = (_c = data['Rtt']) !== null && _c !== void 0 ? _c : '';
4258
+ }
4259
+ };
4260
+ RemoteConnection.fromJS = function (data) {
4261
+ data = typeof data === 'object' ? data : {};
4262
+ var result = new RemoteConnection();
4263
+ result.init(data);
4264
+ return result;
4265
+ };
4266
+ RemoteConnection.prototype.toJSON = function (data) {
4267
+ data = typeof data === 'object' ? data : {};
4268
+ data['EndPoint'] = this.endPoint;
4269
+ data['Connected'] = this.connected;
4270
+ data['Rtt'] = this.rtt;
4271
+ return data;
4272
+ };
4273
+ return RemoteConnection;
4274
+ }());
4275
+ exports.RemoteConnection = RemoteConnection;
4276
+ var StreamInfoStatus = /** @class */ (function () {
4277
+ function StreamInfoStatus(data) {
4278
+ this.runsMaxBytes = 0;
4279
+ this.runsUsage = 0;
4280
+ this.diskFree = 0;
4281
+ if (data) {
4282
+ for (var property in data) {
4283
+ if (Object.prototype.hasOwnProperty.call(data, property))
4284
+ this[property] = data[property];
4285
+ }
4286
+ }
4287
+ }
4288
+ StreamInfoStatus.prototype.init = function (data) {
4289
+ var _a, _b, _c;
4290
+ if (data) {
4291
+ this.runsMaxBytes = (_a = data['RunsMaxBytes']) !== null && _a !== void 0 ? _a : 0;
4292
+ this.runsUsage = (_b = data['RunsUsage']) !== null && _b !== void 0 ? _b : 0;
4293
+ this.diskFree = (_c = data['DiskFree']) !== null && _c !== void 0 ? _c : 0;
4294
+ }
4295
+ };
4296
+ StreamInfoStatus.fromJS = function (data) {
4297
+ data = typeof data === 'object' ? data : {};
4298
+ var result = new StreamInfoStatus();
4299
+ result.init(data);
4300
+ return result;
4301
+ };
4302
+ StreamInfoStatus.prototype.toJSON = function (data) {
4303
+ data = typeof data === 'object' ? data : {};
4304
+ data['RunsMaxBytes'] = this.runsMaxBytes;
4305
+ data['RunsUsage'] = this.runsUsage;
4306
+ data['DiskFree'] = this.diskFree;
4307
+ return data;
4308
+ };
4309
+ return StreamInfoStatus;
4310
+ }());
4311
+ exports.StreamInfoStatus = StreamInfoStatus;
4312
+ var RunnerStatus = /** @class */ (function () {
4313
+ function RunnerStatus(data) {
4314
+ this.version = '';
4315
+ this.runningAsService = false;
4316
+ this.runningInContainer = false;
4317
+ this.ipAddress = '';
4318
+ this.hostame = '';
4319
+ if (data) {
4320
+ for (var property in data) {
4321
+ if (Object.prototype.hasOwnProperty.call(data, property))
4322
+ this[property] = data[property];
4323
+ }
4324
+ }
4325
+ }
4326
+ RunnerStatus.prototype.init = function (data) {
4327
+ var _a, _b, _c, _d, _e;
4328
+ if (data) {
4329
+ this.version = (_a = data['Version']) !== null && _a !== void 0 ? _a : '';
4330
+ this.runningAsService = (_b = data['RunningAsService']) !== null && _b !== void 0 ? _b : false;
4331
+ this.runningInContainer = (_c = data['RunningInContainer']) !== null && _c !== void 0 ? _c : false;
4332
+ this.remoteConnection = data['RemoteConnection'] ? RemoteConnection.fromJS(data['RemoteConnection']) : undefined;
4333
+ this.streamInfo = data['StreamInfo'] ? StreamInfoStatus.fromJS(data['StreamInfo']) : undefined;
4334
+ this.ipAddress = (_d = data['IpAddress']) !== null && _d !== void 0 ? _d : '';
4335
+ this.hostame = (_e = data['Hostname']) !== null && _e !== void 0 ? _e : '';
4336
+ }
4337
+ };
4338
+ RunnerStatus.fromJS = function (data) {
4339
+ data = typeof data === 'object' ? data : {};
4340
+ var result = new RunnerStatus();
4341
+ result.init(data);
4342
+ return result;
4343
+ };
4344
+ RunnerStatus.prototype.toJSON = function (data) {
4345
+ data = typeof data === 'object' ? data : {};
4346
+ data['Version'] = this.version;
4347
+ data['RunningAsService'] = this.runningAsService;
4348
+ data['RunningInContainer'] = this.runningInContainer;
4349
+ data['RemoteConnection'] = this.remoteConnection ? this.remoteConnection.toJSON() : undefined;
4350
+ data['StreamInfo'] = this.streamInfo ? this.streamInfo.toJSON() : undefined;
4351
+ data['IpAddress'] = this.ipAddress;
4352
+ data['Hostname'] = this.hostame;
4353
+ };
4354
+ return RunnerStatus;
4355
+ }());
4356
+ exports.RunnerStatus = RunnerStatus;
@@ -1,6 +1,6 @@
1
1
  import { ConnectionOptions, Consumer, NatsError, Subscription, SubscriptionOptions } from 'nats.ws';
2
2
  import { RunnerUpdateRequest } from './requestDTOs';
3
- import { ISession, ISessionMetricInfo, Image, MetadataUpdatedEvent, RepositoryPackageReference, Session } from './DTOs';
3
+ import { ISession, ISessionMetricInfo, Image, MetadataUpdatedEvent, RepositoryPackageReference, RunnerStatus, Session } from './DTOs';
4
4
  import { BaseClient } from './BaseClient';
5
5
  export declare class RunnerClient extends BaseClient {
6
6
  private runnerId;
@@ -13,6 +13,12 @@ export declare class RunnerClient extends BaseClient {
13
13
  setSettings: (repositoryPackageReference: RepositoryPackageReference) => Promise<void>;
14
14
  };
15
15
  constructor(baseSubject: string, options: ConnectionOptions);
16
+ /**
17
+ * Get the logs zip file from the server.
18
+ * @returns {{Promise<Uint8Array>}}
19
+ * @description The logs zip file contains the logs from the server.
20
+ */
21
+ getLogsZip(): Promise<Uint8Array>;
16
22
  /**
17
23
  * Get the created image with the specified ID.
18
24
  * @param imageId
@@ -90,4 +96,9 @@ export declare class RunnerClient extends BaseClient {
90
96
  encodedMetrics: Uint8Array[];
91
97
  timestamps: number[];
92
98
  }) => void): Promise<Consumer>;
99
+ /**
100
+ * Gets the runner status
101
+ * @return Promise
102
+ */
103
+ getStatus(): Promise<RunnerStatus>;
93
104
  }
@@ -139,6 +139,14 @@ var RunnerClient = /** @class */ (function (_super) {
139
139
  _this.runnerId = (0, utils_1.getSubjectParts)(baseSubject).runnerId;
140
140
  return _this;
141
141
  }
142
+ /**
143
+ * Get the logs zip file from the server.
144
+ * @returns {{Promise<Uint8Array>}}
145
+ * @description The logs zip file contains the logs from the server.
146
+ */
147
+ RunnerClient.prototype.getLogsZip = function () {
148
+ return this.request('LogsZip', undefined, { rawResponse: true }).then(this.success()).catch(this.error());
149
+ };
142
150
  /**
143
151
  * Get the created image with the specified ID.
144
152
  * @param imageId
@@ -390,6 +398,16 @@ var RunnerClient = /** @class */ (function (_super) {
390
398
  return consumer;
391
399
  });
392
400
  };
401
+ /**
402
+ * Gets the runner status
403
+ * @return Promise
404
+ */
405
+ RunnerClient.prototype.getStatus = function () {
406
+ return this.request('Status')
407
+ .then(function (status) { return DTOs_1.RunnerStatus.fromJS(status); })
408
+ .then(this.success())
409
+ .catch(this.error());
410
+ };
393
411
  return RunnerClient;
394
412
  }(BaseClient_1.BaseClient));
395
413
  exports.RunnerClient = RunnerClient;
@@ -21,7 +21,7 @@ export class BaseClient {
21
21
  this.domainAccess = new Map();
22
22
  this._headers = {};
23
23
  this.baseSubject = baseSubject;
24
- this.connectionOptions = Object.assign({}, options) || {};
24
+ this.connectionOptions = Object.assign({}, options);
25
25
  this.connectionOptions.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || DEFAULT_TIMEOUT;
26
26
  this.eventEmitter = new EventEmitter();
27
27
  }
@@ -1518,3 +1518,53 @@ export declare class AssetUpdatedEvent extends RunnerEvent implements IAssetUpda
1518
1518
  static fromJS(data: any): AssetUpdatedEvent;
1519
1519
  toJSON(data?: any): any;
1520
1520
  }
1521
+ export interface IRemoteConnection {
1522
+ endPoint: string;
1523
+ connected: boolean;
1524
+ rtt: string;
1525
+ }
1526
+ export declare class RemoteConnection implements IRemoteConnection {
1527
+ endPoint: string;
1528
+ connected: boolean;
1529
+ rtt: string;
1530
+ constructor(data?: IRemoteConnection);
1531
+ init(data?: any): void;
1532
+ static fromJS(data?: any): RemoteConnection;
1533
+ toJSON(data?: any): any;
1534
+ }
1535
+ export interface IStreamInfoStatus {
1536
+ runsMaxBytes: number;
1537
+ runsUsage: number;
1538
+ diskFree: number;
1539
+ }
1540
+ export declare class StreamInfoStatus implements IStreamInfoStatus {
1541
+ runsMaxBytes: number;
1542
+ runsUsage: number;
1543
+ diskFree: number;
1544
+ constructor(data?: IStreamInfoStatus);
1545
+ init(data?: any): void;
1546
+ static fromJS(data?: any): StreamInfoStatus;
1547
+ toJSON(data?: any): any;
1548
+ }
1549
+ export interface IRunnerStatus {
1550
+ version: string;
1551
+ runningAsService: boolean;
1552
+ runningInContainer: boolean;
1553
+ remoteConnection?: RemoteConnection;
1554
+ streamInfo?: StreamInfoStatus;
1555
+ ipAddress: string;
1556
+ hostame: string;
1557
+ }
1558
+ export declare class RunnerStatus implements IRunnerStatus {
1559
+ version: string;
1560
+ runningAsService: boolean;
1561
+ runningInContainer: boolean;
1562
+ remoteConnection?: RemoteConnection;
1563
+ streamInfo?: StreamInfoStatus;
1564
+ ipAddress: string;
1565
+ hostame: string;
1566
+ constructor(data?: IRunnerStatus);
1567
+ init(data?: any): void;
1568
+ static fromJS(data?: any): RunnerStatus;
1569
+ toJSON(data?: any): any;
1570
+ }
package/dist/mjs/DTOs.js CHANGED
@@ -3722,3 +3722,114 @@ export class AssetUpdatedEvent extends RunnerEvent {
3722
3722
  return data;
3723
3723
  }
3724
3724
  }
3725
+ export class RemoteConnection {
3726
+ constructor(data) {
3727
+ this.endPoint = '';
3728
+ this.connected = false;
3729
+ this.rtt = '';
3730
+ if (data) {
3731
+ for (const property in data) {
3732
+ if (Object.prototype.hasOwnProperty.call(data, property))
3733
+ this[property] = data[property];
3734
+ }
3735
+ }
3736
+ }
3737
+ init(data) {
3738
+ var _a, _b, _c;
3739
+ if (data) {
3740
+ this.endPoint = (_a = data['EndPoint']) !== null && _a !== void 0 ? _a : '';
3741
+ this.connected = (_b = data['Connected']) !== null && _b !== void 0 ? _b : false;
3742
+ this.rtt = (_c = data['Rtt']) !== null && _c !== void 0 ? _c : '';
3743
+ }
3744
+ }
3745
+ static fromJS(data) {
3746
+ data = typeof data === 'object' ? data : {};
3747
+ const result = new RemoteConnection();
3748
+ result.init(data);
3749
+ return result;
3750
+ }
3751
+ toJSON(data) {
3752
+ data = typeof data === 'object' ? data : {};
3753
+ data['EndPoint'] = this.endPoint;
3754
+ data['Connected'] = this.connected;
3755
+ data['Rtt'] = this.rtt;
3756
+ return data;
3757
+ }
3758
+ }
3759
+ export class StreamInfoStatus {
3760
+ constructor(data) {
3761
+ this.runsMaxBytes = 0;
3762
+ this.runsUsage = 0;
3763
+ this.diskFree = 0;
3764
+ if (data) {
3765
+ for (const property in data) {
3766
+ if (Object.prototype.hasOwnProperty.call(data, property))
3767
+ this[property] = data[property];
3768
+ }
3769
+ }
3770
+ }
3771
+ init(data) {
3772
+ var _a, _b, _c;
3773
+ if (data) {
3774
+ this.runsMaxBytes = (_a = data['RunsMaxBytes']) !== null && _a !== void 0 ? _a : 0;
3775
+ this.runsUsage = (_b = data['RunsUsage']) !== null && _b !== void 0 ? _b : 0;
3776
+ this.diskFree = (_c = data['DiskFree']) !== null && _c !== void 0 ? _c : 0;
3777
+ }
3778
+ }
3779
+ static fromJS(data) {
3780
+ data = typeof data === 'object' ? data : {};
3781
+ const result = new StreamInfoStatus();
3782
+ result.init(data);
3783
+ return result;
3784
+ }
3785
+ toJSON(data) {
3786
+ data = typeof data === 'object' ? data : {};
3787
+ data['RunsMaxBytes'] = this.runsMaxBytes;
3788
+ data['RunsUsage'] = this.runsUsage;
3789
+ data['DiskFree'] = this.diskFree;
3790
+ return data;
3791
+ }
3792
+ }
3793
+ export class RunnerStatus {
3794
+ constructor(data) {
3795
+ this.version = '';
3796
+ this.runningAsService = false;
3797
+ this.runningInContainer = false;
3798
+ this.ipAddress = '';
3799
+ this.hostame = '';
3800
+ if (data) {
3801
+ for (const property in data) {
3802
+ if (Object.prototype.hasOwnProperty.call(data, property))
3803
+ this[property] = data[property];
3804
+ }
3805
+ }
3806
+ }
3807
+ init(data) {
3808
+ var _a, _b, _c, _d, _e;
3809
+ if (data) {
3810
+ this.version = (_a = data['Version']) !== null && _a !== void 0 ? _a : '';
3811
+ this.runningAsService = (_b = data['RunningAsService']) !== null && _b !== void 0 ? _b : false;
3812
+ this.runningInContainer = (_c = data['RunningInContainer']) !== null && _c !== void 0 ? _c : false;
3813
+ this.remoteConnection = data['RemoteConnection'] ? RemoteConnection.fromJS(data['RemoteConnection']) : undefined;
3814
+ this.streamInfo = data['StreamInfo'] ? StreamInfoStatus.fromJS(data['StreamInfo']) : undefined;
3815
+ this.ipAddress = (_d = data['IpAddress']) !== null && _d !== void 0 ? _d : '';
3816
+ this.hostame = (_e = data['Hostname']) !== null && _e !== void 0 ? _e : '';
3817
+ }
3818
+ }
3819
+ static fromJS(data) {
3820
+ data = typeof data === 'object' ? data : {};
3821
+ const result = new RunnerStatus();
3822
+ result.init(data);
3823
+ return result;
3824
+ }
3825
+ toJSON(data) {
3826
+ data = typeof data === 'object' ? data : {};
3827
+ data['Version'] = this.version;
3828
+ data['RunningAsService'] = this.runningAsService;
3829
+ data['RunningInContainer'] = this.runningInContainer;
3830
+ data['RemoteConnection'] = this.remoteConnection ? this.remoteConnection.toJSON() : undefined;
3831
+ data['StreamInfo'] = this.streamInfo ? this.streamInfo.toJSON() : undefined;
3832
+ data['IpAddress'] = this.ipAddress;
3833
+ data['Hostname'] = this.hostame;
3834
+ }
3835
+ }
@@ -1,6 +1,6 @@
1
1
  import { ConnectionOptions, Consumer, NatsError, Subscription, SubscriptionOptions } from 'nats.ws';
2
2
  import { RunnerUpdateRequest } from './requestDTOs';
3
- import { ISession, ISessionMetricInfo, Image, MetadataUpdatedEvent, RepositoryPackageReference, Session } from './DTOs';
3
+ import { ISession, ISessionMetricInfo, Image, MetadataUpdatedEvent, RepositoryPackageReference, RunnerStatus, Session } from './DTOs';
4
4
  import { BaseClient } from './BaseClient';
5
5
  export declare class RunnerClient extends BaseClient {
6
6
  private runnerId;
@@ -13,6 +13,12 @@ export declare class RunnerClient extends BaseClient {
13
13
  setSettings: (repositoryPackageReference: RepositoryPackageReference) => Promise<void>;
14
14
  };
15
15
  constructor(baseSubject: string, options: ConnectionOptions);
16
+ /**
17
+ * Get the logs zip file from the server.
18
+ * @returns {{Promise<Uint8Array>}}
19
+ * @description The logs zip file contains the logs from the server.
20
+ */
21
+ getLogsZip(): Promise<Uint8Array>;
16
22
  /**
17
23
  * Get the created image with the specified ID.
18
24
  * @param imageId
@@ -90,4 +96,9 @@ export declare class RunnerClient extends BaseClient {
90
96
  encodedMetrics: Uint8Array[];
91
97
  timestamps: number[];
92
98
  }) => void): Promise<Consumer>;
99
+ /**
100
+ * Gets the runner status
101
+ * @return Promise
102
+ */
103
+ getStatus(): Promise<RunnerStatus>;
93
104
  }
@@ -15,7 +15,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
15
15
  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
16
16
  };
17
17
  import { JSONCodec, nanos } from 'nats.ws';
18
- import { Image, MetadataUpdatedEvent, RepositoryPackageReference, Session, } from './DTOs';
18
+ import { Image, MetadataUpdatedEvent, RepositoryPackageReference, RunnerStatus, Session, } from './DTOs';
19
19
  import { BaseClient } from './BaseClient';
20
20
  import { getSubjectParts } from './utils';
21
21
  export class RunnerClient extends BaseClient {
@@ -79,6 +79,14 @@ export class RunnerClient extends BaseClient {
79
79
  };
80
80
  this.runnerId = getSubjectParts(baseSubject).runnerId;
81
81
  }
82
+ /**
83
+ * Get the logs zip file from the server.
84
+ * @returns {{Promise<Uint8Array>}}
85
+ * @description The logs zip file contains the logs from the server.
86
+ */
87
+ getLogsZip() {
88
+ return this.request('LogsZip', undefined, { rawResponse: true }).then(this.success()).catch(this.error());
89
+ }
82
90
  /**
83
91
  * Get the created image with the specified ID.
84
92
  * @param imageId
@@ -288,4 +296,14 @@ export class RunnerClient extends BaseClient {
288
296
  return consumer;
289
297
  });
290
298
  }
299
+ /**
300
+ * Gets the runner status
301
+ * @return Promise
302
+ */
303
+ getStatus() {
304
+ return this.request('Status')
305
+ .then(status => RunnerStatus.fromJS(status))
306
+ .then(this.success())
307
+ .catch(this.error());
308
+ }
291
309
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.32.0",
3
+ "version": "2.33.0-alpha.1.2.15769323728",
4
4
  "description": "This is the web client for the OpenTAP Runner.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/mjs/index.js",