zen-fs-config 0.3.16 → 0.3.17

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/index.js CHANGED
@@ -612,6 +612,16 @@ registerBackend("WebDAV", async (options) => {
612
612
  };
613
613
  return backend;
614
614
  });
615
+ registerBackend("RemoteStorage", async (options) => {
616
+ const { RemoteStorageFileSystem } = await import("zen-fs-remotestoragejs");
617
+ const href = options.href ?? "";
618
+ const token = options.token ?? "";
619
+ if (!href) throw new Error('RemoteStorage backend requires "href" option');
620
+ if (!token) throw new Error('RemoteStorage backend requires "token" option');
621
+ const basePath = options.basePath || void 0;
622
+ const fs = new RemoteStorageFileSystem({ href, token, basePath });
623
+ return wrapZenFSFileSystem(fs);
624
+ });
615
625
 
616
626
  // src/version.ts
617
627
  function versionPathFor(configFilePath) {
package/dist/index.mjs CHANGED
@@ -565,6 +565,16 @@ registerBackend("WebDAV", async (options) => {
565
565
  };
566
566
  return backend;
567
567
  });
568
+ registerBackend("RemoteStorage", async (options) => {
569
+ const { RemoteStorageFileSystem } = await import("zen-fs-remotestoragejs");
570
+ const href = options.href ?? "";
571
+ const token = options.token ?? "";
572
+ if (!href) throw new Error('RemoteStorage backend requires "href" option');
573
+ if (!token) throw new Error('RemoteStorage backend requires "token" option');
574
+ const basePath = options.basePath || void 0;
575
+ const fs = new RemoteStorageFileSystem({ href, token, basePath });
576
+ return wrapZenFSFileSystem(fs);
577
+ });
568
578
 
569
579
  // src/version.ts
570
580
  function versionPathFor(configFilePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-fs-config",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "description": "Distributed config management library built on ZenFS, zen-fs-cache, and zen-fs-sync",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -41,6 +41,7 @@
41
41
  "zen-fs-cache": ">=1.0.0",
42
42
  "zen-fs-gitee": ">=1.0.0",
43
43
  "zen-fs-github": ">=1.0.0",
44
+ "zen-fs-remotestoragejs": ">=1.2.0",
44
45
  "zen-fs-sync": ">=0.1.0"
45
46
  },
46
47
  "devDependencies": {
@@ -50,6 +51,7 @@
50
51
  "zen-fs-cache": "^1.0.1",
51
52
  "zen-fs-gitee": "^1.0.0",
52
53
  "zen-fs-github": "^1.0.0",
54
+ "zen-fs-remotestoragejs": "^1.2.2",
53
55
  "zen-fs-sync": "^0.1.0"
54
56
  },
55
57
  "dependencies": {