@opentap/runner-client 2.2.3-alpha.1.1 → 2.3.0-alpha.1.1
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/lib/BaseClient.d.ts +2 -2
- package/lib/BaseClient.js +2 -2
- package/package.json +1 -1
package/lib/BaseClient.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentSettingsBase, ComponentSettingsIdentifier, ComponentSettingsListItem, DataGridControl, ErrorResponse, FileParameter, FileResponse, ListItemType, ProfileGroup, RepositoryPackageReference, RepositorySettingsPackageDefinition, SettingsTapPackage } from './DTOs';
|
|
2
|
-
import { ConnectionOptions, RequestOptions, Subscription, SubscriptionOptions } from 'nats.ws';
|
|
2
|
+
import { ConnectionOptions, NatsConnection, RequestOptions, Subscription, SubscriptionOptions } from 'nats.ws';
|
|
3
3
|
export declare class BaseClient {
|
|
4
4
|
private connection;
|
|
5
5
|
private baseSubject;
|
|
@@ -77,7 +77,7 @@ export declare class BaseClient {
|
|
|
77
77
|
* Create a connection to the nats server.
|
|
78
78
|
* @param {ConnectionOptions} options
|
|
79
79
|
*/
|
|
80
|
-
connect(): Promise<
|
|
80
|
+
connect(): Promise<NatsConnection>;
|
|
81
81
|
/**
|
|
82
82
|
* Close the connection.
|
|
83
83
|
*/
|
package/lib/BaseClient.js
CHANGED
|
@@ -360,14 +360,14 @@ var BaseClient = /** @class */ (function () {
|
|
|
360
360
|
if (!this.baseSubject)
|
|
361
361
|
return [2 /*return*/, Promise.reject('Subject must be given')];
|
|
362
362
|
if (this.connection)
|
|
363
|
-
return [2 /*return*/, Promise.resolve()];
|
|
363
|
+
return [2 /*return*/, Promise.resolve(this.connection)];
|
|
364
364
|
_a.label = 1;
|
|
365
365
|
case 1:
|
|
366
366
|
_a.trys.push([1, 3, , 4]);
|
|
367
367
|
return [4 /*yield*/, connect(this.connectionOptions)
|
|
368
368
|
.then(function (connection) {
|
|
369
369
|
_this.connection = connection;
|
|
370
|
-
return
|
|
370
|
+
return _this.connection;
|
|
371
371
|
})
|
|
372
372
|
.catch(function (error) { return Promise.reject("Failed to connect to ".concat(_this.connectionOptions.servers, " with ").concat(error)); })];
|
|
373
373
|
case 2: return [2 /*return*/, _a.sent()];
|