@trap_stevo/filetide-client 0.0.13 → 0.0.15

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.
@@ -162,7 +162,14 @@ class FileTideClient {
162
162
  FileTide.outputGradient(`[${this.deviceName}] Disconnected from the file net.`, ["#00C897", "#00E0FF"]);
163
163
  }
164
164
  }
165
- startClient(clientOptions = {}, connectionOptions = {}, onConnect = null, ...clientConfigurations) {
165
+ startClient(clientOptions = {}, connectionOptions = {}, transportOptions = {
166
+ parallelChunks: 3,
167
+ maxRetries: 3
168
+ }, messagerSettings = {
169
+ maxReconnectionAttempts: 15,
170
+ reconnectionAttempts: 15,
171
+ maxReconnectionDelay: 10000
172
+ }, onConnect = null, ...clientConfigurations) {
166
173
  const launchClient = () => {
167
174
  if (this.fileMessagerInstance && this.fileMessagerInstance.clientTide) {
168
175
  this.fileMessagerInstance.clientTide.closeSocket(this.deviceName);
@@ -175,7 +182,7 @@ class FileTideClient {
175
182
  pingTimeout: 3600000,
176
183
  pingInterval: 60000,
177
184
  ...connectionOptions
178
- }, this.currentRoom, this.deviceName, (fileMessager, enterRoom) => {
185
+ }, transportOptions, messagerSettings, this.currentRoom, this.deviceName, (fileMessager, enterRoom) => {
179
186
  this.fileMessagerInstance = fileMessager;
180
187
  this.connectionID = null;
181
188
  fileMessager.clientTide.onEvent(this.deviceName, "connect", async () => {
@@ -257,7 +264,7 @@ class FileTideClient {
257
264
  changeRoom(room, completion, onReconnect) {
258
265
  this.currentRoom = room;
259
266
  FileTide.outputGradient(`[${this.deviceName}] Updated room to ${this.currentRoom}`, ["#4D96FF", "#89CFF0"]);
260
- this.startClient({}, {}, onReconnect);
267
+ this.startClient({}, {}, {}, {}, onReconnect);
261
268
  if (completion) {
262
269
  completion(room, true);
263
270
  }
@@ -275,7 +282,7 @@ class FileTideClient {
275
282
  this.deviceName = clientID;
276
283
  this.fileMessagerInstance.clientTide.emitEvent(this.currentDeviceName, "client-offline", this.currentDeviceName);
277
284
  FileTide.outputGradient(`[${this.deviceName}] Updated client name to ${this.deviceName}`, ["#4D96FF", "#89CFF0"]);
278
- this.startClient({}, {}, onReconnect);
285
+ this.startClient({}, {}, {}, {}, onReconnect);
279
286
  updatedClientID = true;
280
287
  }
281
288
  if (completion) {
@@ -286,7 +293,7 @@ class FileTideClient {
286
293
  changeTideUrl(url, completion, onReconnect) {
287
294
  this.tideUrl = url;
288
295
  FileTide.outputGradient(`[${this.deviceName}] Updated tide URL to ${this.tideUrl}`, ["#4D96FF", "#89CFF0"]);
289
- this.startClient({}, {}, onReconnect);
296
+ this.startClient({}, {}, {}, {}, onReconnect);
290
297
  if (completion) {
291
298
  completion(url, true);
292
299
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trap_stevo/filetide-client",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
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": {
@@ -37,9 +37,9 @@
37
37
  "author": "Steven Compton",
38
38
  "license": "See License in LICENSE.md",
39
39
  "dependencies": {
40
- "@trap_stevo/filetide": "^0.0.44",
40
+ "@trap_stevo/filetide": "^0.0.46",
41
41
  "@trap_stevo/iotide": "^0.0.37",
42
- "@trap_stevo/legendarybuilderpronodejs-utilities": "^1.0.36",
42
+ "@trap_stevo/legendarybuilderpronodejs-utilities": "^1.0.43",
43
43
  "chalk": "^4.1.2",
44
44
  "readline": "^1.3.0"
45
45
  },