0.1.13 โ€ข Published 4 months ago

@arkts/sdk-downloader v0.1.13

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@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 โœจ

Install ๐Ÿ“ฆ

pnpm add @arkts/sdk-downloader

Usage ๐Ÿš€

import { download, SdkArch, SdkOS, SdkVersion } from '@arkts/sdk-downloader'

download({
  url: {
    os: SdkOS.MacOS,
    version: SdkVersion.API15,
    arch: SdkArch.ARM,
  },
  // Store the resume download file in the cache directory
  cacheDir: 'target/.cache',
  // The sdk target directory
  targetDir: 'target',
  // Whether to resume the download
  resumeDownload: true,
  // The progress callback
  onProgress: (e) => {
    console.warn(`Downloading: ${e.percentage}% ${e.network}${e.unit}`)
  },
  onTarExtracted: (entry) => {
    console.warn(`Extracting TAR file: ${entry.path}`)
  },
  onZipExtracted: (entry, total, current) => {
    console.warn(`Extracting ZIP file: ${entry.path} ${current}/${total}`)
  },
})

Author ๐Ÿค

  • Naily Zero
  • QQ: 1203970284
  • Email: zero@naily.cc
  • WeChat: gcz-zero

License ๐Ÿ“„

MIT

0.1.13

4 months ago

0.1.12

4 months ago

0.1.11

4 months ago

0.1.10

4 months ago

0.1.9

4 months ago

0.1.8

4 months ago

0.1.7

4 months ago

0.1.6

4 months ago

0.1.5

4 months ago

0.1.4

4 months ago

0.1.3

4 months ago

0.1.2

4 months ago