From 6690895d69cfe8235c53b438e3fcbd3904a69abd Mon Sep 17 00:00:00 2001 From: James Prevett Date: Sat, 26 Oct 2024 22:03:47 -0500 Subject: [PATCH] Rebranded as @zenfs/cloud --- package-lock.json | 34 +++-- package.json | 19 +-- readme.md | 10 +- src/dropbox.ts | 347 +++++++++++++++++++++++++++++++++++++++++++++ src/index.ts | 348 +--------------------------------------------- 5 files changed, 389 insertions(+), 369 deletions(-) create mode 100644 src/dropbox.ts diff --git a/package-lock.json b/package-lock.json index d4354cf..3163029 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,13 @@ { - "name": "@zenfs/dropbox", - "version": "0.0.1", + "name": "@zenfs/cloud", + "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@zenfs/dropbox", - "version": "0.0.1", + "name": "@zenfs/cloud", + "version": "0.0.0", "license": "MIT", - "dependencies": { - "dropbox": "^10.34.0" - }, "devDependencies": { "@eslint/js": "^9.11.1", "@types/eslint__js": "^8.42.3", @@ -25,6 +22,13 @@ "engines": { "node": ">= 18" }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/james-pre" + }, + "optionalDependencies": { + "dropbox": "^10.34.0" + }, "peerDependencies": { "@zenfs/core": "^1.0.4" } @@ -380,6 +384,7 @@ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", "license": "MIT", + "optional": true, "peer": true, "dependencies": { "@types/node": "*", @@ -709,6 +714,7 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT", + "optional": true, "peer": true }, "node_modules/balanced-match": { @@ -863,6 +869,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "license": "MIT", + "optional": true, "peer": true, "dependencies": { "delayed-stream": "~1.0.0" @@ -931,6 +938,7 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "license": "MIT", + "optional": true, "peer": true, "engines": { "node": ">=0.4.0" @@ -965,6 +973,7 @@ "resolved": "https://registry.npmjs.org/dropbox/-/dropbox-10.34.0.tgz", "integrity": "sha512-5jb5/XzU0fSnq36/hEpwT5/QIep7MgqKuxghEG44xCu7HruOAjPdOb3x0geXv5O/hd0nHpQpWO+r5MjYTpMvJg==", "license": "MIT", + "optional": true, "dependencies": { "node-fetch": "^2.6.1" }, @@ -1354,6 +1363,7 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "license": "MIT", + "optional": true, "peer": true, "dependencies": { "asynckit": "^0.4.0", @@ -1860,6 +1870,7 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "license": "MIT", + "optional": true, "peer": true, "engines": { "node": ">= 0.6" @@ -1870,6 +1881,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "license": "MIT", + "optional": true, "peer": true, "dependencies": { "mime-db": "1.52.0" @@ -1911,6 +1923,7 @@ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "license": "MIT", + "optional": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -2347,7 +2360,8 @@ "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/trim-lines": { "version": "3.0.1", @@ -3054,13 +3068,15 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" + "license": "BSD-2-Clause", + "optional": true }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "license": "MIT", + "optional": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" diff --git a/package.json b/package.json index 0dd7e29..74e3a0f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@zenfs/dropbox", - "version": "0.0.1", - "description": "ZenFS Dropbox backend", + "name": "@zenfs/cloud", + "version": "0.0.0", + "description": "ZenFS Cloud backends", "funding": { "type": "individual", "url": "https://github.com/sponsors/james-pre" @@ -10,10 +10,11 @@ "types": "src/index.ts", "keywords": [ "filesystem", - "dropbox" + "dropbox", + "S3" ], "type": "module", - "homepage": "https://github.com/zen-fs/dropbox", + "homepage": "https://github.com/zen-fs/cloud", "author": "James Prevett (https://jamespre.dev)", "contributors": [ "John Vilk (http://people.cs.umass.edu/~jvilk)" @@ -21,10 +22,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/zen-fs/dropbox.git" + "url": "git+https://github.com/zen-fs/cloud.git" }, "bugs": { - "url": "https://github.com/zen-fs/dropbox/issues" + "url": "https://github.com/zen-fs/cloud/issues" }, "engines": { "node": ">= 18" @@ -44,7 +45,7 @@ "format:check": "prettier --check .", "lint": "eslint src", "build": "tsc -p tsconfig.json", - "build:docs": "typedoc --out docs --name 'ZenFS Dropbox' src/index.ts", + "build:docs": "typedoc --out docs --name 'ZenFS Cloud' src/index.ts", "test": "#tsx --test --experimental-test-coverage", "prepublishOnly": "npm run build" }, @@ -62,7 +63,7 @@ "peerDependencies": { "@zenfs/core": "^1.0.4" }, - "dependencies": { + "optionalDependencies": { "dropbox": "^10.34.0" } } diff --git a/readme.md b/readme.md index 6dc1a72..29fd721 100644 --- a/readme.md +++ b/readme.md @@ -1,13 +1,13 @@ -# ZenFS Dropbox +# ZenFS Cloud > [!WARNING] > This package was implemented very recently and may not be stable. > > If you find a bug, please report it. Thanks! -This package adds the `Dropbox` backend for ZenFS. +This package adds backends for many cloud providers to ZenFS, including Dropbox, S3, and in the future, Google Drive. -For more information, see the [API documentation](https://zenfs.dev/dropbox). +For more information, see the [API documentation](https://zenfs.dev/cloud). > [!IMPORTANT] > Please read the [ZenFS core documentation](https://zenfs.dev/core)! @@ -15,7 +15,7 @@ For more information, see the [API documentation](https://zenfs.dev/dropbox). ## Installing ```sh -npm install @zenfs/dropbox +npm install @zenfs/cloud ``` ## Usage @@ -25,6 +25,8 @@ npm install @zenfs/dropbox > For CJS, you can `require` the package. > If using a browser environment, you can use a `