@trap_stevo/filetide 0.0.10 → 0.0.11

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.
@@ -69,4 +69,5 @@ class FileMessagerClient {
69
69
  });
70
70
  }
71
71
  }
72
+ ;
72
73
  module.exports = FileMessagerClient;
@@ -41,7 +41,7 @@ class FileTide {
41
41
  * @param {String} userID - The ID of the client user
42
42
  * @param {Function} onLaunch - Callback for when a file messager launches
43
43
  */
44
- launchMessager(clientOptions = {}, roomName, userID, onLaunch, onIncomingFile, onTransferCompletion, onClientsOnline) {
44
+ launchMessager(clientOptions = {}, roomName, userID, onLaunch, onIncomingFile) {
45
45
  if (this.clients.has(userID)) {
46
46
  this.stopMessager(userID);
47
47
  }
@@ -50,7 +50,7 @@ class FileTide {
50
50
  newClient.handleMultipleClientsTransfer();
51
51
  this.clients.set(userID, newClient);
52
52
  console.log(`[FileTide] ~ Messager launched successfully for client ~ ${userID}!`);
53
- _assertClassBrand(_FileTide_brand, this, _setupFileEventListeners).call(this, userID, newClient, onIncomingFile, onTransferCompletion, onClientsOnline);
53
+ _assertClassBrand(_FileTide_brand, this, _setupFileEventListeners).call(this, userID, newClient, onIncomingFile);
54
54
  if (onLaunch) {
55
55
  onLaunch(newClient);
56
56
  }
@@ -137,7 +137,7 @@ class FileTide {
137
137
  return;
138
138
  }
139
139
  }
140
- function _setupFileEventListeners(userID, client, onIncomingFile, onTransferCompletion, onClientsOnline) {
140
+ function _setupFileEventListeners(userID, client, onIncomingFile) {
141
141
  client.clientTide.onEvent(userID, "incoming-file", data => {
142
142
  console.log(`[${userID}] Received file: ${data.fileName}`);
143
143
  const saveDir = data.path;
@@ -154,16 +154,6 @@ function _setupFileEventListeners(userID, client, onIncomingFile, onTransferComp
154
154
  onIncomingFile(data);
155
155
  }
156
156
  });
157
- client.clientTide.onEvent(userID, "transfer-status", data => {
158
- if (onTransferCompletion) {
159
- onTransferCompletion(data);
160
- }
161
- });
162
- client.clientTide.onEvent(userID, "current-clients-online", data => {
163
- if (onClientsOnline) {
164
- onClientsOnline(data);
165
- }
166
- });
167
157
  return;
168
158
  }
169
159
  ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trap_stevo/filetide",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Revolutionizing real-time file transfer with seamless, instant communication across any device. Deliver files instantly, regardless of platform, and experience unparalleled speed and control in managing transfers. Elevate your file-sharing capabilities with a tool designed for precision, efficiency, and effortless connectivity.",
5
5
  "main": "dist/cjs/FileTide.js",
6
6
  "scripts": {