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

@roxybrowser/jumpserver-deploy

v1.0.1

Published

Deploy static assets to remote servers via JumpServer Connection Token (SSH/SFTP)

Readme

jumpserver-deploy

通过 JumpServer Connection Token 将静态资源部署到远程服务器(SSH/SFTP)。

适用于企业微信扫码登录等无法直接 SSH 密码认证的场景:使用 Access Key 创建 Connection Token,经 KoKo 网关上传并解压。

安装

npm install jumpserver-deploy
# 或
pnpm add jumpserver-deploy

要求 Node.js >= 20.12(使用 process.loadEnvFile)。

环境变量

JMS_BASE_URL=https://jumpweb.example.com
JMS_HOST=jumpweb.example.com
JMS_PORT=2222
JMS_ACCESS_KEY_ID=your-access-key-id
JMS_ACCESS_KEY_SECRET=your-access-key-secret
JMS_ORG_ID=00000000-0000-0000-0000-000000000002
JMS_SYSTEM_USERNAME=root

快速开始

import path from 'node:path'
import {
  JumpServerClient,
  JumpServerDeployer,
  createSplitZipPackages,
  loadDeployEnvFile,
  loadJumpServerConfigFromEnv,
} from 'jumpserver-deploy'

loadDeployEnvFile(path.resolve('.env.deploy'))

const config = loadJumpServerConfigFromEnv()

const packages = createSplitZipPackages({
  sourceDir: './dist',
  // 静态站点:先更新 js/css,最后再更新 html
  isDelayedFile: relativePath => relativePath.endsWith('.html'),
})

const deployer = new JumpServerDeployer({
  client: JumpServerClient.fromConfig(config),
  jumpServerHost: config.host,
  jumpServerPort: config.port,
})

await deployer.deploy({
  targets: [
    {
      label: 'web-server',
      assetId: '84416d8e-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
      remoteBasePath: '/var/www/app/dist',
    },
  ],
  packages,
  systemUsername: config.systemUsername,
})

API

| 导出 | 说明 | |------|------| | JumpServerClient | JumpServer REST API,创建/销毁 Connection Token | | JumpServerDeployer | SSH/SFTP 上传 + 远程解压 | | createSplitZipPackages | 将目录拆为主资源包 + 延后部署包 | | loadJumpServerConfigFromEnv | 从环境变量读取 JumpServer 配置 | | loadDeployEnvFile | 加载 .env.deploy 文件 |

发布

pnpm install
pnpm build
npm publish --access public

License

MIT