@be-link/shield-for-tcb-node-sdk 1.0.6 → 1.0.7
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.
|
@@ -31,7 +31,7 @@ class ConfigServiceV2 extends BaseService_1.default {
|
|
|
31
31
|
* @returns 配置数据映射
|
|
32
32
|
*/
|
|
33
33
|
fetchConfigs(req) {
|
|
34
|
-
return (0, http_1.callApi)(this.getApiUrlV2('/fetch-batch'), req);
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrlV2('/fetch-batch'), req).catch(() => ({}));
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* 获取所有服务列表
|
|
@@ -40,7 +40,7 @@ class ConfigServiceV2 extends BaseService_1.default {
|
|
|
40
40
|
*/
|
|
41
41
|
async getServices(env) {
|
|
42
42
|
const query = env ? `?env=${encodeURIComponent(env)}` : '';
|
|
43
|
-
return (0, http_1.getApi)(this.getApiUrlV2('/services') + query);
|
|
43
|
+
return (0, http_1.getApi)(this.getApiUrlV2('/services') + query).catch(() => []);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* 获取指定服务的配置键列表
|
|
@@ -50,7 +50,7 @@ class ConfigServiceV2 extends BaseService_1.default {
|
|
|
50
50
|
*/
|
|
51
51
|
async getServiceKeys(serviceName, env) {
|
|
52
52
|
const query = env ? `?env=${encodeURIComponent(env)}` : '';
|
|
53
|
-
return (0, http_1.getApi)(this.getApiUrlV2(`/services/${serviceName}/keys`) + query);
|
|
53
|
+
return (0, http_1.getApi)(this.getApiUrlV2(`/services/${serviceName}/keys`) + query).catch(() => []);
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* 获取配置值(自动解析类型)
|