@cloudbase/manager-node 4.6.0 → 4.6.2-beta.0

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.
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cloudBaseRequest = cloudBaseRequest;
4
4
  const auth_1 = require("./auth");
5
5
  const http_request_1 = require("./http-request");
6
- const SUPPORT_REGIONS = ['ap-shanghai', 'ap-guangzhou'];
6
+ const SUPPORT_REGIONS = ['ap-shanghai', 'ap-guangzhou', 'ap-singapore'];
7
7
  async function cloudBaseRequest(options) {
8
8
  // const url = 'https://tcb-admin.tencentcloudapi.com/admin'
9
9
  const { config, params = {}, method = 'POST', headers = {} } = options;
@@ -17,11 +17,11 @@ async function cloudBaseRequest(options) {
17
17
  let internalRegionEndpoint = '';
18
18
  if (finalRegion) {
19
19
  if (SUPPORT_REGIONS.includes(finalRegion)) {
20
- internetRegionEndpoint = `${finalRegion}.tcb-api.tencentcloudapi.com`;
21
- internalRegionEndpoint = `internal.${finalRegion}.tcb-api.tencentcloudapi.com`;
20
+ internetRegionEndpoint = `${envId}.${finalRegion}.tcb-api.tencentcloudapi.com`;
21
+ internalRegionEndpoint = `${envId}.internal.${finalRegion}.tcb-api.tencentcloudapi.com`;
22
22
  }
23
23
  else {
24
- console.warn('当前仅支持上海,广州地域,其他地域默认解析到固定域名(上海地域)');
24
+ console.warn('当前仅支持上海,广州,新加坡地域,其他地域默认解析到固定域名(上海地域)');
25
25
  internetRegionEndpoint = `tcb-api.tencentcloudapi.com`;
26
26
  internalRegionEndpoint = `internal.tcb-api.tencentcloudapi.com`;
27
27
  }
@@ -38,7 +38,6 @@ const path_1 = __importDefault(require("path"));
38
38
  const unzipper_1 = __importDefault(require("unzipper"));
39
39
  const constant_1 = require("../constant");
40
40
  const http_request_1 = require("./http-request");
41
- const log_symbols_1 = __importDefault(require("log-symbols"));
42
41
  __exportStar(require("./auth"), exports);
43
42
  __exportStar(require("./cloud-api-request"), exports);
44
43
  __exportStar(require("./cloudbase-request"), exports);
@@ -311,5 +310,5 @@ const getCompleteTimeRange = (timeRange) => {
311
310
  exports.getCompleteTimeRange = getCompleteTimeRange;
312
311
  function successLog(msg) {
313
312
  // 空格,兼容中文字符编码长度问题
314
- console.log(`${log_symbols_1.default.success} ${msg}`);
313
+ console.log(`${msg}`);
315
314
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/manager-node",
3
- "version": "4.6.0",
3
+ "version": "4.6.2-beta.0",
4
4
  "description": "The node manage service api for cloudbase.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {