@opentap/runner-client 2.0.0-alpha.2.4 → 2.0.0-alpha.2.6
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/SessionClient.d.ts +1 -2
- package/lib/SessionClient.js +7 -9
- package/package.json +1 -1
package/lib/SessionClient.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Int
|
|
|
2
2
|
import { ConnectionOptions, NatsError, Subscription, SubscriptionOptions } from 'nats.ws';
|
|
3
3
|
import { BaseClient } from './BaseClient';
|
|
4
4
|
export declare class SessionClient extends BaseClient {
|
|
5
|
-
private
|
|
6
|
-
private eventsWildcardSubscription;
|
|
5
|
+
private subscriptions;
|
|
7
6
|
constructor(baseSubject: string, options: ConnectionOptions);
|
|
8
7
|
/**
|
|
9
8
|
* @param sessionLogsHandler Function to be called when log list or error is received
|
package/lib/SessionClient.js
CHANGED
|
@@ -30,7 +30,9 @@ import { BaseClient } from './BaseClient';
|
|
|
30
30
|
var SessionClient = /** @class */ (function (_super) {
|
|
31
31
|
__extends(SessionClient, _super);
|
|
32
32
|
function SessionClient(baseSubject, options) {
|
|
33
|
-
|
|
33
|
+
var _this = _super.call(this, baseSubject, options) || this;
|
|
34
|
+
_this.subscriptions = [];
|
|
35
|
+
return _this;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
38
|
* @param sessionLogsHandler Function to be called when log list or error is received
|
|
@@ -75,8 +77,8 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
75
77
|
eventHandler(undefined, error);
|
|
76
78
|
}
|
|
77
79
|
};
|
|
78
|
-
this.
|
|
79
|
-
this.
|
|
80
|
+
this.subscriptions.push(this.subscribe('Events', __assign(__assign({}, options), { callback: callback })));
|
|
81
|
+
this.subscriptions.push(this.subscribe('Events.*', __assign(__assign({}, options), { callback: callback })));
|
|
80
82
|
};
|
|
81
83
|
/**
|
|
82
84
|
* @param resultHandler Function to be called when result or error is received
|
|
@@ -122,12 +124,8 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
122
124
|
* Unsubscibe from session events
|
|
123
125
|
*/
|
|
124
126
|
SessionClient.prototype.unsubscribeSessionEvents = function () {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
if (this.eventsWildcardSubscription) {
|
|
129
|
-
this.eventsWildcardSubscription.unsubscribe();
|
|
130
|
-
}
|
|
127
|
+
var _a;
|
|
128
|
+
(_a = this.subscriptions) === null || _a === void 0 ? void 0 : _a.forEach(function (subscription) { return subscription.unsubscribe(); });
|
|
131
129
|
};
|
|
132
130
|
/**
|
|
133
131
|
* Retrieve session logs
|