Skip to content

📦 Simple function to download OpenHarmony SDK, streaming 💦 simple 😊 easy to use, and support resume download ↩️ fast ⚡️ 一个简单的函数,用于下载 OpenHarmony SDK,支持流式传输 💦 非常简洁 😊 且易于使用,并且支持断点续传 ↩️ 就是快 ⚡️

Notifications You must be signed in to change notification settings

ohosvscode/sdk-downloader

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

@arkts/sdk-downloader

Simple function to download the ArkTS SDK, streaming, simple, easy to use, and support resume download, fast ⚡️

Features 🚀

  • ↩️ 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

Supported Platforms 💻

  • Windows
  • macOS
  • Linux

The unit test is run on Windows, macOS and Linux, you can see the test results in github actions:

Current Test Status: CI

Install 📦

pnpm add @arkts/sdk-downloader

Usage 🚀

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()

Author 🤝

License 📄

MIT

About

📦 Simple function to download OpenHarmony SDK, streaming 💦 simple 😊 easy to use, and support resume download ↩️ fast ⚡️ 一个简单的函数,用于下载 OpenHarmony SDK,支持流式传输 💦 非常简洁 😊 且易于使用,并且支持断点续传 ↩️ 就是快 ⚡️

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •