@trap_stevo/filetide-client 0.0.51 → 0.0.53

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.
@@ -0,0 +1,228 @@
1
+ # SCL-1.0-Universal — Steven Compton Universal License v1.0
2
+ (Source-Available, No Redistribution, No Reverse Engineering)
3
+
4
+ **Effective Date:** October 1, 2024
5
+ **Licensor:** Hassan Steven Compton (Steven Compton) (“Licensor”)
6
+ **Package:** @trap_stevo/filetide-client (“Package”)
7
+ **Licensee:** Any individual or entity installing, using, referencing, or integrating the “Package”
8
+
9
+ **SPDX Identifier:** SCL-1.0-Universal
10
+
11
+ ---
12
+
13
+ ## 1. Definitions
14
+
15
+ ### **1.1 “Package”**
16
+ Refers to the software identified as @trap_stevo/filetide-client, including its source code, object code, binaries, compiled outputs, metadata, and documentation.
17
+
18
+ ### **1.2 “Source Code”**
19
+ Human-readable implementation of the “Package”, whether distributed or not.
20
+
21
+ ### **1.3 “Dependent System”**
22
+ Means any system, software, hardware, firmware, service, device, environment, runtime, application, platform, embedded implementation, virtual machine, cloud service, or any other construct that uses, integrates, links to, or depends upon the “Package”, directly or indirectly, without including or exposing the “Package’s” code or internal structure.
23
+
24
+ ### **1.4 “Derivative Work”**
25
+ Any software, product, service, system, or implementation based on or derived from the “Package’s” source code, object code, architecture, structure, behavior, or design, in part or in whole.
26
+
27
+ ---
28
+
29
+ ## 2. Ownership
30
+
31
+ The “Licensor” retains exclusive ownership of all rights, title, and interest in and to the “Package”, including all associated intellectual property.
32
+
33
+ This Agreement transfers no ownership rights to the “Licensee”.
34
+
35
+ ---
36
+
37
+ ## 3. Grant of License
38
+
39
+ Subject to all terms of this Agreement, the “Licensor” grants the “Licensee” a limited, non-exclusive, revocable, non-transferable, and non-sublicensable license to:
40
+
41
+ 1. Use the “Package” as a dependency in “Dependent Systems” created by the “Licensee”.
42
+ 2. Distribute “Dependent Systems”, provided the “Package” is **never** included, exposed, modified, redistributed, or replicated in any form.
43
+
44
+ Nothing in this Agreement grants the “Licensee” permission to:
45
+
46
+ - modify the “Package”
47
+ - redistribute the “Package”
48
+ - fork the “Package”
49
+ - repackage the “Package”
50
+ - host the “Package”
51
+ - analyze the “Package”
52
+ - expose internal behavior of the “Package”
53
+ - create derivative or competing software based on the “Package”
54
+
55
+ ---
56
+
57
+ ## 4. Prohibited Uses
58
+
59
+ Without the express written permission of the “Licensor”, the “Licensee” shall not:
60
+
61
+ 1. Modify, decompile, reverse-engineer, or disassemble the “Package” in any way.
62
+ 2. Include the “Package’s” source code or object code in any distributed software, service, or application.
63
+ 3. Use the “Package” to create a competing product or service that replicates the functionality of the “Package”.
64
+ 4. Make the “Package” publicly available, including uploading it to public repositories or including it in distributed software bundles.
65
+ 5. Attempt to extract or analyze the functionality, structure, or behavior of the “Package” through runtime inspection, instrumentation, reflection, or behavioral analysis.
66
+ 6. Privately share, sublicense, or distribute the “Package” or any portion thereof, whether internally within an organization or externally to any third party, without written authorization.
67
+ 7. Remove, obscure, obfuscate, or alter any attribution, copyright notices, proprietary labels, or identifiers included in the “Package”.
68
+ 8. Re-upload, rename, fork, or redistribute the “Package” or any portion thereof on any registry, platform, or namespace other than that explicitly maintained or authorized by the “Licensor”.
69
+ 9. Use the “Package” in any way that violates applicable laws, infringes on third-party rights, or breaches this Agreement.
70
+
71
+ Any attempt to bypass or circumvent these restrictions constitutes a material breach.
72
+
73
+ ### 4.A. No Competitive Re-implementation
74
+
75
+ “Licensee” shall not create, develop, train, test, benchmark, or distribute any software, system, service, model, or method that uses, incorporates, is derived from, or is based upon the “Package’s” source code, object code, algorithms, data structures, interfaces, protocols, internal behavior, design, architecture, or execution characteristics for the purpose of creating a product or service that provides substantially similar functionality to the “Package”, competes with the “Package”, or reproduces its core operations.
76
+
77
+ “Licensee” shall not directly or indirectly analyze, observe, measure, study, or evaluate the behavior, performance, outputs, or internal characteristics of the “Package” for the purpose of creating, validating, training, improving, or assisting any competing or functionally similar software, system, service, or model.
78
+
79
+ Any such activity shall constitute creation of an unauthorized derivative work and is strictly prohibited.
80
+
81
+ ---
82
+
83
+ ## 5. Dependent System Requirements
84
+
85
+ The “Licensee” may create and distribute “Dependent Systems” only if all of the following conditions are met:
86
+
87
+ 1. The “Dependent System” does **not** include or expose any portion of the “Package’s” source code or object code.
88
+ 2. The “Dependent System” identifies the “Package” as a dependency in its documentation.
89
+ 3. The “Dependent System” provides substantial original functionality.
90
+ 4. The “Dependent System” does not replicate, emulate, reimplement, or mimic any significant part of the “Package’s” behavior or design.
91
+ 5. The “Dependent System” complies fully with this Agreement.
92
+
93
+ ---
94
+
95
+ ## 6. Request for Additional Permissions
96
+
97
+ The “Licensee” may request additional rights by contacting:
98
+
99
+ **h.steven.compton13@gmail.com**
100
+
101
+ Requests must:
102
+
103
+ 1. Be submitted in writing
104
+ 2. Describe purpose, scope, and distribution method
105
+
106
+ The “Licensor” may:
107
+
108
+ - approve or deny at sole discretion
109
+ - impose additional terms
110
+ - revoke previously granted permissions with written notice
111
+
112
+ All permissions must be explicit and in writing.
113
+
114
+ ---
115
+
116
+ ## 7. Violation of Terms (Termination)
117
+
118
+ 1. Any violation of this Agreement results in immediate termination of all licensed rights.
119
+ 2. Upon termination, the “Licensee” must:
120
+ - cease all use of the “Package”
121
+ - remove the “Package” from all systems and environments
122
+ - destroy all copies, including caches and build artifacts
123
+ - confirm destruction in writing if requested
124
+ 3. The “Licensor” may pursue damages, injunctive relief, or any other legal remedy.
125
+
126
+ ---
127
+
128
+ ## 8. No Warranty
129
+
130
+ The “Package” is provided **“AS IS”**, without any warranty, express or implied, including but not limited to merchantability, fitness for a particular purpose, or non-infringement.
131
+
132
+ The “Licensee” assumes all risk associated with use.
133
+
134
+ ---
135
+
136
+ ## 9. Intellectual Property Limitations
137
+
138
+ Nothing in this Agreement grants the “Licensee” any rights under any patent, whether by implication, estoppel, exhaustion, or otherwise. Any use of the “Package” that would require a patent license must receive separate written permission from the “Licensor”.
139
+
140
+ This Agreement also grants no rights to use the “Licensor’s” trademarks, service marks, branding, logos, product names, or organizational names. Any such use requires separate written permission.
141
+
142
+ No patent rights, trademark rights, or branding rights are provided or implied by this license.
143
+
144
+ ---
145
+
146
+ ## 10. Patent Rights and Restrictions
147
+
148
+ ### 10.1 No Implied Patent License
149
+
150
+ Except as expressly stated in this Section, the “Licensor” grants no license, covenant, immunity, or right under any patent or patent application owned, controlled, or licensable by the “Licensor”. All such rights are expressly reserved.
151
+
152
+ ### 10.2 Patent Grant for Non-Competitive Use
153
+
154
+ Subject to full compliance with this Agreement, the “Licensor” grants the “Licensee” a limited, non-exclusive, non-transferable, revocable, royalty-free patent license to use any patent claims embodied in the “Package” solely to the extent necessary to use the unmodified “Package” as permitted under Section 3.
155
+
156
+ This grant does not extend to:
157
+
158
+ - derivative works
159
+
160
+ - competing software
161
+
162
+ - re-implementations
163
+
164
+ - architectural replications
165
+
166
+ - alternative implementations of patented methods
167
+
168
+ - any use not directly involving the unmodified “Package”
169
+
170
+ ### 10.3 Patent Restriction for Competing Systems
171
+
172
+ No patent license is granted for any software, system, service, or model that:
173
+
174
+ - competes with the “Package”,
175
+
176
+ - provides substantially similar core functionality,
177
+
178
+ - implements any patented algorithm, method, design, architecture, or process used by the Package, or
179
+
180
+ - is a re-implementation or functional substitute of the “Package”.
181
+
182
+ Any such use constitutes patent infringement and is prohibited.
183
+
184
+ ### 10.4 Termination of Patent Rights
185
+
186
+ Any violation of this Agreement immediately terminates all patent licenses granted herein. Upon termination, Licensee must cease all uses of the patented subject matter and destroy any implementations utilizing such technology.
187
+
188
+ ---
189
+
190
+ ## 11. Indemnification
191
+
192
+ The “Licensee” agrees to indemnify and hold harmless the “Licensor” from any claims, damages, liabilities, losses, or expenses arising from:
193
+
194
+ - violation of this Agreement
195
+ - misuse of the “Package”
196
+ - unlawful or infringing use
197
+
198
+ ---
199
+
200
+ ## 12. Governing Law & Dispute Resolution
201
+
202
+ This Agreement is governed by the laws of **Georgia, United States**, without regard to conflict-of-law principles.
203
+
204
+ All disputes shall be resolved exclusively through binding arbitration in **Georgia, United States**.
205
+
206
+ ---
207
+
208
+ ## 13. Amendments
209
+
210
+ The “Licensor” may modify this Agreement at any time.
211
+
212
+ Changes take effect 30 days after posting at:
213
+
214
+ **https://www.npmjs.com/package/@trap_stevo/filetide-client**
215
+
216
+ Continued use of the “Package” constitutes acceptance of the updated terms.
217
+
218
+ ---
219
+
220
+ ## 14. Applicability to All Versions
221
+
222
+ This Agreement applies to **all versions** of the “Package” downloaded, installed, or used on or after the Effective Date.
223
+
224
+ Use of any version after this date constitutes acceptance of this License unless explicitly overridden by the “Licensor”.
225
+
226
+ ---
227
+
228
+ **SPDX-License-Identifier: SCL-1.0-Universal**
@@ -3,13 +3,8 @@
3
3
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
4
4
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
5
5
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
6
- const {
7
- HUDUtilityManager
8
- } = require("@trap_stevo/legendarybuilderpronodejs-utilities");
9
6
  const FileTide = require("@trap_stevo/filetide");
