@trap_stevo/filetide-client 0.0.11 → 0.0.12
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.
|
@@ -105,7 +105,6 @@ class FileTideClient {
|
|
|
105
105
|
this.tideUrl = inputTideURL || tideUrl;
|
|
106
106
|
this.currentRoom = inputCurrentRoom || currentRoom;
|
|
107
107
|
this.fileMessagerInstance = fileMessagerInstance;
|
|
108
|
-
this.fileTide = fileTide;
|
|
109
108
|
this.clientDisconnected = false;
|
|
110
109
|
this.shortcuts = shortcuts;
|
|
111
110
|
_assertClassBrand(_FileTideClient_brand, this, _setupProcessEvents).call(this);
|
|
@@ -161,7 +160,7 @@ class FileTideClient {
|
|
|
161
160
|
if (this.fileMessagerInstance && this.fileMessagerInstance.clientTide) {
|
|
162
161
|
this.fileMessagerInstance.clientTide.closeSocket(this.deviceName);
|
|
163
162
|
}
|
|
164
|
-
|
|
163
|
+
fileTide.launchMessager({
|
|
165
164
|
serverUrl: this.tideUrl,
|
|
166
165
|
...clientOptions
|
|
167
166
|
}, {
|
|
@@ -191,7 +190,7 @@ class FileTideClient {
|
|
|
191
190
|
return;
|
|
192
191
|
}
|
|
193
192
|
async transferFiles(recipientID, filePath, destinationPath, filterContent = []) {
|
|
194
|
-
const fileDetails = await
|
|
193
|
+
const fileDetails = await fileTide.getPathData(filePath, filterContent);
|
|
195
194
|
if (!fileDetails) {
|
|
196
195
|
FileTide.outputGradient(`[${this.deviceName}] File at path ${filePath} not found.`, ["#F94144", "#F3722C"]);
|
|
197
196
|
return;
|
|
@@ -203,23 +202,23 @@ class FileTideClient {
|
|
|
203
202
|
}
|
|
204
203
|
if (fileDetails.type === "directory") {
|
|
205
204
|
FileTide.outputGradient(`[${this.deviceName}] Sending ${fileDetails.content.length} files in directory ~ ${path.basename(filePath)} to client ~ ${recipientID}...`, ["#00C897", "#00E0FF"]);
|
|
206
|
-
this.fileMessagerInstance.sendDirectoryFiles(this.deviceName, recipientID, fileDetails.content,
|
|
205
|
+
this.fileMessagerInstance.sendDirectoryFiles(this.deviceName, recipientID, fileDetails.content, fileTide.getTidePath(filePath), destinationPath);
|
|
207
206
|
return;
|
|
208
207
|
}
|
|
209
208
|
return;
|
|
210
209
|
}
|
|
211
210
|
listFiles(recipientID, depth = 1) {
|
|
212
|
-
|
|
211
|
+
fileTide.listFilesFromClient(recipientID, depth);
|
|
213
212
|
return;
|
|
214
213
|
}
|
|
215
214
|
clearShorePolicies(clientID, shores = []) {
|
|
216
|
-
return
|
|
215
|
+
return fileTide.clearShorePolicies(clientID, shores);
|
|
217
216
|
}
|
|
218
217
|
addShorePolicies(clientID, shores = []) {
|
|
219
|
-
return
|
|
218
|
+
return fileTide.addShorePolicies(clientID, shores);
|
|
220
219
|
}
|
|
221
220
|
getShorePolicies(clientID) {
|
|
222
|
-
return
|
|
221
|
+
return fileTide.getShorePolicies(clientID);
|
|
223
222
|
}
|
|
224
223
|
addShortcuts(inputShortcuts) {
|
|
225
224
|
for (const [key, value] of Object.entries(inputShortcuts)) {
|
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.12",
|
|
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": {
|