@dynamic-labs/logger 3.0.0-alpha.6 → 3.0.0-alpha.8

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 CHANGED
@@ -1,4 +1,48 @@
1
1
 
2
+ ## [3.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.7...v3.0.0-alpha.8) (2024-06-21)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * break out turnkey package into 3 separate packages (#6015)
8
+
9
+ ### Features
10
+
11
+ * add reinitialize hook ([#6098](https://github.com/dynamic-labs/DynamicAuth/issues/6098)) ([d978baa](https://github.com/dynamic-labs/DynamicAuth/commit/d978baa404d34064c36cc549229b1fcea1f20df0))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * always reconnect the wallet provider when calling getAddress ([#6097](https://github.com/dynamic-labs/DynamicAuth/issues/6097)) ([0f3d497](https://github.com/dynamic-labs/DynamicAuth/commit/0f3d497cedb38239fa9ada2bb25c6b4eaa72d7b1))
17
+ * break out turnkey package into 3 separate packages ([#6015](https://github.com/dynamic-labs/DynamicAuth/issues/6015)) ([a86fbef](https://github.com/dynamic-labs/DynamicAuth/commit/a86fbefe97558363b085e6f752af32d2943f91fa)), closes [#6017](https://github.com/dynamic-labs/DynamicAuth/issues/6017) [#6059](https://github.com/dynamic-labs/DynamicAuth/issues/6059)
18
+ * set latest blockhash on solana transactions if tx confirmation ui is disabled ([#6102](https://github.com/dynamic-labs/DynamicAuth/issues/6102)) ([b8035a3](https://github.com/dynamic-labs/DynamicAuth/commit/b8035a328e47409bf0416d3a01b2f17914488748))
19
+ * silently query unisat accounts ([#6101](https://github.com/dynamic-labs/DynamicAuth/issues/6101)) ([#6104](https://github.com/dynamic-labs/DynamicAuth/issues/6104)) ([643e704](https://github.com/dynamic-labs/DynamicAuth/commit/643e7048ff8610b31e6397e10b160ad456a45d11))
20
+ * stop querying magiceden solana accounts ([#6103](https://github.com/dynamic-labs/DynamicAuth/issues/6103)) ([#6108](https://github.com/dynamic-labs/DynamicAuth/issues/6108)) ([3cfdbc3](https://github.com/dynamic-labs/DynamicAuth/commit/3cfdbc3bc82bfe9bf53bf4236f7892a5440fcb86))
21
+ * trigger sign when linking an already linked unknown wallet ([#6105](https://github.com/dynamic-labs/DynamicAuth/issues/6105)) ([9e9c03b](https://github.com/dynamic-labs/DynamicAuth/commit/9e9c03bf615991c4f1183bf85c4d75c9a7773c85))
22
+
23
+ ## [3.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.6...v3.0.0-alpha.7) (2024-06-19)
24
+
25
+
26
+ ### ⚠ BREAKING CHANGES
27
+
28
+ * add selectedTabIndex and helpers (#6040)
29
+
30
+ ### Features
31
+
32
+ * add selectedTabIndex and helpers ([#6040](https://github.com/dynamic-labs/DynamicAuth/issues/6040)) ([ae20b80](https://github.com/dynamic-labs/DynamicAuth/commit/ae20b8081376dce97b18fa69c81c9ab73c1ff317))
33
+ * add useRefreshUser to trigger a user state refresh ([#6079](https://github.com/dynamic-labs/DynamicAuth/issues/6079)) ([1236d35](https://github.com/dynamic-labs/DynamicAuth/commit/1236d35fe9fab44ed2114ad9f3c8c6dca7ec27be))
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * always return userWallets when available ([#6080](https://github.com/dynamic-labs/DynamicAuth/issues/6080)) ([#6083](https://github.com/dynamic-labs/DynamicAuth/issues/6083)) ([11992d2](https://github.com/dynamic-labs/DynamicAuth/commit/11992d2af5a401ba4ff1dc6904e2a9f8ef5904ca))
39
+ * less solana rpc calls and improve fee fetching ([#6019](https://github.com/dynamic-labs/DynamicAuth/issues/6019)) ([e2609db](https://github.com/dynamic-labs/DynamicAuth/commit/e2609db962c7708ff5b127cb23260a25bc5032e3))
40
+ * make account change idemopotent ([#6061](https://github.com/dynamic-labs/DynamicAuth/issues/6061)) ([8c87513](https://github.com/dynamic-labs/DynamicAuth/commit/8c8751390ea14888c4889679895e2f06d75717b9))
41
+ * only run multi wallet prompt when user profile or auth flow are open ([#6073](https://github.com/dynamic-labs/DynamicAuth/issues/6073)) ([d48ca10](https://github.com/dynamic-labs/DynamicAuth/commit/d48ca105359018457a78588fd8d9aa8a91583a02))
42
+ * recompute multiwallet state after merging accounts ([#6078](https://github.com/dynamic-labs/DynamicAuth/issues/6078)) ([e08a274](https://github.com/dynamic-labs/DynamicAuth/commit/e08a274c4d848f2a8360be7106cfbfa00b9a8f9b))
43
+ * stop querying okx for accounts while locked ([#6081](https://github.com/dynamic-labs/DynamicAuth/issues/6081)) ([#6084](https://github.com/dynamic-labs/DynamicAuth/issues/6084)) ([34365ac](https://github.com/dynamic-labs/DynamicAuth/commit/34365ac1981fe020b03e666c24535a247645d2ad))
44
+ * update copy for primary wallet not connected modal ([#6069](https://github.com/dynamic-labs/DynamicAuth/issues/6069)) ([4a3f43c](https://github.com/dynamic-labs/DynamicAuth/commit/4a3f43ce5585983f7fea0c5b97e812c0ade80e2c))
45
+
2
46
  ## [3.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.5...v3.0.0-alpha.6) (2024-06-18)
3
47
 
4
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/logger",
3
- "version": "3.0.0-alpha.6",
3
+ "version": "3.0.0-alpha.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
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
- if (level < this.level || level === types.LogLevel.MUTE) {
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
- if (level < this.level || level === LogLevel.MUTE) {
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);