10
- const chalk = require("chalk");
11
7
  const path = require("path");
12
- const fs = require("fs");
13
8
  const os = require("os");
14
9
  let currentRoom = "file-room";
15
10
  let tideUrl = "http://localhost:9269";
@@ -18,7 +13,7 @@ let fileTide;
18
13
  let fileMessagerInstance;
19
14
  const gradients = {
20
15
  success: ["\x1b[38;5;48m", "\x1b[38;5;49m", "\x1b[38;5;50m"],
21
- "indicator": ["\x1b[38;5;30m", "\x1b[38;5;37m", "\x1b[38;5;44m", "\x1b[38;5;51m", "\x1b[38;5;147m"],
16
+ indicator: ["\x1b[38;5;30m", "\x1b[38;5;37m", "\x1b[38;5;44m", "\x1b[38;5;51m", "\x1b[38;5;147m"],
22
17
  error: ["\x1b[38;5;203m", "\x1b[38;5;202m", "\x1b[38;5;208m"],
23
18
  info: ["\x1b[38;5;74m", "\x1b[38;5;75m"],
24
19
  critical: ["\x1b[38;5;203m", "\x1b[38;5;214m"],
@@ -122,10 +117,12 @@ class FileTideClient {
122
117
  };
123
118
  this.connectionOptions = {};
124
119
  this.clientOptions = {};
120
+ this.clientConfigurations = {};
121
+ this.onConnect = null;
122
+ this.onDisconnect = null;
125
123
  if (displayTitle) {
126
124
  this.displayTitle(showCLITitle);
127
125
  }
128
- return;
129
126
  }
