@trap_stevo/filetide 0.0.37 → 0.0.38
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/dist/cjs/FileMessager.js +2 -0
- package/dist/cjs/FileTide.js +23 -1
- package/package.json +1 -1
package/dist/cjs/FileMessager.js
CHANGED
|
@@ -270,10 +270,12 @@ class FileMessager {
|
|
|
270
270
|
activeTransferBarrier
|
|
271
271
|
});
|
|
272
272
|
this.fileNet.emitToTide(tideID, "current-online-clients", Object.fromEntries(FileNetClientManager.getOnlineClients()));
|
|
273
|
+
this.fileNet.emit("current-clients", Object.fromEntries(FileNetClientManager.getOnlineClients()));
|
|
273
274
|
return;
|
|
274
275
|
}
|
|
275
276
|
handleClientOffline(clientID) {
|
|
276
277
|
FileNetClientManager.clearOnlineClient(clientID);
|
|
278
|
+
this.fileNet.emit("current-clients", Object.fromEntries(FileNetClientManager.getOnlineClients()));
|
|
277
279
|
return;
|
|
278
280
|
}
|
|
279
281
|
}
|
package/dist/cjs/FileTide.js
CHANGED
|
@@ -236,6 +236,7 @@ function _setupFileEventListeners(userID, client, onTransferProgress, onIncoming
|
|
|
236
236
|
onTransferStart,
|
|
237
237
|
onTransferComplete,
|
|
238
238
|
onTransferRequested,
|
|
239
|
+
onTransferStatus,
|
|
239
240
|
onListFiles,
|
|
240
241
|
onCurrentOnlineClients
|
|
241
242
|
} = options;
|
|
@@ -280,7 +281,22 @@ function _setupFileEventListeners(userID, client, onTransferProgress, onIncoming
|
|
|
280
281
|
cliTable.setData(currentClients);
|
|
281
282
|
console.log(`\n[FileTide ~ FileNet]\n\n`, cliTable.render(), "\n");
|
|
282
283
|
if (onCurrentOnlineClients) {
|
|
283
|
-
onCurrentOnlineClients(currentClients);
|
|
284
|
+
onCurrentOnlineClients(currentClients, true);
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
client.clientTide.onEvent(userID, "current-clients", data => {
|
|
288
|
+
const currentClients = {};
|
|
289
|
+
Object.keys(data).forEach(key => {
|
|
290
|
+
if (key !== userID) {
|
|
291
|
+
currentClients[key] = data[key];
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
if (Object.keys(currentClients).length <= 0) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
_FileTide.outputGradient(`\n[FileTide ~ FileNet]\n\n✨ Current Clients >${Object.keys(currentClients).length}< ✨\n`, significantMessageColors);
|
|
298
|
+
if (onCurrentOnlineClients) {
|
|
299
|
+
onCurrentOnlineClients(currentClients, false);
|
|
284
300
|
}
|
|
285
301
|
});
|
|
286
302
|
client.clientTide.onEvent(userID, "queue-incoming-transfer", async data => {
|
|
@@ -365,6 +381,12 @@ function _setupFileEventListeners(userID, client, onTransferProgress, onIncoming
|
|
|
365
381
|
onTransferProgress(data);
|
|
366
382
|
}
|
|
367
383
|
});
|
|
384
|
+
client.clientTide.onEvent(userID, "transfer-status", data => {
|
|
385
|
+
if (onTransferStatus) {
|
|
386
|
+
onTransferStatus(data);
|
|
387
|
+
}
|
|
388
|
+
return;
|
|
389
|
+
});
|
|
368
390
|
client.clientTide.onEvent(userID, "transfer-complete", data => {
|
|
369
391
|
const savePath = FileUtilityManager.getTidePath(path.join(data.filePath, data.fileName));
|
|
370
392
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trap_stevo/filetide",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
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": {
|