@pluve/logger-sdk 0.0.20 → 0.0.21
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.
|
@@ -153,13 +153,24 @@ var LoggerSDK = class {
|
|
|
153
153
|
this.opts.userId = userId;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* 设置 token 信息
|
|
158
|
+
* @param token token
|
|
159
|
+
*/
|
|
160
|
+
setToken(token, securityType) {
|
|
161
|
+
var _a;
|
|
162
|
+
logDebug(!!((_a = this.opts) == null ? void 0 : _a.debug), "setToken", token, securityType);
|
|
163
|
+
if (this.opts) {
|
|
164
|
+
this.opts.token = token;
|
|
165
|
+
this.opts.securityType = securityType;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
156
168
|
/** 设置店铺编码 */
|
|
157
|
-
setStoreCode(storeCode
|
|
169
|
+
setStoreCode(storeCode) {
|
|
158
170
|
var _a;
|
|
159
|
-
logDebug(!!((_a = this.opts) == null ? void 0 : _a.debug), "setStoreCode", storeCode
|
|
171
|
+
logDebug(!!((_a = this.opts) == null ? void 0 : _a.debug), "setStoreCode", storeCode);
|
|
160
172
|
if (this.opts) {
|
|
161
173
|
this.opts.storeCode = storeCode;
|
|
162
|
-
this.opts.securityType = securityType;
|
|
163
174
|
}
|
|
164
175
|
}
|
|
165
176
|
/** 设置日志 stage(env) */
|
|
@@ -40,8 +40,13 @@ export declare class LoggerSDK {
|
|
|
40
40
|
* 设置用户信息
|
|
41
41
|
*/
|
|
42
42
|
identify(userId: string): void;
|
|
43
|
+
/**
|
|
44
|
+
* 设置 token 信息
|
|
45
|
+
* @param token token
|
|
46
|
+
*/
|
|
47
|
+
setToken(token: string, securityType: SecurityType): void;
|
|
43
48
|
/** 设置店铺编码 */
|
|
44
|
-
setStoreCode(storeCode: string
|
|
49
|
+
setStoreCode(storeCode: string): void;
|
|
45
50
|
/** 设置日志 stage(env) */
|
|
46
51
|
setStage(stage: Env): void;
|
|
47
52
|
private flattenEnvTags;
|
package/dist/types/index.d.ts
CHANGED