@trap_stevo/filetide-client 0.0.9 → 0.0.11

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,6 +105,7 @@ class FileTideClient {
105
105
  this.tideUrl = inputTideURL || tideUrl;
106
106
  this.currentRoom = inputCurrentRoom || currentRoom;
107
107
  this.fileMessagerInstance = fileMessagerInstance;
108
+ this.fileTide = fileTide;
108
109
  this.clientDisconnected = false;
109
110
  this.shortcuts = shortcuts;
110
111
  _assertClassBrand(_FileTideClient_brand, this, _setupProcessEvents).call(this);
@@ -160,7 +161,7 @@ class FileTideClient {
160
161
  if (this.fileMessagerInstance && this.fileMessagerInstance.clientTide) {
161
162
  this.fileMessagerInstance.clientTide.closeSocket(this.deviceName);
162
163
  }
163
- fileTide.launchMessager({
164
+ this.fileTide.launchMessager({
164
165
  serverUrl: this.tideUrl,
165
166
  ...clientOptions
166
167
  }, {
@@ -190,7 +191,7 @@ class FileTideClient {
190
191
  return;
191
192
  }
192
193
  async transferFiles(recipientID, filePath, destinationPath, filterContent = []) {
193
- const fileDetails = await fileTide.getPathData(filePath, filterContent);
194
+ const fileDetails = await this.fileTide.getPathData(filePath, filterContent);
194
195
  if (!fileDetails) {
195
196
  FileTide.outputGradient(`[${this.deviceName}] File at path ${filePath} not found.`, ["#F94144", "#F3722C"]);
196
197
  return;
@@ -202,23 +203,23 @@ class FileTideClient {
202
203
  }
203
204
  if (fileDetails.type === "directory") {
204
205
  FileTide.outputGradient(`[${this.deviceName}] Sending ${fileDetails.content.length} files in directory ~ ${path.basename(filePath)} to client ~ ${recipientID}...`, ["#00C897", "#00E0FF"]);
205
- this.fileMessagerInstance.sendDirectoryFiles(this.deviceName, recipientID, fileDetails.content, fileTide.getTidePath(filePath), destinationPath);
206
+ this.fileMessagerInstance.sendDirectoryFiles(this.deviceName, recipientID, fileDetails.content, this.fileTide.getTidePath(filePath), destinationPath);
206
207
  return;
207
208
  }
208
209
  return;
209
210
  }
210
211
  listFiles(recipientID, depth = 1) {
211
- fileTide.listFilesFromClient(recipientID, depth);
212
+ this.fileTide.listFilesFromClient(recipientID, depth);
212
213
  return;
213
214
  }
214
215
  clearShorePolicies(clientID, shores = []) {
215
- return fileTide.clearShorePolicies(clientID, shores);
216
+ return this.fileTide.clearShorePolicies(clientID, shores);
216
217
  }
217
218
  addShorePolicies(clientID, shores = []) {
218
- return fileTide.addShorePolicies(clientID, shores);
219
+ return this.fileTide.addShorePolicies(clientID, shores);
219
220
  }
220
221
  getShorePolicies(clientID) {
221
- return fileTide.getShorePolicies(clientID);
222
+ return this.fileTide.getShorePolicies(clientID);
222
223
  }
223
224
  addShortcuts(inputShortcuts) {
224
225
  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.9",
3
+ "version": "0.0.11",
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": {
@@ -36,7 +36,7 @@
36
36
  "author": "Steven Compton",
37
37
  "license": "See License in LICENSE.md",
38
38
  "dependencies": {
39
- "@trap_stevo/filetide": "^0.0.38",
39
+ "@trap_stevo/filetide": "^0.0.39",
40
40
  "@trap_stevo/iotide": "^0.0.37",
41
41
  "@trap_stevo/legendarybuilderpronodejs-utilities": "^1.0.36",
42
42
  "chalk": "^4.1.2",