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

abler-drm-tool

v1.0.121

Published

开发者远程维护工具

Readme

彭彭自用包:abler-drm-tool

开发者远程维护工具

集成在服务端,提供对系统进行维护的工具,开发人员必须在其本机启动服务,使用Postman或类似工具访问本机服务,本机服务再转发到远程服务器执行维护任务。

安装

npm i abler-drm-tool -s

用法示例

  • 代码集成

const express = require('express');
//const {drmTool, drmRouter} = require("abler-drm-tool");
const {drmTool} = require("abler-drm-tool");

drmTool.config(conf, err);

const app = express();
//const drmRouter = drmTool.registerRoutes();
const drmRouter = drmTool.registerRoutes(conf.drmTool.flagPath); // eg: "B44B930B8BA94C1292ED7F7A2C25CFB0"
app.use('/api', drmRouter);
  • 配置
conf.drmTool: {
        //允许哪些IP访问
        get drmClients() {
            return ["127.0.0.1"]; 
        },
	   //目标环境的url
        get drmUrls() {
			return {
                dev: "https://dev.xxxx.com",
                uat: "https://uat.xxxx.com"
            }
        },
        //有哪些环境允许远程维护
        envIds: {
            developer: "developer",
            dev: "mydev"
            //dev: "PROD"
        },
        //drmTool数据加密公钥
        drmPublicKey: "-----BEGIN PUBLIC KEY-----\n" +
            "......" +
            "-----END PUBLIC KEY-----",
       //私钥必须存储在文件本地配置目录下的 cert/drmPrivateKey.pem 文件中
    }
  • 远程维护操作

通过访问开发者本机的服务,将维护操作指令和相关参数发送到远程服务器来执行远程维护任务。

路由模板:

`${flagPath}/:destEnvType/:command`
`${flagPath}/:destEnvType/:command/:_function`
其中:flagPath	由应用系统设定
	destEnvType:目标环境标识,如 uat
	command 维护指令:
		dbQuery	执行数据库查询SQL
		dbExec	执行数据库查询SQL
		dbCopy	拷贝数据库数据
		dbTest	测试SQL语句执行效率
		testCase	测试API
		countByTestLog	根据测试日志统计测试结果
		dbMaintance	数据库维护
		codeFile	代码文件
			_function:
                up、upload	上传更新
                down、download	下载/比较代码文件
		loadLog	装入日志文件
		redis	执行redis命令
		echo	echo
		exec	执行dos命令(目标环境系统为Windows)
		commonTest	执行其他测试函数	

更新日志

1.0.113

  • 路由标志性首段路径可以由应用指定

  • dbQuery、dbExec 可指定SQL名称来使用服务预定义SQL,可指定 _sqlText 指定是否返回sql文本