@everframe/react-native 1.2.0 → 1.3.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 +66 -37
- package/android/build.gradle.kts +1 -1
- package/android/src/main/java/dev/everframe/rn/EverframeModule.kt +37 -36
- package/android/src/main/java/dev/everframe/rn/ReporterBridge.kt +4 -13
- package/dist/NativeEverframe.d.ts +20 -5
- package/dist/chunk-MIWWEGLO.js +1 -0
- package/dist/chunk-UN3Q4UGZ.js +1 -0
- package/dist/index.d.ts +102 -100
- package/dist/index.js +23 -23
- package/dist/index.web.d.ts +2 -2
- package/dist/index.web.js +1 -1
- package/dist/integrations/console.js +1 -1
- package/dist/integrations/react-navigation.js +1 -1
- package/dist/integrations/react.js +1 -1
- package/dist/{promise-rejection-types-C-lxCdDl.d.ts → promise-rejection-types-CiyBTz7v.d.ts} +7 -9
- package/ios/Sources/EverframeBridge.swift +53 -14
- package/ios/Sources/EverframeEventEmitter.swift +3 -5
- package/ios/Sources/EverframeModule.mm +17 -16
- package/package.json +4 -4
- package/src/NativeEverframe.ts +29 -29
- package/src/codegen-types.ts +0 -1
- package/dist/chunk-ENPQ66EV.js +0 -1
- package/dist/chunk-POE5CSO5.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,87 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { EverframeUserSpec, ConfigOpts } from './NativeEverframe.js';
|
|
3
3
|
export { Rect, Spec } from './NativeEverframe.js';
|
|
4
|
-
import { z } from 'zod';
|
|
5
4
|
import { E as EverframeIntegration } from './types-D5e4kWaw.js';
|
|
6
|
-
import { R as ReportDeliveryStatus, E as ErrorCaptureStatus, P as PromiseRejectionStatus } from './promise-rejection-types-
|
|
7
|
-
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-
|
|
5
|
+
import { R as ReportDeliveryStatus, E as ErrorCaptureStatus, P as PromiseRejectionStatus } from './promise-rejection-types-CiyBTz7v.js';
|
|
6
|
+
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-CiyBTz7v.js';
|
|
7
|
+
import { z } from 'zod';
|
|
8
8
|
import { ViewProps, EventSubscription } from 'react-native';
|
|
9
9
|
|
|
10
|
-
declare const ErrorSeverity: z.ZodEnum<{
|
|
11
|
-
error: "error";
|
|
12
|
-
info: "info";
|
|
13
|
-
warning: "warning";
|
|
14
|
-
}>;
|
|
15
|
-
type ErrorSeverity = z.infer<typeof ErrorSeverity>;
|
|
16
|
-
|
|
17
|
-
/** Optional per-occurrence details captured with a handled exception. */
|
|
18
|
-
interface CaptureExceptionOptions {
|
|
19
|
-
severity?: ErrorSeverity;
|
|
20
|
-
context?: string;
|
|
21
|
-
metadata?: Record<string, unknown>;
|
|
22
|
-
}
|
|
23
|
-
interface DeviceMetadata {
|
|
24
|
-
os: string;
|
|
25
|
-
osVersion: string;
|
|
26
|
-
model?: string;
|
|
27
|
-
screenSize: {
|
|
28
|
-
width: number;
|
|
29
|
-
height: number;
|
|
30
|
-
};
|
|
31
|
-
pixelRatio: number;
|
|
32
|
-
locale: string;
|
|
33
|
-
timezone: string;
|
|
34
|
-
network?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Raw User-Agent string from `navigator.userAgent`. Surfaced to triagers so
|
|
37
|
-
* they can disambiguate things our OS/version parser doesn't capture
|
|
38
|
-
* (browser engine + version, in-app webviews, bot signatures, accessibility
|
|
39
|
-
* UA overrides). Web SDK only — native SDKs leave this undefined.
|
|
40
|
-
*/
|
|
41
|
-
userAgent?: string;
|
|
42
|
-
}
|
|
43
|
-
interface ReportDraft {
|
|
44
|
-
title: string;
|
|
45
|
-
description: string;
|
|
46
|
-
excludedArtifacts: string[];
|
|
47
|
-
annotations: unknown[];
|
|
48
|
-
redactions: unknown[];
|
|
49
|
-
/** Host-supplied free-form metadata (from `setExtra`). Opaque string, ≤2000 chars. */
|
|
50
|
-
extra?: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* The SDK key under its name, `sdkKey`, or under `apiKey`, its name before
|
|
54
|
-
* 1.2. `apiKey` is deprecated but still accepted, so a 1.1 config keeps
|
|
55
|
-
* working; `sdkKey` wins when both are set. Exactly one is required.
|
|
56
|
-
*/
|
|
57
|
-
type SdkKeyField = {
|
|
58
|
-
/**
|
|
59
|
-
* Per-app SDK key (`evf_live_…`; publishable, not secret). Every
|
|
60
|
-
* Everframe SDK names this field `sdkKey`. It is not the App ID (a UUID)
|
|
61
|
-
* that symbol and source-map uploads take.
|
|
62
|
-
*/
|
|
63
|
-
sdkKey: string;
|
|
64
|
-
/** @deprecated Renamed to `sdkKey`. Still accepted; `sdkKey` wins when both are set. */
|
|
65
|
-
apiKey?: string;
|
|
66
|
-
} | {
|
|
67
|
-
sdkKey?: undefined;
|
|
68
|
-
/** @deprecated Renamed to `sdkKey`. Still accepted. */
|
|
69
|
-
apiKey: string;
|
|
70
|
-
};
|
|
71
|
-
/** `C` as a host passes it: the SDK key as `sdkKey` or the deprecated `apiKey`. */
|
|
72
|
-
type WithSdkKeyField<C extends {
|
|
73
|
-
sdkKey: string;
|
|
74
|
-
}> = Omit<C, 'sdkKey'> & SdkKeyField;
|
|
75
|
-
/**
|
|
76
|
-
* A host-supplied function that produces the next report's `extra` payload
|
|
77
|
-
* on demand. Registered via `setExtra(resolve)`; invoked once per report
|
|
78
|
-
* assembly (see `resolveClientExtra`), never at registration time.
|
|
79
|
-
*/
|
|
80
|
-
type ExtraResolver = () => string | Record<string, unknown>;
|
|
81
|
-
|
|
82
|
-
/** Protocol ceiling — `packages/protocol/src/envelope.ts`. */
|
|
83
|
-
declare const EXTRA_MAX_CHARS = 16384;
|
|
84
|
-
|
|
85
10
|
type JsonScalar = string | number | boolean | null;
|
|
86
11
|
type JsonValue = JsonScalar | JsonValue[] | JsonObject;
|
|
87
12
|
type JsonObject = {
|
|
@@ -113,15 +38,17 @@ declare const ReportEnvelope: z.ZodObject<{
|
|
|
113
38
|
}>;
|
|
114
39
|
version: z.ZodString;
|
|
115
40
|
platform: z.ZodEnum<{
|
|
116
|
-
android: "android";
|
|
117
|
-
ios: "ios";
|
|
118
41
|
web: "web";
|
|
119
|
-
tvos: "tvos";
|
|
120
42
|
tizen: "tizen";
|
|
121
43
|
webos: "webos";
|
|
122
|
-
androidtv: "androidtv";
|
|
123
|
-
roku: "roku";
|
|
124
44
|
vega: "vega";
|
|
45
|
+
vidaa: "vidaa";
|
|
46
|
+
titanos: "titanos";
|
|
47
|
+
roku: "roku";
|
|
48
|
+
android: "android";
|
|
49
|
+
ios: "ios";
|
|
50
|
+
tvos: "tvos";
|
|
51
|
+
androidtv: "androidtv";
|
|
125
52
|
}>;
|
|
126
53
|
formFactor: z.ZodEnum<{
|
|
127
54
|
phone: "phone";
|
|
@@ -290,9 +217,9 @@ declare const ReportEnvelope: z.ZodObject<{
|
|
|
290
217
|
jsBundle: z.ZodOptional<z.ZodObject<{
|
|
291
218
|
engine: z.ZodLiteral<"hermes">;
|
|
292
219
|
platform: z.ZodEnum<{
|
|
220
|
+
vega: "vega";
|
|
293
221
|
android: "android";
|
|
294
222
|
ios: "ios";
|
|
295
|
-
vega: "vega";
|
|
296
223
|
}>;
|
|
297
224
|
buildId: z.ZodString;
|
|
298
225
|
bundleName: z.ZodString;
|
|
@@ -802,22 +729,85 @@ declare class EverframeNotMountedError extends Error {
|
|
|
802
729
|
readonly name = "EverframeNotMountedError";
|
|
803
730
|
constructor(message?: string);
|
|
804
731
|
}
|
|
732
|
+
/**
|
|
733
|
+
* Rejected by `open()` when the host turned the reporter off
|
|
734
|
+
* (`reporter: { disabled: true }`, a crash-only session). The session keeps
|
|
735
|
+
* this for its whole life, including after a companion bond upgrades it:
|
|
736
|
+
* reports then come through the companion, not through `open()`. Same name
|
|
737
|
+
* as the web SDK's error of the same purpose.
|
|
738
|
+
*/
|
|
739
|
+
declare class EverframeReporterDisabledError extends Error {
|
|
740
|
+
readonly name = "EverframeReporterDisabledError";
|
|
741
|
+
constructor(message?: string);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
declare const ErrorSeverity: z.ZodEnum<{
|
|
745
|
+
error: "error";
|
|
746
|
+
info: "info";
|
|
747
|
+
warning: "warning";
|
|
748
|
+
}>;
|
|
749
|
+
type ErrorSeverity = z.infer<typeof ErrorSeverity>;
|
|
750
|
+
|
|
751
|
+
/** Optional per-occurrence details captured with a handled exception. */
|
|
752
|
+
interface CaptureExceptionOptions {
|
|
753
|
+
severity?: ErrorSeverity;
|
|
754
|
+
context?: string;
|
|
755
|
+
metadata?: Record<string, unknown>;
|
|
756
|
+
}
|
|
757
|
+
interface DeviceMetadata {
|
|
758
|
+
os: string;
|
|
759
|
+
osVersion: string;
|
|
760
|
+
model?: string;
|
|
761
|
+
screenSize: {
|
|
762
|
+
width: number;
|
|
763
|
+
height: number;
|
|
764
|
+
};
|
|
765
|
+
pixelRatio: number;
|
|
766
|
+
locale: string;
|
|
767
|
+
timezone: string;
|
|
768
|
+
network?: string;
|
|
769
|
+
/**
|
|
770
|
+
* Raw User-Agent string from `navigator.userAgent`. Surfaced to triagers so
|
|
771
|
+
* they can disambiguate things our OS/version parser doesn't capture
|
|
772
|
+
* (browser engine + version, in-app webviews, bot signatures, accessibility
|
|
773
|
+
* UA overrides). Web SDK only — native SDKs leave this undefined.
|
|
774
|
+
*/
|
|
775
|
+
userAgent?: string;
|
|
776
|
+
}
|
|
777
|
+
interface ReportDraft {
|
|
778
|
+
title: string;
|
|
779
|
+
description: string;
|
|
780
|
+
excludedArtifacts: string[];
|
|
781
|
+
annotations: unknown[];
|
|
782
|
+
redactions: unknown[];
|
|
783
|
+
/** Host-supplied free-form metadata (from `setExtra`). Opaque string, ≤2000 chars. */
|
|
784
|
+
extra?: string;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* A host-supplied function that produces the next report's `extra` payload
|
|
788
|
+
* on demand. Registered via `setExtra(resolve)`; invoked once per report
|
|
789
|
+
* assembly (see `resolveClientExtra`), never at registration time.
|
|
790
|
+
*/
|
|
791
|
+
type ExtraResolver = () => string | Record<string, unknown>;
|
|
792
|
+
|
|
793
|
+
/** Protocol ceiling — `packages/protocol/src/envelope.ts`. */
|
|
794
|
+
declare const EXTRA_MAX_CHARS = 16384;
|
|
805
795
|
|
|
806
796
|
/** Shape exposed via `useEverframe()` and the top-level `open` re-export. */
|
|
807
797
|
interface EverframeContextValue {
|
|
808
|
-
/** Cached native delivery observations, independent of JS admission
|
|
809
|
-
getReportDeliveryStatus
|
|
810
|
-
/** Local admission only
|
|
811
|
-
getErrorCaptureStatus
|
|
812
|
-
|
|
813
|
-
getPromiseRejectionStatus?(): PromiseRejectionStatus;
|
|
798
|
+
/** Cached native delivery observations, independent of JS admission. */
|
|
799
|
+
getReportDeliveryStatus(): ReportDeliveryStatus;
|
|
800
|
+
/** Local admission only. */
|
|
801
|
+
getErrorCaptureStatus(): ErrorCaptureStatus;
|
|
802
|
+
getPromiseRejectionStatus(): PromiseRejectionStatus;
|
|
814
803
|
/** Capture a handled exception without opening the reporter. No-op outside the owning mount. */
|
|
815
804
|
captureException(error: unknown, options?: CaptureExceptionOptions): void;
|
|
816
805
|
/**
|
|
817
806
|
* Open the native reporter modal. Resolves with the user-facing outcome
|
|
818
807
|
* (`submitted` / `queued` / `cancelled`). Replaces the pre-0.3 nested
|
|
819
808
|
* `report.open()` — the `.report` namespace held only `.open` so flattening
|
|
820
|
-
* matches sdk-react.
|
|
809
|
+
* matches sdk-react. Rejects with `EverframeReporterDisabledError` when the
|
|
810
|
+
* config sets `reporter: { disabled: true }`.
|
|
821
811
|
*/
|
|
822
812
|
open(): Promise<ReporterResult>;
|
|
823
813
|
sensitive: {
|
|
@@ -963,7 +953,7 @@ declare function getReportDeliveryStatus(): ReportDeliveryStatus;
|
|
|
963
953
|
* review instruction, left as pre-existing behavior rather than folded in
|
|
964
954
|
* here.
|
|
965
955
|
*/
|
|
966
|
-
interface RuntimeConfig extends Omit<ConfigOpts,
|
|
956
|
+
interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'installIdentifierDisabled' | 'crashReportingDisabled' | 'companionBadgeEnabled' | 'companionBadgePosition' | 'shakeToReportEnabled' | 'reporterDisabled' | 'themeBackground' | 'themeSurface' | 'themeBorder' | 'themeText' | 'themeTextMuted' | 'themeAccent' | 'themeAccentForeground' | 'themeDestructive' | 'vitalsEnabled' | 'vitalsSampleRate' | 'vitalsCaptureSourceQuery' | 'releaseHealthEnabled' | 'releaseHealthLoadedBuildId' | 'releaseHealthUserId' | 'releaseHealthIncludeDebugBuilds'> {
|
|
967
957
|
/**
|
|
968
958
|
* Per-app SDK key (publishable, not secret). Required on the host-facing
|
|
969
959
|
* config — narrows the bridge `ConfigOpts.sdkKey?` to required so a missing
|
|
@@ -1056,7 +1046,7 @@ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifi
|
|
|
1056
1046
|
* it through unchanged — the union is a subtype of `string`, so no
|
|
1057
1047
|
* conversion is needed, same as `captureScreenshot` above.
|
|
1058
1048
|
*/
|
|
1059
|
-
attachPinUi?:
|
|
1049
|
+
attachPinUi?: 'builtin' | 'custom' | 'off';
|
|
1060
1050
|
/**
|
|
1061
1051
|
* Companion on-screen name-badge visibility/position (naming spec
|
|
1062
1052
|
* 2026-08-24, controller ruling / Task 6b) — lets a host that finds the
|
|
@@ -1071,7 +1061,7 @@ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifi
|
|
|
1071
1061
|
*/
|
|
1072
1062
|
companionBadge?: {
|
|
1073
1063
|
enabled?: boolean;
|
|
1074
|
-
position?:
|
|
1064
|
+
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
1075
1065
|
};
|
|
1076
1066
|
/**
|
|
1077
1067
|
* Native mobile shake gesture. Enabled by default; the dashboard remains
|
|
@@ -1081,6 +1071,21 @@ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifi
|
|
|
1081
1071
|
shakeToReport?: {
|
|
1082
1072
|
enabled?: boolean;
|
|
1083
1073
|
};
|
|
1074
|
+
/**
|
|
1075
|
+
* Crash-only session switch (spec 2026-10-12). CLIENT VETO only.
|
|
1076
|
+
* `disabled: true` turns off every on-device way to open the reporter
|
|
1077
|
+
* (shake, `open()`, which then rejects with
|
|
1078
|
+
* `EverframeReporterDisabledError`), keeps network bodies off and samples
|
|
1079
|
+
* session replay with the server's crash-only rate (default 0) instead of
|
|
1080
|
+
* the normal one. A companion bond upgrades the session: replay and bodies
|
|
1081
|
+
* then follow the normal server rules for the rest of the session, and
|
|
1082
|
+
* reports come through the companion. Crash and error capture are
|
|
1083
|
+
* unaffected. Flattened onto `ConfigOpts.reporterDisabled` by
|
|
1084
|
+
* `extractBridgeConfig`.
|
|
1085
|
+
*/
|
|
1086
|
+
reporter?: {
|
|
1087
|
+
disabled?: boolean;
|
|
1088
|
+
};
|
|
1084
1089
|
/**
|
|
1085
1090
|
* Inline reporter theme (reporter branding spec 2026-08-25, RN slice) —
|
|
1086
1091
|
* 8 optional `#rrggbb` role strings for the NATIVE report dialogs the RN
|
|
@@ -1120,11 +1125,8 @@ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifi
|
|
|
1120
1125
|
captureSourceQuery?: boolean;
|
|
1121
1126
|
};
|
|
1122
1127
|
}
|
|
1123
|
-
/**
|
|
1124
|
-
|
|
1125
|
-
* deprecated `apiKey` (its name before 1.2).
|
|
1126
|
-
*/
|
|
1127
|
-
type EverframeProviderConfig = WithSdkKeyField<RuntimeConfig>;
|
|
1128
|
+
/** The provider config as a host passes it. */
|
|
1129
|
+
type EverframeProviderConfig = RuntimeConfig;
|
|
1128
1130
|
|
|
1129
1131
|
interface EverframeProviderProps {
|
|
1130
1132
|
config: EverframeProviderConfig;
|
|
@@ -1393,4 +1395,4 @@ declare namespace companion {
|
|
|
1393
1395
|
export { type companion_CompanionAttachChallenge as CompanionAttachChallenge, type companion_CompanionState as CompanionState, companion_getEmitter as getEmitter, companion_onAttachChallenge as onAttachChallenge, companion_onAttachedUserName as onAttachedUserName, companion_onCode as onCode, companion_onPairUrl as onPairUrl, companion_onResolvedName as onResolvedName, companion_onRunning as onRunning, companion_onState as onState, companion_start as start, companion_stop as stop, companion_useCompanion as useCompanion };
|
|
1394
1396
|
}
|
|
1395
1397
|
|
|
1396
|
-
export { AttachmentRef, type CaptureExceptionOptions, type CompanionState, ConfigOpts, type DeviceMetadata, EXTRA_MAX_CHARS, ErrorCaptureStatus, type EverframeContextValue, EverframeIntegration, EverframeNotMountedError, EverframeProvider, type EverframeProviderProps, EverframeScreen, type EverframeScreenProps, EverframeSensitive, EverframeUserSpec, type HostPlayerEventType, type PlayerHandle, type PlayerStats, PromiseRejectionStatus, ReportDeliveryStatus, type ReportDraft, ReportEnvelope, type ReporterResult, EverframeSensitive as Sensitive, type TrackPlayerOptions, UINode, UITree, VitalsPlayerEventType, addBreadcrumb, captureException, companion, getErrorCaptureStatus, getPromiseRejectionStatus, getReportDeliveryStatus, open, recordScreen, setExtra, setUser, trackPlayer, trackVitals, useCompanion, useEverframe, useEverframeScreen, useEverframeSensitiveRef, useTrackPlayer };
|
|
1398
|
+
export { AttachmentRef, type CaptureExceptionOptions, type CompanionState, ConfigOpts, type DeviceMetadata, EXTRA_MAX_CHARS, ErrorCaptureStatus, type EverframeContextValue, EverframeIntegration, EverframeNotMountedError, EverframeProvider, type EverframeProviderProps, EverframeReporterDisabledError, EverframeScreen, type EverframeScreenProps, EverframeSensitive, EverframeUserSpec, type HostPlayerEventType, type PlayerHandle, type PlayerStats, PromiseRejectionStatus, ReportDeliveryStatus, type ReportDraft, ReportEnvelope, type ReporterResult, EverframeSensitive as Sensitive, type TrackPlayerOptions, UINode, UITree, VitalsPlayerEventType, addBreadcrumb, captureException, companion, getErrorCaptureStatus, getPromiseRejectionStatus, getReportDeliveryStatus, open, recordScreen, setExtra, setUser, trackPlayer, trackVitals, useCompanion, useEverframe, useEverframeScreen, useEverframeSensitiveRef, useTrackPlayer };
|