130
127
 
131
128
  // --- FileTide Client TideToken Enforcement Management ---
@@ -191,12 +188,71 @@ class FileTideClient {
191
188
  maxReconnectionAttempts: 15,
192
189
  reconnectionAttempts: 15,
193
190
  maxReconnectionDelay: 10000
194
- }, onConnect = null, onDisconnect = null, ...clientConfigurations) {
191
+ }, onConnect = null, onDisconnect = null, clientConfigurations = {}) {
192
+ const {
193
+ onLaunch = null,
194
+ onIncomingFile = null,
195
+ onIncomingTransfer = null,
196
+ onTransferBarrier = null,
197
+ onTransferProgress = null,
198
+ enableTransferBarrier = true,
199
+ headers = {},
200
+ authURL = "",
201
+ authHeaders = {},
202
+ useAuthentication = false,
203
+ queryAuthToken = false,
204
+ options = {},
205
+ ...lifecycleOptions
206
+ } = clientConfigurations || {};
207
+ const fileTideOptions = {
208
+ ...options,
209
+ ...lifecycleOptions
210
+ };
195
211
  const launchClient = () => {
196
212
  if (this.fileMessagerInstance && this.fileMessagerInstance.clientTide && this.fileMessagerInstance.clientTide.tideExists(this.deviceName)) {
197
213
  this.broadcastClientOffline(this.fileMessagerInstance);
198
214
  this.fileMessagerInstance.clientTide.closeSocket(this.deviceName);
199
215
  }
216
+ let enterRoom = null;
217
+ let pendingConnectionArguments = null;
218
+ let connectionHandled = false;
219
+ const handleConnection = async (...connectionArguments) => {
220
+ if (typeof enterRoom !== "function") {
221
+ pendingConnectionArguments = connectionArguments;
222
+ return;
223
+ }
224
+ if (connectionHandled) {
225
+ return;
226
+ }
227
+ connectionHandled = true;
228
+ this.clientDisconnected = false;
229
+ const socket = this.fileMessagerInstance?.clientTide?.sockets?.[this.deviceName];
230
+ if (!socket) {
231
+ connectionHandled = false;
232
+ return;
233
+ }
234
+ this.connectionID = socket.id;
235
+
236
+ /*
237
+ * Register this Tider with Anchor.
238
+ *
239
+ * Anchor's handleClientOnline currently expects
240
+ * these positional values:
241
+ *
242
+ * clientID
243
+ * tideID
244
+ * previousClientID
245
+ * connectionID
246
+ * activeTransferBarrier
247
+ * originClientID
248
+ * currentTideChannel
249
+ */
250
+ this.fileMessagerInstance.clientTide.emitEvent(this.deviceName, "client-online", this.deviceName, socket.tideID, this.currentDeviceName, socket.id, fileTide.transferBarrier, this.originDeviceName, this.currentRoom);
251
+ enterRoom();
252
+ if (typeof onConnect === "function") {
253
+ await onConnect(this.fileMessagerInstance, ...connectionArguments);
254
+ }
255
+ };
200
256
  fileTide.launchMessager({
201
257
  serverUrl: this.tideUrl,
202
258
  ...clientOptions
@@ -205,41 +261,32 @@ class FileTideClient {
205
261
  pingTimeout: 3600000,
206
262
  pingInterval: 60000,
207
263
  ...connectionOptions
208
- }, transportOptions, messagerSettings, this.currentRoom, this.deviceName, (fileMessager, enterRoom) => {
264
+ }, transportOptions, messagerSettings, this.currentRoom, this.deviceName, (fileMessager, roomEntry) => {
209
265
  this.fileMessagerInstance = fileMessager;
210
- this.connectionID = null;
211
- fileMessager.clientTide.onEvent(this.deviceName, "connect", async () => {
212
- this.clientDisconnected = false;
213
- this.connectionID = fileMessager.clientTide.sockets[this.deviceName].id;
214
- FileTide.outputGradient(`[${this.deviceName}] Connected to FileTide ~ ${this.tideUrl} in ${this.currentRoom}!`, ["#00C897", "#00E0FF"]);
215
- fileMessager.clientTide.emitEvent(this.deviceName, "client-online", this.deviceName, fileMessager.clientTide.sockets[this.deviceName].tideID, this.pDeviceName, fileMessager.clientTide.sockets[this.deviceName].id, fileTide.transferBarrier, this.originDeviceName, this.currentRoom);
216
- const clientOnline = await fileMessager.clientTide.emitEventWithResponse(this.deviceName, "check-client-online", "retrieved-client-online", {
217
- clientID: this.deviceName
218
- }, 5000);
219
- if (clientOnline && clientOnline.online && clientOnline.client.id !== this.connectionID) {
220
- launchClient();
221
- return;
222
- }
223
- enterRoom();
224
- FileTide.outputGradient(`[${this.deviceName}] Getting connected clients...`, ["#00C897", "#00E0FF"]);
225
- if (onConnect) {
226
- onConnect(fileMessager);
227
- }
228
- });
229
- fileMessager.clientTide.onEvent(this.deviceName, "disconnect", () => {
230
- if (this.fileMessagerInstance.clientTide.tideExists(this.deviceName)) {
231
- this.broadcastClientOffline(fileMessager);
232
- }
233
- if (onDisconnect) {
234
- onDisconnect(this.deviceName, this.connectionID, this.tideUrl);
235
- }
236
- });
237
- }, ...clientConfigurations);
266
+ fileMessagerInstance = fileMessager;
267
+ enterRoom = roomEntry;
268
+ if (typeof onLaunch === "function") {
269
+ onLaunch(fileMessager, roomEntry);
270
+ }
271
+ if (pendingConnectionArguments) {
272
+ const connectionArguments = pendingConnectionArguments;
273
+ pendingConnectionArguments = null;
274
+ handleConnection(...connectionArguments);
275
+ }
276
+ }, onIncomingFile, onIncomingTransfer, onTransferBarrier, onTransferProgress, enableTransferBarrier, fileTideOptions, headers, handleConnection, async (...disconnectArguments) => {
277
+ this.clientDisconnected = true;
278
+ if (typeof onDisconnect === "function") {
279
+ await onDisconnect(this.deviceName, this.connectionID, this.tideUrl, ...disconnectArguments);
280
+ }
281
+ }, authURL, authHeaders, useAuthentication, queryAuthToken);
238
282
  };
