@jonathanleelx/meddle 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/index.js +8 -0
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -43,6 +43,12 @@ if (command === '--help' || command === '-h' || command === 'help') {
43
43
  process.exit(0)
44
44
  }
45
45
 
46
+ // Check for --version / -v flag
47
+ if (command === '--version' || command === '-v') {
48
+ require('./commands/version.js')
49
+ process.exit(0)
50
+ }
51
+
46
52
  // Handle nested commands (mock/route/session)
47
53
  if (command === 'mock' || command === 'route' || command === 'session') {
48
54
  require(commands[command])
@@ -70,6 +76,7 @@ Meddle - 开发代理工具
70
76
  meddle url 获取代理 URL
71
77
  meddle status 查看代理状态
72
78
  meddle version 查看版本信息
79
+ meddle --version, -v 查看版本信息 (快捷别名)
73
80
 
74
81
  Session 命令 (多实例隔离,预览功能):
75
82
  meddle session create [--name <label>] [--port <port>]
@@ -101,6 +108,7 @@ Route 命令:
101
108
 
102
109
  全局选项:
103
110
  --help, -h 显示帮助信息
111
+ --version, -v 显示版本信息
104
112
  --session <id> 指定目标 session(与 MEDDLE_HOME 互斥)
105
113
  --json JSON 格式输出 (用于 list/show/preview 命令)
106
114
  --open 启动后自动打开浏览器
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonathanleelx/meddle",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A simple development proxy server with custom routing rules, mock responses, HTTPS interception, and a plugin system",
5
5
  "main": "index.js",
6
6
  "scripts": {