@elizaos/project-tee-starter 1.5.11 → 1.5.12-alpha.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.
- package/dist/index.js +18 -2
- package/dist/index.js.map +3 -3
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -28455,7 +28455,8 @@ var require_dist5 = __commonJS((exports) => {
|
|
|
28455
28455
|
return result;
|
|
28456
28456
|
}
|
|
28457
28457
|
close(code, data) {
|
|
28458
|
-
this.socket
|
|
28458
|
+
if (this.socket)
|
|
28459
|
+
this.socket.close(code || 1000, data);
|
|
28459
28460
|
}
|
|
28460
28461
|
setAutoReconnect(reconnect) {
|
|
28461
28462
|
this.reconnect = reconnect;
|
|
@@ -28466,6 +28467,18 @@ var require_dist5 = __commonJS((exports) => {
|
|
|
28466
28467
|
setMaxReconnects(max_reconnects) {
|
|
28467
28468
|
this.max_reconnects = max_reconnects;
|
|
28468
28469
|
}
|
|
28470
|
+
getCurrentReconnects() {
|
|
28471
|
+
return this.current_reconnects;
|
|
28472
|
+
}
|
|
28473
|
+
getMaxReconnects() {
|
|
28474
|
+
return this.max_reconnects;
|
|
28475
|
+
}
|
|
28476
|
+
isReconnecting() {
|
|
28477
|
+
return this.reconnect_timer_id !== undefined;
|
|
28478
|
+
}
|
|
28479
|
+
willReconnect() {
|
|
28480
|
+
return this.reconnect && (this.max_reconnects === 0 || this.current_reconnects < this.max_reconnects);
|
|
28481
|
+
}
|
|
28469
28482
|
_connect(address, options) {
|
|
28470
28483
|
clearTimeout(this.reconnect_timer_id);
|
|
28471
28484
|
this.socket = this.webSocketFactory(address, options);
|
|
@@ -28524,6 +28537,9 @@ var require_dist5 = __commonJS((exports) => {
|
|
|
28524
28537
|
this.current_reconnects++;
|
|
28525
28538
|
if (this.reconnect && (this.max_reconnects > this.current_reconnects || this.max_reconnects === 0))
|
|
28526
28539
|
this.reconnect_timer_id = setTimeout(() => this._connect(address, options), this.reconnect_interval);
|
|
28540
|
+
else if (this.reconnect && this.max_reconnects > 0 && this.current_reconnects >= this.max_reconnects) {
|
|
28541
|
+
setTimeout(() => this.emit("max_reconnects_reached", code, reason), 1);
|
|
28542
|
+
}
|
|
28527
28543
|
});
|
|
28528
28544
|
}
|
|
28529
28545
|
};
|
|
@@ -35650,5 +35666,5 @@ export {
|
|
|
35650
35666
|
StarterService
|
|
35651
35667
|
};
|
|
35652
35668
|
|
|
35653
|
-
//# debugId=
|
|
35669
|
+
//# debugId=8F12EBB04074C17A64756E2164756E21
|
|
35654
35670
|
//# sourceMappingURL=index.js.map
|