@trap_stevo/filetide 0.0.35 → 0.0.37

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.
@@ -148,7 +148,8 @@ class FileMessager {
148
148
  handleListClientFiles(clientData) {
149
149
  const {
150
150
  requesterID,
151
- recipientID
151
+ recipientID,
152
+ depth = 1
152
153
  } = clientData;
153
154
  const recipientConnectionID = FileNetClientManager.getOnlineClient(recipientID).id;
154
155
  const senderConnectionID = FileNetClientManager.getOnlineClient(requesterID).id;
@@ -159,7 +160,8 @@ class FileMessager {
159
160
  }
160
161
  this.fileNet.emitToTide(client.tideID, "list-files", {
161
162
  senderID: requesterID,
162
- recipientID
163
+ recipientID,
164
+ depth
163
165
  });
164
166
  }
165
167
  handleClientToClientTransfer(transferData) {
@@ -108,6 +108,15 @@ class FileTide {
108
108
  }
109
109
  });
110
110
  }
111
+ listFilesFromClient(recipientID, depth = 1) {
112
+ const clientID = this.currentUserID;
113
+ const clientMessager = this.clients.get(clientID);
114
+ if (!clientMessager) {
115
+ FileTide.outputGradient(`[FileTide] Client ~ ${clientID} not found.`, ["#F94144", "#F3722C"]);
116
+ return;
117
+ }
118
+ clientMessager.listFiles(clientID, recipientID, depth);
119
+ }
111
120
  async listFiles(directories, depth = 1) {
112
121
  return await FileUtilityManager.listFiles(directories, depth);
113
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trap_stevo/filetide",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
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": {