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

@elevo-ai/plugin-serve

v0.2.6

Published

Elevo Plugin Serve

Readme

@elevo/plugin-serve

Elevo Plugin Development Server - 用于本地插件开发的代理服务器。

功能特性

  • 🔄 反向代理到主应用服务器
  • 📦 本地插件 bundle 托管
  • 🎯 可配置端口和代理服务器
  • 📊 分级日志系统

安装

npm install -g @elevo/plugin-serve

或在项目中使用:

npm install --save-dev @elevo/plugin-serve

使用方法

基本用法

plugin-serve

使用默认配置:

  • Port: 3000
  • Proxy Server: https://172.30.0.188.nip.io
  • Log Level: info

命令行参数

plugin-serve [options]

选项

| 选项 | 简写 | 说明 | 默认值 | |------|------|------|--------| | --port <port> | -p | 服务器监听端口 | 3000 | | --server <url> | -s | 代理服务器 URL | https://172.30.0.188.nip.io | | --log-level <level> | -l | 日志级别 | info | | --version | | 显示版本号 | | | --help | | 显示帮助信息 | |

示例

自定义端口

plugin-serve --port 8080
# 或
plugin-serve -p 8080

自定义代理服务器

plugin-serve --server https://my-server.example.com
# 或
plugin-serve -s https://my-server.example.com

设置日志级别

# 仅显示错误
plugin-serve --log-level error

# 显示调试信息
plugin-serve --log-level debug

# 完全静默
plugin-serve --log-level silent

组合使用

plugin-serve -p 8080 -s https://my-server.com -l debug

日志级别

| 级别 | 说明 | 包含内容 | |------|------|----------| | debug | 调试模式 | 所有日志(debug, info, warn, error) | | info | 信息模式(默认) | 一般信息、警告和错误 | | warn | 警告模式 | 警告和错误 | | error | 错误模式 | 仅错误信息 | | silent | 静默模式 | 不输出任何日志 |

日志示例

info 级别(默认)

[2026-01-30T12:00:00.000Z] [INFO ] Plugin serve configuration:
[2026-01-30T12:00:00.001Z] [INFO ]   Port: 3000
[2026-01-30T12:00:00.002Z] [INFO ]   Proxy Server: https://172.30.0.188.nip.io
[2026-01-30T12:00:00.003Z] [INFO ]   Log Level: info
[2026-01-30T12:00:00.100Z] [INFO ] Serving local plugin "my-plugin" from local bundle
[2026-01-30T12:00:00.200Z] [INFO ] Plugin server listening on http://localhost:3000

debug 级别

[2026-01-30T12:00:00.000Z] [INFO ] Plugin serve configuration:
[2026-01-30T12:00:00.001Z] [INFO ]   Port: 3000
[2026-01-30T12:00:00.002Z] [INFO ]   Proxy Server: https://172.30.0.188.nip.io
[2026-01-30T12:00:00.003Z] [INFO ]   Log Level: debug
[2026-01-30T12:00:00.010Z] [DEBUG] Plugin name: my-plugin
[2026-01-30T12:00:00.011Z] [DEBUG] Local bundle path: /path/to/dist/app.umd.js
[2026-01-30T12:00:00.100Z] [DEBUG] Proxying request: GET /api/v1/workspaces/123/plugins
[2026-01-30T12:00:00.150Z] [INFO ] Serving local plugin "my-plugin" from local bundle
[2026-01-30T12:00:00.200Z] [DEBUG] Proxying request to host app: GET /api/v1/other-endpoint
[2026-01-30T12:00:00.300Z] [INFO ] Plugin server listening on http://localhost:3000

环境变量

也可以通过环境变量配置(优先级低于命令行参数):

export PLUGIN_SERVE_PORT=8080
export PLUGIN_SERVE_SERVER=https://my-server.com
export PLUGIN_SERVE_LOG_LEVEL=debug
plugin-serve

兼容旧版环境变量:

  • PORT - 等同于 PLUGIN_SERVE_PORT
  • SERVER - 等同于 PLUGIN_SERVE_SERVER

工作原理

  1. 本地 bundle 托管:拦截 /api/v1/local-plugins/definitions/:id/bundle 请求,返回本地构建的 dist/app.umd.js
  2. 插件列表修改:拦截 /api/v1/workspaces/:workspaceId/plugins 请求,将匹配的插件的 bundle_url 替换为本地 bundle 路径
  3. 反向代理:所有其他请求转发到配置的代理服务器

开发

# 安装依赖
npm install

# 本地测试
node bin/plugin-serve.js --help

许可证

MIT