@trap_stevo/filetide-client 0.0.62 → 0.0.64
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/FileTideClient.js +92 -98
- package/package.json +2 -2
|
@@ -19,76 +19,6 @@ const gradients = {
|
|
|
19
19
|
critical: ["\x1b[38;5;203m", "\x1b[38;5;214m"],
|
|
20
20
|
neutral: ["\x1b[38;5;74m", "\x1b[38;5;81m", "\x1b[38;5;117m", "\x1b[38;5;153m"]
|
|
21
21
|
};
|
|
22
|
-
const shortcuts = {
|
|
23
|
-
">Downloads": {
|
|
24
|
-
description: "User's downloads folder.",
|
|
25
|
-
shortCut: ">Downloads"
|
|
26
|
-
},
|
|
27
|
-
">Documents": {
|
|
28
|
-
description: "User's documents folder.",
|
|
29
|
-
shortCut: ">Documents"
|
|
30
|
-
},
|
|
31
|
-
">Desktop": {
|
|
32
|
-
description: "User's desktop folder.",
|
|
33
|
-
shortCut: ">Desktop"
|
|
34
|
-
},
|
|
35
|
-
">AppData": {
|
|
36
|
-
description: "User's roaming application data folder.",
|
|
37
|
-
shortCut: ">AppData"
|
|
38
|
-
},
|
|
39
|
-
">LocalAppData": {
|
|
40
|
-
description: "User's local application data folder.",
|
|
41
|
-
shortCut: ">LocalAppData"
|
|
42
|
-
},
|
|
43
|
-
">Music": {
|
|
44
|
-
description: "User's music folder.",
|
|
45
|
-
shortCut: ">Music"
|
|
46
|
-
},
|
|
47
|
-
">Photos": {
|
|
48
|
-
description: "User's photos folder.",
|
|
49
|
-
shortCut: ">Photos"
|
|
50
|
-
},
|
|
51
|
-
">Videos": {
|
|
52
|
-
description: "User's videos folder.",
|
|
53
|
-
shortCut: ">Videos"
|
|
54
|
-
},
|
|
55
|
-
">Public": {
|
|
56
|
-
description: "User's public folder.",
|
|
57
|
-
shortCut: ">Public"
|
|
58
|
-
},
|
|
59
|
-
">Templates": {
|
|
60
|
-
description: "User's templates folder",
|
|
61
|
-
shortCut: ">Templates"
|
|
62
|
-
},
|
|
63
|
-
">Temp": {
|
|
64
|
-
description: "System's temp folder.",
|
|
65
|
-
shortCut: ">Temp"
|
|
66
|
-
},
|
|
67
|
-
">LogFiles": {
|
|
68
|
-
description: "System's logs folder.",
|
|
69
|
-
shortCut: ">LogFiles"
|
|
70
|
-
},
|
|
71
|
-
">SystemRoot": {
|
|
72
|
-
description: "System's root folder.",
|
|
73
|
-
shortCut: ">SystemRoot"
|
|
74
|
-
},
|
|
75
|
-
">Cache": {
|
|
76
|
-
description: "User's application cache folder.",
|
|
77
|
-
shortCut: ">Cache"
|
|
78
|
-
},
|
|
79
|
-
">Config": {
|
|
80
|
-
description: "User's application config folder.",
|
|
81
|
-
shortCut: ">Config"
|
|
82
|
-
},
|
|
83
|
-
">CurrentDirectory": {
|
|
84
|
-
description: "User's current folder.",
|
|
85
|
-
shortCut: ">CurrentDirectory"
|
|
86
|
-
},
|
|
87
|
-
">Home": {
|
|
88
|
-
description: "System's home folder.",
|
|
89
|
-
shortCut: ">Home"
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
22
|
const colorReset = "\x1b[0m";
|
|
93
23
|
var _FileTideClient_brand = /*#__PURE__*/new WeakSet();
|
|
94
24
|
class FileTideClient {
|
|
@@ -103,7 +33,6 @@ class FileTideClient {
|
|
|
103
33
|
this.currentRoom = inputCurrentRoom || currentRoom;
|
|
104
34
|
this.fileMessagerInstance = fileMessagerInstance;
|
|
105
35
|
this.clientDisconnected = false;
|
|
106
|
-
this.shortcuts = shortcuts;
|
|
107
36
|
this.connectionID = null;
|
|
108
37
|
_assertClassBrand(_FileTideClient_brand, this, _setupProcessEvents).call(this);
|
|
109
38
|
this.messagerSettings = {
|
|
@@ -142,6 +71,18 @@ class FileTideClient {
|
|
|
142
71
|
getTideToken(scope = "default") {
|
|
143
72
|
return fileTide.getTideToken(scope);
|
|
144
73
|
}
|
|
74
|
+
|
|
75
|
+
// --- FileTide Client Storage Management ---
|
|
76
|
+
|
|
77
|
+
async initializeStorage(options = {}) {
|
|
78
|
+
return await fileTide.initializeStorage(options);
|
|
79
|
+
}
|
|
80
|
+
storage(namespace) {
|
|
81
|
+
return fileTide.storage(namespace);
|
|
82
|
+
}
|
|
83
|
+
getStorageManager() {
|
|
84
|
+
return fileTide.getStorageManager();
|
|
85
|
+
}
|
|
145
86
|
broadcastClientOffline(fileMessager, forceBroadcast = false) {
|
|
146
87
|
if (fileMessager && !this.clientDisconnected) {
|
|
147
88
|
this.clientDisconnected = true;
|
|
@@ -326,38 +267,91 @@ class FileTideClient {
|
|
|
326
267
|
return fileTide.getTransferStatsOverview();
|
|
327
268
|
}
|
|
328
269
|
|
|
270
|
+
// --- FileTide Client Transfer History Management ---
|
|
271
|
+
|
|
272
|
+
async getTransferHistory(options = {}) {
|
|
273
|
+
return await fileTide.getTransferHistory(options);
|
|
274
|
+
}
|
|
275
|
+
async getTransferHistoryEntry(transferID, ownerClientID = this.deviceName) {
|
|
276
|
+
return await fileTide.getTransferHistoryEntry(transferID, ownerClientID);
|
|
277
|
+
}
|
|
278
|
+
async clearTransferHistory(options = {}) {
|
|
279
|
+
return await fileTide.clearTransferHistory(options);
|
|
280
|
+
}
|
|
281
|
+
async pruneTransferHistory(maxEntries, options = {}) {
|
|
282
|
+
return await fileTide.pruneTransferHistory(maxEntries, options);
|
|
283
|
+
}
|
|
284
|
+
|
|
329
285
|
// --- FileTide Client Shore Policy Management ---
|
|
330
286
|
|
|
331
|
-
clearShorePolicies(clientID
|
|
332
|
-
return fileTide.clearShorePolicies(clientID
|
|
333
|
-
}
|
|
334
|
-
addShorePolicies(clientID, shores = []) {
|
|
335
|
-
return fileTide.addShorePolicies(clientID, shores);
|
|
336
|
-
}
|
|
337
|
-
getShorePolicies(clientID) {
|
|
338
|
-
return fileTide.getShorePolicies(clientID);
|
|
339
|
-
}
|
|
340
|
-
addShortcuts(inputShortcuts) {
|
|
341
|
-
for (const [key, value] of Object.entries(inputShortcuts)) {
|
|
342
|
-
if (!shortcuts[key]) {
|
|
343
|
-
this.shortcuts[key] = {
|
|
344
|
-
description: value.description || "No description provided.",
|
|
345
|
-
shortCut: key
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
return shortcuts;
|
|
287
|
+
async clearShorePolicies(clientID = this.deviceName) {
|
|
288
|
+
return await fileTide.clearShorePolicies(clientID);
|
|
350
289
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
290
|
+
async removeShorePolicies(shores = [], clientID = this.deviceName) {
|
|
291
|
+
return await fileTide.removeShorePolicies(clientID, shores);
|
|
292
|
+
}
|
|
293
|
+
async addShorePolicies(shores = [], clientID = this.deviceName) {
|
|
294
|
+
return await fileTide.addShorePolicies(clientID, shores);
|
|
295
|
+
}
|
|
296
|
+
async setShorePolicies(shores = [], clientID = this.deviceName) {
|
|
297
|
+
return await fileTide.setShorePolicies(clientID, shores);
|
|
298
|
+
}
|
|
299
|
+
async resetShorePolicies(clientID = this.deviceName) {
|
|
300
|
+
return await fileTide.resetShorePolicies(clientID);
|
|
301
|
+
}
|
|
302
|
+
async pathWithinShorePolicies(inputPath, clientID = this.deviceName) {
|
|
303
|
+
return await fileTide.pathWithinShorePolicies(clientID, inputPath);
|
|
304
|
+
}
|
|
305
|
+
async getShorePolicies(clientID = this.deviceName) {
|
|
306
|
+
return await fileTide.getShorePolicies(clientID);
|
|
307
|
+
}
|
|
308
|
+
getDefaultShorePolicies() {
|
|
309
|
+
return fileTide.getDefaultShorePolicies();
|
|
310
|
+
}
|
|
311
|
+
async getResolvedShorePolicies(clientID = this.deviceName) {
|
|
312
|
+
return await fileTide.getResolvedShorePolicies(clientID);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// --- FileTide Client Shortcut Management ---
|
|
316
|
+
|
|
317
|
+
getDefaultShortcuts() {
|
|
318
|
+
return fileTide.getDefaultShortcuts();
|
|
358
319
|
}
|
|
359
320
|
getShortcuts() {
|
|
360
|
-
return
|
|
321
|
+
return fileTide.getShortcuts();
|
|
322
|
+
}
|
|
323
|
+
getShortcut(shortcut) {
|
|
324
|
+
return fileTide.getShortcut(shortcut);
|
|
325
|
+
}
|
|
326
|
+
hasShortcut(shortcut) {
|
|
327
|
+
return fileTide.hasShortcut(shortcut);
|
|
328
|
+
}
|
|
329
|
+
addShortcut(shortcut, targetPath) {
|
|
330
|
+
return fileTide.addShortcut(shortcut, targetPath);
|
|
331
|
+
}
|
|
332
|
+
setShortcut(shortcut, targetPath) {
|
|
333
|
+
return fileTide.setShortcut(shortcut, targetPath);
|
|
334
|
+
}
|
|
335
|
+
updateShortcut(shortcut, targetPath) {
|
|
336
|
+
return fileTide.updateShortcut(shortcut, targetPath);
|
|
337
|
+
}
|
|
338
|
+
renameShortcut(shortcut, nextShortcut) {
|
|
339
|
+
return fileTide.renameShortcut(shortcut, nextShortcut);
|
|
340
|
+
}
|
|
341
|
+
removeShortcut(shortcut) {
|
|
342
|
+
return fileTide.removeShortcut(shortcut);
|
|
343
|
+
}
|
|
344
|
+
setShortcuts(shortcuts = {}) {
|
|
345
|
+
return fileTide.setShortcuts(shortcuts);
|
|
346
|
+
}
|
|
347
|
+
clearShortcuts() {
|
|
348
|
+
return fileTide.clearShortcuts();
|
|
349
|
+
}
|
|
350
|
+
resetShortcut(shortcut) {
|
|
351
|
+
return fileTide.resetShortcut(shortcut);
|
|
352
|
+
}
|
|
353
|
+
resetShortcuts() {
|
|
354
|
+
return fileTide.resetShortcuts();
|
|
361
355
|
}
|
|
362
356
|
|
|
363
357
|
// --- FileTide Client Client Settings Management ---
|
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.64",
|
|
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": "SCL-1.0-Universal",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@trap_stevo/filetide": "^0.0.
|
|
40
|
+
"@trap_stevo/filetide": "^0.0.97",
|
|
41
41
|
"@trap_stevo/iotide": "^0.0.46",
|
|
42
42
|
"@trap_stevo/legendarybuilderpronodejs-utilities": "^1.0.51",
|
|
43
43
|
"chalk": "^4.1.2"
|