@opentap/runner-client 2.21.0 → 2.22.0-alpha.1.1.9252487423

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.
@@ -102,6 +102,12 @@ var BaseClient = /** @class */ (function () {
102
102
  enumerable: false,
103
103
  configurable: true
104
104
  });
105
+ BaseClient.prototype.getConnection = function () {
106
+ return this.connection;
107
+ };
108
+ BaseClient.prototype.setConnection = function (connection) {
109
+ this.connection = connection;
110
+ };
105
111
  BaseClient.prototype.withTimeout = function (promise, timeout) {
106
112
  return Promise.race([promise, new Promise(function (_, reject) { return setTimeout(function () { return reject(new Error(nats_ws_1.ErrorCode.Timeout)); }, timeout); })]);
107
113
  };
@@ -1,6 +1,6 @@
1
1
  import { DownloadTapSettingsRequest } from './requestDTOs';
2
2
  import { ComponentSettingsBase, ComponentSettingsIdentifier, ComponentSettingsListItem, DataGridControl, ErrorResponse, FileParameter, ListItemType, ProfileGroup, RepositoryPackageReference, RepositorySettingsPackageDefinition } from './DTOs';
3
- import { ConnectionOptions, NatsError, Subscription, SubscriptionOptions, PublishOptions } from 'nats.ws';
3
+ import { ConnectionOptions, NatsConnection, NatsError, Subscription, SubscriptionOptions, PublishOptions } from 'nats.ws';
4
4
  interface BaseClientRequestOptions {
5
5
  publishOptions?: PublishOptions;
6
6
  rawResponse?: boolean;
@@ -33,6 +33,8 @@ export declare class BaseClient {
33
33
  /** Set timeout in milliseconds. Default is 40000 milliseconds */
34
34
  set timeout(value: number);
35
35
  constructor(baseSubject: string, options: ConnectionOptions);
36
+ getConnection(): NatsConnection | null;
37
+ setConnection(connection: NatsConnection): void;
36
38
  private withTimeout;
37
39
  /**
38
40
  * Send a request to the nats server.
@@ -49,6 +49,12 @@ export class BaseClient {
49
49
  set timeout(value) {
50
50
  this._timeout = value;
51
51
  }
52
+ getConnection() {
53
+ return this.connection;
54
+ }
55
+ setConnection(connection) {
56
+ this.connection = connection;
57
+ }
52
58
  withTimeout(promise, timeout) {
53
59
  return Promise.race([promise, new Promise((_, reject) => setTimeout(() => reject(new Error(ErrorCode.Timeout)), timeout))]);
54
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.21.0",
3
+ "version": "2.22.0-alpha.1.1.9252487423",
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",