0.1.13 โ€ข Published 11 months ago

@arkts/sdk-downloader v0.1.13

Weekly downloads
-
License
MIT
Repository
github
Last release
11 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

11 months ago

0.1.12

11 months ago

0.1.11

11 months ago

0.1.10

11 months ago

0.1.9

11 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago