Skip to content

Commit

Permalink
添加登陆失败的报错
Browse files Browse the repository at this point in the history
  • Loading branch information
masx200 committed Sep 16, 2020
1 parent 9617f1b commit 24c3542
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 50 deletions.
1 change: 1 addition & 0 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const helppath = path.join(__dirname, "../help.txt");
const helptxt = String(fs.readFileSync(helppath));
console.log(argsobj);
if (input && dest) {
console.log({
input,
Expand Down
1 change: 1 addition & 0 deletions lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const helppath = path.join(__dirname, "../help.txt");
const helptxt = String(fs.readFileSync(helppath));
console.log(argsobj);
if (input && dest) {
console.log({
input,
Expand Down
1 change: 1 addition & 0 deletions lib/uploadfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const fatalerror = [
"遇到错误, 远端服务器返回错误, 代码: 31062, 消息: file name is invalid",
"遇到错误, 远端服务器返回错误, 代码: 31045, 消息: 操作失败, 可能百度帐号登录状态过期",
"网络错误, http 响应错误, 403 Forbidden",
];
export { fatalerror };
const directfailure = [
Expand Down
1 change: 1 addition & 0 deletions lib/uploadfile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const fatalerror = [
"遇到错误, 远端服务器返回错误, 代码: 31062, 消息: file name is invalid",
"遇到错误, 远端服务器返回错误, 代码: 31045, 消息: 操作失败, 可能百度帐号登录状态过期",
"网络错误, http 响应错误, 403 Forbidden",
];
//遇到错误, 远端服务器返回错误, 代码: 31045, 消息: 操作失败, 可能百度帐号登录状态过期, 请尝试重新登录, 消息: user not exists
export { fatalerror };
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "@masx200/baidupcs-batch-upload",
"bin": "./lib/cli.js",
"main": "./lib/index.js",
"version": "1.2.4",
"version": "1.2.5",
"types": "./lib/index.d.ts",
"module": "./lib/index.js",
"type": "module",
Expand All @@ -24,8 +24,8 @@
"devDependencies": {
"@types/find": "^0.2.1",
"@types/fs-extra": "^9.0.1",
"@types/node": "^14.6.2",
"prettier": "^2.1.1",
"@types/node": "^14.10.2",
"prettier": "^2.1.2",
"tslib": "^2.0.1",
"typescript": "^4.0.2"
},
Expand Down
113 changes: 66 additions & 47 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 24c3542

Please sign in to comment.