@workclaw/cli 1.0.27 → 1.0.29
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.
- package/README.md +119 -161
- package/dist/bin/cli.d.ts +3 -0
- package/dist/bin/cli.d.ts.map +1 -0
- package/dist/box/error/index.d.ts +30 -0
- package/dist/box/error/index.d.ts.map +1 -0
- package/dist/box/index.d.ts +3 -0
- package/dist/box/index.d.ts.map +1 -0
- package/dist/box/installer/index.d.ts +2 -0
- package/dist/box/installer/index.d.ts.map +1 -0
- package/dist/box/installer/installer.d.ts +16 -0
- package/dist/box/installer/installer.d.ts.map +1 -0
- package/dist/box/src/box.d.ts +3 -0
- package/dist/box/src/box.d.ts.map +1 -0
- package/dist/box/types/index.d.ts +30 -0
- package/dist/box/types/index.d.ts.map +1 -0
- package/dist/box/utils/index.d.ts +2 -0
- package/dist/box/utils/index.d.ts.map +1 -0
- package/dist/box/utils/path.d.ts +2 -0
- package/dist/box/utils/path.d.ts.map +1 -0
- package/dist/command/index.d.ts +3 -0
- package/dist/command/index.d.ts.map +1 -0
- package/dist/command/src/base-command.d.ts +12 -0
- package/dist/command/src/base-command.d.ts.map +1 -0
- package/dist/command/types/index.d.ts +14 -0
- package/dist/command/types/index.d.ts.map +1 -0
- package/dist/{index-BWLa_Wav.js → index-0P3M9kKr.js} +949 -1230
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/init/index.d.ts +6 -0
- package/dist/init/index.d.ts.map +1 -0
- package/dist/init/src/init.d.ts +39 -0
- package/dist/init/src/init.d.ts.map +1 -0
- package/dist/init/src/installer/base-installer.d.ts +36 -0
- package/dist/init/src/installer/base-installer.d.ts.map +1 -0
- package/dist/init/src/installer/box-installer.d.ts +39 -0
- package/dist/init/src/installer/box-installer.d.ts.map +1 -0
- package/dist/init/src/installer/index.d.ts +4 -0
- package/dist/init/src/installer/index.d.ts.map +1 -0
- package/dist/init/src/installer/local-installer.d.ts +27 -0
- package/dist/init/src/installer/local-installer.d.ts.map +1 -0
- package/dist/init/src/types/index.d.ts +36 -0
- package/dist/init/src/types/index.d.ts.map +1 -0
- package/dist/lib/command/base-command.d.ts +16 -0
- package/dist/lib/command/base-command.d.ts.map +1 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/local/apis/index.d.ts +11 -0
- package/dist/local/apis/index.d.ts.map +1 -0
- package/dist/local/error/index.d.ts +33 -0
- package/dist/local/error/index.d.ts.map +1 -0
- package/dist/local/index.d.ts +3 -0
- package/dist/local/index.d.ts.map +1 -0
- package/dist/local/installer/index.d.ts +2 -0
- package/dist/local/installer/index.d.ts.map +1 -0
- package/dist/local/installer/installer.d.ts +16 -0
- package/dist/local/installer/installer.d.ts.map +1 -0
- package/dist/local/src/local.d.ts +3 -0
- package/dist/local/src/local.d.ts.map +1 -0
- package/dist/local/types/index.d.ts +41 -0
- package/dist/local/types/index.d.ts.map +1 -0
- package/dist/local/utils/crypto.d.ts +2 -0
- package/dist/local/utils/crypto.d.ts.map +1 -0
- package/dist/local/utils/index.d.ts +4 -0
- package/dist/local/utils/index.d.ts.map +1 -0
- package/dist/local/utils/path.d.ts +9 -0
- package/dist/local/utils/path.d.ts.map +1 -0
- package/dist/shared/config/index.d.ts +48 -0
- package/dist/shared/config/index.d.ts.map +1 -0
- package/dist/shared/utils/debug.d.ts +4 -0
- package/dist/shared/utils/debug.d.ts.map +1 -0
- package/dist/shared/utils/index.d.ts +4 -0
- package/dist/shared/utils/index.d.ts.map +1 -0
- package/dist/shared/utils/logger.d.ts +14 -0
- package/dist/shared/utils/logger.d.ts.map +1 -0
- package/dist/utils/config-default.d.ts +28 -0
- package/dist/utils/config-default.d.ts.map +1 -0
- package/dist/utils/config.d.ts +21 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/crypto.d.ts +13 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/dist/utils/error.d.ts +34 -0
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/http.d.ts +27 -0
- package/dist/utils/http.d.ts.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +16 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/path.d.ts +23 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -1,161 +1,119 @@
|
|
|
1
|
-
# WorkClaw CLI
|
|
2
|
-
|
|
3
|
-
WorkClaw CLI 是一个用于初始化和配置 WorkClaw 插件的命令行工具。
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
workclaw
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
|
48
|
-
|
|
49
|
-
| --
|
|
50
|
-
| --
|
|
51
|
-
| --
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
61
|
-
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
#
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### 盒子安装
|
|
123
|
-
|
|
124
|
-
盒子安装适用于不需要用户登录的场景,直接使用 AppKey 和 AppSecret 进行安装。**仅支持 Linux 环境**。
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
# 基本用法
|
|
128
|
-
workclaw box --app-key your_app_key --app-secret your_app_secret
|
|
129
|
-
|
|
130
|
-
# 指定环境
|
|
131
|
-
workclaw box --app-key your_app_key --app-secret your_app_secret --env prod
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### 指定插件版本
|
|
135
|
-
|
|
136
|
-
可以使用 `--plugin-version` 参数安装指定版本的插件(默认安装最新版):
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
# 安装指定版本
|
|
140
|
-
workclaw local --phone 13800138000 --user-pass your_password --plugin-version 1.0.0
|
|
141
|
-
workclaw box --app-key your_app_key --app-secret your_app_secret --plugin-version 1.0.0
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### 调试模式
|
|
145
|
-
|
|
146
|
-
当安装失败时,可以使用 `--debug` 参数查看详细日志:
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
# 本地安装 + 调试模式
|
|
150
|
-
workclaw local --phone 13800138000 --user-pass your_password --debug
|
|
151
|
-
|
|
152
|
-
# 盒子安装 + 调试模式
|
|
153
|
-
workclaw box --app-key your_app_key --app-secret your_app_secret --debug
|
|
154
|
-
|
|
155
|
-
# 完整参数 + 调试模式
|
|
156
|
-
workclaw local --scenario windows-local --env test --phone 13800138000 --user-pass your_password --debug
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## 许可证
|
|
160
|
-
|
|
161
|
-
MIT License
|
|
1
|
+
# WorkClaw CLI
|
|
2
|
+
|
|
3
|
+
WorkClaw CLI 是一个用于初始化和配置 WorkClaw 插件的命令行工具。
|
|
4
|
+
|
|
5
|
+
## 特性
|
|
6
|
+
|
|
7
|
+
- 🚀 **快速初始化** - 一键安装 WorkClaw 插件
|
|
8
|
+
- 🔐 **安全认证** - RSA 加密密码,保护用户隐私
|
|
9
|
+
- 🌐 **多平台支持** - Windows, macOS, Linux
|
|
10
|
+
- 📊 **详细日志** - 完整的请求/响应日志
|
|
11
|
+
- 🎨 **友好界面** - 彩色输出和加载动画
|
|
12
|
+
|
|
13
|
+
## 安装
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @workclaw/cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 快速开始
|
|
20
|
+
|
|
21
|
+
### 交互式初始化
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
workclaw init
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 命令行参数
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
workclaw init --phone 13800138000 --user-pass mypassword
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 使用文档
|
|
34
|
+
|
|
35
|
+
### 命令
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# 初始化
|
|
39
|
+
workclaw init [options]
|
|
40
|
+
|
|
41
|
+
# 帮助
|
|
42
|
+
workclaw --help
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 参数
|
|
46
|
+
|
|
47
|
+
| 参数 | 必填 | 说明 |
|
|
48
|
+
|------|------|------|
|
|
49
|
+
| --phone | ✅ | 手机号码 |
|
|
50
|
+
| --user-pass | ✅ | 用户密码 |
|
|
51
|
+
| --scenario | ❌ | 安装场景 |
|
|
52
|
+
| --env | ❌ | 环境 (test/prod) |
|
|
53
|
+
| --base-url | ❌ | API 地址 |
|
|
54
|
+
| --ws-url | ❌ | WebSocket 地址 |
|
|
55
|
+
| --force | ❌ | 强制覆盖 |
|
|
56
|
+
|
|
57
|
+
## 安装场景
|
|
58
|
+
|
|
59
|
+
| 场景 | 说明 |
|
|
60
|
+
|------|------|
|
|
61
|
+
| windows-local | Windows 本地安装 |
|
|
62
|
+
| mac-local | macOS 本地安装 |
|
|
63
|
+
| linux-local | Linux 本地安装 |
|
|
64
|
+
| linux-box | Linux Box 环境安装 |
|
|
65
|
+
|
|
66
|
+
## 开发
|
|
67
|
+
|
|
68
|
+
### 项目结构
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
packages/cli/
|
|
72
|
+
├── src/
|
|
73
|
+
│ ├── bin/ # CLI 入口
|
|
74
|
+
│ ├── lib/ # 核心库和基类
|
|
75
|
+
│ ├── init/ # 初始化命令
|
|
76
|
+
│ │ └── installer/ # 安装器
|
|
77
|
+
│ └── utils/ # 工具函数
|
|
78
|
+
├── vite.config.ts
|
|
79
|
+
└── README.md
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 构建
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm run build # 构建
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## 更新日志
|
|
89
|
+
|
|
90
|
+
### v2.0.0 (2026-04-08)
|
|
91
|
+
|
|
92
|
+
- ✨ 新增 phone + userPass 认证方式
|
|
93
|
+
- 🔒 新增 RSA 密码加密
|
|
94
|
+
- 📝 新增完整请求日志
|
|
95
|
+
- 🎨 优化交互式提示和进度显示
|
|
96
|
+
- 🌐 支持 NPM 安装插件
|
|
97
|
+
- 🔧 统一错误码管理
|
|
98
|
+
|
|
99
|
+
### v1.0.0
|
|
100
|
+
|
|
101
|
+
- 🎉 初始版本
|
|
102
|
+
- ✨ 支持 appKey + appSecret 认证
|
|
103
|
+
- ✨ 支持多平台安装
|
|
104
|
+
|
|
105
|
+
## 许可证
|
|
106
|
+
|
|
107
|
+
MIT License
|
|
108
|
+
|
|
109
|
+
## 联系方式
|
|
110
|
+
|
|
111
|
+
- 项目主页: [GitHub]()
|
|
112
|
+
- 问题反馈: [Issue Tracker]()
|
|
113
|
+
|
|
114
|
+
## 致谢
|
|
115
|
+
|
|
116
|
+
- [commander](https://github.com/tj/commander.js) - 命令行解析
|
|
117
|
+
- [chalk](https://github.com/chalk/chalk) - 彩色输出
|
|
118
|
+
- [ora](https://github.com/sindresorhus/ora) - 加载动画
|
|
119
|
+
- [axios](https://github.com/axios/axios) - HTTP 客户端
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/bin/cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 错误码枚举
|
|
3
|
+
*/
|
|
4
|
+
export declare const ERROR_CODES: {
|
|
5
|
+
readonly APP_KEY_REQUIRED: "APP_KEY_REQUIRED";
|
|
6
|
+
readonly APP_SECRET_REQUIRED: "APP_SECRET_REQUIRED";
|
|
7
|
+
readonly NODE_VERSION_LOW: "NODE_VERSION_LOW";
|
|
8
|
+
readonly NODE_NOT_FOUND: "NODE_NOT_FOUND";
|
|
9
|
+
readonly NPM_NOT_FOUND: "NPM_NOT_FOUND";
|
|
10
|
+
readonly NPM_INSTALL_FAILED: "NPM_INSTALL_FAILED";
|
|
11
|
+
readonly CONFIG_WRITE_FAILED: "CONFIG_WRITE_FAILED";
|
|
12
|
+
readonly PLUGIN_EXTRACT_FAILED: "PLUGIN_EXTRACT_FAILED";
|
|
13
|
+
};
|
|
14
|
+
export type ErrorCode = keyof typeof ERROR_CODES;
|
|
15
|
+
/**
|
|
16
|
+
* 中文错误提示
|
|
17
|
+
*/
|
|
18
|
+
export declare const ERROR_MESSAGES: Record<ErrorCode, string>;
|
|
19
|
+
/**
|
|
20
|
+
* 应用错误类
|
|
21
|
+
*/
|
|
22
|
+
export declare class AppError extends Error {
|
|
23
|
+
code: ErrorCode;
|
|
24
|
+
constructor(code: ErrorCode, message: string);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 格式化错误信息
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatError(error: unknown): string;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/error/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;CASd,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,WAAW,CAAA;AAEhD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CASpD,CAAA;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAExB,IAAI,EAAE,SAAS;gBAAf,IAAI,EAAE,SAAS,EACtB,OAAO,EAAE,MAAM;CAKlB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAUlD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGxC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CASvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/installer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BoxInstallerConfig } from '../types';
|
|
2
|
+
export declare class BoxInstaller {
|
|
3
|
+
private config;
|
|
4
|
+
private spinner;
|
|
5
|
+
private prefixText;
|
|
6
|
+
constructor(config: BoxInstallerConfig);
|
|
7
|
+
validateConfig(): void;
|
|
8
|
+
private getPaths;
|
|
9
|
+
private updateSpinner;
|
|
10
|
+
getPrefixText(): string;
|
|
11
|
+
install(): Promise<void>;
|
|
12
|
+
private doCleanOldFiles;
|
|
13
|
+
private doDownloadFromNpm;
|
|
14
|
+
private doUpdateConfig;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/box/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,UAAU,CAAA;AAoDhE,qBAAa,YAAY;IAIX,OAAO,CAAC,MAAM;IAH1B,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAa;gBAEX,MAAM,EAAE,kBAAkB;IAI9C,cAAc,IAAI,IAAI;IAatB,OAAO,CAAC,QAAQ;IAmBhB,OAAO,CAAC,aAAa;IAMrB,aAAa,IAAI,MAAM;IAIjB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YA0BhB,eAAe;YA0Bf,iBAAiB;YAuBjB,cAAc;CAmQ7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/box/src/box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAgC1C,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAqHzE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Environment } from '../../shared/config';
|
|
2
|
+
export interface BoxOptions {
|
|
3
|
+
env?: string;
|
|
4
|
+
appKey?: string;
|
|
5
|
+
appSecret?: string;
|
|
6
|
+
pluginVersion?: string;
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface BoxInstallerConfig {
|
|
10
|
+
env: Environment;
|
|
11
|
+
baseUrl?: string;
|
|
12
|
+
wsUrl?: string;
|
|
13
|
+
appKey: string;
|
|
14
|
+
appSecret: string;
|
|
15
|
+
pluginVersion?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface InstallResult {
|
|
18
|
+
success: boolean;
|
|
19
|
+
message?: string;
|
|
20
|
+
error?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface InstallPaths {
|
|
23
|
+
home: string;
|
|
24
|
+
extensions: string;
|
|
25
|
+
target: string;
|
|
26
|
+
config: string;
|
|
27
|
+
workspace: string;
|
|
28
|
+
temp: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,WAAW,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/box/utils/path.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { Option } from '../types';
|
|
3
|
+
export declare abstract class BaseCommand<T = Record<string, any>> {
|
|
4
|
+
protected program: Command;
|
|
5
|
+
constructor(program: Command);
|
|
6
|
+
protected options: Array<Option>;
|
|
7
|
+
protected init(): void;
|
|
8
|
+
abstract action(options: T): void | Promise<void>;
|
|
9
|
+
abstract command: string;
|
|
10
|
+
abstract description: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=base-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../../src/command/src/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEtC,8BAAsB,WAAW,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC3C,SAAS,CAAC,OAAO,EAAE,OAAO;gBAAhB,OAAO,EAAE,OAAO;IAItC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAK;IAErC,SAAS,CAAC,IAAI,IAAI,IAAI;IAStB,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Option {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
}
|
|
5
|
+
export interface InitOptions {
|
|
6
|
+
scenario?: string;
|
|
7
|
+
env?: string;
|
|
8
|
+
phone?: string;
|
|
9
|
+
userPass?: string;
|
|
10
|
+
appKey?: string;
|
|
11
|
+
appSecret?: string;
|
|
12
|
+
debug?: boolean;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/command/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB"}
|