@cloudbase/toolbox 0.7.19 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/toolbox",
3
- "version": "0.7.19",
3
+ "version": "0.7.20",
4
4
  "description": "The toolbox for cloudbase",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {