Simple function to download the ArkTS SDK, streaming, simple, easy to use, and support resume download, fast ⚡️
- ↩️ Resume download ✅
- ⬇ Download Progress, tar extract progress and zip extract progress tracking ✅
- 🧵 HTTP/HTTPS support ✅
- 🔗 Support cancel download ✅
- 🧹 Clean the cache directory after the download is complete ✨
- 👂 Support listen events when download, tar extract and zip extract
- ㊙️ Check the SHA256 of the downloaded
tar.gz
file
- Windows
- macOS
- Linux
The unit test is run on Windows, macOS and Linux, you can see the test results in github actions:
pnpm add @arkts/sdk-downloader
import { createDownloader } from '@arkts/sdk-downloader'
const downloader = await createDownloader({
url: {
os: SdkOS.MacOS,
version: SdkVersion.API15,
arch: SdkArch.ARM,
},
cacheDir: 'target/.cache',
targetDir: 'target',
resumeDownload: true,
})
await downloader.startDownload(/** Override request options */)
await downloader.checkSha256()
await downloader.extractTar()
await downloader.extractZip()
await downloader.clean()
- Naily Zero
- QQ: 1203970284
- Email: [email protected]
- WeChat: gcz-zero
MIT