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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@qse/ssh-sftp

v1.0.1

Published

教育代码部署工具

Downloads

6

Readme

@qse/ssh-sftp

简单易用的 SFTP 工具,可以上传/忽略/删除远程的文件

安装

# 全局
npm i @qse/ssh-sftp -g

# 局部
npm i @qse/ssh-sftp -D

使用

  1. 首先初始化一份配置文件

npx ssh-sftp init

  1. 将生成的.sftprc.json文件里的信息填写完整

  2. 添加脚本到 package.json

{
  "scripts": {
    "deploy": "ssh-sftp"
  }
}

建议在部署前使用npx ssh-sftp ls查看哪些文件会被上传或删除

字段说明

.sftprc.json

schema定义 http://www.zhidianbao.cn:8088/qsxxwapdev/edu-ssh-sftp/sftprc.schema.json

| 字段名 | 类型 | 描述 | 默认值 | | ---------------- | ---------------------------------------------------- | ---------------------------------------------- | ---------------------- | | localPath | string | | 'dist' | | remotePath | string | | - | | connectOptions | ConnectOptions | 登录信息 | - | | ignore | string[] | 忽略localPath中的部分文件,glob类型 | ['**/*.LICENSE.txt'] | | cleanRemoteFiles | boolean \| string[] | 清空远程文件夹,或按glob匹配清空远程部分文件 | true | | securityLock | boolean | 安全锁,默认开启 | true | | keepAlive | boolean | 保持连接 | false | | noWarn | boolean | 禁止提示 | false | | skipPrompt | boolean | 跳过询问,全部同意 | false | | preset | {context: string; folder?: string; server?:string} | 预设登录项 | - |

preset.context 目前只有三个值 "qsxxwapdev", "eduwebngv1", "qsxxadminv1"

preset.folder 文件夹名称默认使用项目名称,也可自定义文件夹名称,支持多层文件夹,例如 parent/child

preset.server 部署服务器地址 "19", "171"

connectOptions

| 字段名 | 类型 | 描述 | | -------- | -------- | ---- | | host | string | | | port | number | | | username | string | | | password | string | |

securityLock

安全锁 默认开启,会校验项目名称与远程地址是否匹配防止误传,关闭后忽略验证

Commands

ssh-sftp init

初始化生成配置文件 .sftprc.json

ssh-sftp ls

列出所有需要上传/删除/忽略的文件

ssh-sftp ls -u 单独列出所有需要上传的文件

ssh-sftp ls -d 单独列出所有需要删除的文件

ssh-sftp ls -i 单独列出所有忽略的文件