@flowcore/sdk 1.11.1 → 1.11.3
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/CHANGELOG.md +15 -0
- package/esm/common/notification-client.d.ts +10 -0
- package/esm/common/notification-client.d.ts.map +1 -1
- package/esm/common/notification-client.js +35 -0
- package/esm/contracts/index.d.ts +1 -0
- package/esm/contracts/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/common/notification-client.d.ts +10 -0
- package/script/common/notification-client.d.ts.map +1 -1
- package/script/common/notification-client.js +37 -2
- package/script/contracts/index.d.ts +1 -0
- package/script/contracts/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.11.3](https://github.com/flowcore-io/flowcore-sdk/compare/v1.11.2...v1.11.3) (2025-02-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add isopen and isconnecting to notification client ([fa90737](https://github.com/flowcore-io/flowcore-sdk/commit/fa907373c05a255889978190bea9a6e3750b18f9))
|
|
9
|
+
* add return types ([c51fbac](https://github.com/flowcore-io/flowcore-sdk/commit/c51fbac0d4fd1ac6208451837fb192afa3ffa6bb))
|
|
10
|
+
|
|
11
|
+
## [1.11.2](https://github.com/flowcore-io/flowcore-sdk/compare/v1.11.1...v1.11.2) (2025-02-12)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* import node buffer ([6e6caa0](https://github.com/flowcore-io/flowcore-sdk/commit/6e6caa0707bb58987939e39898b32e574e7194f8))
|
|
17
|
+
|
|
3
18
|
## [1.11.1](https://github.com/flowcore-io/flowcore-sdk/compare/v1.11.0...v1.11.1) (2025-02-12)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -46,6 +46,8 @@ export declare class NotificationClient {
|
|
|
46
46
|
private eventCount;
|
|
47
47
|
private reconnectInterval;
|
|
48
48
|
private reconnectAttempts;
|
|
49
|
+
private _isOpen;
|
|
50
|
+
private _isConnecting;
|
|
49
51
|
/**
|
|
50
52
|
* Creates a new NotificationClient instance
|
|
51
53
|
* @param observer - RxJS Subject for emitting notification events
|
|
@@ -59,6 +61,14 @@ export declare class NotificationClient {
|
|
|
59
61
|
flowType?: string;
|
|
60
62
|
eventType?: string;
|
|
61
63
|
}, options?: Partial<NotificationClientOptions>);
|
|
64
|
+
/**
|
|
65
|
+
* Is the websocket connection open
|
|
66
|
+
*/
|
|
67
|
+
get isOpen(): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Is the websocket connection currently connecting
|
|
70
|
+
*/
|
|
71
|
+
get isConnecting(): boolean;
|
|
62
72
|
/**
|
|
63
73
|
* Establishes WebSocket connection and sets up event handlers
|
|
64
74
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AASnC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AASnC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAM/D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,EAAE,MAAM,CAAA;QAClB,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,OAAO,CAAC;QACtB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH,CAAA;AAcD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAKD;;;GAGG;AACH,qBAAa,kBAAkB;IAmB3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IApBnC,OAAO,CAAC,GAAG,CAA+C;IAC1D,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,iBAAiB,CAAI;IAC7B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,aAAa,CAAiB;IAEtC;;;;;;OAMG;gBAEgB,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,EACpC,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE;QACjC,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,EACD,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAU9C;;OAEG;IACH,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED;;OAEG;IACG,OAAO;IAmIb;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;OAEG;IACH,UAAU;IAMV;;;OAGG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM;CAGnC"}
|
|
@@ -2,6 +2,7 @@ import * as dntShim from "../_dnt.shims.js";
|
|
|
2
2
|
import { DataCoreFetchCommand, EventTypeFetchCommand, FlowTypeFetchCommand, TenantFetchCommand, } from "../mod.js";
|
|
3
3
|
import { defaultLogger } from "../utils/logger.js";
|
|
4
4
|
import { FlowcoreClient } from "./flowcore-client.js";
|
|
5
|
+
import { Buffer } from "node:buffer";
|
|
5
6
|
// Maximum reconnection interval in milliseconds
|
|
6
7
|
const MAX_RECONNECT_INTERVAL = 30_000;
|
|
7
8
|
/**
|
|
@@ -77,6 +78,18 @@ export class NotificationClient {
|
|
|
77
78
|
writable: true,
|
|
78
79
|
value: 0
|
|
79
80
|
});
|
|
81
|
+
Object.defineProperty(this, "_isOpen", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
configurable: true,
|
|
84
|
+
writable: true,
|
|
85
|
+
value: false
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(this, "_isConnecting", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
configurable: true,
|
|
90
|
+
writable: true,
|
|
91
|
+
value: false
|
|
92
|
+
});
|
|
80
93
|
this.options = {
|
|
81
94
|
reconnectInterval: 1000,
|
|
82
95
|
...options,
|
|
@@ -84,10 +97,27 @@ export class NotificationClient {
|
|
|
84
97
|
this.logger = options?.logger ?? defaultLogger;
|
|
85
98
|
this.reconnectInterval = options?.reconnectInterval ?? 1000;
|
|
86
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Is the websocket connection open
|
|
102
|
+
*/
|
|
103
|
+
get isOpen() {
|
|
104
|
+
return this._isOpen;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Is the websocket connection currently connecting
|
|
108
|
+
*/
|
|
109
|
+
get isConnecting() {
|
|
110
|
+
return this._isConnecting;
|
|
111
|
+
}
|
|
87
112
|
/**
|
|
88
113
|
* Establishes WebSocket connection and sets up event handlers
|
|
89
114
|
*/
|
|
90
115
|
async connect() {
|
|
116
|
+
if (this._isConnecting || this._isOpen) {
|
|
117
|
+
this.logger.debug("Is already connecting or open");
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this._isConnecting = true;
|
|
91
121
|
const token = await this.oidcClient.getToken();
|
|
92
122
|
const flowcoreClient = new FlowcoreClient({
|
|
93
123
|
getBearerToken: () => Promise.resolve(token.accessToken),
|
|
@@ -115,6 +145,8 @@ export class NotificationClient {
|
|
|
115
145
|
}
|
|
116
146
|
this.webSocket = new dntShim.WebSocket(`${this.url}?token=${encodeURIComponent(token.accessToken)}`);
|
|
117
147
|
this.webSocket.onopen = () => {
|
|
148
|
+
this._isOpen = true;
|
|
149
|
+
this._isConnecting = false;
|
|
118
150
|
this.logger.info("WebSocket connection opened.");
|
|
119
151
|
this.reconnectInterval = this.options.reconnectInterval;
|
|
120
152
|
this.reconnectAttempts = 0;
|
|
@@ -166,11 +198,13 @@ export class NotificationClient {
|
|
|
166
198
|
}
|
|
167
199
|
};
|
|
168
200
|
this.webSocket.onclose = (event) => {
|
|
201
|
+
this._isOpen = false;
|
|
169
202
|
this.logger.info(`Connection closed: Code [${event.code}], Reason: ${event.reason}`);
|
|
170
203
|
if (event.code !== 1000) {
|
|
171
204
|
this.attemptReconnect();
|
|
172
205
|
return;
|
|
173
206
|
}
|
|
207
|
+
this._isConnecting = false;
|
|
174
208
|
this.observer.complete();
|
|
175
209
|
};
|
|
176
210
|
this.webSocket.onerror = (error) => {
|
|
@@ -188,6 +222,7 @@ export class NotificationClient {
|
|
|
188
222
|
return;
|
|
189
223
|
}
|
|
190
224
|
this.reconnectAttempts++;
|
|
225
|
+
this._isConnecting = true;
|
|
191
226
|
this.logger.info(`Attempting reconnection ${this.reconnectAttempts}${this.options.maxReconnects ? `/${this.options.maxReconnects}` : ""} in ${this.reconnectInterval} ms...`);
|
|
192
227
|
setTimeout(() => {
|
|
193
228
|
this.connect();
|
package/esm/contracts/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export type { DataCore } from "./data-core.js";
|
|
|
2
2
|
export type { EventType } from "./event-type.js";
|
|
3
3
|
export type { FlowType } from "./flow-type.js";
|
|
4
4
|
export type { FlowcoreEvent } from "./event.js";
|
|
5
|
+
export type { Tenant } from "./tenant.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA"}
|
package/package.json
CHANGED
|
@@ -46,6 +46,8 @@ export declare class NotificationClient {
|
|
|
46
46
|
private eventCount;
|
|
47
47
|
private reconnectInterval;
|
|
48
48
|
private reconnectAttempts;
|
|
49
|
+
private _isOpen;
|
|
50
|
+
private _isConnecting;
|
|
49
51
|
/**
|
|
50
52
|
* Creates a new NotificationClient instance
|
|
51
53
|
* @param observer - RxJS Subject for emitting notification events
|
|
@@ -59,6 +61,14 @@ export declare class NotificationClient {
|
|
|
59
61
|
flowType?: string;
|
|
60
62
|
eventType?: string;
|
|
61
63
|
}, options?: Partial<NotificationClientOptions>);
|
|
64
|
+
/**
|
|
65
|
+
* Is the websocket connection open
|
|
66
|
+
*/
|
|
67
|
+
get isOpen(): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Is the websocket connection currently connecting
|
|
70
|
+
*/
|
|
71
|
+
get isConnecting(): boolean;
|
|
62
72
|
/**
|
|
63
73
|
* Establishes WebSocket connection and sets up event handlers
|
|
64
74
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AASnC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AASnC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAM/D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,EAAE,MAAM,CAAA;QAClB,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,OAAO,CAAC;QACtB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH,CAAA;AAcD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAKD;;;GAGG;AACH,qBAAa,kBAAkB;IAmB3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IApBnC,OAAO,CAAC,GAAG,CAA+C;IAC1D,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,iBAAiB,CAAI;IAC7B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,aAAa,CAAiB;IAEtC;;;;;;OAMG;gBAEgB,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,EACpC,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE;QACjC,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,EACD,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAU9C;;OAEG;IACH,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED;;OAEG;IACG,OAAO;IAmIb;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;OAEG;IACH,UAAU;IAMV;;;OAGG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM;CAGnC"}
|
|
@@ -28,6 +28,7 @@ const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
|
28
28
|
const mod_js_1 = require("../mod.js");
|
|
29
29
|
const logger_js_1 = require("../utils/logger.js");
|
|
30
30
|
const flowcore_client_js_1 = require("./flowcore-client.js");
|
|
31
|
+
const node_buffer_1 = require("node:buffer");
|
|
31
32
|
// Maximum reconnection interval in milliseconds
|
|
32
33
|
const MAX_RECONNECT_INTERVAL = 30_000;
|
|
33
34
|
/**
|
|
@@ -103,6 +104,18 @@ class NotificationClient {
|
|
|
103
104
|
writable: true,
|
|
104
105
|
value: 0
|
|
105
106
|
});
|
|
107
|
+
Object.defineProperty(this, "_isOpen", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
configurable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
value: false
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(this, "_isConnecting", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
configurable: true,
|
|
116
|
+
writable: true,
|
|
117
|
+
value: false
|
|
118
|
+
});
|
|
106
119
|
this.options = {
|
|
107
120
|
reconnectInterval: 1000,
|
|
108
121
|
...options,
|
|
@@ -110,10 +123,27 @@ class NotificationClient {
|
|
|
110
123
|
this.logger = options?.logger ?? logger_js_1.defaultLogger;
|
|
111
124
|
this.reconnectInterval = options?.reconnectInterval ?? 1000;
|
|
112
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Is the websocket connection open
|
|
128
|
+
*/
|
|
129
|
+
get isOpen() {
|
|
130
|
+
return this._isOpen;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Is the websocket connection currently connecting
|
|
134
|
+
*/
|
|
135
|
+
get isConnecting() {
|
|
136
|
+
return this._isConnecting;
|
|
137
|
+
}
|
|
113
138
|
/**
|
|
114
139
|
* Establishes WebSocket connection and sets up event handlers
|
|
115
140
|
*/
|
|
116
141
|
async connect() {
|
|
142
|
+
if (this._isConnecting || this._isOpen) {
|
|
143
|
+
this.logger.debug("Is already connecting or open");
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this._isConnecting = true;
|
|
117
147
|
const token = await this.oidcClient.getToken();
|
|
118
148
|
const flowcoreClient = new flowcore_client_js_1.FlowcoreClient({
|
|
119
149
|
getBearerToken: () => Promise.resolve(token.accessToken),
|
|
@@ -141,6 +171,8 @@ class NotificationClient {
|
|
|
141
171
|
}
|
|
142
172
|
this.webSocket = new dntShim.WebSocket(`${this.url}?token=${encodeURIComponent(token.accessToken)}`);
|
|
143
173
|
this.webSocket.onopen = () => {
|
|
174
|
+
this._isOpen = true;
|
|
175
|
+
this._isConnecting = false;
|
|
144
176
|
this.logger.info("WebSocket connection opened.");
|
|
145
177
|
this.reconnectInterval = this.options.reconnectInterval;
|
|
146
178
|
this.reconnectAttempts = 0;
|
|
@@ -156,12 +188,12 @@ class NotificationClient {
|
|
|
156
188
|
if (event.data instanceof ArrayBuffer) {
|
|
157
189
|
parsedData = new TextDecoder().decode(event.data);
|
|
158
190
|
}
|
|
159
|
-
else if (Buffer.isBuffer(event.data)) {
|
|
191
|
+
else if (node_buffer_1.Buffer.isBuffer(event.data)) {
|
|
160
192
|
parsedData = event.data.toString();
|
|
161
193
|
}
|
|
162
194
|
else if (Array.isArray(event.data)) {
|
|
163
195
|
// Handle Buffer arrays by concatenating them
|
|
164
|
-
parsedData = Buffer.concat(event.data).toString();
|
|
196
|
+
parsedData = node_buffer_1.Buffer.concat(event.data).toString();
|
|
165
197
|
}
|
|
166
198
|
else {
|
|
167
199
|
parsedData = event.data;
|
|
@@ -192,11 +224,13 @@ class NotificationClient {
|
|
|
192
224
|
}
|
|
193
225
|
};
|
|
194
226
|
this.webSocket.onclose = (event) => {
|
|
227
|
+
this._isOpen = false;
|
|
195
228
|
this.logger.info(`Connection closed: Code [${event.code}], Reason: ${event.reason}`);
|
|
196
229
|
if (event.code !== 1000) {
|
|
197
230
|
this.attemptReconnect();
|
|
198
231
|
return;
|
|
199
232
|
}
|
|
233
|
+
this._isConnecting = false;
|
|
200
234
|
this.observer.complete();
|
|
201
235
|
};
|
|
202
236
|
this.webSocket.onerror = (error) => {
|
|
@@ -214,6 +248,7 @@ class NotificationClient {
|
|
|
214
248
|
return;
|
|
215
249
|
}
|
|
216
250
|
this.reconnectAttempts++;
|
|
251
|
+
this._isConnecting = true;
|
|
217
252
|
this.logger.info(`Attempting reconnection ${this.reconnectAttempts}${this.options.maxReconnects ? `/${this.options.maxReconnects}` : ""} in ${this.reconnectInterval} ms...`);
|
|
218
253
|
setTimeout(() => {
|
|
219
254
|
this.connect();
|
|
@@ -2,4 +2,5 @@ export type { DataCore } from "./data-core.js";
|
|
|
2
2
|
export type { EventType } from "./event-type.js";
|
|
3
3
|
export type { FlowType } from "./flow-type.js";
|
|
4
4
|
export type { FlowcoreEvent } from "./event.js";
|
|
5
|
+
export type { Tenant } from "./tenant.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA"}
|