@cloudbase/toolbox 0.7.18 → 0.7.20

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.
@@ -12,7 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.resolveWebCredential = exports.resolveCredential = exports.checkAuth = void 0;
13
13
  const cloud_api_1 = require("@cloudbase/cloud-api");
14
14
  const config_1 = require("../config");
15
- // 调用 env:list 接口,检查密钥是否有效
15
+ // 调用 CheckTcbService 接口,检查密钥是否有效
16
+ // 相比 DescribeEnvs,该接口不会返回环境列表,仅验证登录态,性能更好
16
17
  function checkAuth(credential, options = {}) {
17
18
  return __awaiter(this, void 0, void 0, function* () {
18
19
  // 兼容原临时秘钥
@@ -31,7 +32,7 @@ function checkAuth(credential, options = {}) {
31
32
  });
32
33
  return tcbService.request({
33
34
  region,
34
- action: 'DescribeEnvs'
35
+ action: 'CheckTcbService'
35
36
  });
36
37
  });
37
38
  }
package/lib/auth/oauth.js CHANGED
@@ -57,7 +57,6 @@ function sleep(ms) {
57
57
  * - custom 模式:返回值本身即为裸数据,直接透传
58
58
  */
59
59
  function unwrapDeviceCodeResponse(raw, custom) {
60
- console.log(raw);
61
60
  if (custom) {
62
61
  if (!raw || !raw.device_code) {
63
62
  throw new error_1.CloudBaseError('Device Flow fetchDeviceCode failed (custom mode): 返回数据异常');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/toolbox",
3
- "version": "0.7.18",
3
+ "version": "0.7.20",
4
4
  "description": "The toolbox for cloudbase",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {