Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit ab6979e

Browse files
committed
[refactor] rm cloud api sdk & refactor config resovle method
1 parent 32be6b9 commit ab6979e

126 files changed

Lines changed: 1452 additions & 39217 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bin/cloudbase.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ notifier.notify({
5757
})
5858

5959
// 测试模式
60-
if (processArgv.includes('--deb')) {
60+
if (processArgv.includes('-debug')) {
6161
console.log(
62-
chalk.bold.yellow('====\n您已经进入 debug 模式!\n移除 --deb 选项退出 debug 模式!\n====')
62+
chalk.bold.yellow('====\n您已经进入 debug 模式!\n移除 -debug 选项退出 debug 模式!\n====')
6363
)
6464
}
6565

@@ -80,10 +80,10 @@ if (processArgv.includes('--tcb-test')) {
8080
}
8181

8282
// debug 模式
83-
process.IS_DEBUG = processArgv.includes('--deb')
83+
process.IS_DEBUG = processArgv.includes('-debug')
8484

8585
// 需要隐藏的选项
86-
const hideArgs = ['--deb', '--tcb-test']
86+
const hideArgs = ['-debug', '--tcb-test']
8787
hideArgs.forEach(arg => {
8888
const index = processArgv.indexOf(arg)
8989
if (index > -1) {
@@ -123,6 +123,10 @@ program._helpDescription = '输出帮助信息'
123123
program.on('--help', function() {
124124
const tips = `\nTips:
125125
126+
${chalk.gray('–')} 简写
127+
128+
${chalk.cyan('使用 tcb 替代 cloudbase')}
129+
126130
${chalk.gray('–')} 登录
127131
128132
${chalk.cyan('$ cloudbase login')}
@@ -137,7 +141,7 @@ ${chalk.gray('–')} 部署云函数
137141
138142
${chalk.gray('–')} 查看命令使用介绍
139143
140-
${chalk.cyan('$ cloudbase functions:log -h')}`
144+
${chalk.cyan('$ cloudbase env:list -h')}`
141145
console.log(tips)
142146
})
143147

@@ -149,11 +153,12 @@ if (process.argv.length < 3) {
149153
try {
150154
program.parse(processArgv)
151155
} catch (e) {
152-
const errMsg = `${logSymbols.error} ${e.message || '参数异常,请检查您是否输入了正确的命令!'}`
156+
const errMsg = `${logSymbols.error} ${e.message || '参数异常,请检查您是否使用了正确的命令!'}`
153157
console.log(errMsg)
154158
}
155159

156160
function errorHandler(err) {
161+
process.emit('tcbError')
157162
const stackIngoreErrors = ['TencentCloudSDKHttpException', 'CloudBaseError']
158163
// 忽略自定义错误的错误栈
159164
if (err.stack && !stackIngoreErrors.includes(err.name)) {

deps/tencentcloud-sdk-nodejs/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

deps/tencentcloud-sdk-nodejs/LICENSE

Lines changed: 0 additions & 201 deletions
This file was deleted.

deps/tencentcloud-sdk-nodejs/README.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

deps/tencentcloud-sdk-nodejs/index.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)