@be-link/shield-for-tcb-node-sdk 1.0.15 → 1.0.16
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.
|
@@ -112,10 +112,10 @@ class ShieldConfigManager {
|
|
|
112
112
|
}
|
|
113
113
|
__classPrivateFieldSet(this, _ShieldConfigManager_serviceName, options.serviceName, "f");
|
|
114
114
|
__classPrivateFieldSet(this, _ShieldConfigManager_env, options.env || process.env.NODE_ENV, "f");
|
|
115
|
-
__classPrivateFieldSet(this, _ShieldConfigManager_refreshIntervalMs, options.refreshIntervalMs
|
|
116
|
-
__classPrivateFieldSet(this, _ShieldConfigManager_fetchTimeoutMs, options.fetchTimeoutMs
|
|
117
|
-
__classPrivateFieldSet(this, _ShieldConfigManager_enableInfoLog, options.enableInfoLog
|
|
118
|
-
const baseLogger = options.logger
|
|
115
|
+
__classPrivateFieldSet(this, _ShieldConfigManager_refreshIntervalMs, options.refreshIntervalMs || DEFAULT_REFRESH_INTERVAL_MS, "f");
|
|
116
|
+
__classPrivateFieldSet(this, _ShieldConfigManager_fetchTimeoutMs, options.fetchTimeoutMs || DEFAULT_FETCH_TIMEOUT_MS, "f");
|
|
117
|
+
__classPrivateFieldSet(this, _ShieldConfigManager_enableInfoLog, options.enableInfoLog || false, "f");
|
|
118
|
+
const baseLogger = options.logger || defaultLogger;
|
|
119
119
|
__classPrivateFieldSet(this, _ShieldConfigManager_logger, __classPrivateFieldGet(this, _ShieldConfigManager_enableInfoLog, "f") ? baseLogger : { ...baseLogger, info: () => { } }, "f");
|
|
120
120
|
}
|
|
121
121
|
/** 当前缓存的配置副本(原始 Record) */
|
|
@@ -181,7 +181,7 @@ class ShieldConfigManager {
|
|
|
181
181
|
* @returns 泛型 T 类型的配置对象
|
|
182
182
|
*/
|
|
183
183
|
getConfig() {
|
|
184
|
-
return __classPrivateFieldGet(this, _ShieldConfigManager_config, "f")
|
|
184
|
+
return __classPrivateFieldGet(this, _ShieldConfigManager_config, "f") || null;
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
187
|
* 根据 config_key 获取对应的配置值
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@be-link/shield-for-tcb-node-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "ShieldForTCB Node.js SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"axios": "
|
|
18
|
+
"axios": "0.27.2",
|
|
19
19
|
"axios-retry": "^4.0.0",
|
|
20
20
|
"uuid": "^9.0.1"
|
|
21
21
|
},
|