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

mps-deploy

v0.1.4

Published

miniprogram`s (weapp) batch deployment tool

Readme

Mps-deploy 小程序批量发布助手

对已有多个不同小程序实例运行同一套小程序源码情况,因当前的小程序类目限制或因某些原因无法使用微信第三方开放平台,那Mps-deploy可以帮你快速将更新的小程序(小游戏以及插件)代码一键批量的发布到对应的小程序实例,不必再开启微信开发者工具逐一修改发布。

安装

如果你的环境尚未安装mps-deploy的相关依赖,如babel,可按照提示信息安装对应的依赖 "Couldn't find preset "es2015" relative to directory" --> npm install babel-preset-es2015 -g "Couldn't find preset "miniprogram-ci" relative to directory" --> npm install [email protected] -g

npm i mps-deploy -g // 推荐使用cnpm i mps-deploy -g

使用前提

秘钥文件:微信公众平台 —— 开发设置 —— 提交代码; 如果你在个人电脑上使用mps-deploy,请在上文位置关闭白名单限制; 可能小程序开发者并非发布者,或发布者有多名,因此开发者需要在小程序项目的根目录中添加统一的版本信息文件: mps-deploy-version.json

{
  "version": "0.0.1",
  "desc": "批量发布"
}

使用

mps-deploy提供3种使用方式:命令行,GUI,部署到服务器(或接入到第三方程序)

查看全部命令
mps-deploy
命令行
mps-deploy CMD "path/to/yourfile" // yourfile是一个发布JSON名单
{
  "project": "C:/Users/Administrator/Desktop/mps/weapp", // 小程序项目文件

  "type": "miniProgram", // miniProgram/miniProgramPlugin/miniGame/miniGamePlugin

  "es6": false, // 是否将es6编译为es5,提高兼容性

  "deploy": [ // 发布名单
​    {
​      "name": "app-one",
​      "appid": "wx00000000001",
​      "key": "C:/private.wx00000000001.key" // 秘钥文件,可从微信公众平台的开发设置中获得
​    },
​    {
​      "name": "app-two",
​      "appid": "wx00000000002",
​      "key": "C:/mps/private.wx00000000002.key"
​    }
  ]
}
GUI
mps-deploy GUI 8181(自定义端口号)

CMD和GUI方式批量发布,mps-deploy会在C盘下创建"mps-deploy-log"文件夹,每次发布任务均会存储一份文本日志

部署到服务器(或接入到第三方程序)
mps-deploy SERVER 8181

mps-deploy会提供下列接口调用, 支持并发任务

// 提交发布任务
url: /postdata
method: post
headers: m-hash // String 当前发布用户的唯一标识 必填
data: [
  "response": {
    "host": "127.0.0.1",
    "port": "9090",
    "path: "/backdata"
  },
  "deployList": {
    "project": "C:/weapp", // 小程序项目路径
    "type": "miniProgram",
    "es6": true,
    "version": "0.0.1",
    "desc": "批量发布", // 版本描述
    "name": "app-one",
    "appid": "wx000000000001",
    "key": "C:/private.wx000000000001.key"
  }
]

// 获得发布进度结果方式--轮询mps-deploy提供的接口
// 本次发布任务结束之后mps-deploy只会将本次发布结果保存60s,轮询间隙不应大于60s
url: /result
method: get
headers: m-hash
response: {
    "status": "success",
    "type": "end", // 整个任务是否完成
    "data": [
        {
            "speed": "[1/1]",
            "appid": "wx000000000001",
            "status": "success",
            "time": "2020-07-22T09:30:37.235Z"
        }
    ]
}

// 获得发布进度结果方式--mps-deploy主动调用第三方提供的接口返回数据
url: "/yourApi" // 从"/postdata"接口中提交调用的第三方接口信息
method: "post"
data: {
    "type": "end",
    "m-hash": "xxxxxxx",
    "data": [
        {
            "speed": "[1/1]",
            "appid": "wx000000000001",
            "status": "success",
            "time": "2020-07-22T09:30:37.235Z"
        }
    ]
}

注意

mps-deploy会对小程序项目做一些合法校验,但这是不完备的,因此强烈建议在批量发布之前先在微信开发者工具中上传一次,由官方开发工具校验本次构建的版本是否合法后再批量发布。 建议在代码开发完成时使用对应技术框架的cli,或webpack,或微信开发者工具来编译es6语法;不建议使用mps-deploy将小程序项目中es6语法编译为es5