npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arkts/image-manager

v0.1.5

Published

OpenHarmony/HarmonyOS qemu image manager.

Downloads

783

Readme

@arkts/image-manager

OpenHarmony/HarmonyOS qemu image manager.

Usage

import { createImageManager, RequestUrlError } from '@arkts/image-manager'

async function main() {
  const imageManager = createImageManager({ /** options */ })

  // Get all local and remote images
  const images = await imageManager.getImages()
  console.log(images)

  // We choice the first image to deploy
  const image = images[0]
  // Download the image
  const downloader = await image.createDownloader()
  if (downloader instanceof RequestUrlError)
    return console.error(downloader)

  // Listen to the download and extract progress
  downloader.on('download-progress', progress => console.warn(progress))
  downloader.on('extract-progress', progress => console.warn(progress))

  // Start download
  await downloader.startDownload()

  // When the download is complete, we can check the checksum
  const checksum = await downloader.checkChecksum()
  console.warn(`Checksum: ${checksum}`)
  if (!checksum)
    return console.error('Checksum is not valid')

  // Start extract the image
  await downloader.extract()

  // Clean the download cache
  await downloader.clean()

  // Start to deploy the image
  // We must find the product config item if you don't want to customize the deployed image options,
  // like `screenWidth`, `screenHeight`, `screenDiagonal`, `screenDensity`, etc.
  const productConfig = await image.getProductConfig()
  const mateBookFold = productConfig.find(item => item.name === 'MateBook Fold')
  if (!mateBookFold)
    throw new Error('MateBook Fold not found')

  // Create the deployer
  const device = image.createDevice('MateBook Fold', createDeployedImageConfig(image))
    .setCpuNumber(4)
    .setMemoryRamSize(4096)
    .setDataDiskSize(6144)

  // We can get the final deployed image options,
  // it will be written to the `imageBasePath/lists.json` file when deployed.
  const list = await device.buildList()
  console.warn(list)

  // We can get the `config.ini` object,
  // it will be written to the `deployedPath/MateBook Fold/config.ini` file when deployed.
  const config = await device.buildIni()
  console.warn(config)
  // You also can get the `config.ini` string version:
  const iniString = await device.toIniString()
  console.warn(iniString)

  // Deploy the device
  await device.deploy()
  console.warn('Image deployed successfully')

  // Start the emulator
  await image.start(device)

  await new Promise<void>(resolve => setTimeout(resolve, 1000 * 60))
  // Stop the emulator
  image.stop(device)
}