@trap_stevo/filetide 0.0.56 → 0.0.58

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.
@@ -63,9 +63,10 @@ class FileTide {
63
63
  * Initialize and start the server.
64
64
  * @param {Object} serverOptions - Configuration for server (e.g., port, useCors, useHTTPS)
65
65
  * @param {Function} onLaunch - Callback for when a file tide instance launches
66
+ * @param {...any} tideConfigurations - Additional configuration objects for customizing FileTide behavior
66
67
  */
67
- launchFileTide(serverOptions = {}, onLaunch) {
68
- this.fileNet = new FileMessager(serverOptions);
68
+ launchFileTide(serverOptions = {}, onLaunch, ...tideConfigurations) {
69
+ this.fileNet = new FileMessager(serverOptions, ...tideConfigurations);
69
70
  this.fileNet.start();
70
71
  FileTide.outputGradient("[FileTide] ~ FileNet launched successfully!", significantMessageColors);
71
72
  if (onLaunch) {
@@ -41,10 +41,13 @@ class FileUtilityManager {
41
41
  const results = [];
42
42
  for (const item of items) {
43
43
  const itemPath = path.join(currentDirPath, item.name);
44
+ if (item.name.startsWith(".")) {
45
+ continue;
46
+ }
44
47
  const filtered = filterContent.some(filterEntry => {
45
48
  const resolvedFilterEntry = path.resolve(currentDirPath, filterEntry);
46
- const fileExtension = filterEntry.startsWith(".");
47
- return itemPath === resolvedFilterEntry || item.name === filterEntry || fileExtension && path.extname(item.name) === filterEntry;
49
+ const extensionFilter = filterEntry.startsWith(".");
50
+ return itemPath === resolvedFilterEntry || item.name === filterEntry || extensionFilter && path.extname(item.name) === filterEntry;
48
51
  });
49
52
  if (!filtered) {
50
53
  const stats = await fs.promises.stat(itemPath);
@@ -59,7 +62,7 @@ class FileUtilityManager {
59
62
  }
60
63
  return results;
61
64
  } catch (error) {
62
- console.error("Did not read directory: ", error);
65
+ console.log(`Did not filter contents from ${dirPath} ~ `, error);
63
66
  throw error;
64
67
  }
65
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trap_stevo/filetide",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
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": {