@trap_stevo/filetide-client 0.0.25 → 0.0.26
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/cjs/FileTideClient.js +19 -3
- package/package.json +1 -1
|
@@ -110,6 +110,17 @@ class FileTideClient {
|
|
|
110
110
|
this.shortcuts = shortcuts;
|
|
111
111
|
this.connectionID = null;
|
|
112
112
|
_assertClassBrand(_FileTideClient_brand, this, _setupProcessEvents).call(this);
|
|
113
|
+
this.messagerSettings = {
|
|
114
|
+
maxReconnectionAttempts: 15,
|
|
115
|
+
reconnectionAttempts: 15,
|
|
116
|
+
maxReconnectionDelay: 10000
|
|
117
|
+
};
|
|
118
|
+
this.transportOptions = {
|
|
119
|
+
parallelChunks: 3,
|
|
120
|
+
maxRetries: 3
|
|
121
|
+
};
|
|
122
|
+
this.connectionOptions = {};
|
|
123
|
+
this.clientOptions = {};
|
|
113
124
|
if (displayTitle) {
|
|
114
125
|
this.displayTitle(showCLITitle);
|
|
115
126
|
}
|
|
@@ -173,6 +184,7 @@ class FileTideClient {
|
|
|
173
184
|
}, onConnect = null, onDisconnect = null, ...clientConfigurations) {
|
|
174
185
|
const launchClient = () => {
|
|
175
186
|
if (this.fileMessagerInstance && this.fileMessagerInstance.clientTide) {
|
|
187
|
+
this.broadcastClientOffline(this.fileMessagerInstance);
|
|
176
188
|
this.fileMessagerInstance.clientTide.closeSocket(this.deviceName);
|
|
177
189
|
}
|
|
178
190
|
fileTide.launchMessager({
|
|
@@ -212,6 +224,10 @@ class FileTideClient {
|
|
|
212
224
|
});
|
|
213
225
|
}, ...clientConfigurations);
|
|
214
226
|
};
|
|
227
|
+
this.connectionOptions = connectionOptions;
|
|
228
|
+
this.transportOptions = transportOptions;
|
|
229
|
+
this.messagerSettings = messagerSettings;
|
|
230
|
+
this.clientOptions = clientOptions;
|
|
215
231
|
launchClient();
|
|
216
232
|
}
|
|
217
233
|
requestFileTransfer(senderID, filePath, destinationPath, filterContent = [], transferRequestExpirationTime = 30000) {
|
|
@@ -268,7 +284,7 @@ class FileTideClient {
|
|
|
268
284
|
changeRoom(room, completion, onReconnect) {
|
|
269
285
|
this.currentRoom = room;
|
|
270
286
|
FileTide.outputGradient(`[${this.deviceName}] Updated room to ${this.currentRoom}`, ["#4D96FF", "#89CFF0"]);
|
|
271
|
-
this.startClient(
|
|
287
|
+
this.startClient(this.clientOptions, this.connectionOptions, this.transportOptions, this.messagerSettings, onReconnect);
|
|
272
288
|
if (completion) {
|
|
273
289
|
completion(room, true);
|
|
274
290
|
}
|
|
@@ -293,7 +309,7 @@ class FileTideClient {
|
|
|
293
309
|
});
|
|
294
310
|
this.deviceName = clientID;
|
|
295
311
|
FileTide.outputGradient(`[${this.deviceName}] Updated client name to ${this.deviceName}`, ["#4D96FF", "#89CFF0"]);
|
|
296
|
-
this.startClient(
|
|
312
|
+
this.startClient(this.clientOptions, this.connectionOptions, this.transportOptions, this.messagerSettings, onReconnect);
|
|
297
313
|
updatedClientID = true;
|
|
298
314
|
}
|
|
299
315
|
if (completion) {
|
|
@@ -304,7 +320,7 @@ class FileTideClient {
|
|
|
304
320
|
changeTideUrl(url, completion, onReconnect) {
|
|
305
321
|
this.tideUrl = url;
|
|
306
322
|
FileTide.outputGradient(`[${this.deviceName}] Updated tide URL to ${this.tideUrl}`, ["#4D96FF", "#89CFF0"]);
|
|
307
|
-
this.startClient(
|
|
323
|
+
this.startClient(this.clientOptions, this.connectionOptions, this.transportOptions, this.messagerSettings, onReconnect);
|
|
308
324
|
if (completion) {
|
|
309
325
|
completion(url, true);
|
|
310
326
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trap_stevo/filetide-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "Seamless, real-time file transfers between devices with effortless connectivity. Allowing for powerful, instant, secure, and cross-platform file sharing, enabling efficient and reliable data transfers in any network environment.",
|
|
5
5
|
"main": "dist/cjs/FileTideClient.js",
|
|
6
6
|
"exports": {
|