@dynamic-labs/logger 5.8.0 → 5.9.0
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 +19 -0
- package/_virtual/_tslib.cjs +0 -1
- package/_virtual/_tslib.js +0 -1
- package/package.json +1 -1
- package/src/MetaData/MetaData.cjs +0 -1
- package/src/MetaData/MetaData.js +0 -1
- package/src/index.cjs +27 -26
- package/src/index.js +27 -26
- package/src/types.cjs +0 -1
- package/src/types.js +0 -1
- package/src/utils/createCircularReferenceReplacer.cjs +0 -1
- package/src/utils/createCircularReferenceReplacer.js +0 -1
- package/src/utils/createLogPayloadReplacer.cjs +0 -1
- package/src/utils/createLogPayloadReplacer.js +0 -1
- package/src/utils/deepMerge.cjs +0 -1
- package/src/utils/deepMerge.js +0 -1
- package/src/utils/getStack.cjs +0 -1
- package/src/utils/getStack.js +0 -1
- package/src/utils/mapLogLevel.cjs +0 -1
- package/src/utils/mapLogLevel.js +0 -1
- package/src/utils/processArgs.cjs +0 -1
- package/src/utils/processArgs.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
|
|
2
|
+
## [5.9.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.8.1...v5.9.0) (2026-09-16)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **sdk-react-core:** gate business account mutations behind step-up auth ([#12410](https://github.com/dynamic-labs/dynamic-auth/issues/12410)) ([d394719](https://github.com/dynamic-labs/dynamic-auth/commit/d3947198f9f84debccdd3ae4a4321f56b24467fb))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* prefer dashboard-saved RPC urls when mapping viem chains ([#12404](https://github.com/dynamic-labs/dynamic-auth/issues/12404)) ([dfe75b4](https://github.com/dynamic-labs/dynamic-auth/commit/dfe75b4193cff46b0fa0ef014f8b040587a0667e))
|
|
13
|
+
|
|
14
|
+
### [5.8.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.8.0...v5.8.1) (2026-09-15)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **wallet-connect:** fix Rabby WalletConnect connection ([#12385](https://github.com/dynamic-labs/dynamic-auth/issues/12385)) ([df2a93c](https://github.com/dynamic-labs/dynamic-auth/commit/df2a93cd95b75b74dd47468faedad88c463b14de))
|
|
20
|
+
|
|
2
21
|
## [5.8.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.7.0...v5.8.0) (2026-09-09)
|
|
3
22
|
|
|
4
23
|
|
package/_virtual/_tslib.cjs
CHANGED
package/_virtual/_tslib.js
CHANGED
package/package.json
CHANGED
package/src/MetaData/MetaData.js
CHANGED
package/src/index.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
'use client'
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -168,31 +167,34 @@ class Logger {
|
|
|
168
167
|
* Essentially, multiple calls to log in the same event loop will be batched into a single request
|
|
169
168
|
*/
|
|
170
169
|
queueMicrotask(() => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
currentBatch.forEach((msg) => {
|
|
175
|
-
var _a, _b, _c, _d, _e, _f;
|
|
176
|
-
const body = {};
|
|
177
|
-
const { objectArgs, remainingArgs } = processArgs.processArgs(msg);
|
|
178
|
-
Object.assign(body, ...objectArgs);
|
|
179
|
-
Object.assign(body, {
|
|
180
|
-
level: types.LogLevel[msg.level],
|
|
181
|
-
message: [msg.message, ...remainingArgs].join(' '),
|
|
182
|
-
meta: transformMeta(globalState.metaData.merge(this.metaData).get()),
|
|
183
|
-
stack: msg.stack,
|
|
184
|
-
url: {
|
|
185
|
-
hostname: (_a = window.location) === null || _a === void 0 ? void 0 : _a.hostname,
|
|
186
|
-
origin: (_b = window.location) === null || _b === void 0 ? void 0 : _b.origin,
|
|
187
|
-
pathname: (_c = window.location) === null || _c === void 0 ? void 0 : _c.pathname,
|
|
188
|
-
port: (_d = window.location) === null || _d === void 0 ? void 0 : _d.port,
|
|
189
|
-
protocol: (_e = window.location) === null || _e === void 0 ? void 0 : _e.protocol,
|
|
190
|
-
},
|
|
191
|
-
userAgent: (_f = window.navigator) === null || _f === void 0 ? void 0 : _f.userAgent,
|
|
192
|
-
});
|
|
193
|
-
messages.push(body);
|
|
194
|
-
});
|
|
170
|
+
// Payload assembly stays inside this try because an escaping
|
|
171
|
+
// rejection is re-reported by host apps' unhandledrejection
|
|
172
|
+
// handlers, which call back into the logger and loop.
|
|
195
173
|
try {
|
|
174
|
+
// Grab all pending messages immediately and clear the queue
|
|
175
|
+
const currentBatch = messageQueue.splice(0, messageQueue.length);
|
|
176
|
+
const messages = [];
|
|
177
|
+
currentBatch.forEach((msg) => {
|
|
178
|
+
var _a, _b, _c, _d, _e, _f;
|
|
179
|
+
const body = {};
|
|
180
|
+
const { objectArgs, remainingArgs } = processArgs.processArgs(msg);
|
|
181
|
+
Object.assign(body, ...objectArgs);
|
|
182
|
+
Object.assign(body, {
|
|
183
|
+
level: types.LogLevel[msg.level],
|
|
184
|
+
message: [msg.message, ...remainingArgs].join(' '),
|
|
185
|
+
meta: transformMeta(globalState.metaData.merge(this.metaData).get()),
|
|
186
|
+
stack: msg.stack,
|
|
187
|
+
url: {
|
|
188
|
+
hostname: (_a = window.location) === null || _a === void 0 ? void 0 : _a.hostname,
|
|
189
|
+
origin: (_b = window.location) === null || _b === void 0 ? void 0 : _b.origin,
|
|
190
|
+
pathname: (_c = window.location) === null || _c === void 0 ? void 0 : _c.pathname,
|
|
191
|
+
port: (_d = window.location) === null || _d === void 0 ? void 0 : _d.port,
|
|
192
|
+
protocol: (_e = window.location) === null || _e === void 0 ? void 0 : _e.protocol,
|
|
193
|
+
},
|
|
194
|
+
userAgent: (_f = window.navigator) === null || _f === void 0 ? void 0 : _f.userAgent,
|
|
195
|
+
});
|
|
196
|
+
messages.push(body);
|
|
197
|
+
});
|
|
196
198
|
if (!globalState.keys.environmentId) {
|
|
197
199
|
throw new Error('Environment ID not set');
|
|
198
200
|
}
|
|
@@ -212,7 +214,6 @@ class Logger {
|
|
|
212
214
|
catch (error) {
|
|
213
215
|
this.debug('Failed to send logs to server', error);
|
|
214
216
|
}
|
|
215
|
-
// REMOVE: messageQueue.length = 0;
|
|
216
217
|
}));
|
|
217
218
|
}
|
|
218
219
|
}
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
'use client'
|
|
2
1
|
import { __awaiter } from '../_virtual/_tslib.js';
|
|
3
2
|
import EventEmitter from 'eventemitter3';
|
|
4
3
|
import { MetaData } from './MetaData/MetaData.js';
|
|
@@ -161,31 +160,34 @@ class Logger {
|
|
|
161
160
|
* Essentially, multiple calls to log in the same event loop will be batched into a single request
|
|
162
161
|
*/
|
|
163
162
|
queueMicrotask(() => __awaiter(this, void 0, void 0, function* () {
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
currentBatch.forEach((msg) => {
|
|
168
|
-
var _a, _b, _c, _d, _e, _f;
|
|
169
|
-
const body = {};
|
|
170
|
-
const { objectArgs, remainingArgs } = processArgs(msg);
|
|
171
|
-
Object.assign(body, ...objectArgs);
|
|
172
|
-
Object.assign(body, {
|
|
173
|
-
level: LogLevel[msg.level],
|
|
174
|
-
message: [msg.message, ...remainingArgs].join(' '),
|
|
175
|
-
meta: transformMeta(globalState.metaData.merge(this.metaData).get()),
|
|
176
|
-
stack: msg.stack,
|
|
177
|
-
url: {
|
|
178
|
-
hostname: (_a = window.location) === null || _a === void 0 ? void 0 : _a.hostname,
|
|
179
|
-
origin: (_b = window.location) === null || _b === void 0 ? void 0 : _b.origin,
|
|
180
|
-
pathname: (_c = window.location) === null || _c === void 0 ? void 0 : _c.pathname,
|
|
181
|
-
port: (_d = window.location) === null || _d === void 0 ? void 0 : _d.port,
|
|
182
|
-
protocol: (_e = window.location) === null || _e === void 0 ? void 0 : _e.protocol,
|
|
183
|
-
},
|
|
184
|
-
userAgent: (_f = window.navigator) === null || _f === void 0 ? void 0 : _f.userAgent,
|
|
185
|
-
});
|
|
186
|
-
messages.push(body);
|
|
187
|
-
});
|
|
163
|
+
// Payload assembly stays inside this try because an escaping
|
|
164
|
+
// rejection is re-reported by host apps' unhandledrejection
|
|
165
|
+
// handlers, which call back into the logger and loop.
|
|
188
166
|
try {
|
|
167
|
+
// Grab all pending messages immediately and clear the queue
|
|
168
|
+
const currentBatch = messageQueue.splice(0, messageQueue.length);
|
|
169
|
+
const messages = [];
|
|
170
|
+
currentBatch.forEach((msg) => {
|
|
171
|
+
var _a, _b, _c, _d, _e, _f;
|
|
172
|
+
const body = {};
|
|
173
|
+
const { objectArgs, remainingArgs } = processArgs(msg);
|
|
174
|
+
Object.assign(body, ...objectArgs);
|
|
175
|
+
Object.assign(body, {
|
|
176
|
+
level: LogLevel[msg.level],
|
|
177
|
+
message: [msg.message, ...remainingArgs].join(' '),
|
|
178
|
+
meta: transformMeta(globalState.metaData.merge(this.metaData).get()),
|
|
179
|
+
stack: msg.stack,
|
|
180
|
+
url: {
|
|
181
|
+
hostname: (_a = window.location) === null || _a === void 0 ? void 0 : _a.hostname,
|
|
182
|
+
origin: (_b = window.location) === null || _b === void 0 ? void 0 : _b.origin,
|
|
183
|
+
pathname: (_c = window.location) === null || _c === void 0 ? void 0 : _c.pathname,
|
|
184
|
+
port: (_d = window.location) === null || _d === void 0 ? void 0 : _d.port,
|
|
185
|
+
protocol: (_e = window.location) === null || _e === void 0 ? void 0 : _e.protocol,
|
|
186
|
+
},
|
|
187
|
+
userAgent: (_f = window.navigator) === null || _f === void 0 ? void 0 : _f.userAgent,
|
|
188
|
+
});
|
|
189
|
+
messages.push(body);
|
|
190
|
+
});
|
|
189
191
|
if (!globalState.keys.environmentId) {
|
|
190
192
|
throw new Error('Environment ID not set');
|
|
191
193
|
}
|
|
@@ -205,7 +207,6 @@ class Logger {
|
|
|
205
207
|
catch (error) {
|
|
206
208
|
this.debug('Failed to send logs to server', error);
|
|
207
209
|
}
|
|
208
|
-
// REMOVE: messageQueue.length = 0;
|
|
209
210
|
}));
|
|
210
211
|
}
|
|
211
212
|
}
|
package/src/types.cjs
CHANGED
package/src/types.js
CHANGED
package/src/utils/deepMerge.cjs
CHANGED
package/src/utils/deepMerge.js
CHANGED
package/src/utils/getStack.cjs
CHANGED
package/src/utils/getStack.js
CHANGED
package/src/utils/mapLogLevel.js
CHANGED
package/src/utils/processArgs.js
CHANGED