diff --git a/plugins/s3-downloader/CHANGELOG.md b/plugins/s3-downloader/CHANGELOG.md index 75420af1a..5c3021868 100644 --- a/plugins/s3-downloader/CHANGELOG.md +++ b/plugins/s3-downloader/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 0.1.4 - 2026-12-03 + +- 同时支持 macOS、Windows 和 Linux +- 安装包内包含四个平台原生二进制 + +## 0.1.3 - 2026-12-03 + +- 改用独立发布的 S3-only Node 原生包 +- 同时支持 macOS Intel 和 Apple Silicon +- 插件安装包从约 24 MB 降到约 4.4 MB + +## 0.1.2 - 2026-12-03 + +- 改用仅包含 S3 的原生构建 +- 增加 macOS Intel 支持 + ## 0.1.1 - 2026-12-02 - 首次上架插件市场 diff --git a/plugins/s3-downloader/README.md b/plugins/s3-downloader/README.md index 6d6698a32..06c56a9ba 100644 --- a/plugins/s3-downloader/README.md +++ b/plugins/s3-downloader/README.md @@ -25,9 +25,12 @@ ## 支持平台 -当前版本仅支持 **macOS Apple Silicon(arm64)**。 +- macOS Apple Silicon(arm64) +- macOS Intel(x64) +- Windows x64 +- Linux x64 -Intel Mac 和 Windows 版本需要分别构建对应的原生下载组件,后续会单独发布。 +插件使用独立的 S3-only Node 多平台原生包,安装包约 9.5 MB,包含上述四个平台二进制。 ## 凭证安全 @@ -36,3 +39,5 @@ Intel Mac 和 Windows 版本需要分别构建对应的原生下载组件,后 ## 源码 https://github.com/fagao-ai/ztools-s3-downloader + +原生下载包:https://github.com/fagao-ai/opendal-s3 diff --git a/plugins/s3-downloader/build-plugin.sh b/plugins/s3-downloader/build-plugin.sh index dcf9ed004..20325e34d 100755 --- a/plugins/s3-downloader/build-plugin.sh +++ b/plugins/s3-downloader/build-plugin.sh @@ -4,11 +4,24 @@ set -euo pipefail npm ci --omit=dev --no-audit --no-fund node - <<'NODE' -if (process.platform !== 'darwin' || process.arch !== 'arm64') { - throw new Error(`This release targets macOS Apple Silicon, got ${process.platform}/${process.arch}`) +const fs = require('node:fs') +const path = require('node:path') + +const packageDir = path.dirname(require.resolve('@fagao-ai/opendal-s3/package.json')) +const requiredBinaries = [ + 'opendal_s3.darwin-arm64.node', + 'opendal_s3.darwin-x64.node', + 'opendal_s3.win32-x64-msvc.node', + 'opendal_s3.linux-x64-gnu.node' +] + +for (const file of requiredBinaries) { + if (!fs.existsSync(path.join(packageDir, file))) { + throw new Error(`Missing native binding: ${file}`) + } } -const { Operator } = require('opendal') +const { Operator } = require('@fagao-ai/opendal-s3') if (typeof Operator !== 'function') { throw new Error('Native download binding is unavailable') } diff --git a/plugins/s3-downloader/lib/opendal-service.js b/plugins/s3-downloader/lib/opendal-service.js index efeae34b9..5f39b4b7d 100644 --- a/plugins/s3-downloader/lib/opendal-service.js +++ b/plugins/s3-downloader/lib/opendal-service.js @@ -11,10 +11,10 @@ let opendalVersion = null let loadError = null try { - const opendal = require('opendal') + const opendal = require('@fagao-ai/opendal-s3') Operator = opendal.Operator try { - opendalVersion = require('opendal/package.json').version + opendalVersion = require('@fagao-ai/opendal-s3/package.json').version } catch { opendalVersion = null } diff --git a/plugins/s3-downloader/package-lock.json b/plugins/s3-downloader/package-lock.json index c2373d38c..4fdeaed8b 100644 --- a/plugins/s3-downloader/package-lock.json +++ b/plugins/s3-downloader/package-lock.json @@ -1,174 +1,510 @@ { "name": "ztools-s3-downloader", - "version": "0.1.1", + "version": "0.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ztools-s3-downloader", - "version": "0.1.1", + "version": "0.1.4", "dependencies": { - "opendal": "0.49.13" + "@fagao-ai/opendal-s3": "https://cdn.jsdelivr.net/gh/fagao-ai/opendal-s3@v0.1.0-dist/dist/fagao-ai-opendal-s3-0.1.0.tgz" + }, + "devDependencies": { + "@electron/asar": "^4.3.4", + "@ztools-center/ztools-api-types": "1.0.3", + "adm-zip": "^0.6.1", + "jsdom": "^31.0.1" } }, - "node_modules/@opendal/lib-darwin-arm64": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/@opendal/lib-darwin-arm64/-/lib-darwin-arm64-0.49.13.tgz", - "integrity": "sha512-G1RN7gSRq3giZ2sovG48p2zG1fECkicyw9QkWKNBWXtDHfqPM4Z1nLrVvKTxQAFZdhKzdyQyU5jgPVCirbHW4g==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], + "node_modules/@electron/asar": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-4.3.4.tgz", + "integrity": "sha512-wMqBW59rlXFknVi29koZopvKlHBEOy2m48kHagjOGV+oQ8rxMjHmPvfdRVb0J+5j6eRHsoU0WotaBNCaepVLIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob": "^14.0.2", + "minimatch": "^11.0.1" + }, + "bin": { + "asar": "bin/asar.mjs" + }, "engines": { - "node": ">= 10" + "node": ">=22.12.0" } }, - "node_modules/@opendal/lib-darwin-x64": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/@opendal/lib-darwin-x64/-/lib-darwin-x64-0.49.13.tgz", - "integrity": "sha512-2HbefZ/laVZlfwJceKhCBlM6GOTVjm6zjsgITIZE6xzJeUbRET0lTJeoTsTrzTwB2LRuLOlZ/uelm4aIZLtHqA==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@opendal/lib-linux-arm64-gnu": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/@opendal/lib-linux-arm64-gnu/-/lib-linux-arm64-gnu-0.49.13.tgz", - "integrity": "sha512-uTabu3o+c0+gbQD1AOy9YQfMBb65YOhxKVCHF1Ve3CEzud/nM4+izVZx5+JWmt1qsk4zu1mVsMVNk8kKY4DQ7A==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@opendal/lib-linux-arm64-musl": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/@opendal/lib-linux-arm64-musl/-/lib-linux-arm64-musl-0.49.13.tgz", - "integrity": "sha512-tmK/tLW/aSFTwE6YPKlhri9LOnJafvxM4dDsevLVmZUnoOrBJae9LATLcim1nx1a2PaagcZYj0nrL0NSPRWMBA==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@opendal/lib-linux-x64-gnu": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/@opendal/lib-linux-x64-gnu/-/lib-linux-x64-gnu-0.49.13.tgz", - "integrity": "sha512-Q/+079Q8tSyIW5S9iCrwSr56NRMScHeio6HsioGbmiksb41HnUxdHXzDuSUz9b/jufxyFEiNh3ifMVLpa4Gfwg==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@opendal/lib-linux-x64-musl": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/@opendal/lib-linux-x64-musl/-/lib-linux-x64-musl-0.49.13.tgz", - "integrity": "sha512-QK9NioYu8rXsw1ILpm/+S/FkSq9IK5IomE7SA9sP09OLHvJNydHKIhx+avVQMTIb4E40d+12Cq9F3FL3qo9wPw==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], + "node_modules/@exodus/bytes": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.16.0.tgz", + "integrity": "sha512-IcpW84uEn3N7ETtNZMlxKhfl6Pec8rUNGOTBtWbK1FKhJxIFAptZyVrvVRVBimAJxJCgc3PxepxkdWWG4DVzfA==", + "dev": true, + "license": "MIT", "engines": { - "node": ">= 10" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + }, + "peerDependencies": { + "@noble/hashes": "^1.8.0 || ^2.0.0" + }, + "peerDependenciesMeta": { + "@noble/hashes": { + "optional": true + } } }, - "node_modules/@opendal/lib-win32-arm64-msvc": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/@opendal/lib-win32-arm64-msvc/-/lib-win32-arm64-msvc-0.49.13.tgz", - "integrity": "sha512-eNV1I76iaJAvl8VUY3z+LxYMhkJT904wc2VCVP0OHMc3xUD+Ugp/50RNsWTzOnNd5W+oZv5eKGtm0GCggeDtrA==", - "cpu": [ - "arm64" - ], + "node_modules/@fagao-ai/opendal-s3": { + "version": "0.1.0", + "resolved": "https://cdn.jsdelivr.net/gh/fagao-ai/opendal-s3@v0.1.0-dist/dist/fagao-ai-opendal-s3-0.1.0.tgz", + "integrity": "sha512-lLjS75QFBh9pTSuH0q/+x/LI4oik1LhKhS3uLo/Jtz2rdOtWkarsb3Fwebgr7xno5c7xDoABhXbiOZGzQCVAtw==", "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], "engines": { - "node": ">= 10" + "node": ">=16" } }, - "node_modules/@opendal/lib-win32-x64-msvc": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/@opendal/lib-win32-x64-msvc/-/lib-win32-x64-msvc-0.49.13.tgz", - "integrity": "sha512-AzBzm4xwraXOrnRY+oGhgy6/97xPoHTBAMsqUlXbsCFmPXW4sv6NKm6NTm6vQZuNw3wWrADOoPFJ+NKj5k/MQg==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/@ztools-center/ztools-api-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@ztools-center/ztools-api-types/-/ztools-api-types-1.0.3.tgz", + "integrity": "sha512-dv1eOAIasAupqKaQL/gESk1i2+RebdM/1gvZhrvH2D/bo3enCUsAGJ8nrHnlCLBSOGB81eC/SU0IH8BNsUlmvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/adm-zip": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.6.1.tgz", + "integrity": "sha512-Xwrja8nx9e5o2N1my4DsKCeKpdrnACyr1wtbPxBDgGzKzKyE9kRtBFA8mWldI+RVlD7CBZNWY/wQ2+ydwOR6kQ==", + "dev": true, + "license": "MIT", "engines": { - "node": ">= 10" + "node": ">=14.0" } }, - "node_modules/opendal": { - "version": "0.49.13", - "resolved": "https://registry.npmjs.org/opendal/-/opendal-0.49.13.tgz", - "integrity": "sha512-9aqgQ4pGKP3ESPAxfKDk5JUE4X/la8SzQXSOZxBMSIIDleJOhT4jgOwjNGVLZ0TtJ/PQpGmVpm7LCncTiAlTHg==", - "license": "Apache-2.0", + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/bcp-47": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bcp-47/-/bcp-47-2.1.2.tgz", + "integrity": "sha512-wsv86UuNFuPnVieKLyECTT+CP1WSAHeoIg5P3xu2kA9Z+7fVPoKt7dxzSeEhtJel0AI+NW3fIW3KtTKQKUCngg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/bcp-47-match": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-2.0.3.tgz", + "integrity": "sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/brace-expansion": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.1.2.tgz", + "integrity": "sha512-ELhY3JEerIBbhgW+rh0/8glkZAaMqn1x3BAvp3yTULSEGozMK/5PT6WTdBgsdvJqwwmv7MAQNOydfYbvK1Vgfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/data-urls": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-8.0.0.tgz", + "integrity": "sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^17.1.2" + }, + "engines": { + "node": "^22.14.0 || >=24.0.0" + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "dev": true, + "license": "MIT" + }, + "node_modules/entities": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-9.0.0.tgz", + "integrity": "sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/glob": { + "version": "14.0.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-14.0.7.tgz", + "integrity": "sha512-ob8P0VbyEjcLG2ycNYmzYhZj65kkcN5b7tt5moGhTq3rkXtuU8MB+i0GIzPtLnSHVF2DkK4M+nQRojDvsOGVJw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^11.0.5", + "minipass": "^7.1.3", + "path-scurry": "^3.0.0" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-7.0.0.tgz", + "integrity": "sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@exodus/bytes": "^1.15.1" + }, + "engines": { + "node": "^22.13.0 || >=24.0.0" + } + }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsdom": { + "version": "31.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-31.0.1.tgz", + "integrity": "sha512-CbhJL8ZQg3eKswxSZth4QO9tW0jPIhmR0vtSXQSbKSfWbwIT6hoRc17wdHIVTQ43KI0mdV5iTJr3281IDgVZ5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@exodus/bytes": "^1.16.0", + "bcp-47": "^2.1.2", + "bcp-47-match": "^2.0.3", + "data-urls": "^8.0.0", + "decimal.js": "^10.6.0", + "html-encoding-sniffer": "^7.0.0", + "is-potential-custom-element-name": "^1.0.1", + "lru-cache": "^11.5.3", + "parse5": "^8.1.0", + "parse5-parser-stream": "^8.1.0", + "saxes": "^6.0.0", + "tough-cookie": "^6.0.2", + "undici": "^8.12.3", + "w3c-xmlserializer": "^6.0.0", + "webidl-conversions": "^8.0.1", + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^17.3.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + }, + "peerDependencies": { + "@napi-rs/canvas": "^1.0.13" + }, + "peerDependenciesMeta": { + "@napi-rs/canvas": { + "optional": true + } + } + }, + "node_modules/lru-cache": { + "version": "11.5.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.4.tgz", + "integrity": "sha512-B8nJCTi8JuSaDBg0tBdnImV6j5O2CXaqKfdj24ZTCFbyivN8KZ2Z+RL3aHjwJAfLutD9cNnObG4SIgW4gMufiw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/minimatch": { + "version": "11.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.10.tgz", + "integrity": "sha512-L3/cjhQ5E6lft0VCp/2mO3Ic74RnutKy3rz7iGwp/6w1hKcO262g2rbfacFyw6eBig5OdI0nu5PpuA0/WQs9Tw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/parse5": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.1.1.tgz", + "integrity": "sha512-EcR/6WDcU7b2N3vQSxKALCk9lXGtUMQxXio008OEMBE0kavu/7JLfBEeFPzi43nMqVDSbEn3QCK+BMCc9zO//w==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^9.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-8.1.1.tgz", + "integrity": "sha512-hMcVbbUJcQmP8rURWUdYrT1flRiBiBVjq/RYGguJpDUgIXSqdYKlE0CxthmdMWoSlBAuL5bUBa73g0pttSy7Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse5": "^8.1.1" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/path-scurry": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.3.tgz", + "integrity": "sha512-Ie3c3F+7WJOUCr0r8V8uEunY5Sj4PGFDoBZvFw7JmHJs/+H5GZK+GsIM8tHMcZy7c27Zj+U1NOcVzqlC7tBJpg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, + "node_modules/tldts": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.6.3.tgz", + "integrity": "sha512-x/ocO0PagQVYQHoAk19SsR9j/ylnRLU82sugMUl9eGdHGHgw46NLzopvcYDUCW/kgVFwJe/syU9dMjbrS2e5cQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^7.6.3" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.6.3.tgz", + "integrity": "sha512-HjQiEhyxofqR2GM1cOp8CSwMYoKpmz/guhmZniTUayo7W/8d6uXebMelNanMFwRz0jKcMIprTzQDLuPdDyTBNA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tough-cookie": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.1.0.tgz", + "integrity": "sha512-FTxc8u8Kl2tz0Lat1u8ksvcy8bwHRyEMawwTWybo51JqaC6O7SvfuhAKg+Ld6VqyIe2QRJBzY9HA7y2WyFRT2w==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^7.0.5" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-7.0.0.tgz", + "integrity": "sha512-BcDSDW+SIGWVOns1Zm6Yg91q9AEj7eaID0QDY9oIqJD1A8dscNwMcl9Sms2DeuWCNov1X0/oXanHGYQBSLwZsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": "^22.14.0 || >=24.0.0" + } + }, + "node_modules/undici": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.14.0.tgz", + "integrity": "sha512-MqM6wqORYo0jb1WFUwFKZTFWFz6VeBMPj9op5Hq+RvlrQjISQCyLEfx5+/iqOLWC/LL1HliJ5t0NP1BgYpXeVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22.19.0" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-6.0.0.tgz", + "integrity": "sha512-4Nsy8K5Tr6SPDH9jhKJOHf7ChDrc1zufZTVSF7x72hwuEXBqxqk9G6cK+K2NRUtB3iELRJqjXb4JPDMBjMTl2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/webidl-conversions": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", + "integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==", + "dev": true, + "license": "BSD-2-Clause", "engines": { - "node": ">= 10" + "node": ">=20" + } + }, + "node_modules/whatwg-mimetype": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", + "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/whatwg-url": { + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-17.3.0.tgz", + "integrity": "sha512-KwOAJrpf+GTgBvcBQJcP38sMF0DsQKdwtG+TxM2pW44P6E5k0hDbWrDmyuJDIF0Uef0aQq0ZoJs+5oI+k8ddhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@exodus/bytes": "^1.16.0", + "tr46": "^7.0.0", + "webidl-conversions": "^8.0.1" }, - "optionalDependencies": { - "@opendal/lib-darwin-arm64": "0.49.13", - "@opendal/lib-darwin-x64": "0.49.13", - "@opendal/lib-linux-arm64-gnu": "0.49.13", - "@opendal/lib-linux-arm64-musl": "0.49.13", - "@opendal/lib-linux-x64-gnu": "0.49.13", - "@opendal/lib-linux-x64-musl": "0.49.13", - "@opendal/lib-win32-arm64-msvc": "0.49.13", - "@opendal/lib-win32-x64-msvc": "0.49.13" + "engines": { + "node": "^22.14.0 || >=24.0.0" + } + }, + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true, + "license": "MIT" } } } diff --git a/plugins/s3-downloader/package.json b/plugins/s3-downloader/package.json index 67ce5ceea..c1e2e2ae8 100644 --- a/plugins/s3-downloader/package.json +++ b/plugins/s3-downloader/package.json @@ -1,10 +1,21 @@ { "name": "ztools-s3-downloader", - "version": "0.1.1", + "version": "0.1.4", "private": true, - "description": "ZTools plugin: download objects from S3-compatible storage", + "description": "ZTools plugin: download objects from S3-compatible storage with OpenDAL", "type": "commonjs", + "scripts": { + "check": "node --check preload.js && node --check lib/opendal-service.js && node --check app.js && node --check scripts/package.mjs", + "test": "node --test test/*.test.cjs", + "package": "node scripts/package.mjs" + }, "dependencies": { - "opendal": "0.49.13" + "@fagao-ai/opendal-s3": "https://cdn.jsdelivr.net/gh/fagao-ai/opendal-s3@v0.1.0-dist/dist/fagao-ai-opendal-s3-0.1.0.tgz" + }, + "devDependencies": { + "@electron/asar": "^4.3.4", + "@ztools-center/ztools-api-types": "1.0.3", + "adm-zip": "^0.6.1", + "jsdom": "^31.0.1" } } diff --git a/plugins/s3-downloader/plugin.json b/plugins/s3-downloader/plugin.json index 87ed54842..4f3d194c1 100644 --- a/plugins/s3-downloader/plugin.json +++ b/plugins/s3-downloader/plugin.json @@ -1,11 +1,12 @@ { + "$schema": "node_modules/@ztools-center/ztools-api-types/resource/ztools.schema.json", "name": "s3-downloader", "title": "S3 下载", - "description": "管理 S3 凭证与桶,输入 object key 即可下载到本地(macOS Apple Silicon)", - "version": "0.1.1", + "description": "管理 S3 凭证与桶,输入 object key 即可下载到本地(macOS / Windows / Linux)", + "version": "0.1.4", "author": "fagao-ai", "homepage": "https://github.com/fagao-ai/ztools-s3-downloader", - "platform": ["darwin"], + "platform": ["darwin", "win32", "linux"], "categories": ["development"], "main": "index.html", "preload": "preload.js",