@dynamic-labs/logger 2.2.1 → 2.2.3
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.
- package/CHANGELOG.md +18 -1
- package/package.json +1 -1
- package/src/index.cjs +6 -2
- package/src/index.js +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
### [2.2.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.2...v2.2.3) (2024-06-19)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* return userWallets connected state async ([#6080](https://github.com/dynamic-labs/DynamicAuth/issues/6080)) ([6ffa444](https://github.com/dynamic-labs/DynamicAuth/commit/6ffa444ad374d1923a07bbc12191455cb3a1d276))
|
|
8
|
+
* ensure multi wallet prompts widget will not overlay the merge accounts UI ([#6087](https://github.com/dynamic-labs/DynamicAuth/issues/6087)) ([582f44f](https://github.com/dynamic-labs/DynamicAuth/commit/582f44f48b4d93917c4b20e9e6b4bbbfe4e4f94f))
|
|
9
|
+
* stop querying okx for accounts while locked ([#6081](https://github.com/dynamic-labs/DynamicAuth/issues/6081)) ([3374e38](https://github.com/dynamic-labs/DynamicAuth/commit/3374e38e2006f795809233de5bc03904d106bd2d))
|
|
10
|
+
* update copy for primary wallet not connected modal ([#6070](https://github.com/dynamic-labs/DynamicAuth/issues/6070)) ([d0466e1](https://github.com/dynamic-labs/DynamicAuth/commit/d0466e19f386adcd0ed83e73f783cfe827e1b94d))
|
|
11
|
+
|
|
12
|
+
### [2.2.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.1...v2.2.2) (2024-06-18)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* make phantom BTC account change requests idempotent ([#6062](https://github.com/dynamic-labs/DynamicAuth/issues/6062)) ([2308d32](https://github.com/dynamic-labs/DynamicAuth/commit/2308d32d18627f2673c8f4c9b5623a9c731e4752))
|
|
18
|
+
|
|
2
19
|
### [2.2.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0...v2.2.1) (2024-06-17)
|
|
3
20
|
|
|
4
21
|
|
|
@@ -94,7 +111,7 @@
|
|
|
94
111
|
|
|
95
112
|
- React Native - You can now build mobile-first onboarding experiences with the same Dynamic magic but for React Native, get started [here](https://docs.dynamic.xyz/react-native/introduction)
|
|
96
113
|
|
|
97
|
-
- Cookie Authentication - Dynamic can now be configured to set a secure, HttpOnly cookie that can be used for authenticating with Dynamic’s backend. This will contain a minified version of our JWT token.
|
|
114
|
+
- Cookie Authentication - Dynamic can now be configured to set a secure, HttpOnly cookie that can be used for authenticating with Dynamic’s backend. This will contain a minified version of our JWT token.
|
|
98
115
|
|
|
99
116
|
|
|
100
117
|
## Improvements
|
package/package.json
CHANGED
package/src/index.cjs
CHANGED
|
@@ -79,6 +79,7 @@ class Logger {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
formatMessage(level, message) {
|
|
82
|
+
var _a;
|
|
82
83
|
if (message instanceof Error) {
|
|
83
84
|
message = message.stack;
|
|
84
85
|
}
|
|
@@ -92,7 +93,7 @@ class Logger {
|
|
|
92
93
|
message = JSON.stringify(message);
|
|
93
94
|
}
|
|
94
95
|
const names = (Array.isArray(this.name) ? this.name : [this.name]).map((name) => `[${name}]`);
|
|
95
|
-
return `${names.join('')} [${types.LogLevel[level]}]: ${message}`;
|
|
96
|
+
return `${names.join('')} [${(_a = types.LogLevel[level]) !== null && _a !== void 0 ? _a : 'TROUBLESHOOTING'}]: ${message}`;
|
|
96
97
|
}
|
|
97
98
|
captureAndSend(level, message, ...args) {
|
|
98
99
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -156,7 +157,10 @@ class Logger {
|
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
159
|
log(level, message, ...args) {
|
|
159
|
-
|
|
160
|
+
const enableTroubleshootMode = typeof window !== 'undefined' &&
|
|
161
|
+
(window === null || window === void 0 ? void 0 : window.dynamic_enableTroubleshootMode) === true;
|
|
162
|
+
if (!enableTroubleshootMode &&
|
|
163
|
+
(level < this.level || level === types.LogLevel.MUTE)) {
|
|
160
164
|
return;
|
|
161
165
|
}
|
|
162
166
|
const fmtMsg = this.formatMessage(level, message);
|
package/src/index.js
CHANGED
|
@@ -72,6 +72,7 @@ class Logger {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
formatMessage(level, message) {
|
|
75
|
+
var _a;
|
|
75
76
|
if (message instanceof Error) {
|
|
76
77
|
message = message.stack;
|
|
77
78
|
}
|
|
@@ -85,7 +86,7 @@ class Logger {
|
|
|
85
86
|
message = JSON.stringify(message);
|
|
86
87
|
}
|
|
87
88
|
const names = (Array.isArray(this.name) ? this.name : [this.name]).map((name) => `[${name}]`);
|
|
88
|
-
return `${names.join('')} [${LogLevel[level]}]: ${message}`;
|
|
89
|
+
return `${names.join('')} [${(_a = LogLevel[level]) !== null && _a !== void 0 ? _a : 'TROUBLESHOOTING'}]: ${message}`;
|
|
89
90
|
}
|
|
90
91
|
captureAndSend(level, message, ...args) {
|
|
91
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -149,7 +150,10 @@ class Logger {
|
|
|
149
150
|
}
|
|
150
151
|
}
|
|
151
152
|
log(level, message, ...args) {
|
|
152
|
-
|
|
153
|
+
const enableTroubleshootMode = typeof window !== 'undefined' &&
|
|
154
|
+
(window === null || window === void 0 ? void 0 : window.dynamic_enableTroubleshootMode) === true;
|
|
155
|
+
if (!enableTroubleshootMode &&
|
|
156
|
+
(level < this.level || level === LogLevel.MUTE)) {
|
|
153
157
|
return;
|
|
154
158
|
}
|
|
155
159
|
const fmtMsg = this.formatMessage(level, message);
|