@dynamic-labs/logger 4.9.2-preview.0 → 4.9.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 CHANGED
@@ -1,5 +1,32 @@
1
1
 
2
- ### [4.9.2-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2-preview.0) (2025-03-11)
2
+ ### [4.9.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.2...v4.9.3) (2025-03-14)
3
+
4
+
5
+ ### Features
6
+
7
+ * allow adding extra text to ToS and PP footer using custom css ([#8290](https://github.com/dynamic-labs/dynamic-auth/issues/8290)) ([0f6eb26](https://github.com/dynamic-labs/dynamic-auth/commit/0f6eb2666ea93a32360710ba5ac14eac53e07e2d))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * log out if there is a mismatch in user and wallet state ([#8300](https://github.com/dynamic-labs/dynamic-auth/issues/8300)) ([82ec2ad](https://github.com/dynamic-labs/dynamic-auth/commit/82ec2add1682a576d00dfe13aa1b9cccecf96688))
13
+ * sol sponsored tx for v3 ([#8288](https://github.com/dynamic-labs/dynamic-auth/issues/8288)) ([c466fba](https://github.com/dynamic-labs/dynamic-auth/commit/c466fba417d39641631e29104ec9c156dfdf7647))
14
+ * v3 existing wallet could not log in again ([#8282](https://github.com/dynamic-labs/dynamic-auth/issues/8282)) ([c2d68ad](https://github.com/dynamic-labs/dynamic-auth/commit/c2d68adf575fcce371e438076184ef590f346c9f))
15
+
16
+ ### [4.9.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2) (2025-03-12)
17
+
18
+
19
+ ### Features
20
+
21
+ * **QNTM-2951:** update sdk styles ([#8214](https://github.com/dynamic-labs/dynamic-auth/issues/8214)) ([45cefa8](https://github.com/dynamic-labs/dynamic-auth/commit/45cefa82bdaad769c63ffeab4fb48f88ac855461))
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * embedded widget race condition that would show both embedded and non-embedded widgets at the same time ([#8208](https://github.com/dynamic-labs/dynamic-auth/issues/8208)) ([031fb77](https://github.com/dynamic-labs/dynamic-auth/commit/031fb775c10daa383bf56ab7ba5fa4cf6ae9451c))
27
+ * **iframe-setup:** require the initial parent url when using an iframe ([#8268](https://github.com/dynamic-labs/dynamic-auth/issues/8268)) ([258e8a1](https://github.com/dynamic-labs/dynamic-auth/commit/258e8a128c31b8695518f9943bc74de9fce63196))
28
+ * improve WalletConnect experience ([#8201](https://github.com/dynamic-labs/dynamic-auth/issues/8201)) ([a09b16d](https://github.com/dynamic-labs/dynamic-auth/commit/a09b16de2ccd3cbba89f70a8ded4b7656f09f807)), closes [#8202](https://github.com/dynamic-labs/dynamic-auth/issues/8202) [#8207](https://github.com/dynamic-labs/dynamic-auth/issues/8207)
29
+ * prevent closing modal when mfa view is required ([#8156](https://github.com/dynamic-labs/dynamic-auth/issues/8156)) ([c34b245](https://github.com/dynamic-labs/dynamic-auth/commit/c34b24509e3f96046e72150b055d9c820f98706f))
3
30
 
4
31
  ### [4.9.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.0...v4.9.1) (2025-03-11)
5
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/logger",
3
- "version": "4.9.2-preview.0",
3
+ "version": "4.9.3",
4
4
  "description": "A simple client side logging library used in Dynamic SDK",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
package/src/index.cjs CHANGED
@@ -32,6 +32,18 @@ class Logger {
32
32
  else {
33
33
  this.level = level;
34
34
  }
35
+ if (typeof window !== 'undefined') {
36
+ Logger.troubleshootModeEnabled =
37
+ (localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem('dynamic_enableTroubleshootMode')) === 'true';
38
+ window.enableTroubleshootMode = () => {
39
+ localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem('dynamic_enableTroubleshootMode', 'true');
40
+ Logger.troubleshootModeEnabled = true;
41
+ };
42
+ window.disableTroubleshootMode = () => {
43
+ localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem('dynamic_enableTroubleshootMode');
44
+ Logger.troubleshootModeEnabled = false;
45
+ };
46
+ }
35
47
  }
36
48
  static setEmitErrors(emit) {
37
49
  if (emit !== undefined) {
@@ -154,8 +166,7 @@ class Logger {
154
166
  });
155
167
  }
156
168
  log(level, message, ...args) {
157
- const enableTroubleshootMode = typeof window !== 'undefined' &&
158
- (window === null || window === void 0 ? void 0 : window.dynamic_enableTroubleshootMode) === true;
169
+ const enableTroubleshootMode = typeof window !== 'undefined' && Logger.troubleshootModeEnabled;
159
170
  if (!enableTroubleshootMode &&
160
171
  (level < this.level || level === types.LogLevel.MUTE)) {
161
172
  return;
@@ -195,6 +206,7 @@ class Logger {
195
206
  Logger.globalKeys = {
196
207
  emitErrors: true,
197
208
  };
209
+ Logger.troubleshootModeEnabled = false;
198
210
  Logger.globalMetaData = new MetaData.MetaData();
199
211
  Logger.events = new EventEmitter__default["default"]();
200
212
 
package/src/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export declare class Logger {
22
22
  private name;
23
23
  private level;
24
24
  private static globalKeys;
25
+ static troubleshootModeEnabled: boolean;
25
26
  static globalMetaData: MetaData;
26
27
  metaData: MetaData;
27
28
  constructor(name: string | string[], level?: LogLevel);
package/src/index.js CHANGED
@@ -25,6 +25,18 @@ class Logger {
25
25
  else {
26
26
  this.level = level;
27
27
  }
28
+ if (typeof window !== 'undefined') {
29
+ Logger.troubleshootModeEnabled =
30
+ (localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem('dynamic_enableTroubleshootMode')) === 'true';
31
+ window.enableTroubleshootMode = () => {
32
+ localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem('dynamic_enableTroubleshootMode', 'true');
33
+ Logger.troubleshootModeEnabled = true;
34
+ };
35
+ window.disableTroubleshootMode = () => {
36
+ localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem('dynamic_enableTroubleshootMode');
37
+ Logger.troubleshootModeEnabled = false;
38
+ };
39
+ }
28
40
  }
29
41
  static setEmitErrors(emit) {
30
42
  if (emit !== undefined) {
@@ -147,8 +159,7 @@ class Logger {
147
159
  });
148
160
  }
149
161
  log(level, message, ...args) {
150
- const enableTroubleshootMode = typeof window !== 'undefined' &&
151
- (window === null || window === void 0 ? void 0 : window.dynamic_enableTroubleshootMode) === true;
162
+ const enableTroubleshootMode = typeof window !== 'undefined' && Logger.troubleshootModeEnabled;
152
163
  if (!enableTroubleshootMode &&
153
164
  (level < this.level || level === LogLevel.MUTE)) {
154
165
  return;
@@ -188,6 +199,7 @@ class Logger {
188
199
  Logger.globalKeys = {
189
200
  emitErrors: true,
190
201
  };
202
+ Logger.troubleshootModeEnabled = false;
191
203
  Logger.globalMetaData = new MetaData();
192
204
  Logger.events = new EventEmitter();
193
205
 
package/src/types.d.ts CHANGED
@@ -5,6 +5,12 @@ export declare enum LogLevel {
5
5
  ERROR = 3,
6
6
  MUTE = 99
7
7
  }
8
+ declare global {
9
+ interface Window {
10
+ enableTroubleshootMode: () => void;
11
+ disableTroubleshootMode: () => void;
12
+ }
13
+ }
8
14
  export type Message = string | Error | unknown;
9
15
  export type MessageQueueMessage = {
10
16
  level: LogLevel;