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

xm-upload-ftp

v1.1.6

Published

**描述:** MoveFile.js 用于将 portykey React 前端代码转移到 Cocos 并应用。

Readme

README.md

MoveFile.js

描述: MoveFile.js 用于将 portykey React 前端代码转移到 Cocos 并应用。

如何使用: 该工具通常与 portkey 项目的 build 命令配合使用。


xm-upload-ftp

描述: 将本地文件/文件夹通过 SFTP 上传到远程服务器。支持单个文件上传、整文件夹递归上传。


快速开始

# 1. 安装
npm install xm-upload-ftp --save-dev

# 2. 初始化配置文件(在项目根目录生成 upload_config.json)
npx xm-upload-ftp init

# 3. 编辑 upload_config.json,填入 SFTP 服务器信息和上传路径映射

# 4. 上传
npx xm-upload-ftp

配置文件 upload_config.json

{
    "sftpConfig": {
        "host": "你的服务器 IP",
        "username": "登录用户名",
        "port": 22,
        "password": "登录密码"
    },
    "uploadConfig": {
        "pathMap": {
            "项目A": {
                "local": "D:/path/to/local/folder",   // 本地路径(文件或文件夹)
                "remote": "/home/www/game/项目A",      // 远端目标路径
                "clearRemote": false                   // 上传前是否清空远端目录
            },
            "项目B": [
                "D:/path/to/local/file.txt",           // 兼容旧版数组格式
                "/home/www/game/file.txt"
            ]
        }
    },
    "uploadDifferConfig": {}
}

pathMap 条目格式:

| 格式 | 说明 | |------|------| | 对象格式(推荐) | { "local": "...", "remote": "...", "clearRemote": false } | | 数组格式(兼容) | ["本地路径", "远端路径"] |

clearRemote 选项:

| 值 | 说明 | |----|------| | false(默认) | 增量上传,基于文件大小跳过未变化文件 | | true | 上传前清空远端目录中所有内容,然后全量上传 |


命令

| 命令 | 说明 | |------|------| | xm-upload-ftp | 默认上传(增量),跳过未变化的文件 | | xm-upload-ftp upload [-p key...] | 上传指定项目 | | xm-upload-ftp upload --no-skip | 强制全量覆盖上传 | | xm-upload-ftp init | 在当前目录创建默认配置文件 | | xm-upload-ftp help | 显示帮助信息 | | xm-upload-ftp version | 显示版本号 | | xm-upload-ftp --help / -h | 直接显示帮助(无需子命令) | | xm-upload-ftp --version / -v | 直接显示版本(无需子命令) |

增量上传:默认启用。上传前对比本地与远端文件的大小,一致则跳过,大幅提升重复部署速度。使用 --no-skip--force 可关闭。


使用示例

# 上传所有项目(默认增量)
xm-upload-ftp
xm-upload-ftp upload

# 上传指定项目(-p 支持多个值)
xm-upload-ftp upload -p 项目A -p 项目B
xm-upload-ftp upload -p 项目A 项目B

# 强制全量覆盖上传
xm-upload-ftp upload --no-skip
xm-upload-ftp upload --force

# 使用自定义配置文件
xm-upload-ftp upload --config ./config/prod.json
xm-upload-ftp upload -c /path/to/my_config.json -p 项目A

# 显示帮助
xm-upload-ftp help
xm-upload-ftp --help

# 显示版本
xm-upload-ftp version
xm-upload-ftp --version

# 初始化配置
xm-upload-ftp init

npm scripts 方式

package.json 中:

{
    "scripts": {
        "upload": "xm-upload-ftp",
        "upload:force": "xm-upload-ftp upload --no-skip",
        "upload:init": "xm-upload-ftp init",
        "upload:help": "xm-upload-ftp help"
    }
}
npm run upload
npm run upload:force
npm run upload -- -p 项目A
npm run upload -- -c ./prod.json