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

wx-mini-program-publisher

v0.1.8

Published

CLI for publishing WeChat Mini Programs in CI

Readme

wx-mini-program-publisher

一个可通过 npx 直接调用的微信小程序自动发布脚本,适合在 CI/CD 流水线中使用。

通过 npx 调用

npx -y [email protected]

也可以带参数:

npx -y [email protected] \
  --project-path ./miniprogram \
  --desc "ci auto release" \
  --robot 1

版本描述用 --desc 指定;省略时会读取环境变量 CI_COMMIT_MESSAGE(CI 里常用)。机器人编号用 --robot,省略时默认为 1

建议在 CI 中始终使用 -y(跳过交互确认)并固定版本号(如 @0.1.7)以保证发布流程稳定可复现。

发布版本号生成规则:

  • 微信上传 version 使用三段格式:YY.MMDD.xxx
  • version 自动生成规则:
    • 优先:YY.MMDD.BUILD_NUMBERBUILD_NUMBER 去除非数字后作为第三段)
    • 兜底:YY.MMDD.HHmm(当没有 BUILD_NUMBER 时,第三段使用当前时间 HHmm
  • 示例:26.0328.78926.0328.1457

环境变量

必填

  • WX_APPID(或 APPID
  • 私钥(二选一)
    • WX_PRIVATE_KEY_BASE64(或 PRIVATE_KEY_BASE64):推荐,放 base64 编码后的私钥内容
    • WX_PRIVATE_KEY(或 PRIVATE_KEY):明文私钥,支持 \n 自动转真实换行

脚本会在运行时把私钥写入临时文件,并将该临时文件路径传给 miniprogram-ciprivateKeyPath,发布结束后自动删除。

可选

  • WX_CI_SETTING_JSON:自定义 miniprogram-ci upload.setting JSON 字符串

CI 使用示例(GitHub Actions)

- name: Publish mini program
  env:
    WX_APPID: ${{ secrets.WX_APPID }}
    WX_PRIVATE_KEY_BASE64: ${{ secrets.WX_PRIVATE_KEY_BASE64 }}
  run: |
    npx -y [email protected] \
      --project-path ./miniprogram \
      --desc "${{ github.event.head_commit.message }}" \
      --robot 1