@buoy-gg/console 7.0.20 → 7.0.22
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/README.md +1 -0
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/preset.js +25 -0
- package/lib/commonjs/preset.js.map +1 -1
- package/lib/commonjs/store/consoleLogStore.js +294 -1
- package/lib/commonjs/store/consoleLogStore.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/preset.js +27 -0
- package/lib/module/preset.js.map +1 -1
- package/lib/module/store/consoleLogStore.js +293 -1
- package/lib/module/store/consoleLogStore.js.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/preset.d.ts.map +1 -1
- package/lib/typescript/store/consoleLogStore.d.ts +26 -1
- package/lib/typescript/store/consoleLogStore.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.tsx +1 -0
- package/src/preset.tsx +32 -0
- package/src/store/consoleLogStore.ts +366 -1
|
@@ -50,6 +50,13 @@ const MAX_ENTRIES = 1000;
|
|
|
50
50
|
let entries = [];
|
|
51
51
|
let nextId = 1;
|
|
52
52
|
let installed = false;
|
|
53
|
+
let fatalInstalled = false;
|
|
54
|
+
/**
|
|
55
|
+
* Raised by an explicit `uninstallConsoleCapture()`. The fatal-error hook can't
|
|
56
|
+
* be safely unwound once chained (another library may have chained on top of
|
|
57
|
+
* ours since), so an explicit user OFF mutes fatal recording instead.
|
|
58
|
+
*/
|
|
59
|
+
let captureDisabledByUser = false;
|
|
53
60
|
const listeners = new Set();
|
|
54
61
|
const clearListeners = new Set();
|
|
55
62
|
|
|
@@ -102,10 +109,71 @@ function captureOwnerStack() {
|
|
|
102
109
|
return undefined;
|
|
103
110
|
}
|
|
104
111
|
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* An error React Native decorated on its way through ExceptionsManager: a
|
|
115
|
+
* render/lifecycle crash carrying the component stack. `isComponentError` is
|
|
116
|
+
* set by RN's `getExtendedError`, so this identifies a REAL crash rather than
|
|
117
|
+
* an ordinary `console.error("...")` call.
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
/** Frames to keep from a component stack — the crash site plus its context. */
|
|
121
|
+
const COMPONENT_STACK_FRAMES = 8;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Squeeze a React component stack down to the part a human (or an agent
|
|
125
|
+
* reading this over a wire) actually uses: the component names nearest the
|
|
126
|
+
* crash.
|
|
127
|
+
*
|
|
128
|
+
* Raw component stacks in a Metro dev bundle append the full bundle URL with
|
|
129
|
+
* every query param to EVERY frame — one crash is ~15 KB of near-identical
|
|
130
|
+
* `http://192.168.x.x:8830/…&transform.routerRoot=src/app…` noise wrapped
|
|
131
|
+
* around the handful of names that matter. The complete error, componentStack
|
|
132
|
+
* included, is still on the entry's `args` for anyone who wants it.
|
|
133
|
+
*/
|
|
134
|
+
function compactComponentStack(stack) {
|
|
135
|
+
const frames = stack.split("\n").map(line => line.trim()).filter(Boolean)
|
|
136
|
+
// Drop the "(url)" tail; keep a "Name(./file.tsx)" hint when RN provides one.
|
|
137
|
+
.map(line => line.replace(/\s*\((?:https?:|\/).*$/, ""));
|
|
138
|
+
const shown = frames.slice(0, COMPONENT_STACK_FRAMES);
|
|
139
|
+
const rest = frames.length - shown.length;
|
|
140
|
+
return shown.map(f => ` ${f}`).join("\n") + (rest > 0 ? `\n …+${rest} more frames` : "");
|
|
141
|
+
}
|
|
142
|
+
function asComponentError(arg) {
|
|
143
|
+
if (!(arg instanceof Error)) return null;
|
|
144
|
+
const e = arg;
|
|
145
|
+
return e.isComponentError || typeof e.componentStack === "string" ? e : null;
|
|
146
|
+
}
|
|
105
147
|
function record(method, args) {
|
|
106
148
|
// Capture the call site for every log so we can attribute its origin.
|
|
107
149
|
const rawStack = new Error().stack;
|
|
108
150
|
const origin = parseOrigin(rawStack, captureOwnerStack());
|
|
151
|
+
|
|
152
|
+
// React Native funnels an uncaught render error back through console.error
|
|
153
|
+
// (ExceptionsManager.reportException) so console monkey-patches still see it.
|
|
154
|
+
// That arrives as an ordinary error row, which badly under-sells it: the app
|
|
155
|
+
// is dead. Promote it to a tagged [FATAL] entry carrying the component stack.
|
|
156
|
+
const crash = method === "error" ? asComponentError(args[0]) : null;
|
|
157
|
+
if (crash) {
|
|
158
|
+
// Tagged [RENDER ERROR], not [FATAL]: React reports an error an
|
|
159
|
+
// ErrorBoundary CAUGHT and recovered from through this same path, with the
|
|
160
|
+
// same componentStack, and nothing here distinguishes the two. Claiming a
|
|
161
|
+
// healthy app "most likely CRASHED" is worse than under-claiming — the
|
|
162
|
+
// component stack, which is the useful part, is reported either way.
|
|
163
|
+
const headline = fatalKey(crash.name, crash.message);
|
|
164
|
+
const located = crash.componentStack ? `\n\nThis error is located at:\n${compactComponentStack(crash.componentStack)}` : "";
|
|
165
|
+
pushFatal({
|
|
166
|
+
id: nextId++,
|
|
167
|
+
method: "error",
|
|
168
|
+
level: "error",
|
|
169
|
+
args: ["[RENDER ERROR]", crash],
|
|
170
|
+
message: `[RENDER ERROR] ${headline}${located}`,
|
|
171
|
+
timestamp: Date.now(),
|
|
172
|
+
stack: crash.stack,
|
|
173
|
+
origin
|
|
174
|
+
}, isDuplicateFatal(`[RENDER ERROR] ${headline}`));
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
109
177
|
const entry = {
|
|
110
178
|
id: nextId++,
|
|
111
179
|
method,
|
|
@@ -119,14 +187,236 @@ function record(method, args) {
|
|
|
119
187
|
entries = entries.length >= MAX_ENTRIES ? [...entries.slice(entries.length - MAX_ENTRIES + 1), entry] : [...entries, entry];
|
|
120
188
|
emit();
|
|
121
189
|
scheduleSave();
|
|
190
|
+
// Errors are the entries most likely to be the last thing an app ever logs,
|
|
191
|
+
// so they get pushed to any dashboard immediately instead of waiting on the
|
|
192
|
+
// throttle that a dying tree will never run. Rate-limited; ordinary logs
|
|
193
|
+
// still ride the normal throttled path.
|
|
194
|
+
if (entry.level === "error") flushConsoleSyncNow();
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** Minimal shape of React Native's global `ErrorUtils`. */
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Two independent seams report the same crash on some setups (the C++ handler
|
|
201
|
+
* can also feed `console.error`). Suppress a repeat of the same headline within
|
|
202
|
+
* this window so a crash reads as ONE entry.
|
|
203
|
+
*/
|
|
204
|
+
const FATAL_DEDUPE_MS = 2000;
|
|
205
|
+
let lastFatalKey = "";
|
|
206
|
+
let lastFatalAt = 0;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Normalize a crash headline so the same error reported through two different
|
|
210
|
+
* seams produces the same key. React Native often sets `error.message` to the
|
|
211
|
+
* ALREADY-prefixed string ("TypeError: x is not a function"), so one path
|
|
212
|
+
* builds "TypeError: TypeError: x…" and the other "TypeError: x…" — which
|
|
213
|
+
* defeats the de-duplication entirely.
|
|
214
|
+
*/
|
|
215
|
+
function fatalKey(name, message) {
|
|
216
|
+
const body = message.trim();
|
|
217
|
+
if (name && body.startsWith(`${name}: `)) return body;
|
|
218
|
+
return name ? `${name}: ${body}` : body;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Has this crash already been recorded moments ago?
|
|
223
|
+
*
|
|
224
|
+
* Only ever used to suppress a duplicate PUSH to the dashboard — never to drop
|
|
225
|
+
* an entry. Two different components crashing with the same message inside the
|
|
226
|
+
* window are two crashes, and a tool whose pitch is "the app's last words"
|
|
227
|
+
* must not silently throw one away.
|
|
228
|
+
*/
|
|
229
|
+
function isDuplicateFatal(key) {
|
|
230
|
+
const now = Date.now();
|
|
231
|
+
if (key === lastFatalKey && now - lastFatalAt < FATAL_DEDUPE_MS) return true;
|
|
232
|
+
lastFatalKey = key;
|
|
233
|
+
lastFatalAt = now;
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The device sync bridge's "push this tool NOW" escape hatch
|
|
239
|
+
* (@buoy-gg/external-sync `crashFlush`). Reached through the global rather than
|
|
240
|
+
* an import because console deliberately has no dependency on external-sync.
|
|
241
|
+
*/
|
|
242
|
+
let lastFlushAt = 0;
|
|
243
|
+
/** Floor between opportunistic flushes, so an error storm can't flood the socket. */
|
|
244
|
+
const FLUSH_MIN_INTERVAL_MS = 150;
|
|
245
|
+
const flushConsoleSyncNow = (force = false) => {
|
|
246
|
+
const now = Date.now();
|
|
247
|
+
// A fatal is the app's last word — it always goes out, rate limit or not.
|
|
248
|
+
if (!force && now - lastFlushAt < FLUSH_MIN_INTERVAL_MS) return;
|
|
249
|
+
lastFlushAt = now;
|
|
250
|
+
try {
|
|
251
|
+
const set = globalThis.__buoyFlushToolSync;
|
|
252
|
+
if (!set) return;
|
|
253
|
+
for (const flush of set) flush("console");
|
|
254
|
+
} catch {
|
|
255
|
+
// Best-effort: a crash path must never crash.
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Append a pre-built fatal entry to the ring buffer, then push it to any
|
|
261
|
+
* connected dashboard IMMEDIATELY.
|
|
262
|
+
*
|
|
263
|
+
* A fatal render error unmounts the React tree microseconds later, taking the
|
|
264
|
+
* sync bridge — and the normal 200 ms throttled snapshot — with it. Flushing
|
|
265
|
+
* synchronously here is what makes a crashed app's last words readable from
|
|
266
|
+
* the desktop app and the MCP server instead of the app just going silent.
|
|
267
|
+
*/
|
|
268
|
+
function pushFatal(entry, duplicate = false) {
|
|
269
|
+
entries = entries.length >= MAX_ENTRIES ? [...entries.slice(entries.length - MAX_ENTRIES + 1), entry] : [...entries, entry];
|
|
270
|
+
emit();
|
|
271
|
+
scheduleSave();
|
|
272
|
+
// A repeat within the dedupe window is still RECORDED (two crashes are two
|
|
273
|
+
// crashes); it just doesn't earn another forced push to the dashboard.
|
|
274
|
+
if (!duplicate) flushConsoleSyncNow(true);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/** Record an uncaught JS error from the global handler as an error entry. */
|
|
278
|
+
function recordFatalError(error, isFatal) {
|
|
279
|
+
const err = error instanceof Error ? error : undefined;
|
|
280
|
+
// RN passes isFatal:false for non-fatal uncaught errors (e.g. errors thrown
|
|
281
|
+
// in event handlers on some setups); anything else is treated as fatal.
|
|
282
|
+
const label = isFatal === false ? "[UNCAUGHT]" : "[FATAL]";
|
|
283
|
+
const headline = err ? fatalKey(err.name, err.message) : formatArg(error);
|
|
284
|
+
const duplicate = isDuplicateFatal(`${label} ${headline}`);
|
|
285
|
+
// The label leads the args (not just the pre-rendered message): the
|
|
286
|
+
// DevTools-style row renders from args, so this is what makes the tag
|
|
287
|
+
// visible in the UI — exactly like `console.error("[FATAL]", err)`.
|
|
288
|
+
pushFatal({
|
|
289
|
+
id: nextId++,
|
|
290
|
+
method: "error",
|
|
291
|
+
level: "error",
|
|
292
|
+
args: [label, error],
|
|
293
|
+
message: `${label} ${headline}`,
|
|
294
|
+
timestamp: Date.now(),
|
|
295
|
+
// The error's OWN stack — the crash site, not this handler's call site.
|
|
296
|
+
stack: err?.stack,
|
|
297
|
+
fatal: true
|
|
298
|
+
}, duplicate);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* The exception payload React Native's C++ error handler hands to listeners
|
|
303
|
+
* registered via `global.RN$registerExceptionListener` (JsErrorHandler.cpp).
|
|
304
|
+
*/
|
|
305
|
+
|
|
306
|
+
/** Render the C++ handler's parsed frames back into a normal stack string. */
|
|
307
|
+
function formatNativeStack(data) {
|
|
308
|
+
const raw = data.extraData?.rawStack;
|
|
309
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
310
|
+
if (!Array.isArray(data.stack) || data.stack.length === 0) return undefined;
|
|
311
|
+
return data.stack.map(f => {
|
|
312
|
+
const where = f.lineNumber != null ? `${f.file ?? "?"}:${f.lineNumber}:${f.column ?? 0}` : f.file ?? "?";
|
|
313
|
+
return ` at ${f.methodName || "<anonymous>"} (${where})`;
|
|
314
|
+
}).join("\n");
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/** Record a crash reported by React Native's native (C++) error handler. */
|
|
318
|
+
function recordNativeException(data) {
|
|
319
|
+
const label = data.isFatal === false ? "[UNCAUGHT]" : "[FATAL]";
|
|
320
|
+
const headline = fatalKey(data.name ?? undefined, data.originalMessage ?? data.message ?? "Unknown error");
|
|
321
|
+
const duplicate = isDuplicateFatal(`${label} ${headline}`);
|
|
322
|
+
// The component stack is the single most useful line for "which component
|
|
323
|
+
// crashed" — RN puts it in the redbox, so put it in the console entry too.
|
|
324
|
+
const componentStack = typeof data.componentStack === "string" && data.componentStack.trim() ? `\n\nThis error is located at:\n${compactComponentStack(data.componentStack)}` : "";
|
|
325
|
+
const message = `${label} ${headline}${componentStack}`;
|
|
326
|
+
pushFatal({
|
|
327
|
+
id: nextId++,
|
|
328
|
+
method: "error",
|
|
329
|
+
level: "error",
|
|
330
|
+
args: [label, headline, ...(componentStack ? [componentStack.trim()] : [])],
|
|
331
|
+
message,
|
|
332
|
+
timestamp: Date.now(),
|
|
333
|
+
stack: formatNativeStack(data),
|
|
334
|
+
fatal: true
|
|
335
|
+
}, duplicate);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Register with React Native's native (C++) exception handler — the seam a
|
|
340
|
+
* RENDER crash actually travels through on the New Architecture.
|
|
341
|
+
*
|
|
342
|
+
* React 19 routes an uncaught render error to `onUncaughtError` →
|
|
343
|
+
* `ExceptionsManager.handleException`, which NEVER reaches
|
|
344
|
+
* `ErrorUtils.setGlobalHandler`. Where it goes from there depends on the build:
|
|
345
|
+
*
|
|
346
|
+
* - `useAlwaysAvailableJSErrorHandling` on: the C++ handler
|
|
347
|
+
* (`global.RN$handleException`) reports it and JS sees nothing — this
|
|
348
|
+
* listener is the only seam.
|
|
349
|
+
* - otherwise: JS `reportException` re-feeds `console.error(e)` "so any methods
|
|
350
|
+
* monkey patched on top of console.error are called", which the console patch
|
|
351
|
+
* catches and promotes to `[FATAL]` (see `record`).
|
|
352
|
+
*
|
|
353
|
+
* Both are covered, and a crash reported through both de-duplicates to one
|
|
354
|
+
* entry. `RN$registerExceptionListener` keeps a LIST of listeners (LogBox
|
|
355
|
+
* registers one too), so this is purely additive. We never call the payload's
|
|
356
|
+
* `preventDefault()`: suppressing RN's own redbox is not our call to make.
|
|
357
|
+
*/
|
|
358
|
+
function installNativeExceptionCapture() {
|
|
359
|
+
const register = globalThis.RN$registerExceptionListener;
|
|
360
|
+
if (typeof register !== "function") return false;
|
|
361
|
+
register(data => {
|
|
362
|
+
try {
|
|
363
|
+
if (!captureDisabledByUser) recordNativeException(data);
|
|
364
|
+
} catch {
|
|
365
|
+
// Capture must never interfere with error reporting.
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
return true;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Hook React Native's error paths so FATAL/uncaught JS errors land in the
|
|
373
|
+
* console store: the classic `ErrorUtils.setGlobalHandler` (old architecture,
|
|
374
|
+
* native-module callbacks, promise rejections) AND the native C++ exception
|
|
375
|
+
* listener (New Architecture render crashes — see
|
|
376
|
+
* {@link installNativeExceptionCapture}). Both feed the same de-duplicated
|
|
377
|
+
* `[FATAL]` entry, so a crash reported through both seams shows up once.
|
|
378
|
+
*
|
|
379
|
+
* - Chains the previous handler (LogBox/redbox still fire; nothing swallowed).
|
|
380
|
+
* - Idempotent, and a silent no-op off React Native (neither global present) —
|
|
381
|
+
* which also keeps it inert on the desktop dashboard / web mirrors.
|
|
382
|
+
* - Recording respects an explicit `uninstallConsoleCapture()` (user OFF), but
|
|
383
|
+
* the hooks themselves stay chained — they can't be safely removed.
|
|
384
|
+
*/
|
|
385
|
+
export function installFatalErrorCapture() {
|
|
386
|
+
if (fatalInstalled) return;
|
|
387
|
+
// Latch only once a seam is actually attached. Setting the flag up front
|
|
388
|
+
// means an install that runs before `InitializeCore` has published
|
|
389
|
+
// `ErrorUtils` would latch anyway and never retry — silently losing promise
|
|
390
|
+
// rejections and native-callback errors, which travel ONLY that seam.
|
|
391
|
+
const nativeInstalled = installNativeExceptionCapture();
|
|
392
|
+
const errorUtils = globalThis.ErrorUtils;
|
|
393
|
+
if (typeof errorUtils?.setGlobalHandler !== "function") {
|
|
394
|
+
fatalInstalled = nativeInstalled;
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
fatalInstalled = true;
|
|
398
|
+
const previous = typeof errorUtils.getGlobalHandler === "function" ? errorUtils.getGlobalHandler() : undefined;
|
|
399
|
+
errorUtils.setGlobalHandler((error, isFatal) => {
|
|
400
|
+
try {
|
|
401
|
+
if (!captureDisabledByUser) recordFatalError(error, isFatal);
|
|
402
|
+
} catch {
|
|
403
|
+
// Capture must never interfere with error reporting.
|
|
404
|
+
}
|
|
405
|
+
if (typeof previous === "function") previous(error, isFatal);
|
|
406
|
+
});
|
|
122
407
|
}
|
|
123
408
|
|
|
124
409
|
/**
|
|
125
410
|
* Patch the global console methods. Idempotent — safe to call more than once.
|
|
126
411
|
* Each patched method still forwards to the original so normal logging keeps
|
|
127
412
|
* working (Metro terminal, Chrome, native logcat/Xcode).
|
|
413
|
+
*
|
|
414
|
+
* Also installs the fatal-error hook (see `installFatalErrorCapture`) so every
|
|
415
|
+
* install path captures crashes, not just `console.*` calls.
|
|
128
416
|
*/
|
|
129
417
|
export function installConsoleCapture() {
|
|
418
|
+
captureDisabledByUser = false;
|
|
419
|
+
installFatalErrorCapture();
|
|
130
420
|
if (installed) return;
|
|
131
421
|
installed = true;
|
|
132
422
|
for (const method of METHODS) {
|
|
@@ -143,8 +433,10 @@ export function installConsoleCapture() {
|
|
|
143
433
|
}
|
|
144
434
|
}
|
|
145
435
|
|
|
146
|
-
/** Restore the original console methods.
|
|
436
|
+
/** Restore the original console methods. Also mutes fatal-error recording
|
|
437
|
+
* (the hook itself stays chained — see `installFatalErrorCapture`). */
|
|
147
438
|
export function uninstallConsoleCapture() {
|
|
439
|
+
captureDisabledByUser = true;
|
|
148
440
|
if (!installed) return;
|
|
149
441
|
installed = false;
|
|
150
442
|
for (const method of METHODS) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","persistentStorage","sanitizeArgs","parseOrigin","METHODS","STACK_METHODS","Set","METHOD_LEVEL","error","assert","warn","debug","log","info","trace","dir","table","group","groupCollapsed","groupEnd","MAX_ENTRIES","entries","nextId","installed","listeners","clearListeners","originals","emitScheduled","emit","requestAnimationFrame","listener","formatArg","arg","Error","stack","name","message","undefined","JSON","stringify","String","formatArgs","args","map","join","cleanStack","raw","split","slice","captureOwnerStack","fn","record","method","rawStack","origin","entry","id","level","timestamp","Date","now","has","length","scheduleSave","installConsoleCapture","original","console","buoyConsoleProxy","apply","uninstallConsoleCapture","subscribe","add","delete","getEntries","clearEntries","clearSavedBuffer","replaceEntries","next","onClear","PRESERVE_KEY","BUFFER_KEY","SAVE_DEBOUNCE_MS","preserveLog","persistenceReady","preserveListeners","saveTimer","emitPreserve","clearTimeout","setTimeout","saveBuffer","serializable","setItem","removeItem","initConsolePersistence","getItem","saved","parse","Array","isArray","Math","max","e","getPreserveLog","setPreserveLog","catch","subscribePreserveLog"],"sourceRoot":"../../../src","sources":["store/consoleLogStore.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,YAAY,QAAQ,YAAY;AACzC,SAASC,WAAW,QAAwB,oBAAoB;;AAEhE;;AAeA;;AAsBA;AACA,MAAMC,OAAwB,GAAG,CAC/B,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB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8B,oBAAoBA,CAAC3E,QAAkB,EAAc;EACnEsD,iBAAiB,CAACb,GAAG,CAACzC,QAAQ,CAAC;EAC/B,OAAO,MAAM;IACXsD,iBAAiB,CAACZ,MAAM,CAAC1C,QAAQ,CAAC;EACpC,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","persistentStorage","sanitizeArgs","parseOrigin","METHODS","STACK_METHODS","Set","METHOD_LEVEL","error","assert","warn","debug","log","info","trace","dir","table","group","groupCollapsed","groupEnd","MAX_ENTRIES","entries","nextId","installed","fatalInstalled","captureDisabledByUser","listeners","clearListeners","originals","emitScheduled","emit","requestAnimationFrame","listener","formatArg","arg","Error","stack","name","message","undefined","JSON","stringify","String","formatArgs","args","map","join","cleanStack","raw","split","slice","captureOwnerStack","fn","COMPONENT_STACK_FRAMES","compactComponentStack","frames","line","trim","filter","Boolean","replace","shown","rest","length","f","asComponentError","e","isComponentError","componentStack","record","method","rawStack","origin","crash","headline","fatalKey","located","pushFatal","id","level","timestamp","Date","now","isDuplicateFatal","entry","has","scheduleSave","flushConsoleSyncNow","FATAL_DEDUPE_MS","lastFatalKey","lastFatalAt","body","startsWith","key","lastFlushAt","FLUSH_MIN_INTERVAL_MS","force","set","globalThis","__buoyFlushToolSync","flush","duplicate","recordFatalError","isFatal","err","label","fatal","formatNativeStack","data","extraData","Array","isArray","where","lineNumber","file","column","methodName","recordNativeException","originalMessage","installNativeExceptionCapture","register","RN$registerExceptionListener","installFatalErrorCapture","nativeInstalled","errorUtils","ErrorUtils","setGlobalHandler","previous","getGlobalHandler","installConsoleCapture","original","console","buoyConsoleProxy","apply","uninstallConsoleCapture","subscribe","add","delete","getEntries","clearEntries","clearSavedBuffer","replaceEntries","next","onClear","PRESERVE_KEY","BUFFER_KEY","SAVE_DEBOUNCE_MS","preserveLog","persistenceReady","preserveListeners","saveTimer","emitPreserve","clearTimeout","setTimeout","saveBuffer","serializable","setItem","removeItem","initConsolePersistence","getItem","saved","parse","Math","max","getPreserveLog","setPreserveLog","catch","subscribePreserveLog"],"sourceRoot":"../../../src","sources":["store/consoleLogStore.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,YAAY,QAAQ,YAAY;AACzC,SAASC,WAAW,QAAwB,oBAAoB;;AAEhE;;AAeA;;AA4BA;AACA,MAAMC,OAAwB,GAAG,CAC/B,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,UAAU,CACX;;AAED;AACA,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;;AAElF;AACA,MAAMC,YAAiD,GAAG;EACxDC,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE,OAAO;EACfC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,GAAG,EAAE,MAAM;EACXC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,MAAM;EACbC,GAAG,EAAE,MAAM;EACXC,KAAK,EAAE,MAAM;EACbC,KAAK,EAAE,MAAM;EACbC,cAAc,EAAE,MAAM;EACtBC,QAAQ,EAAE;AACZ,CAAC;;AAED;AACA,MAAMC,WAAW,GAAG,IAAI;AAIxB,IAAIC,OAA0B,GAAG,EAAE;AACnC,IAAIC,MAAM,GAAG,CAAC;AACd,IAAIC,SAAS,GAAG,KAAK;AACrB,IAAIC,cAAc,GAAG,KAAK;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAIC,qBAAqB,GAAG,KAAK;AAEjC,MAAMC,SAAS,GAAG,IAAIpB,GAAG,CAAW,CAAC;AACrC,MAAMqB,cAAc,GAAG,IAAIrB,GAAG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AACC,OAAO,CAACiD,KAAK,CAAC,IAAIA,KAAK,CAACjG,MAAM,EAAE;QACxC;QACA1C,OAAO,GAAG,CAAC,GAAG2I,KAAK,EAAE,GAAG3I,OAAO,CAAC,CAAC6B,KAAK,CAAC,CAAC9B,WAAW,CAAC;QACpDE,MAAM,GAAG4I,IAAI,CAACC,GAAG,CAAC7I,MAAM,EAAE,GAAG0I,KAAK,CAACnH,GAAG,CAAEqB,CAAC,IAAKA,CAAC,CAACY,EAAE,GAAG,CAAC,CAAC,CAAC;QACxDhD,IAAI,CAAC,CAAC;MACR;IACF;EACF,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ;;AAEA;AACA,OAAO,SAASsI,cAAcA,CAAA,EAAY;EACxC,OAAOjB,WAAW;AACpB;;AAEA;AACA,OAAO,SAASkB,cAAcA,CAACvB,IAAa,EAAQ;EAClD,IAAIK,WAAW,KAAKL,IAAI,EAAE;EAC1BK,WAAW,GAAGL,IAAI;EAClBS,YAAY,CAAC,CAAC;EACdtJ,iBAAiB,CAAC2J,OAAO,CAACZ,YAAY,EAAEtG,MAAM,CAACoG,IAAI,CAAC,CAAC,CAACwB,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;EACrE,IAAIxB,IAAI,EAAEY,UAAU,CAAC,CAAC,CAAC,KAClBd,gBAAgB,CAAC,CAAC;AACzB;;AAEA;AACA,OAAO,SAAS2B,oBAAoBA,CAACvI,QAAkB,EAAc;EACnEqH,iBAAiB,CAACb,GAAG,CAACxG,QAAQ,CAAC;EAC/B,OAAO,MAAM;IACXqH,iBAAiB,CAACZ,MAAM,CAACzG,QAAQ,CAAC;EACpC,CAAC;AACH","ignoreList":[]}
|
|
@@ -21,6 +21,6 @@ export { ConsoleLogList } from "./components/ConsoleLogList";
|
|
|
21
21
|
export { useConsoleLogs } from "./hooks/useConsoleLogs";
|
|
22
22
|
export type { UseConsoleLogsResult } from "./hooks/useConsoleLogs";
|
|
23
23
|
export { consoleSyncAdapter } from "./sync/consoleSyncAdapter";
|
|
24
|
-
export { installConsoleCapture, uninstallConsoleCapture, clearEntries, getEntries, subscribe, replaceEntries, onClear, initConsolePersistence, getPreserveLog, setPreserveLog, subscribePreserveLog, } from "./store/consoleLogStore";
|
|
24
|
+
export { installConsoleCapture, installFatalErrorCapture, uninstallConsoleCapture, clearEntries, getEntries, subscribe, replaceEntries, onClear, initConsolePersistence, getPreserveLog, setPreserveLog, subscribePreserveLog, } from "./store/consoleLogStore";
|
|
25
25
|
export type { ConsoleLogEntry, ConsoleLevel, ConsoleMethod, } from "./store/consoleLogStore";
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAKhE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG3E,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;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ACvB,YAAY,EACZ,UAAU,EACV,SAAS,EACT,cAAc,EACd,OAAO,EACP,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,eAAe,EACf,YAAY,EACZ,aAAa,GACd,MAAM,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAkCzD,eAAO,MAAM,iBAAiB;;;;;4BAKJ;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;CAIzD,CAAC;AAEF,kDAAkD;AAClD,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;4BAR7B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;EAezD"}
|
|
@@ -33,15 +33,40 @@ export interface ConsoleLogEntry {
|
|
|
33
33
|
stack?: string;
|
|
34
34
|
/** Where the log came from (component / function / call site). */
|
|
35
35
|
origin?: LogOrigin;
|
|
36
|
+
/**
|
|
37
|
+
* True when this entry came from React Native's global error handler (an
|
|
38
|
+
* uncaught — usually fatal — JS error), not from a `console.*` call. The
|
|
39
|
+
* message carries a matching `[FATAL]` / `[UNCAUGHT]` prefix.
|
|
40
|
+
*/
|
|
41
|
+
fatal?: boolean;
|
|
36
42
|
}
|
|
37
43
|
type Listener = () => void;
|
|
44
|
+
/**
|
|
45
|
+
* Hook React Native's error paths so FATAL/uncaught JS errors land in the
|
|
46
|
+
* console store: the classic `ErrorUtils.setGlobalHandler` (old architecture,
|
|
47
|
+
* native-module callbacks, promise rejections) AND the native C++ exception
|
|
48
|
+
* listener (New Architecture render crashes — see
|
|
49
|
+
* {@link installNativeExceptionCapture}). Both feed the same de-duplicated
|
|
50
|
+
* `[FATAL]` entry, so a crash reported through both seams shows up once.
|
|
51
|
+
*
|
|
52
|
+
* - Chains the previous handler (LogBox/redbox still fire; nothing swallowed).
|
|
53
|
+
* - Idempotent, and a silent no-op off React Native (neither global present) —
|
|
54
|
+
* which also keeps it inert on the desktop dashboard / web mirrors.
|
|
55
|
+
* - Recording respects an explicit `uninstallConsoleCapture()` (user OFF), but
|
|
56
|
+
* the hooks themselves stay chained — they can't be safely removed.
|
|
57
|
+
*/
|
|
58
|
+
export declare function installFatalErrorCapture(): void;
|
|
38
59
|
/**
|
|
39
60
|
* Patch the global console methods. Idempotent — safe to call more than once.
|
|
40
61
|
* Each patched method still forwards to the original so normal logging keeps
|
|
41
62
|
* working (Metro terminal, Chrome, native logcat/Xcode).
|
|
63
|
+
*
|
|
64
|
+
* Also installs the fatal-error hook (see `installFatalErrorCapture`) so every
|
|
65
|
+
* install path captures crashes, not just `console.*` calls.
|
|
42
66
|
*/
|
|
43
67
|
export declare function installConsoleCapture(): void;
|
|
44
|
-
/** Restore the original console methods.
|
|
68
|
+
/** Restore the original console methods. Also mutes fatal-error recording
|
|
69
|
+
* (the hook itself stays chained — see `installFatalErrorCapture`). */
|
|
45
70
|
export declare function uninstallConsoleCapture(): void;
|
|
46
71
|
/** Subscribe to changes. Returns an unsubscribe function. */
|
|
47
72
|
export declare function subscribe(listener: Listener): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleLogStore.d.ts","sourceRoot":"","sources":["../../../src/store/consoleLogStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEjE,iDAAiD;AACjD,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,OAAO,GACP,gBAAgB,GAChB,UAAU,CAAC;AAEf,wDAAwD;AACxD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,MAAM,EAAE,aAAa,CAAC;IACtB,+CAA+C;IAC/C,KAAK,EAAE,YAAY,CAAC;IACpB,sDAAsD;IACtD,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,MAAM,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"consoleLogStore.d.ts","sourceRoot":"","sources":["../../../src/store/consoleLogStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEjE,iDAAiD;AACjD,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,OAAO,GACP,gBAAgB,GAChB,UAAU,CAAC;AAEf,wDAAwD;AACxD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,EAA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E,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAKnE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/console",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.22",
|
|
4
4
|
"description": "Chrome DevTools-style console for React Native — captures every console.* on device, even in release builds. Part of Buoy devtools.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
16
|
+
"@buoy-gg/shared-ui": "^7.0.22"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": "*",
|
package/src/index.tsx
CHANGED
|
@@ -51,6 +51,7 @@ export { consoleSyncAdapter } from "./sync/consoleSyncAdapter";
|
|
|
51
51
|
// =============================================================================
|
|
52
52
|
export {
|
|
53
53
|
installConsoleCapture,
|
|
54
|
+
installFatalErrorCapture,
|
|
54
55
|
uninstallConsoleCapture,
|
|
55
56
|
clearEntries,
|
|
56
57
|
getEntries,
|
package/src/preset.tsx
CHANGED
|
@@ -11,6 +11,38 @@
|
|
|
11
11
|
|
|
12
12
|
import { ConsoleIcon, CONSOLE_ICON_COLOR } from "./components/ConsoleIcon";
|
|
13
13
|
import { ConsoleModal } from "./components/ConsoleModal";
|
|
14
|
+
import { installConsoleCapture } from "./store/consoleLogStore";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Install console + fatal-error capture at IMPORT time, not first UI mount.
|
|
18
|
+
*
|
|
19
|
+
* Deliberately a module side effect (same pattern as @buoy-gg/network's
|
|
20
|
+
* override hydration): a fatal error thrown during the app's FIRST render
|
|
21
|
+
* kills the tree before FloatingDevTools' effects ever run, so mount-time
|
|
22
|
+
* install (`ConsoleRoot`) captured nothing for exactly the crashes that most
|
|
23
|
+
* need capturing. Importing the preset happens at bundle-eval, before any
|
|
24
|
+
* rendering, so the `console.*` patch and both fatal-error hooks (`ErrorUtils`
|
|
25
|
+
* and RN's native exception listener) are live from the first line of app code.
|
|
26
|
+
*
|
|
27
|
+
* Guards:
|
|
28
|
+
* - `ErrorUtils` OR `RN$registerExceptionListener` present = a real React Native
|
|
29
|
+
* runtime. The desktop dashboard and web mirrors import this package too, and
|
|
30
|
+
* must never patch their OWN console (they mirror device entries via
|
|
31
|
+
* `replaceEntries`).
|
|
32
|
+
* - Dev-only. In production the existing mount-time path still applies (the
|
|
33
|
+
* tools only mount there for licensed users), so end-user builds are never
|
|
34
|
+
* patched at import.
|
|
35
|
+
*/
|
|
36
|
+
const rnGlobals = globalThis as {
|
|
37
|
+
ErrorUtils?: { setGlobalHandler?: unknown };
|
|
38
|
+
RN$registerExceptionListener?: unknown;
|
|
39
|
+
};
|
|
40
|
+
const isReactNativeRuntime =
|
|
41
|
+
typeof rnGlobals.ErrorUtils?.setGlobalHandler === "function" ||
|
|
42
|
+
typeof rnGlobals.RN$registerExceptionListener === "function";
|
|
43
|
+
if (isReactNativeRuntime && typeof __DEV__ !== "undefined" && __DEV__) {
|
|
44
|
+
installConsoleCapture();
|
|
45
|
+
}
|
|
14
46
|
|
|
15
47
|
export const consoleToolPreset = {
|
|
16
48
|
id: "console",
|