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

eo-maker-deploy

v1.3.1

Published

CLI tool for deploying static sites to EdgeOne with automatic domain, CNAME, and SSL configuration

Readme

EdgeOne Deploy

一键部署静态网站到腾讯云 EdgeOne,自动配置域名、CNAME 和 SSL 证书。

🤖 本项目为纯 Vibe Coding,使用 MiMo-v2.5 完成,没有人类参与。

npm version License: MIT

为什么需要这个工具?

不再忍受腾讯云缓慢的后台操作:

❌ 手动流程:进 Maker 后台 → 等几分钟出 CNAME → 去 DNS 配置 → 再等几分钟 → 配置 SSL → 又是几分钟 → 部署证书 → 继续等待... 配好 API Key,剩下的全自动:上传文件 → 绑定域名 → 配置 CNAME → 申请 SSL → 部署证书,全程无需手动操作。

适用场景:

  • 🔄 CI/CD 流水线自动部署(GitHub Actions、GitLab CI 等)
  • 🚀 本地项目快速部署测试
  • 👥 团队协作,统一部署流程

功能特性

  • 🚀 一键部署静态网站
  • 🌐 自动配置自定义域名
  • 🔗 自动设置 CNAME 解析
  • 🔒 自动申请和部署 SSL 证书
  • 📦 支持 React、Vue、HTML 等任意静态项目
  • ⚙️ 支持腾讯云 DNS 自动配置

安装

npm install -g eo-maker-deploy

或直接使用 npx:

npx eo-maker-deploy 

配置

有两种方式配置凭证(CLI 参数优先于 .env 文件):

方式一:CLI 参数(推荐用于 CI/CD)

npx eo-maker-deploy deploy ./dist --domain test.example.com \
  --secret-id YOUR_SECRET_ID \
  --secret-key YOUR_SECRET_KEY \
  --maker-api-token YOUR_API_TOKEN \
  --project-name YOUR_PROJECT

方式二:.env 文件

创建 .env 文件:

cp .env.example .env

配置以下环境变量:

# 腾讯云凭证(必填)
TENCENT_SECRET_ID=your_secret_id_here
TENCENT_SECRET_KEY=your_secret_key_here

# EdgeOne API Token(必填)
EDGEONE_MAKER_API_TOKEN=your_api_token_here

# EdgeOne 项目名称(可选,默认:edgeone-deploy)
EDGEONE_PROJECT_NAME=edgeone-deploy

# EdgeOne Zone 名称(可选,设置后跳过自动查找)
# EDGEONE_ZONE_NAME=makers.morxi.com

全局 CLI 参数

所有命令都支持以下全局参数(覆盖 .env 值):

| 参数 | 环境变量 | 说明 | |------|----------|------| | --secret-id <id> | TENCENT_SECRET_ID | 腾讯云 SecretId | | --secret-key <key> | TENCENT_SECRET_KEY | 腾讯云 SecretKey | | --maker-api-token <token> | EDGEONE_MAKER_API_TOKEN | EdgeOne API Token | | --project-name <name> | EDGEONE_PROJECT_NAME | EdgeOne 项目名称 | | --zone-name <name> | EDGEONE_ZONE_NAME | EdgeOne Zone 名称 |

获取凭证

  1. 腾讯云 SecretId/SecretKey

    • 登录 腾讯云控制台
    • 创建或查看 API 密钥
    • 如果使用子账户,请确保已添加所需权限(见下方"腾讯云子账户权限"章节)
  2. EdgeOne API Token

使用方法

一键部署(推荐)

# 使用 .env 文件
edgeone-deploy deploy ./dist --domain test.example.com

# 或使用 CLI 参数
edgeone-deploy deploy ./dist --domain test.example.com \
  --secret-id YOUR_ID --secret-key YOUR_KEY --maker-api-token YOUR_TOKEN

这个命令会:

  1. 部署静态文件到 EdgeOne
  2. 配置自定义域名
  3. 设置 CNAME 解析
  4. 申请并部署 SSL 证书

分步操作

1. 域名设置

edgeone-deploy setup-domain example.com

2. 部署项目

edgeone-deploy deploy ./dist --project my-project

3. 查看项目列表

edgeone-deploy list-domains

4. 添加域名

edgeone-deploy add-domain test.example.com

