eprolo-cli 1.0.66 → 1.0.68

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/bin/eprolo-cli.js CHANGED
@@ -96,10 +96,10 @@ async function postJsonWithRetry(url, body, config) {
96
96
  refreshToken: config.refreshToken
97
97
  });
98
98
 
99
- if (refreshRes.code === 0 && refreshRes.data.accessToken) {
99
+ if (refreshRes.data.code == 0 && refreshRes.data.data.accessToken) {
100
100
  // 更新凭据文件
101
- config.accessToken = refreshRes.data.accessToken;
102
- if (refreshRes.data.account) config.account = refreshRes.data.account;
101
+ config.accessToken = refreshRes.data.data.accessToken;
102
+ if (refreshRes.data.data.account) config.account = refreshRes.data.data.account;
103
103
  writeConfig(config);
104
104
 
105
105
  // 用新 token 重试
@@ -112,7 +112,7 @@ async function postJsonWithRetry(url, body, config) {
112
112
  }
113
113
  }else if (result.data.code != 0) {
114
114
  const err = new Error(`HTTP ${result.statusCode}`);
115
- err.response = 6666;
115
+ err.response = result.data.data.msg;
116
116
  throw err;
117
117
  }
118
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.66",
3
+ "version": "1.0.68",
4
4
  "description": "CLI for Dianxiaobao ICBU AI publishing, authorization profile management, task submission, and task status checks.",
5
5
  "bin": {
6
6
  "eprolo": "bin/eprolo-cli.js"