@everframe/react-native 1.2.0 → 1.2.1
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 +59 -30
- 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 +92 -92
- package/dist/index.js +14 -14
- 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-Bf5iLv8n.d.ts} +1 -3
- 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 +22 -7
- 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-Bf5iLv8n.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-Bf5iLv8n.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 = {
|
|
@@ -802,22 +727,85 @@ declare class EverframeNotMountedError extends Error {
|
|
|
802
727
|
readonly name = "EverframeNotMountedError";
|
|
803
728
|
constructor(message?: string);
|
|
804
729
|
}
|
|
730
|
+
/**
|
|
731
|
+
* Rejected by `open()` when the host turned the reporter off
|
|
732
|
+
* (`reporter: { disabled: true }`, a crash-only session). The session keeps
|
|
733
|
+
* this for its whole life, including after a companion bond upgrades it:
|
|
734
|
+
* reports then come through the companion, not through `open()`. Same name
|
|
735
|
+
* as the web SDK's error of the same purpose.
|
|
736
|
+
*/
|
|
737
|
+
declare class EverframeReporterDisabledError extends Error {
|
|
738
|
+
readonly name = "EverframeReporterDisabledError";
|
|
739
|
+
constructor(message?: string);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
declare const ErrorSeverity: z.ZodEnum<{
|
|
743
|
+
error: "error";
|
|
744
|
+
info: "info";
|
|
745
|
+
warning: "warning";
|
|
746
|
+
}>;
|
|
747
|
+
type ErrorSeverity = z.infer<typeof ErrorSeverity>;
|
|
748
|
+
|
|
749
|
+
/** Optional per-occurrence details captured with a handled exception. */
|
|
750
|
+
interface CaptureExceptionOptions {
|
|
751
|
+
severity?: ErrorSeverity;
|
|
752
|
+
context?: string;
|
|
753
|
+
metadata?: Record<string, unknown>;
|
|
754
|
+
}
|
|
755
|
+
interface DeviceMetadata {
|
|
756
|
+
os: string;
|
|
757
|
+
osVersion: string;
|
|
758
|
+
model?: string;
|
|
759
|
+
screenSize: {
|
|
760
|
+
width: number;
|
|
761
|
+
height: number;
|
|
762
|
+
};
|
|
763
|
+
pixelRatio: number;
|
|
764
|
+
locale: string;
|
|
765
|
+
timezone: string;
|
|
766
|
+
network?: string;
|
|
767
|
+
/**
|
|
768
|
+
* Raw User-Agent string from `navigator.userAgent`. Surfaced to triagers so
|
|
769
|
+
* they can disambiguate things our OS/version parser doesn't capture
|
|
770
|
+
* (browser engine + version, in-app webviews, bot signatures, accessibility
|
|
771
|
+
* UA overrides). Web SDK only — native SDKs leave this undefined.
|
|
772
|
+
*/
|
|
773
|
+
userAgent?: string;
|
|
774
|
+
}
|
|
775
|
+
interface ReportDraft {
|
|
776
|
+
title: string;
|
|
777
|
+
description: string;
|
|
778
|
+
excludedArtifacts: string[];
|
|
779
|
+
annotations: unknown[];
|
|
780
|
+
redactions: unknown[];
|
|
781
|
+
/** Host-supplied free-form metadata (from `setExtra`). Opaque string, ≤2000 chars. */
|
|
782
|
+
extra?: string;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* A host-supplied function that produces the next report's `extra` payload
|
|
786
|
+
* on demand. Registered via `setExtra(resolve)`; invoked once per report
|
|
787
|
+
* assembly (see `resolveClientExtra`), never at registration time.
|
|
788
|
+
*/
|
|
789
|
+
type ExtraResolver = () => string | Record<string, unknown>;
|
|
790
|
+
|
|
791
|
+
/** Protocol ceiling — `packages/protocol/src/envelope.ts`. */
|
|
792
|
+
declare const EXTRA_MAX_CHARS = 16384;
|
|
805
793
|
|
|
806
794
|
/** Shape exposed via `useEverframe()` and the top-level `open` re-export. */
|
|
807
795
|
interface EverframeContextValue {
|
|
808
|
-
/** Cached native delivery observations, independent of JS admission
|
|
809
|
-
getReportDeliveryStatus
|
|
810
|
-
/** Local admission only
|
|
811
|
-
getErrorCaptureStatus
|
|
812
|
-
|
|
813
|
-
getPromiseRejectionStatus?(): PromiseRejectionStatus;
|
|
796
|
+
/** Cached native delivery observations, independent of JS admission. */
|
|
797
|
+
getReportDeliveryStatus(): ReportDeliveryStatus;
|
|
798
|
+
/** Local admission only. */
|
|
799
|
+
getErrorCaptureStatus(): ErrorCaptureStatus;
|
|
800
|
+
getPromiseRejectionStatus(): PromiseRejectionStatus;
|
|
814
801
|
/** Capture a handled exception without opening the reporter. No-op outside the owning mount. */
|
|
815
802
|
captureException(error: unknown, options?: CaptureExceptionOptions): void;
|
|
816
803
|
/**
|
|
817
804
|
* Open the native reporter modal. Resolves with the user-facing outcome
|
|
818
805
|
* (`submitted` / `queued` / `cancelled`). Replaces the pre-0.3 nested
|
|
819
806
|
* `report.open()` — the `.report` namespace held only `.open` so flattening
|
|
820
|
-
* matches sdk-react.
|
|
807
|
+
* matches sdk-react. Rejects with `EverframeReporterDisabledError` when the
|
|
808
|
+
* config sets `reporter: { disabled: true }`.
|
|
821
809
|
*/
|
|
822
810
|
open(): Promise<ReporterResult>;
|
|
823
811
|
sensitive: {
|
|
@@ -963,7 +951,7 @@ declare function getReportDeliveryStatus(): ReportDeliveryStatus;
|
|
|
963
951
|
* review instruction, left as pre-existing behavior rather than folded in
|
|
964
952
|
* here.
|
|
965
953
|
*/
|
|
966
|
-
interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifierDisabled" | "crashReportingDisabled" | "companionBadgeEnabled" | "companionBadgePosition" | "shakeToReportEnabled" | "themeBackground" | "themeSurface" | "themeBorder" | "themeText" | "themeTextMuted" | "themeAccent" | "themeAccentForeground" | "themeDestructive" | "vitalsEnabled" | "vitalsSampleRate" | "vitalsCaptureSourceQuery" | "releaseHealthEnabled" | "releaseHealthLoadedBuildId" | "releaseHealthUserId" | "releaseHealthIncludeDebugBuilds"> {
|
|
954
|
+
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
955
|
/**
|
|
968
956
|
* Per-app SDK key (publishable, not secret). Required on the host-facing
|
|
969
957
|
* config — narrows the bridge `ConfigOpts.sdkKey?` to required so a missing
|
|
@@ -1081,6 +1069,21 @@ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifi
|
|
|
1081
1069
|
shakeToReport?: {
|
|
1082
1070
|
enabled?: boolean;
|
|
1083
1071
|
};
|
|
1072
|
+
/**
|
|
1073
|
+
* Crash-only session switch (spec 2026-10-12). CLIENT VETO only.
|
|
1074
|
+
* `disabled: true` turns off every on-device way to open the reporter
|
|
1075
|
+
* (shake, `open()`, which then rejects with
|
|
1076
|
+
* `EverframeReporterDisabledError`), keeps network bodies off and samples
|
|
1077
|
+
* session replay with the server's crash-only rate (default 0) instead of
|
|
1078
|
+
* the normal one. A companion bond upgrades the session: replay and bodies
|
|
1079
|
+
* then follow the normal server rules for the rest of the session, and
|
|
1080
|
+
* reports come through the companion. Crash and error capture are
|
|
1081
|
+
* unaffected. Flattened onto `ConfigOpts.reporterDisabled` by
|
|
1082
|
+
* `extractBridgeConfig`.
|
|
1083
|
+
*/
|
|
1084
|
+
reporter?: {
|
|
1085
|
+
disabled?: boolean;
|
|
1086
|
+
};
|
|
1084
1087
|
/**
|
|
1085
1088
|
* Inline reporter theme (reporter branding spec 2026-08-25, RN slice) —
|
|
1086
1089
|
* 8 optional `#rrggbb` role strings for the NATIVE report dialogs the RN
|
|
@@ -1120,11 +1123,8 @@ interface RuntimeConfig extends Omit<ConfigOpts, "sdkVersion" | "installIdentifi
|
|
|
1120
1123
|
captureSourceQuery?: boolean;
|
|
1121
1124
|
};
|
|
1122
1125
|
}
|
|
1123
|
-
/**
|
|
1124
|
-
|
|
1125
|
-
* deprecated `apiKey` (its name before 1.2).
|
|
1126
|
-
*/
|
|
1127
|
-
type EverframeProviderConfig = WithSdkKeyField<RuntimeConfig>;
|
|
1126
|
+
/** The provider config as a host passes it. */
|
|
1127
|
+
type EverframeProviderConfig = RuntimeConfig;
|
|
1128
1128
|
|
|
1129
1129
|
interface EverframeProviderProps {
|
|
1130
1130
|
config: EverframeProviderConfig;
|
|
@@ -1393,4 +1393,4 @@ declare namespace companion {
|
|
|
1393
1393
|
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
1394
|
}
|
|
1395
1395
|
|
|
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 };
|
|
1396
|
+
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 };
|