5. 验证部署

edgeone-deploy verify

6. 检查权限配置

edgeone-deploy check-permissions

命令参数

deploy

edgeone-deploy deploy <directory> [options]

参数:

  • <directory> - 构建输出目录(如 ./dist
  • -p, --project <name> - 项目名称(覆盖 .env 配置)
  • --domain <domains...> - 自定义域名(支持多个,如 test.example.com api.example.com
  • --project-id <id> - 项目 ID(自动从 .edgeone/project.json 检测)
  • --skip-ssl - 跳过 SSL 证书配置
  • --verbose - 显示详细调试信息

setup-domain

edgeone-deploy setup-domain <domain> [options]

参数:

  • <domain> - 要设置的域名(如 example.com
  • --area <area> - EdgeOne 加速区域(global, mainland, overseas)
  • --verbose - 显示详细调试信息

add-domain

edgeone-deploy add-domain <domain>

list-domains

edgeone-deploy list-domains

verify

edgeone-deploy verify <domain>

check-permissions

edgeone-deploy check-permissions

验证所有 API 凭证和权限是否正确配置,包括:

  • 腾讯云 SecretId/SecretKey 是否有效
  • TEO(EdgeOne)域名管理权限是否具备
  • EdgeOne API Token 是否可用

如果有任何配置问题,会显示具体的修复步骤。适合在首次部署前使用,确保环境就绪。

npm 脚本

如果从源码运行,可以使用 npm 脚本:

# 部署
npm run deploy -- ./dist --domain your-domain.com

# 域名设置
npm run setup-domain -- example.com

# 添加域名
npm run add-domain -- test.example.com

# 列出域名
npm run list-domains

# 验证部署
npm run verify -- your-domain.com

# 检查权限
npm run check-permissions

示例

部署 React 项目

# 构建项目
cd my-react-app
npm run build

# 部署到 EdgeOne
edgeone-deploy deploy ./build --domain myapp.example.com

部署 Vue 项目

# 构建项目
cd my-vue-app
npm run build

# 部署到 EdgeOne
edgeone-deploy deploy ./dist --domain myapp.example.com

部署静态 HTML

edgeone-deploy deploy ./public --domain mysite.example.com

跳过 SSL 配置

edgeone-deploy deploy ./dist --domain test.example.com --skip-ssl

使用自定义项目名称

edgeone-deploy deploy ./dist --project my-custom-project --domain test.example.com

工作流程

执行 deploy 命令时,系统会自动完成以下步骤:

  1. 部署静态文件

    • 将构建产物上传到 EdgeOne
    • 创建或更新项目
  2. 配置自定义域名

    • 在 Maker 项目中添加域名
    • 验证域名所有权
  3. 设置 CNAME 解析

    • 自动配置腾讯云 DNS
    • 等待 DNS 传播
  4. 配置 SSL 证书

    • 申请免费 SSL 证书
    • 配置 DNS 验证记录
    • 等待证书签发
    • 部署证书到域名

环境变量 / CLI 参数

| 环境变量 | CLI 参数 | 必填 | 说明 | |----------|----------|------|------| | TENCENT_SECRET_ID | --secret-id | ✅ | 腾讯云 SecretId | | TENCENT_SECRET_KEY | --secret-key | ✅ | 腾讯云 SecretKey | | EDGEONE_MAKER_API_TOKEN | --maker-api-token | ✅ | EdgeOne API Token | | EDGEONE_PROJECT_NAME | -p, --project, --project-name | ❌ | 项目名称(默认:edgeone-deploy) | | EDGEONE_PROJECT_ID | --project-id | ❌ | 项目 ID(自动从 .edgeone/project.json 检测) | | EDGEONE_ZONE_NAME | --zone-name | ❌ | EdgeOne Zone 名称(跳过自动查找) |

前置条件

  1. 已安装 Node.js(>= 14)
  2. 已安装 edgeone CLI:npm install -g edgeone
  3. 已配置腾讯云 DNS 域名
  4. 已创建 EdgeOne 项目

腾讯云子账户权限

如果使用子账户(协作者)访问,需要配置以下权限策略:

| 权限策略 | 说明 | 必需 | |---------|------|------| | QcloudTEOFullAccess | 边缘安全加速平台 EO 全读写访问权限 | ✅ | | QcloudDNSPodFullAccess | 云解析 DNS 全读写访问权限 | ✅ | | QcloudPrivateDNSFullAccess | 私有域解析(Private DNS)全读写访问权限 | 推荐 | | QcloudPrivateDNSReadOnlyAccess | 私有域解析(Private DNS)只读访问权限 | 推荐 |

配置步骤

  1. 登录 腾讯云控制台
  2. 进入 访问管理用户用户列表
  3. 选择或创建子账户
  4. 点击 授权
  5. 搜索并添加上述权限策略

主账户 vs 子账户

  • 主账户:默认拥有所有权限,无需额外配置
  • 子账户:需要手动添加上述权限策略

⚠️ 注意:为了安全起见,建议使用子账户并仅授予必要的权限。

常见问题

Q: 如何获取 EdgeOne API Token?

A: 登录 EdgeOne 控制台,进入 Pages 项目 → 设置 → API Token。

Q: 域名验证失败怎么办?

A: 确保域名已在腾讯云 DNS 中配置,并且 API 密钥有 DNS 管理权限。

Q: SSL 证书申请失败怎么办?

A: 检查域名是否正确配置,EdgeOne Zone 是否存在。可以使用 --verbose 查看详细错误信息。

Q: 如何更新已部署的项目?

A: 再次运行 edgeone-deploy deploy ./dist --domain your-domain.com 即可。

Q: 子账户权限不足怎么办?

A: 请确保子账户已添加以下权限策略:

  • QcloudTEOFullAccess - 边缘安全加速平台 EO 全读写访问权限
  • QcloudDNSPodFullAccess - 云解析 DNS 全读写访问权限

CI/CD 集成

GitHub Actions

# .github/workflows/deploy.yml
name: Deploy to EdgeOne

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: '20'

      - run: npm ci
      - run: npm run build

      - name: Deploy to EdgeOne
        run: |
          npx eo-maker-deploy deploy ./dist \
            --domain ${{ vars.DOMAIN }} \
            --secret-id ${{ secrets.TENCENT_SECRET_ID }} \
            --secret-key ${{ secrets.TENCENT_SECRET_KEY }} \
            --maker-api-token ${{ secrets.EDGEONE_MAKER_API_TOKEN }}

GitLab CI

# .gitlab-ci.yml
stages:
  - build
  - deploy

build:
  stage: build
  image: node:20
  script:
    - npm ci
    - npm run build
  artifacts:
    paths:
      - dist/

deploy:
  stage: deploy
  image: node:20
  script:
    - npx eo-maker-deploy deploy ./dist --domain $DOMAIN --secret-id $TENCENT_SECRET_ID --secret-key $TENCENT_SECRET_KEY --maker-api-token $EDGEONE_MAKER_API_TOKEN
  only:
    - main

Docker

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
RUN npm run build
CMD ["npx", "eo-maker-deploy", "deploy", "./dist", "--domain", "example.com"]

环境变量说明

| 变量 | 说明 | 获取方式 | |------|------|----------| | TENCENT_SECRET_ID | 腾讯云 SecretId | 控制台 | | TENCENT_SECRET_KEY | 腾讯云 SecretKey | 同上 | | EDGEONE_MAKER_API_TOKEN | EdgeOne Maker API Token | EdgeOne 控制台 → Pages → 设置 → API Token |

💡 安全提示:在 CI/CD 中使用 Secrets/Variables 存储凭证,不要硬编码到代码中。

开发

# 克隆项目
git clone https://github.com/your-username/edgeone-deploy.git
cd edgeone-deploy

# 安装依赖
npm install

# 本地运行
node index.js deploy ./test --domain test.example.com

# 链接到全局(开发测试)
npm link

LLM Instructions

For AI agents and LLMs integrating with this tool, see LLM.md.

Quick summary for LLMs:

  • Tool: edgeone-deploy — deploys static sites to Tencent Cloud EdgeOne
  • Required credentials: TENCENT_SECRET_ID, TENCENT_SECRET_KEY, EDGEONE_MAKER_API_TOKEN
  • Main command: edgeone-deploy deploy <directory> --domain <domain> --project-name <name>
  • All credentials can be passed via CLI flags or environment variables
  • The tool automates: file upload, domain config, CNAME setup, SSL certificate

许可证

MIT