@ctil/gql 1.0.13 → 1.0.14
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/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4380,6 +4380,7 @@ var CCRequest = class {
|
|
|
4380
4380
|
console.error("Failed to persist login info to file:", err);
|
|
4381
4381
|
}
|
|
4382
4382
|
}
|
|
4383
|
+
this.config.loginInfo = loginInfo;
|
|
4383
4384
|
}
|
|
4384
4385
|
/** 加载登录信息(仅负责加载,不负责刷新) */
|
|
4385
4386
|
/** 加载登录信息 */
|
|
@@ -4456,6 +4457,7 @@ var CCRequest = class {
|
|
|
4456
4457
|
this.removeLoginInfo();
|
|
4457
4458
|
throw new Error("Login expired. Please login again.");
|
|
4458
4459
|
}
|
|
4460
|
+
console.log("refreshExpired", refreshExpired);
|
|
4459
4461
|
if (accessExpired && !refreshExpired) {
|
|
4460
4462
|
try {
|
|
4461
4463
|
const refreshResult = await auth.refreshToken({
|
|
@@ -4465,9 +4467,10 @@ var CCRequest = class {
|
|
|
4465
4467
|
});
|
|
4466
4468
|
const newInfo = refreshResult.refreshToken ?? refreshResult;
|
|
4467
4469
|
this.setLoginInfo(newInfo, this._remember);
|
|
4468
|
-
} catch {
|
|
4470
|
+
} catch (err) {
|
|
4471
|
+
console.log("err", err);
|
|
4469
4472
|
this.removeLoginInfo();
|
|
4470
|
-
throw new Error("Failed to refresh token. Please login again.");
|
|
4473
|
+
throw new Error("Failed to refresh token. Please login again." + err?.message);
|
|
4471
4474
|
}
|
|
4472
4475
|
}
|
|
4473
4476
|
}
|