@cloudbase/manager-node 4.6.1 → 4.6.2
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 =
|
|
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
|
}
|