239
283
  this.connectionOptions = connectionOptions;
240
284
  this.transportOptions = transportOptions;
241
285
  this.messagerSettings = messagerSettings;
242
286
  this.clientOptions = clientOptions;
287
+ this.clientConfigurations = clientConfigurations || {};
288
+ this.onDisconnect = onDisconnect;
289
+ this.onConnect = onConnect;
243
290
  launchClient();
244
291
  }
245
292
  getOnlineClients(completion) {
@@ -247,30 +294,34 @@ class FileTideClient {
247
294
  if (completion) {
248
295
  completion();
249
296
  }
250
- return;
251
297
  }
252
- refreshConnection(reconnectClient = true, onReconnect, onDisconnect, ...clientConfigurations) {
298
+ refreshConnection(reconnectClient = true, onReconnect = this.onConnect, onDisconnect = this.onDisconnect, clientConfigurations = this.clientConfigurations) {
253
299
  if (!reconnectClient) {
254
300
  return;
255
301
  }
256
- this.startClient(this.clientOptions, this.connectionOptions, this.transportOptions, this.messagerSettings, onReconnect, onDisconnect, ...clientConfigurations);
257
- return;
302
+ this.startClient(this.clientOptions, this.connectionOptions, this.transportOptions, this.messagerSettings, onReconnect, onDisconnect, clientConfigurations);
258
303
  }
259
304
 
260
305
  // --- FileTide Client Transfer Management ---
261
306
 
262
- requestFileTransfer(senderID, filePath, destinationPath, filterContent = [], transferRequestExpirationTime = 30000) {
307
+ async requestFileTransfer(senderID, filePath, destinationPath, filterContent = [], transferRequestExpirationTime = 30000) {
263
308
  FileTide.outputGradient(`[${this.deviceName}] Requesting ${path.basename(filePath)} from client ~ ${senderID}...`, ["#00C897", "#00E0FF"]);
264
- this.fileMessagerInstance.requestTransfer(this.deviceName, senderID, filePath, destinationPath, filterContent, transferRequestExpirationTime);
265
- return;
309
+ return await this.fileMessagerInstance.requestTransfer(this.deviceName, senderID, filePath, destinationPath, filterContent, transferRequestExpirationTime);
266
310
  }
267
311
  async transferFiles(recipientID, filePath, destinationPath, filterContent = [], tideSize = 200, tidalSize = 500, minTideSize = 10, maxTideSize = 2000, transferRequestExpirationTime = 30000, metadata = {}) {
268
- await fileTide.sendToDevice(recipientID, filePath, destinationPath, filterContent, tideSize, tidalSize, minTideSize, maxTideSize, transferRequestExpirationTime, metadata);
269
- return;
312
+ return await fileTide.sendToDevice(recipientID, filePath, destinationPath, filterContent, tideSize, tidalSize, minTideSize, maxTideSize, transferRequestExpirationTime, metadata);
270
313
  }
271
314
  listFiles(recipientID, depth = 1) {
272
- fileTide.listFilesFromClient(recipientID, depth);
273
- return;
315
+ return fileTide.listFilesFromClient(recipientID, depth);
316
+ }
317
+
318
+ // --- FileTide Client Transfer State Management ---
319
+
320
+ getTransferStats(transferID) {
321
+ return fileTide.getTransferStats(transferID);
322
+ }
323
+ getTransferStatsOverview() {
324
+ return fileTide.getTransferStatsOverview();
274
325
  }
275
326
 
276
327
  // --- FileTide Client Shore Policy Management ---
@@ -309,16 +360,15 @@ class FileTideClient {
309
360
 
310
361
  // --- FileTide Client Client Settings Management ---
311
362
 
312
- changeRoom(room, completion, reconnectClient = true, onReconnect, onDisconnect, ...clientConfigurations) {
363
+ changeRoom(room, completion, reconnectClient = true, onReconnect = this.onConnect, onDisconnect = this.onDisconnect, clientConfigurations = this.clientConfigurations) {
313
364
  this.currentRoom = room;
314
365
  FileTide.outputGradient(`[${this.deviceName}] Updated room to ${this.currentRoom}`, ["#4D96FF", "#89CFF0"]);
315
- this.refreshConnection(reconnectClient, onReconnect, onDisconnect, ...clientConfigurations);
366
+ this.refreshConnection(reconnectClient, onReconnect, onDisconnect, clientConfigurations);
316
367
  if (completion) {
317
368
  completion(room, true);
318
369
  }
319
- return;
320
370
  }
321
- async changeClientID(clientID, completion, reconnectClient = true, onReconnect, onDisconnect, ...clientConfigurations) {
371
+ async changeClientID(clientID, completion, reconnectClient = true, onReconnect = this.onConnect, onDisconnect = this.onDisconnect, clientConfigurations = this.clientConfigurations) {
322
372
  const clientOnline = await this.fileMessagerInstance.clientTide.emitEventWithResponse(clientID, "check-client-online", "retrieved-client-online", {
323
373
  clientID
324
374
  }, 5000);
@@ -336,22 +386,20 @@ class FileTideClient {
336
386
  this.fileMessagerInstance.clientTide.closeSocket(this.deviceName);
337
387
  this.deviceName = clientID;
338
388
  FileTide.outputGradient(`[${pDeviceName}] Updated client name to ${this.deviceName}`, ["#4D96FF", "#89CFF0"]);
339
- this.refreshConnection(reconnectClient, onReconnect, onDisconnect, ...clientConfigurations);
389
+ this.refreshConnection(reconnectClient, onReconnect, onDisconnect, clientConfigurations);
340
390
  updatedClientID = true;
341
391
  }
342
392
  if (completion) {
343
393
  completion(clientID, updatedClientID);
344
394
  }
345
- return;
346
395
  }
347
- changeTideUrl(url, completion, reconnectClient = true, onReconnect, onDisconnect, ...clientConfigurations) {
396
+ changeTideUrl(url, completion, reconnectClient = true, onReconnect = this.onConnect, onDisconnect = this.onDisconnect, clientConfigurations = this.clientConfigurations) {
348
397
  this.tideUrl = url;
349
398
  FileTide.outputGradient(`[${this.deviceName}] Updated tide URL to ${this.tideUrl}`, ["#4D96FF", "#89CFF0"]);
350
- this.refreshConnection(reconnectClient, onReconnect, onDisconnect, ...clientConfigurations);
399
+ this.refreshConnection(reconnectClient, onReconnect, onDisconnect, clientConfigurations);
351
400
  if (completion) {
352
401
  completion(url, true);
353
402
  }
354
- return;
355
403
  }
356
404
 
357
405
  // --- FileTide Client Display Management ---
@@ -359,7 +407,9 @@ class FileTideClient {
359
407
  applyGradient(text, gradientType) {
360
408
  const colors = gradients[gradientType];
361
409
  let gradientText = "";
362
- if (text.length === 0) return colorReset + text;
410
+ if (text.length === 0) {
411
+ return colorReset + text;
412
+ }
363
413
  const totalSteps = Math.max(text.length - 1, 1);
364
414
  for (let i = 0; i < text.length; i++) {
365
415
  const progress = i / totalSteps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trap_stevo/filetide-client",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
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": {
@@ -35,9 +35,9 @@
35
35
  "real-time-sync"
36
36
  ],
37
37
  "author": "Steven Compton",
38
- "license": "See License in LICENSE.md",
38
+ "license": "SCL-1.0-Universal",
39
39
  "dependencies": {
40
- "@trap_stevo/filetide": "^0.0.84",
40
+ "@trap_stevo/filetide": "^0.0.87",
41
41
  "@trap_stevo/iotide": "^0.0.46",
42
42
  "@trap_stevo/legendarybuilderpronodejs-utilities": "^1.0.51",
43
43
  "chalk": "^4.1.2"
package/LICENSE.md DELETED
@@ -1,79 +0,0 @@
1
- # License Agreement for @trap_stevo/filetide-client
2
-
3
- **Effective Date**: October 1, 2024
4
-
5
- This License Agreement ("Agreement") is entered into by and between **Hassan Steven Compton**, the owner of the package ("Licensor"), and any individual or entity attempting to use the package ("Licensee"). By attempting to install, use, modify, or distribute the package, Licensee agrees to the following terms and conditions:
6
-
7
- ## 1. **Definitions**
8
- - **"Package"**: Refers to the software identified as @trap_stevo/filetide-client, including its source code, object code, binaries, and any related files or documentation.
9
- - **"Wrapper API"**: Refers to any software, service, or application developed by the Licensee that interacts with the Package as a dependency but does not include, modify, or expose the Package's source code or proprietary components.
10
- - **"Derivative Work"**: Refers to any software, service, or product that is based on or derived from the Package's source code or object code, either in part or in whole, and includes modified, translated, or adapted versions of the Package.
11
-
12
- ## 2. **Ownership**
13
- **Hassan Steven Compton** is the sole owner of all rights, title, and interest in and to @trap_stevo/filetide-client, including all related intellectual property rights.
14
-
15
- ## 3. **Grant of License**
16
- Subject to the terms of this agreement, the Licensor grants the Licensee a limited, non-exclusive, revocable license to:
17
- 1. Use the Package as a dependency or library within their own projects to create Wrapper APIs, services, or applications.
18
- 2. Distribute Wrapper APIs, services, or applications that rely on the Package, provided the Package's source code is not included, modified, or distributed as part of the Wrapper.
19
-
20
- Licensee is **NOT** permitted to:
21
- - Modify, copy, or distribute the Package's source code or object code.
22
- - Create or distribute any Derivative Work based on the Package.
23
- - Remove, alter, or obscure any proprietary notices, attributions, or trademarks included in the Package.
24
-
25
- This license is non-transferable and non-sublicensable without prior express written consent from the Licensor.
26
-
27
- ## 4. **Prohibited Uses**
28
- Without the express written permission of the Licensor, Licensee shall not:
29
- 1. Modify, decompile, reverse-engineer, or disassemble the Package in any way.
30
- 2. Include the Package's source code or object code in any distributed software, service, or application.
31
- 3. Use the Package to create a competing product or service that replicates the functionality of the Package.
32
- 4. Make the Package publicly available, including uploading it to public repositories or including it in distributed software bundles.
33
- 5. Attempt to extract or analyze the functionality, structure, or behavior of the Package through runtime inspection, instrumentation, reflection, or behavioral analysis.
34
- 6. Privately share, sublicense, or distribute the Package or any portion thereof, whether internally within an organization or externally to any third party, without written authorization.
35
- 7. Remove, obscure, obfuscate, or alter any attribution, copyright notices, proprietary labels, or identifiers included in the Package.
36
- 8. Re-upload, rename, fork, or redistribute the Package or any portion thereof on any registry, platform, or namespace other than that explicitly maintained by or authorized by the Licensor.
37
- 9. Use the Package in any way that violates applicable laws, infringes on third-party rights, or breaches this agreement.
38
-
39
- ## 5. **Wrapper API Creation**
40
- Licensee is permitted to create and distribute Wrapper APIs, provided that:
41
- 1. The Wrapper API does not expose or include the Package's source code or object code in any form.
42
- 2. The Wrapper API identifies @trap_stevo/filetide-client as a dependency in its documentation and credits it as required by this license.
43
- 3. The Wrapper API complies with all terms outlined in this agreement, including restrictions on modification and redistribution of the Package.
44
- 4. The Wrapper API adds substantial original functionality and does not merely replicate or repackage the Package's functionality.
45
-
46
- ## 6. **Request for Permission**
47
- Licensee may request additional permissions to use the Package beyond the scope of this agreement by contacting the Licensor at **h.steven.compton13@gmail.com**. All requests must:
48
-
49
- 1. Be submitted in writing.
50
- 2. Specify the intended use of the Package in detail, including but not limited to the purpose, scope, and distribution method.
51
-
52
- The Licensor reserves the right to:
53
- - Approve or deny any request at its sole discretion, with or without providing a reason.
54
- - Impose additional terms and conditions for any granted permission.
55
- - Revoke any granted permission at any time, for any reason, with prior written notice to the Licensee.
56
-
57
- Any permission granted by the Licensor:
58
- - Must be documented in writing.
59
- - Does not constitute a waiver of any rights or terms outlined in this agreement unless explicitly stated.
60
- - Remains non-transferable and non-sublicensable.
61
-
62
- ## 7. **Violation of Terms**
63
- 1. Any violation of this agreement will result in the immediate termination of the Licensee's rights under this license.
64
- 2. Upon termination, the Licensee must cease all use of the Package, destroy all copies in their possession, and confirm compliance with this clause to the Licensor in writing.
65
- 3. The Licensor reserves the right to seek legal remedies, including damages and injunctive relief, for any breach of this agreement.
66
-
67
- ## 8. **No Warranty**
68
- @trap_stevo/filetide-client is provided "as is," without any warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement. Licensee assumes all risks associated with the use of the package, including but not limited to potential damage to systems or data.
69
-
70
- ## 9. **Indemnification**
71
- Licensee agrees to indemnify and hold harmless the Licensor from any and all claims, damages, liabilities, and expenses arising out of Licensee's use of the package in violation of this Agreement.
72
-
73
- ## 10. **Governing Law and Dispute Resolution**
74
- This Agreement shall be governed by and construed in accordance with the laws of **the state of Georgia**, without regard to its conflict of law principles. Any disputes arising out of this Agreement shall be resolved through arbitration in **the state of Georgia**.
75
-
76
- ## 11. **Amendments**
77
- Licensor reserves the right to modify or update this Agreement at any time. Any changes to the Agreement will be effective **30 days** after being posted to **https://www.npmjs.com/package/@trap_stevo/filetide-client**. The Licensor will notify Licensees of any material changes by **posting a notice in the package’s release notes on NPM**. Continued use of the package after the notice period constitutes acceptance of the modified terms.
78
-
79
- **This Agreement applies to all versions of @trap_stevo/filetide-client downloaded, installed, or used on or after the Effective Date of this license, regardless of version number.** Use of any version of the Package after this date shall be deemed acceptance of and agreement to the terms of this license, unless otherwise explicitly stated by the Licensor.