Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions plugins/s3-downloader/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

- 首次上架插件市场
Expand Down
9 changes: 7 additions & 2 deletions plugins/s3-downloader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,包含上述四个平台二进制。

## 凭证安全

Expand All @@ -36,3 +39,5 @@ Intel Mac 和 Windows 版本需要分别构建对应的原生下载组件,后
## 源码

https://github.com/fagao-ai/ztools-s3-downloader

原生下载包:https://github.com/fagao-ai/opendal-s3
19 changes: 16 additions & 3 deletions plugins/s3-downloader/build-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/s3-downloader/lib/opendal-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Loading
Loading