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

Commit 25f8799

Browse files
committed
rm sentry unhandled rejection log
1 parent 0165998 commit 25f8799

4 files changed

Lines changed: 60 additions & 41 deletions

File tree

bin/cloudbase.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const logSymbols = require('log-symbols')
88
const updateNotifier = require('update-notifier')
99
const address = require('address')
1010
const pkg = require('../package.json')
11+
const store = require('../lib/utils/store')
12+
const { getProxy } = require('../lib/utils/proxy')
1113

1214
let processArgv = process.argv
1315
const isBeta = pkg.version.indexOf('-') > -1
@@ -27,10 +29,15 @@ if (Number(major) < 8 || (Number(major) === 8 && Number(minor) < 6)) {
2729
Sentry.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
// 注册命令
8895
require('../lib')
8996

90-
const store = require('../lib/utils/store')
91-
9297
// 设置 Sentry 上报的用户 uin
9398
Sentry.configureScope(scope => {
9499
try {
@@ -105,7 +110,7 @@ Sentry.configureScope(scope => {
105110
// 设置 options 选项
106111
program.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
// 处理无效命令
111116
program.action(cmd => {

docs/api-demo/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
12
const Client = require('../../lib')
23

34
const client = new Client()

package-lock.json

Lines changed: 46 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"license": "ISC",
2727
"dependencies": {
2828
"@cloudbase/manager-node": "^1.3.0",
29-
"@sentry/node": "^5.7.1",
29+
"@sentry/node": "^5.10.2",
3030
"address": "^1.1.2",
3131
"archiver": "^3.1.1",
3232
"arg": "^4.1.1",

0 commit comments

Comments
 (0)