edgeone-cli 1.0.0
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 +104 -0
- package/dist/api/client.d.ts +54 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +196 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/signer.d.ts +47 -0
- package/dist/api/signer.d.ts.map +1 -0
- package/dist/api/signer.js +100 -0
- package/dist/api/signer.js.map +1 -0
- package/dist/commands/config.d.ts +19 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +265 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/edgeone.d.ts +14 -0
- package/dist/commands/edgeone.d.ts.map +1 -0
- package/dist/commands/edgeone.js +415 -0
- package/dist/commands/edgeone.js.map +1 -0
- package/dist/edgeone/tasks/prefetch.d.ts +23 -0
- package/dist/edgeone/tasks/prefetch.d.ts.map +1 -0
- package/dist/edgeone/tasks/prefetch.js +16 -0
- package/dist/edgeone/tasks/prefetch.js.map +1 -0
- package/dist/edgeone/tasks/purge.d.ts +23 -0
- package/dist/edgeone/tasks/purge.d.ts.map +1 -0
- package/dist/edgeone/tasks/purge.js +16 -0
- package/dist/edgeone/tasks/purge.js.map +1 -0
- package/dist/errors/codes.d.ts +67 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/codes.js +134 -0
- package/dist/errors/codes.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/crypto.d.ts +13 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/dist/utils/crypto.js +86 -0
- package/dist/utils/crypto.js.map +1 -0
- package/dist/utils/signature.d.ts +14 -0
- package/dist/utils/signature.d.ts.map +1 -0
- package/dist/utils/signature.js +48 -0
- package/dist/utils/signature.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import inquirer from 'inquirer';
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import os from 'os';
|
|
7
|
+
import { encrypt, decrypt, isEncrypted } from '../utils/crypto.js';
|
|
8
|
+
const CONFIG_DIR = path.join(os.homedir(), '.edgeone-cli');
|
|
9
|
+
const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
|
|
10
|
+
/**
|
|
11
|
+
* 确保配置目录存在
|
|
12
|
+
*/
|
|
13
|
+
function ensureConfigDir() {
|
|
14
|
+
if (!fs.existsSync(CONFIG_DIR)) {
|
|
15
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 读取配置(自动解密,自动迁移旧格式)
|
|
20
|
+
*/
|
|
21
|
+
function readConfig() {
|
|
22
|
+
if (fs.existsSync(CONFIG_FILE)) {
|
|
23
|
+
const content = fs.readFileSync(CONFIG_FILE, 'utf-8');
|
|
24
|
+
const stored = JSON.parse(content);
|
|
25
|
+
let secretKey = stored.secretKey;
|
|
26
|
+
let needsMigration = !stored.encrypted;
|
|
27
|
+
// 如果是加密格式或检测到是加密数据,则解密
|
|
28
|
+
if (stored.encrypted || isEncrypted(stored.secretKey)) {
|
|
29
|
+
try {
|
|
30
|
+
secretKey = decrypt(stored.secretKey);
|
|
31
|
+
needsMigration = false;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// 解密失败,可能是旧格式明文
|
|
35
|
+
needsMigration = false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const config = {
|
|
39
|
+
secretId: stored.secretId,
|
|
40
|
+
secretKey: secretKey,
|
|
41
|
+
endpoint: stored.endpoint,
|
|
42
|
+
mode: stored.mode || 'production', // 默认为生产模式
|
|
43
|
+
domainIdList: stored.domainIdList || [] // 默认为空数组
|
|
44
|
+
};
|
|
45
|
+
// 自动迁移:检测到旧格式明文配置,自动转为加密格式
|
|
46
|
+
if (needsMigration) {
|
|
47
|
+
writeConfig(config);
|
|
48
|
+
console.log(chalk.gray('💡 配置已自动升级为加密格式'));
|
|
49
|
+
}
|
|
50
|
+
return config;
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 写入配置(自动加密 SecretKey)
|
|
56
|
+
*/
|
|
57
|
+
function writeConfig(config) {
|
|
58
|
+
ensureConfigDir();
|
|
59
|
+
// 加密 secretKey
|
|
60
|
+
const encryptedSecretKey = encrypt(config.secretKey);
|
|
61
|
+
const stored = {
|
|
62
|
+
secretId: config.secretId,
|
|
63
|
+
secretKey: encryptedSecretKey,
|
|
64
|
+
endpoint: config.endpoint,
|
|
65
|
+
mode: config.mode,
|
|
66
|
+
domainIdList: config.domainIdList,
|
|
67
|
+
encrypted: true
|
|
68
|
+
};
|
|
69
|
+
fs.writeFileSync(CONFIG_FILE, JSON.stringify(stored, null, 2), 'utf-8');
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 遮盖字符串中间部分
|
|
73
|
+
*/
|
|
74
|
+
function maskString(str, showLength = 4) {
|
|
75
|
+
if (!str)
|
|
76
|
+
return 'N/A';
|
|
77
|
+
if (str.length <= showLength * 2)
|
|
78
|
+
return str;
|
|
79
|
+
return str.slice(0, showLength) + '****' + str.slice(-showLength);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 显示配置
|
|
83
|
+
*/
|
|
84
|
+
function showConfig() {
|
|
85
|
+
const config = readConfig();
|
|
86
|
+
if (!config) {
|
|
87
|
+
console.log(chalk.yellow('⚠ 未找到配置文件,请先运行 "edgeone-cli config init"'));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const modeText = config.mode === 'debug' ? '调试模式' : '生产模式';
|
|
91
|
+
const modeColor = config.mode === 'debug' ? chalk.yellow : chalk.green;
|
|
92
|
+
console.log(chalk.cyan('\n📋 当前配置:\n'));
|
|
93
|
+
console.log(chalk.gray('─'.repeat(40)));
|
|
94
|
+
console.log(` SecretId: ${chalk.green(maskString(config.secretId))}`);
|
|
95
|
+
console.log(` SecretKey: ${chalk.green(maskString(config.secretKey))}`);
|
|
96
|
+
console.log(` 接口请求域名: ${chalk.yellow(config.endpoint || 'teo.tencentcloudapi.com')}`);
|
|
97
|
+
console.log(` 运行模式: ${modeColor(modeText)}`);
|
|
98
|
+
if (config.domainIdList && config.domainIdList.length > 0) {
|
|
99
|
+
console.log(` 域名ID列表: ${chalk.yellow(config.domainIdList.join(', '))}`);
|
|
100
|
+
}
|
|
101
|
+
console.log(chalk.gray('─'.repeat(40)));
|
|
102
|
+
}
|
|
103
|
+
// 创建配置命令
|
|
104
|
+
const configCmd = new Command('config')
|
|
105
|
+
.description('管理 EdgeOne 配置');
|
|
106
|
+
// 初始化配置
|
|
107
|
+
configCmd
|
|
108
|
+
.command('init')
|
|
109
|
+
.description('初始化配置')
|
|
110
|
+
.action(async () => {
|
|
111
|
+
console.log(chalk.cyan('\n🔧 开始初始化 EdgeOne 配置\n'));
|
|
112
|
+
const answers = await inquirer.prompt([
|
|
113
|
+
{
|
|
114
|
+
type: 'input',
|
|
115
|
+
name: 'secretId',
|
|
116
|
+
message: '请输入 SecretId:',
|
|
117
|
+
validate: (input) => input.trim() !== '' || 'SecretId 不能为空'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: 'password',
|
|
121
|
+
name: 'secretKey',
|
|
122
|
+
message: '请输入 SecretKey:',
|
|
123
|
+
mask: '*',
|
|
124
|
+
validate: (input) => input.trim() !== '' || 'SecretKey 不能为空'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: 'input',
|
|
128
|
+
name: 'endpoint',
|
|
129
|
+
message: '请输入接口请求域名:',
|
|
130
|
+
default: 'teo.tencentcloudapi.com'
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'list',
|
|
134
|
+
name: 'mode',
|
|
135
|
+
message: '请选择运行模式:',
|
|
136
|
+
choices: [
|
|
137
|
+
{ name: '生产模式 (不显示调试信息)', value: 'production' },
|
|
138
|
+
{ name: '调试模式 (显示详细请求信息)', value: 'debug' }
|
|
139
|
+
],
|
|
140
|
+
default: 'production'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: 'input',
|
|
144
|
+
name: 'domainIdList',
|
|
145
|
+
message: '请输入域名ID列表(多个用逗号分隔,留空跳过):',
|
|
146
|
+
default: ''
|
|
147
|
+
}
|
|
148
|
+
]);
|
|
149
|
+
// 处理域名ID列表
|
|
150
|
+
let domainIds = [];
|
|
151
|
+
const domainIdInput = answers.domainIdList;
|
|
152
|
+
if (domainIdInput && domainIdInput.trim()) {
|
|
153
|
+
domainIds = domainIdInput.split(',').map(id => id.trim()).filter(id => id !== '');
|
|
154
|
+
}
|
|
155
|
+
writeConfig({
|
|
156
|
+
secretId: answers.secretId,
|
|
157
|
+
secretKey: answers.secretKey,
|
|
158
|
+
endpoint: answers.endpoint || 'teo.tencentcloudapi.com',
|
|
159
|
+
mode: answers.mode || 'production',
|
|
160
|
+
domainIdList: domainIds
|
|
161
|
+
});
|
|
162
|
+
console.log(chalk.green('\n✅ 配置已加密保存到: ' + CONFIG_FILE));
|
|
163
|
+
});
|
|
164
|
+
// 显示配置
|
|
165
|
+
configCmd
|
|
166
|
+
.command('show')
|
|
167
|
+
.description('显示当前配置')
|
|
168
|
+
.action(showConfig);
|
|
169
|
+
// 删除配置
|
|
170
|
+
configCmd
|
|
171
|
+
.command('remove')
|
|
172
|
+
.description('删除配置文件')
|
|
173
|
+
.action(async () => {
|
|
174
|
+
if (!fs.existsSync(CONFIG_FILE)) {
|
|
175
|
+
console.log(chalk.yellow('⚠ 配置文件不存在'));
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const { confirm } = await inquirer.prompt([
|
|
179
|
+
{
|
|
180
|
+
type: 'confirm',
|
|
181
|
+
name: 'confirm',
|
|
182
|
+
message: '确定要删除配置文件吗?',
|
|
183
|
+
default: false
|
|
184
|
+
}
|
|
185
|
+
]);
|
|
186
|
+
if (confirm) {
|
|
187
|
+
fs.unlinkSync(CONFIG_FILE);
|
|
188
|
+
console.log(chalk.green('✅ 配置文件已删除'));
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
console.log(chalk.gray('已取消'));
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
// 编辑配置
|
|
195
|
+
configCmd
|
|
196
|
+
.command('edit')
|
|
197
|
+
.description('编辑配置项')
|
|
198
|
+
.action(async () => {
|
|
199
|
+
const config = readConfig();
|
|
200
|
+
if (!config) {
|
|
201
|
+
console.log(chalk.yellow('⚠ 未找到配置文件,请先运行 "edgeone-cli config init"'));
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const answers = await inquirer.prompt([
|
|
205
|
+
{
|
|
206
|
+
type: 'list',
|
|
207
|
+
name: 'field',
|
|
208
|
+
message: '选择要修改的配置项:',
|
|
209
|
+
choices: [
|
|
210
|
+
{ name: 'SecretId', value: 'secretId' },
|
|
211
|
+
{ name: 'SecretKey', value: 'secretKey' },
|
|
212
|
+
{ name: '接口请求域名', value: 'endpoint' },
|
|
213
|
+
{ name: '运行模式', value: 'mode' },
|
|
214
|
+
{ name: '域名ID列表', value: 'domainIdList' }
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
type: 'input',
|
|
219
|
+
name: 'value',
|
|
220
|
+
message: (answers) => `请输入新的 ${answers.field}:`,
|
|
221
|
+
when: (answers) => answers.field !== 'secretKey' && answers.field !== 'mode' && answers.field !== 'domainIdList',
|
|
222
|
+
validate: (input) => input.trim() !== '' || '不能为空'
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
type: 'password',
|
|
226
|
+
name: 'value',
|
|
227
|
+
message: '请输入新的 SecretKey:',
|
|
228
|
+
mask: '*',
|
|
229
|
+
when: (answers) => answers.field === 'secretKey',
|
|
230
|
+
validate: (input) => input.trim() !== '' || '不能为空'
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
type: 'list',
|
|
234
|
+
name: 'value',
|
|
235
|
+
message: '请选择运行模式:',
|
|
236
|
+
when: (answers) => answers.field === 'mode',
|
|
237
|
+
choices: [
|
|
238
|
+
{ name: '生产模式 (不显示调试信息)', value: 'production' },
|
|
239
|
+
{ name: '调试模式 (显示详细请求信息)', value: 'debug' }
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
type: 'input',
|
|
244
|
+
name: 'value',
|
|
245
|
+
message: '请输入域名ID列表(多个用逗号分隔):',
|
|
246
|
+
when: (answers) => answers.field === 'domainIdList',
|
|
247
|
+
default: ''
|
|
248
|
+
}
|
|
249
|
+
]);
|
|
250
|
+
if (answers.field === 'domainIdList') {
|
|
251
|
+
const domainIdInput = answers.value;
|
|
252
|
+
const domainIds = domainIdInput && domainIdInput.trim()
|
|
253
|
+
? domainIdInput.split(',').map(id => id.trim()).filter(id => id !== '')
|
|
254
|
+
: [];
|
|
255
|
+
config[answers.field] = domainIds;
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
config[answers.field] = answers.value;
|
|
259
|
+
}
|
|
260
|
+
writeConfig(config);
|
|
261
|
+
console.log(chalk.green('✅ 配置已更新'));
|
|
262
|
+
});
|
|
263
|
+
export default configCmd;
|
|
264
|
+
export { readConfig, CONFIG_FILE };
|
|
265
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,I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AAE,qBAAqB;YAC9B,IAAI,EAAE,CAAC,OAAY,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,KAAK,cAAc;YACxD,OAAO,EAAE,EAAE;SACZ;KACF,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,KAAK,KAAK,cAAc,EAAE,CAAC;QACrC,MAAM,aAAa,GAAG,OAAO,CAAC,KAAe,CAAC;QAC9C,MAAM,SAAS,GAAG,aAAa,IAAI,aAAa,CAAC,IAAI,EAAE;YACrD,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;YACvE,CAAC,CAAC,EAAE,CAAC;QACN,MAAc,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAC7C,CAAC;SAAM,CAAC;QACL,MAAc,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;IACjD,CAAC;IACD,WAAW,CAAC,MAAM,CAAC,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC;AAEL,eAAe,SAAS,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* 创建清除缓存命令
|
|
4
|
+
*/
|
|
5
|
+
export declare function createPurgeCommand(): Command;
|
|
6
|
+
/**
|
|
7
|
+
* 创建预热命令
|
|
8
|
+
*/
|
|
9
|
+
export declare function createPrefetchCommand(): Command;
|
|
10
|
+
/**
|
|
11
|
+
* 创建历史记录命令
|
|
12
|
+
*/
|
|
13
|
+
export declare function createHistoryCommand(): Command;
|
|
14
|
+
//# sourceMappingURL=edgeone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edgeone.d.ts","sourceRoot":"","sources":["../../src/commands/edgeone.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BpC;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAkG5C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CA0D/C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAiQ9C"}
|