@trap_stevo/filetide-client 0.0.15 → 0.0.17
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.
|
@@ -169,7 +169,7 @@ class FileTideClient {
|
|
|
169
169
|
maxReconnectionAttempts: 15,
|
|
170
170
|
reconnectionAttempts: 15,
|
|
171
171
|
maxReconnectionDelay: 10000
|
|
172
|
-
}, onConnect = null, ...clientConfigurations) {
|
|
172
|
+
}, onConnect = null, onDisconnect = null, ...clientConfigurations) {
|
|
173
173
|
const launchClient = () => {
|
|
174
174
|
if (this.fileMessagerInstance && this.fileMessagerInstance.clientTide) {
|
|
175
175
|
this.fileMessagerInstance.clientTide.closeSocket(this.deviceName);
|
|
@@ -205,6 +205,9 @@ class FileTideClient {
|
|
|
205
205
|
});
|
|
206
206
|
fileMessager.clientTide.onEvent(this.deviceName, "disconnect", () => {
|
|
207
207
|
this.broadcastClientOffline(fileMessager);
|
|
208
|
+
if (onDisconnect) {
|
|
209
|
+
onDisconnect(this.deviceName, this.connectionID, this.tideUrl);
|
|
210
|
+
}
|
|
208
211
|
});
|
|
209
212
|
}, ...clientConfigurations);
|
|
210
213
|
};
|
|
@@ -215,8 +218,8 @@ class FileTideClient {
|
|
|
215
218
|
this.fileMessagerInstance.requestTransfer(this.deviceName, senderID, filePath, destinationPath, filterContent);
|
|
216
219
|
return;
|
|
217
220
|
}
|
|
218
|
-
async transferFiles(recipientID, filePath, destinationPath, filterContent = [], tideSize = 500, minTideSize = 10, maxTideSize = 2000) {
|
|
219
|
-
await fileTide.sendToDevice(recipientID, filePath, destinationPath, filterContent, tideSize, minTideSize, maxTideSize);
|
|
221
|
+
async transferFiles(recipientID, filePath, destinationPath, filterContent = [], tideSize = 200, tidalSize = 500, minTideSize = 10, maxTideSize = 2000) {
|
|
222
|
+
await fileTide.sendToDevice(recipientID, filePath, destinationPath, filterContent, tideSize, tidalSize, minTideSize, maxTideSize);
|
|
220
223
|
return;
|
|
221
224
|
}
|
|
222
225
|
listFiles(recipientID, depth = 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trap_stevo/filetide-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
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": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"author": "Steven Compton",
|
|
38
38
|
"license": "See License in LICENSE.md",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@trap_stevo/filetide": "^0.0.
|
|
40
|
+
"@trap_stevo/filetide": "^0.0.47",
|
|
41
41
|
"@trap_stevo/iotide": "^0.0.37",
|
|
42
42
|
"@trap_stevo/legendarybuilderpronodejs-utilities": "^1.0.43",
|
|
43
43
|
"chalk": "^4.1.2",
|