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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@wisdomgarden/cloak

v0.0.3

Published

Cloak is a hybrid development framework for HarmonyOS, enabling quick packaging of H5 applications and native capability access

Readme

English Version | 中文版

Cloak - HarmonyOS 混合开发框架

Cloak 是专为 HarmonyOS 设计的混合开发框架,类似 CordovaCapacitor,但具备 更轻量更高性能 的特性。

该框架可将 Web 应用快速转换为原生应用,同时通过插件机制访问 HarmonyOS 原生能力。


核心特性

  • 快速打包:将 H5 应用快速编译为 HarmonyOS 应用。
  • 原生能力访问:通过插件机制调用原生接口。
  • WebView 支持:提供高性能 WebView 容器,确保 H5 应用流畅运行。
  • 插件开发:支持开发者自定义插件以扩展原生功能。

提示

  • 兼容性说明:与现有 Cordova 或 Capacitor 插件 不兼容,所有插件需基于 HarmonyOS 原生能力 重新开发

现有插件

  • CloakPluginPermission ohpm i @wisdomgarden/cloak-plugin-permission

    用于检查、请求 HarmonyOS 权限。


使用方法

运行示例应用

  1. 创建 EmptyAbility 应用

    参考华为官方文档:构建第一个ArkTS应用(Stage模型)

  2. 安装 Cloak 框架

    ohpm install @wisdomgarden/cloak

    安装完成后即可运行内置示例应用。


集成你的 H5 应用

  1. 创建配置文件 在资源目录新建 entry/src/main/resources/rawfile/config.json

    {
      "APP_FOLDER": "www",
      "APP_HOST": "http://localhost",
      "APP_IDENTITY_USER_AGENT": "YourAppName/HarmonyOS",
      "IS_DEBUG": false,
      "WEB_VIEW_USE_APP_PERMISSION": true,
      "APP_USE_REAL_HOST_RESOURCE": false
    }
  2. 部署 H5 资源

    将 H5 应用文件(以 index.html 为入口)复制至 entry/src/main/resources/rawfile/www

  3. 调试与运行

    通过 DevEco Studio 进行编译和实时调试。

  4. 适配 H5 能力

    至此,配合 CloakPluginPermission 获得系统权限, Cloak 已经可以适配绝大多数 H5 应用所需的能力。比如 navigator.mediaDevices, input (capture, file), navigator.geolocation, indexedDB 等。可参见 Demo

  5. 插件开发

    根据需求开发自定义插件,或通过社区获取适配 HarmonyOS 的插件。

示例

完成使用方法步骤,其他可参照: https://github.com/WisdomGardenInc/Cloak