@arkstack/filesystem 0.12.20 → 0.12.22

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.
@@ -1,4 +1,4 @@
1
- import { t as Storage } from "../src-Cj4wZApu.js";
1
+ import { t as Storage } from "../src-Cm2ie00f.js";
2
2
  import { Command } from "@h3ravel/musket";
3
3
  //#region src/commands/StorageLinkCommand.ts
4
4
  var StorageLinkCommand = class extends Command {
package/dist/index.d.ts CHANGED
@@ -46,7 +46,7 @@ type CustomDiskConfig = keyof CustomDiskDriverRegistry extends never ? {
46
46
  driver: K;
47
47
  } }[keyof CustomDiskDriverRegistry];
48
48
  type DiskConfig = LocalDriverConfig & {
49
- driver: 'local';
49
+ driver: 'local' | 'public';
50
50
  } | FtpDriverConfig & {
51
51
  driver: 'ftp';
52
52
  } | S3DriverConfig & {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as FtpDriver, t as Storage } from "./src-Cj4wZApu.js";
1
+ import { n as FtpDriver, t as Storage } from "./src-Cm2ie00f.js";
2
2
  export { FtpDriver, Storage };
@@ -243,7 +243,8 @@ var Driver = class Driver {
243
243
  constructor(config) {
244
244
  this.config = config;
245
245
  }
246
- static make(name, config) {
246
+ static make(config) {
247
+ const name = config.driver;
247
248
  if (![
248
249
  "local",
249
250
  "ftp",
@@ -330,7 +331,7 @@ var Storage = class Storage {
330
331
  const disks = Object.entries(config("filesystem.disks", {}));
331
332
  const customDrivers = config("filesystem.custom_drivers", {});
332
333
  for (const [name, driver] of Object.entries(customDrivers)) Driver.registerDriver(name, driver);
333
- for (const [disk, conf] of disks) this.services[disk] = () => Driver.make(disk, conf);
334
+ for (const [disk, config] of disks) this.services[disk] = () => Driver.make(config);
334
335
  this.diskName = config("filesystem.default");
335
336
  this.driver = new DriveManager({
336
337
  default: config("filesystem.default"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/filesystem",
3
- "version": "0.12.20",
3
+ "version": "0.12.22",
4
4
  "type": "module",
5
5
  "description": "Filesystem module for Arkstack, providing shared file storage and filesystem utitlities for the framework.",
6
6
  "homepage": "https://arkstack.toneflix.net",
@@ -39,8 +39,8 @@
39
39
  "@aws-sdk/s3-request-presigner": "^3.1011.0",
40
40
  "flydrive": "^2.0.0",
41
41
  "ssh2-sftp-client": "^12.1.0",
42
- "@arkstack/common": "^0.12.20",
43
- "@arkstack/contract": "^0.12.20"
42
+ "@arkstack/common": "^0.12.22",
43
+ "@arkstack/contract": "^0.12.22"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/ssh2-sftp-client": "^9.0.6"