@everframe/react-native 0.9.0 → 1.1.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/EverframeRN.podspec +1 -1
- package/README.md +258 -0
- package/android/build.gradle.kts +1 -1
- package/android/src/main/java/dev/everframe/rn/EverframeModule.kt +31 -46
- package/android/src/main/java/dev/everframe/rn/ReporterBridge.kt +89 -0
- package/dist/NativeEverframe.d.ts +2 -0
- package/dist/chunk-ENPQ66EV.js +1 -0
- package/dist/chunk-POE5CSO5.js +1 -0
- package/dist/index.d.ts +61 -1
- package/dist/index.js +25 -25
- package/dist/index.web.d.ts +13 -0
- package/dist/index.web.js +1 -0
- package/dist/integrations/console.js +1 -1
- package/dist/integrations/react-navigation.js +1 -1
- package/dist/integrations/react.d.ts +15 -0
- package/dist/integrations/react.js +1 -0
- package/dist/promise-rejection-types-C-lxCdDl.d.ts +101 -0
- package/ios/Sources/EverframeBridge.swift +5 -0
- package/ios/Sources/EverframeModule.mm +4 -0
- package/package.json +19 -4
- package/src/NativeEverframe.ts +3 -0
- package/dist/chunk-QRPINMCR.js +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { E as ErrorCaptureStatus, P as PromiseRejectionStatus, R as ReportDeliveryStatus } from './promise-rejection-types-C-lxCdDl.js';
|
|
2
|
+
export { a as ErrorCaptureCounters, b as ErrorCaptureOutcome, c as ErrorCapturePath, d as PromiseRejectionCounters, e as RejectionReason, f as ReportCaptureOutcome, g as ReportCapturePath, h as ReportCapturePathStatus, i as ReportDeliveryReason, j as ReportQueueOperation, k as ReportQueueStatus, l as ReportStorageFailure, m as ReportTransportOrigin, n as ReportTransportOutcome, o as ReportTransportStatus } from './promise-rejection-types-C-lxCdDl.js';
|
|
3
|
+
export * from '@everframe/react';
|
|
4
|
+
|
|
5
|
+
/** Hermes observation is separate from the browser SDK's own rejection handling. */
|
|
6
|
+
declare function getPromiseRejectionStatus(): PromiseRejectionStatus;
|
|
7
|
+
|
|
8
|
+
/** Mobile admission diagnostics are unavailable on the browser entry. */
|
|
9
|
+
declare function getErrorCaptureStatus(): ErrorCaptureStatus;
|
|
10
|
+
|
|
11
|
+
declare function getReportDeliveryStatus(): ReportDeliveryStatus;
|
|
12
|
+
|
|
13
|
+
export { ErrorCaptureStatus, PromiseRejectionStatus, ReportDeliveryStatus, getErrorCaptureStatus, getPromiseRejectionStatus, getReportDeliveryStatus };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,c as e,e as o}from"./chunk-ENPQ66EV.js";import{a as t}from"./chunk-XUSV3KOD.js";export*from"@everframe/react";function a(){return o("unsupported","platform")}t(a,"getPromiseRejectionStatus");function s(){return e("unsupported","platform")}t(s,"getErrorCaptureStatus");function n(){return r("unsupported","platform")}t(n,"getReportDeliveryStatus");export{s as getErrorCaptureStatus,a as getPromiseRejectionStatus,n as getReportDeliveryStatus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as c}from"../chunk-POE5CSO5.js";import"../chunk-ENPQ66EV.js";import{a as i}from"../chunk-XUSV3KOD.js";var g={log:"info",info:"info",warn:"warn",error:"error",debug:"debug"},a=2048;function p(t){let l=[...new Set(t?.levels??["log","info","warn","error"])];return{name:"console",setup(){let n=!1,e=[];for(let o of l){let r=console[o];if(typeof r!="function")continue;e.push({level:o,fn:r});let u=r.bind(console);console[o]=(...f)=>{if(u(...f),!n){n=!0;try{let s=v(f);s&&!s.startsWith("[everframe]")&&c({message:s,kind:"console",level:g[o]})}catch{}finally{n=!1}}}}return()=>{for(let{level:o,fn:r}of e)console[o]=r}}}}i(p,"consoleIntegration");function v(t){let n=t.map(e=>{if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}).join(" ");return n.length>a?n.slice(0,a):n}i(v,"serializeArgs");export{p as consoleIntegration};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{i}from"../chunk-POE5CSO5.js";import"../chunk-ENPQ66EV.js";import{a as n}from"../chunk-XUSV3KOD.js";function o(t){let e=n(()=>{try{let a=t.navigationRef.getCurrentRoute?.()?.name;a&&i(a)}catch{}},"emit");return{name:"react-navigation",onReady:e,onStateChange:e,setup(){try{t.navigationRef.isReady()&&e()}catch{}try{return t.navigationRef.addListener("state",e)}catch{return}}}}n(o,"reactNavigationIntegration");export{o as reactNavigationIntegration};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Call from an application's componentDidCatch, in a boundary rendered inside
|
|
3
|
+
* EverframeProvider. A boundary that wraps the provider replaces it with its
|
|
4
|
+
* fallback in the same commit, before componentDidCatch runs, so its calls find
|
|
5
|
+
* no provider unless that fallback mounts one. Inside the provider, errors
|
|
6
|
+
* caught during its first commit are not captured: the provider publishes its
|
|
7
|
+
* runtime after its descendants' componentDidCatch.
|
|
8
|
+
* The application owns its fallback and recovery policy. Native acceptance does
|
|
9
|
+
* not establish delivery; fatal escalation can still produce a separate report.
|
|
10
|
+
*/
|
|
11
|
+
declare function captureReactError(error: unknown, info?: {
|
|
12
|
+
componentStack?: string | null;
|
|
13
|
+
}): void;
|
|
14
|
+
|
|
15
|
+
export { captureReactError };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as n,e as a}from"../chunk-POE5CSO5.js";import"../chunk-ENPQ66EV.js";import{a as c}from"../chunk-XUSV3KOD.js";var d=Reflect.apply,u;function l(t,i){let r=a();if(!r){s();return}let p=n(),o;try{if(i!=null){let e=Object.getOwnPropertyDescriptor(i,"componentStack");e&&"value"in e&&typeof e.value=="string"&&(o=e.value)}}catch{}try{let e=r.captureException;if(a()!==r||n()!==p)return;d(e,r,[t,{context:"react.error-boundary",...o!==void 0?{metadata:{componentStack:o}}:{}}])}catch{}}c(l,"captureReactError");function s(){try{let t=n();if(u===t||typeof __DEV__>"u"||!__DEV__)return;u=t,console.warn("[everframe] captureReactError: no EverframeProvider is mounted, so this error was not captured. Render the error boundary inside <EverframeProvider>; errors caught during its first commit are not captured.")}catch{}}c(s,"warnNotMounted");export{l as captureReactError};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
declare const capturePaths: readonly ["native-handled", "bridge-handled", "bridge-automatic", "jvm-uncaught"];
|
|
2
|
+
declare const captureOutcomes: readonly ["persisted", "disabled", "admission-suppressed", "reentrant", "invalid-input", "ownership-lost", "storage-unavailable", "failed"];
|
|
3
|
+
declare const queueOperations: readonly ["enqueue-committed", "enqueue-failed", "capacity-evicted", "removed-after-acceptance", "removed-after-terminal", "removal-failed", "read-failed"];
|
|
4
|
+
declare const storageFailures: readonly ["capacity", "key-unavailable", "corrupt", "io", "revoked", "invalid-entry", "busy", "unknown", "unsupported-format"];
|
|
5
|
+
declare const transportOrigins: readonly ["live-submit", "outbox-drain"];
|
|
6
|
+
declare const transportOutcomes: readonly ["server-accepted", "retryable-http", "terminal-http", "network-failure", "authorization-cancelled", "cancelled", "failed"];
|
|
7
|
+
type ReportCapturePath = typeof capturePaths[number];
|
|
8
|
+
type ReportCaptureOutcome = typeof captureOutcomes[number];
|
|
9
|
+
type ReportQueueOperation = typeof queueOperations[number];
|
|
10
|
+
type ReportStorageFailure = typeof storageFailures[number];
|
|
11
|
+
type ReportTransportOrigin = typeof transportOrigins[number];
|
|
12
|
+
type ReportTransportOutcome = typeof transportOutcomes[number];
|
|
13
|
+
type ReportDeliveryReason = 'none' | 'no-start' | 'capture-disabled' | 'no-mount' | 'platform' | 'native-method-missing' | 'native-call-failed' | 'invalid-native-snapshot' | 'snapshot-busy';
|
|
14
|
+
interface ReportCapturePathStatus {
|
|
15
|
+
supported: boolean;
|
|
16
|
+
settledAttempts: number;
|
|
17
|
+
outcomes: Record<ReportCaptureOutcome, number>;
|
|
18
|
+
lastOutcome?: ReportCaptureOutcome;
|
|
19
|
+
}
|
|
20
|
+
interface ReportQueueStatus {
|
|
21
|
+
scope: 'sdk-report-outbox';
|
|
22
|
+
observation: 'not-observed' | 'observed' | 'failed';
|
|
23
|
+
quality: 'complete' | 'partial' | 'unknown';
|
|
24
|
+
pendingCount?: number;
|
|
25
|
+
capacityPolicy: 'reject-new' | 'evict-oldest' | 'unknown';
|
|
26
|
+
terminalHttpPolicy: 'retain' | 'attempt-remove' | 'unknown';
|
|
27
|
+
operations: Record<ReportQueueOperation, number>;
|
|
28
|
+
lastFailure?: ReportStorageFailure;
|
|
29
|
+
migration: 'not-observed' | 'clear' | 'blocked' | 'unknown';
|
|
30
|
+
}
|
|
31
|
+
interface ReportTransportStatus {
|
|
32
|
+
settledAttempts: number;
|
|
33
|
+
outcomes: Record<ReportTransportOutcome, number>;
|
|
34
|
+
lastOutcome?: ReportTransportOutcome;
|
|
35
|
+
lastHttpStatus?: number;
|
|
36
|
+
}
|
|
37
|
+
interface ReportDeliveryStatus {
|
|
38
|
+
schemaVersion: 1;
|
|
39
|
+
status: 'active' | 'not-started' | 'disabled' | 'not-mounted' | 'unsupported' | 'unavailable';
|
|
40
|
+
reason: ReportDeliveryReason;
|
|
41
|
+
scope: 'native-runtime-observations';
|
|
42
|
+
coverage: 'best-effort';
|
|
43
|
+
revision: number;
|
|
44
|
+
capture: {
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
paths: Record<ReportCapturePath, ReportCapturePathStatus>;
|
|
47
|
+
};
|
|
48
|
+
queue: ReportQueueStatus;
|
|
49
|
+
transport: Record<ReportTransportOrigin, ReportTransportStatus>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Local admission only: native acceptance is not delivery confirmation. */
|
|
53
|
+
type ErrorCapturePath = 'handled' | 'errorUtils' | 'rejection';
|
|
54
|
+
interface ErrorCaptureCounters {
|
|
55
|
+
attempted: number;
|
|
56
|
+
accepted: number;
|
|
57
|
+
duplicateSuppressed: number;
|
|
58
|
+
allowanceSuppressed: number;
|
|
59
|
+
bridgeUnavailable: number;
|
|
60
|
+
nativeRefused: number;
|
|
61
|
+
captureFailed: number;
|
|
62
|
+
reentrantSuppressed: number;
|
|
63
|
+
inactiveAborted: number;
|
|
64
|
+
legacyAttempted: number;
|
|
65
|
+
}
|
|
66
|
+
type ErrorCaptureOutcome = Exclude<keyof ErrorCaptureCounters, 'attempted'>;
|
|
67
|
+
interface ErrorCaptureStatus {
|
|
68
|
+
status: 'not-mounted' | 'disabled' | 'active' | 'unsupported';
|
|
69
|
+
reason: 'no-mount' | 'crash-reporting-disabled' | 'none' | 'platform';
|
|
70
|
+
scope: 'mounted-js-admission';
|
|
71
|
+
limits: {
|
|
72
|
+
handled: 10;
|
|
73
|
+
automatic: 10;
|
|
74
|
+
};
|
|
75
|
+
counters: Record<ErrorCapturePath, ErrorCaptureCounters>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type RejectionReason = 'none' | 'opt-in-required' | 'crash-reporting-disabled' | 'platform' | 'runtime' | 'promise-identity' | 'hook-shape' | 'hook-install' | 'hook-displaced' | 'no-mount';
|
|
79
|
+
interface PromiseRejectionCounters {
|
|
80
|
+
pending: number;
|
|
81
|
+
accepted: number;
|
|
82
|
+
cancelled: number;
|
|
83
|
+
capacityDropped: number;
|
|
84
|
+
sizeDropped: number;
|
|
85
|
+
expired: number;
|
|
86
|
+
duplicateSuppressed: number;
|
|
87
|
+
allowanceSuppressed: number;
|
|
88
|
+
nativeRefused: number;
|
|
89
|
+
captureFailed: number;
|
|
90
|
+
/** Pending observations released when another owner replaced the hooks. */
|
|
91
|
+
discarded: number;
|
|
92
|
+
}
|
|
93
|
+
interface PromiseRejectionStatus {
|
|
94
|
+
status: 'disabled' | 'unsupported' | 'observing' | 'displaced' | 'install-failed' | 'not-mounted';
|
|
95
|
+
reason: RejectionReason;
|
|
96
|
+
adapterId?: string;
|
|
97
|
+
previousCallbacksPresent: boolean;
|
|
98
|
+
counters: PromiseRejectionCounters;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type { ErrorCaptureStatus as E, PromiseRejectionStatus as P, ReportDeliveryStatus as R, ErrorCaptureCounters as a, ErrorCaptureOutcome as b, ErrorCapturePath as c, PromiseRejectionCounters as d, RejectionReason as e, ReportCaptureOutcome as f, ReportCapturePath as g, ReportCapturePathStatus as h, ReportDeliveryReason as i, ReportQueueOperation as j, ReportQueueStatus as k, ReportStorageFailure as l, ReportTransportOrigin as m, ReportTransportOutcome as n, ReportTransportStatus as o };
|
|
@@ -592,6 +592,11 @@ import EverframeReporterUI // tvOS slice present per Package.swift:12 (TV-03
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
/// Cached, content-free native delivery facts. Encoding failure is rejected by JS.
|
|
596
|
+
@objc public static func getReportDeliveryStatusJson() -> NSString {
|
|
597
|
+
((try? Everframe.shared.getReportDeliveryStatus().toJSON()) ?? "{}") as NSString
|
|
598
|
+
}
|
|
599
|
+
|
|
595
600
|
// MARK: - reportCrash (Task 13 — crash/error reporting spec 2026-07-18)
|
|
596
601
|
|
|
597
602
|
/// Crash/error reporting. Synchronous: the RN fatal path must finish
|
|
@@ -419,6 +419,10 @@ RCT_EXPORT_MODULE(Everframe)
|
|
|
419
419
|
[EverframeBridge setUser:dict];
|
|
420
420
|
}
|
|
421
421
|
|
|
422
|
+
- (NSString *)getReportDeliveryStatusJson {
|
|
423
|
+
return [EverframeBridge getReportDeliveryStatusJson];
|
|
424
|
+
}
|
|
425
|
+
|
|
422
426
|
// MARK: - reportCrash(crashJson) — Task 13 (spec 2026-07-18)
|
|
423
427
|
|
|
424
428
|
// Sync spec method: codegen emits a non-void, non-promise boolean-returning
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everframe/react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "React Native SDK for Everframe — AI-ready in-app bug reporting, bridging the native iOS and Android reporter to your RN app. Supports phone, Apple TV, and Android TV.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Scriptx, UAB",
|
|
@@ -42,13 +42,22 @@
|
|
|
42
42
|
},
|
|
43
43
|
"main": "./dist/index.js",
|
|
44
44
|
"module": "./dist/index.js",
|
|
45
|
+
"browser": "./dist/index.web.js",
|
|
45
46
|
"react-native": "./dist/index.js",
|
|
46
47
|
"types": "./dist/index.d.ts",
|
|
47
48
|
"exports": {
|
|
48
49
|
".": {
|
|
50
|
+
"browser": {
|
|
51
|
+
"types": "./dist/index.web.d.ts",
|
|
52
|
+
"default": "./dist/index.web.js"
|
|
53
|
+
},
|
|
49
54
|
"types": "./dist/index.d.ts",
|
|
50
55
|
"default": "./dist/index.js"
|
|
51
56
|
},
|
|
57
|
+
"./web": {
|
|
58
|
+
"types": "./dist/index.web.d.ts",
|
|
59
|
+
"default": "./dist/index.web.js"
|
|
60
|
+
},
|
|
52
61
|
"./integrations/console": {
|
|
53
62
|
"types": "./dist/integrations/console.d.ts",
|
|
54
63
|
"default": "./dist/integrations/console.js"
|
|
@@ -64,6 +73,11 @@
|
|
|
64
73
|
"./integrations/theoplayer": {
|
|
65
74
|
"types": "./dist/integrations/theoplayer.d.ts",
|
|
66
75
|
"default": "./dist/integrations/theoplayer.js"
|
|
76
|
+
},
|
|
77
|
+
"./integrations/react": {
|
|
78
|
+
"types": "./dist/integrations/react.d.ts",
|
|
79
|
+
"browser": null,
|
|
80
|
+
"default": "./dist/integrations/react.js"
|
|
67
81
|
}
|
|
68
82
|
},
|
|
69
83
|
"files": [
|
|
@@ -85,7 +99,8 @@
|
|
|
85
99
|
},
|
|
86
100
|
"dependencies": {
|
|
87
101
|
"bippy": "^0.5.39",
|
|
88
|
-
"zod": "^4.3.0"
|
|
102
|
+
"zod": "^4.3.0",
|
|
103
|
+
"@everframe/react": "^1.1.0"
|
|
89
104
|
},
|
|
90
105
|
"devDependencies": {
|
|
91
106
|
"@arethetypeswrong/cli": "^0.18.0",
|
|
@@ -97,8 +112,8 @@
|
|
|
97
112
|
"publint": "^0.3.0",
|
|
98
113
|
"tsup": "^8.0.0",
|
|
99
114
|
"vitest": "^4.0.0",
|
|
100
|
-
"@everframe/sdk-core": "0.
|
|
101
|
-
"@everframe/protocol": "0.
|
|
115
|
+
"@everframe/sdk-core": "0.5.0",
|
|
116
|
+
"@everframe/protocol": "0.6.0"
|
|
102
117
|
},
|
|
103
118
|
"codegenConfig": {
|
|
104
119
|
"name": "EverframeSpec",
|
package/src/NativeEverframe.ts
CHANGED
|
@@ -319,6 +319,9 @@ export interface Spec extends TurboModule {
|
|
|
319
319
|
*/
|
|
320
320
|
recordScreen(name: string, data?: UnsafeObject): void;
|
|
321
321
|
|
|
322
|
+
/** Additive diagnostic bridge: bounded JSON of cached native observations; no I/O. */
|
|
323
|
+
getReportDeliveryStatusJson(): string;
|
|
324
|
+
|
|
322
325
|
/**
|
|
323
326
|
* Crash/error reporting (spec 2026-07-18). SYNCHRONOUS by design (non-void
|
|
324
327
|
* return forces a sync TurboModule method): the fatal path must complete
|
package/dist/chunk-QRPINMCR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-XUSV3KOD.js";var n=class extends Error{static{r(this,"EverframeNotMountedError")}name="EverframeNotMountedError";constructor(o){super(o??"EverframeProvider is not mounted; wrap your app root.")}};var t=null;function a(e){t=e}r(a,"__setCurrentContext");function d(){return t}r(d,"__getCurrentContext");function p(){let e=t;return e?e.open():Promise.reject(new n("EverframeProvider not mounted; wrap your root with <EverframeProvider>."))}r(p,"open");function c(e){t?.setExtra(e)}r(c,"setExtra");function v(e){t?.addBreadcrumb(e)}r(v,"addBreadcrumb");function x(e,o){o!==void 0?t?.recordScreen(e,o):t?.recordScreen(e)}r(x,"recordScreen");function m(e){t?.setUser(e)}r(m,"setUser");function f(e,o){t?.captureException(e,o)}r(f,"captureException");export{n as a,a as b,d as c,p as d,c as e,v as f,x as g,m as h,f as i};
|