@trap_stevo/filetide-client 0.0.3 → 0.0.5

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/LICENSE.md ADDED
@@ -0,0 +1,36 @@
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. **Ownership**
8
+ **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.
9
+
10
+ ## 2. **Grant of License**
11
+ Licensee is **NOT** granted any rights to use, modify, distribute, or create derivative works of @trap_stevo/filetide-client, either in part or in whole, without prior express written consent from the Licensor. **Any granted license is non-transferable and non-sublicensable without express written consent from the Licensor.**
12
+
13
+ ## 3. **Prohibited Uses**
14
+ Without the express written permission of the Licensor, Licensee shall not:
15
+ - Use the package for any purpose, including but not limited to personal, commercial, or educational purposes.
16
+ - Copy, modify, distribute, or sublicense the package.
17
+ - Reverse-engineer, decompile, or disassemble the package.
18
+ - Create derivative works or adapt the package in any form.
19
+
20
+ ## 4. **Request for Permission**
21
+ Licensee may request permission to use the package by contacting the Licensor at **h.steven.compton13@gmail.com**. All requests must be made in writing, specifying the intended use of the package. Licensor reserves the right to approve, deny, or revoke any permission at its sole discretion. Any granted permission is subject to the Licensor’s terms and may be revoked at any time.
22
+
23
+ ## 5. **Violation of Terms**
24
+ Any unauthorized use of @trap_stevo/filetide-client will result in immediate termination of any rights granted under this Agreement. The Licensor reserves the right to pursue legal action, including seeking damages and injunctive relief, for any violations of these terms.
25
+
26
+ ## 6. **No Warranty**
27
+ @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.
28
+
29
+ ## 7. **Indemnification**
30
+ 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.
31
+
32
+ ## 8. **Governing Law and Dispute Resolution**
33
+ 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**.
34
+
35
+ ## 9. **Amendments**
36
+ 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.
@@ -184,13 +184,13 @@ class FileTideClient {
184
184
  });
185
185
  }, ...clientConfigurations);
186
186
  }
187
- requestFileTransfer(senderID, filePath, destinationPath) {
187
+ requestFileTransfer(senderID, filePath, destinationPath, filterContent = []) {
188
188
  FileTide.outputGradient(`[${this.deviceName}] Requesting ${path.basename(filePath)} from client ~ ${senderID}...`, ["#00C897", "#00E0FF"]);
189
- this.fileMessagerInstance.requestTransfer(this.deviceName, senderID, filePath, destinationPath);
189
+ this.fileMessagerInstance.requestTransfer(this.deviceName, senderID, filePath, destinationPath, filterContent);
190
190
  return;
191
191
  }
192
- transferFiles(recipientID, filePath, destinationPath) {
193
- const fileDetails = fileTide.getPathData(filePath);
192
+ transferFiles(recipientID, filePath, destinationPath, filterContent = []) {
193
+ const fileDetails = fileTide.getPathData(filePath, filterContent);
194
194
  if (!fileDetails) {
195
195
  FileTide.outputGradient(`[${this.deviceName}] File at path ${filePath} not found.`, ["#F94144", "#F3722C"]);
196
196
  return;
@@ -236,32 +236,32 @@ class FileTideClient {
236
236
  }
237
237
  return;
238
238
  }
239
- changeRoom(room, completion) {
239
+ changeRoom(room, completion, onReconnect) {
240
240
  this.currentRoom = room;
241
241
  FileTide.outputGradient(`[${this.deviceName}] Updated room to ${this.currentRoom}`, ["#4D96FF", "#89CFF0"]);
242
- this.startClient();
242
+ this.startClient({}, {}, onReconnect);
243
243
  if (completion) {
244
- completion();
244
+ completion(room);
245
245
  }
246
246
  return;
247
247
  }
248
- changeClientID(clientID, completion) {
248
+ changeClientID(clientID, completion, onReconnect) {
249
249
  this.currentDeviceName = this.deviceName;
250
250
  this.deviceName = clientID;
251
251
  this.fileMessagerInstance.clientTide.emitEvent(this.currentDeviceName, "client-offline", this.currentDeviceName);
252
252
  FileTide.outputGradient(`[${this.deviceName}] Updated client name to ${this.deviceName}`, ["#4D96FF", "#89CFF0"]);
253
- this.startClient();
253
+ this.startClient({}, {}, onReconnect);
254
254
  if (completion) {
255
- completion();
255
+ completion(clientID);
256
256
  }
257
257
  return;
258
258
  }
259
- changeTideUrl(url, completion) {
259
+ changeTideUrl(url, completion, onReconnect) {
260
260
  this.tideUrl = url;
261
261
  FileTide.outputGradient(`[${this.deviceName}] Updated tide URL to ${this.tideUrl}`, ["#4D96FF", "#89CFF0"]);
262
- this.startClient();
262
+ this.startClient({}, {}, onReconnect);
263
263
  if (completion) {
264
- completion();
264
+ completion(url);
265
265
  }
266
266
  return;
267
267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trap_stevo/filetide-client",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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": {
@@ -34,9 +34,9 @@
34
34
  "real-time-sync"
35
35
  ],
36
36
  "author": "Steven Compton",
37
- "license": "ISC",
37
+ "license": "See License in LICENSE.md",
38
38
  "dependencies": {
39
- "@trap_stevo/filetide": "^0.0.32",
39
+ "@trap_stevo/filetide": "^0.0.36",
40
40
  "@trap_stevo/iotide": "^0.0.37",
41
41
  "@trap_stevo/legendarybuilderpronodejs-utilities": "^1.0.36",
42
42
  "chalk": "^4.1.2",