@@ -8,6 +8,8 @@ const logSymbols = require('log-symbols')
88const updateNotifier = require ( 'update-notifier' )
99const address = require ( 'address' )
1010const pkg = require ( '../package.json' )
11+ const store = require ( '../lib/utils/store' )
12+ const { getProxy } = require ( '../lib/utils/proxy' )
1113
1214let processArgv = process . argv
1315const isBeta = pkg . version . indexOf ( '-' ) > - 1
@@ -27,10 +29,15 @@ if (Number(major) < 8 || (Number(major) === 8 && Number(minor) < 6)) {
2729Sentry . init ( {
2830 release : pkg . version ,
2931 dsn : 'https://fff0077d06624655ad70d1ee25df419e@report.url.cn/sentry/1782' ,
30- httpsProxy : process . env . http_proxy || '' ,
31- serverName : os . hostname ( )
32- // 忽略错误,正则匹配
33- // ignoreErrors
32+ httpsProxy : getProxy ( ) || '' ,
33+ serverName : os . hostname ( ) ,
34+ // 忽略错误,正则匹配,
35+ // ignoreErrors: [],
36+ integrations : [
37+ new Sentry . Integrations . OnUnhandledRejection ( {
38+ mode : 'none'
39+ } )
40+ ]
3441} )
3542
3643// 检查更新
@@ -87,8 +94,6 @@ hideArgs.forEach(arg => {
8794// 注册命令
8895require ( '../lib' )
8996
90- const store = require ( '../lib/utils/store' )
91-
9297// 设置 Sentry 上报的用户 uin
9398Sentry . configureScope ( scope => {
9499 try {
@@ -105,7 +110,7 @@ Sentry.configureScope(scope => {
105110// 设置 options 选项
106111program . option ( '--config-file <path>' , '设置配置文件,默认为 ./cloudbaserc.js 或 .cloudbaserc.json' )
107112
108- program . version ( pkg . version , '-V , --version' , '输出当前 CloudBase CLI 版本' )
113+ program . version ( pkg . version , '-v , --version' , '输出当前 CloudBase CLI 版本' )
109114
110115// 处理无效命令
111116program . action ( cmd => {
0 commit comments