@ansight/react-native 1.4.0-preview.5 → 1.4.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/README.md
CHANGED
|
@@ -80,8 +80,8 @@ bundle; its API requires the native Ansight module.
|
|
|
80
80
|
|
|
81
81
|
This package version expects matching native SDK packages:
|
|
82
82
|
|
|
83
|
-
- CocoaPods: `Ansight`, `AnsightObjC` version `1.4.0
|
|
84
|
-
- Maven: `ai.ansight:ansight-android:1.4.0
|
|
83
|
+
- CocoaPods: `Ansight`, `AnsightObjC` version `1.4.0`
|
|
84
|
+
- Maven: `ai.ansight:ansight-android:1.4.0`
|
|
85
85
|
|
|
86
86
|
## Quickstart
|
|
87
87
|
|
|
@@ -144,9 +144,9 @@ where reconnects should only happen after an explicit app action.
|
|
|
144
144
|
> max-width settings, and disable `sessionJpegCapture` for performance-focused
|
|
145
145
|
> runs unless visual evidence is required.
|
|
146
146
|
|
|
147
|
-
For simulator/emulator sessions,
|
|
147
|
+
For simulator/emulator sessions, host can acknowledge the native
|
|
148
148
|
`device.profile` with host screenshot mode. The native SDK then suspends
|
|
149
|
-
periodic in-app JPEG capture for that session so
|
|
149
|
+
periodic in-app JPEG capture for that session so host can use a host-side
|
|
150
150
|
source such as `simctl` or `adb`.
|
|
151
151
|
|
|
152
152
|
## Options
|
|
@@ -156,7 +156,7 @@ The TypeScript `AnsightOptions` surface mirrors Android `AnsightOptions`, iOS
|
|
|
156
156
|
|
|
157
157
|
| Option | Purpose |
|
|
158
158
|
| --- | --- |
|
|
159
|
-
| `useNativeAllInOneDefaults` | Applies native iOS/Android all-in-one defaults when true. Defaults to false. This enables the native visual-tree/screenshot tools required by
|
|
159
|
+
| `useNativeAllInOneDefaults` | Applies native iOS/Android all-in-one defaults when true. Defaults to false. This enables the native visual-tree/screenshot tools required by host visual tree inspection unless `remoteTools.visualTree` is explicitly false. Configure `toolGuard`, capture options, and `hostConnection` separately. |
|
|
160
160
|
| `clientName` | Default client name for host auto-probe and connections. |
|
|
161
161
|
| `sampleFrequencyMilliseconds` | Built-in telemetry sampling interval. |
|
|
162
162
|
| `retentionPeriodSeconds` | Local metric/event retention window. |
|
|
@@ -273,7 +273,7 @@ app-side policy for inspection or testing.
|
|
|
273
273
|
|
|
274
274
|
## Native Tool Options
|
|
275
275
|
|
|
276
|
-
`remoteTools` configures the native tool suites registered by the bridge. `useNativeAllInOneDefaults: true` enables visual tree tools by default so
|
|
276
|
+
`remoteTools` configures the native tool suites registered by the bridge. `useNativeAllInOneDefaults: true` enables visual tree tools by default so host can pair `ui.get_visual_tree` data with `ui.get_screenshot` frames. Apps that do not use all-in-one defaults can opt in explicitly:
|
|
277
277
|
|
|
278
278
|
```ts
|
|
279
279
|
await Ansight.initializeAndActivate(
|
|
@@ -472,7 +472,7 @@ locale; if the app selects a different language through an i18n library, set
|
|
|
472
472
|
|
|
473
473
|
## JavaScript Tools
|
|
474
474
|
|
|
475
|
-
Custom JavaScript tools can be exposed to Ansight
|
|
475
|
+
Custom JavaScript tools can be exposed to Ansight host:
|
|
476
476
|
|
|
477
477
|
```ts
|
|
478
478
|
const registration = Ansight.registerTool(
|
|
@@ -547,7 +547,7 @@ await reportProvider.ready;
|
|
|
547
547
|
The first provider installs the `read` policy `artifacts.query` and
|
|
548
548
|
`artifacts.request` JavaScript tools in the native registry. A provider can
|
|
549
549
|
return text, base64, byte arrays, `ArrayBuffer`, or `Uint8Array`. Artifact
|
|
550
|
-
requests require a live
|
|
550
|
+
requests require a live host tool call; the bridge forwards the returned
|
|
551
551
|
bytes through the native binary-transfer channel. Call
|
|
552
552
|
`reportProvider.unregister()` during teardown or hot-reload cleanup.
|
|
553
553
|
|
|
@@ -670,5 +670,5 @@ The current-Expo validation app lives in:
|
|
|
670
670
|
|
|
671
671
|
It is pinned to Expo SDK 57 and React Native 0.86 with the New Architecture and
|
|
672
672
|
Hermes enabled. It validates Expo CNG/autolinking, the bundled config plugin,
|
|
673
|
-
Android and iOS native builds, and the same live
|
|
673
|
+
Android and iOS native builds, and the same live host feature surface as the
|
|
674
674
|
baseline harness.
|
package/android/build.gradle
CHANGED
|
@@ -67,6 +67,6 @@ repositories {
|
|
|
67
67
|
dependencies {
|
|
68
68
|
implementation("com.facebook.react:react-android")
|
|
69
69
|
def ansightAndroidVersion =
|
|
70
|
-
findProperty("ansightAndroidVersion") ?: "1.4.0
|
|
71
|
-
implementation("ai.ansight:ansight-android:1.4.0
|
|
70
|
+
findProperty("ansightAndroidVersion") ?: "1.4.0"
|
|
71
|
+
implementation("ai.ansight:ansight-android:1.4.0")
|
|
72
72
|
}
|
|
@@ -894,7 +894,7 @@ class AnsightReactNativeModule(
|
|
|
894
894
|
val crash = map.getMapOrNull("crashCapture")
|
|
895
895
|
AnsightCrashCaptureOptions(
|
|
896
896
|
enabled = crash.booleanValue("enabled", true),
|
|
897
|
-
|
|
897
|
+
hostHandoffEnabled = crash.booleanValue("hostHandoffEnabled", true),
|
|
898
898
|
offlineCaptureAttachmentEnabled = crash.booleanValue("offlineCaptureAttachmentEnabled", true),
|
|
899
899
|
maximumPendingReports = crash.intValue("maximumPendingReports", 8),
|
|
900
900
|
retentionDays = crash.intValue("retentionDays", 7),
|
package/expo-plugin.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const DEFAULT_CAMERA_PERMISSION =
|
|
4
|
-
"Allow $(PRODUCT_NAME) to use the camera to scan an Ansight
|
|
4
|
+
"Allow $(PRODUCT_NAME) to use the camera to scan an Ansight host enrollment QR code.";
|
|
5
5
|
const DEFAULT_LOCAL_NETWORK_PERMISSION =
|
|
6
|
-
"Allow $(PRODUCT_NAME) to connect to Ansight
|
|
6
|
+
"Allow $(PRODUCT_NAME) to connect to Ansight host on your local network during development.";
|
|
7
7
|
|
|
8
8
|
function withAnsightReactNative(config, options = {}) {
|
|
9
9
|
const { withInfoPlist } = loadExpoConfigPlugins();
|
package/index.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ export interface AnsightOptions {
|
|
|
217
217
|
|
|
218
218
|
export interface AnsightCrashCaptureOptions {
|
|
219
219
|
enabled?: boolean;
|
|
220
|
-
|
|
220
|
+
hostHandoffEnabled?: boolean;
|
|
221
221
|
offlineCaptureAttachmentEnabled?: boolean;
|
|
222
222
|
maximumPendingReports?: number;
|
|
223
223
|
retentionDays?: number;
|
|
@@ -617,7 +617,7 @@ export function screenViewed(name: string, details?: Record<string, string>): Pr
|
|
|
617
617
|
export function trackRoute(name: string, details?: Record<string, string>): Promise<AnsightDebugSnapshot>;
|
|
618
618
|
export function setAppLifecycleState(state: AnsightLifecycleState): Promise<AnsightDebugSnapshot>;
|
|
619
619
|
export function connect(pairingPayload?: string | object | null, options?: AnsightConnectOptions): Promise<AnsightHostConnectionResult>;
|
|
620
|
-
/** Scans a one-use
|
|
620
|
+
/** Scans a one-use host invite, registers this installation, and saves automatic reconnect state. */
|
|
621
621
|
export function enrollFromQrCode(options?: AnsightScanPairingOptions): Promise<AnsightHostConnectionResult>;
|
|
622
622
|
export function scanPairingQrCode(options?: AnsightScanPairingOptions): Promise<AnsightHostConnectionResult>;
|
|
623
623
|
export function openSession(pairingPayload: string | object, options?: AnsightOpenSessionOptions): Promise<AnsightHostConnectionResult>;
|
|
@@ -1093,7 +1093,7 @@ final class AnsightReactNative: RCTEventEmitter {
|
|
|
1093
1093
|
} else if let crash = raw as? NSDictionary {
|
|
1094
1094
|
options.crashCapture = AnsightCrashCaptureOptions(
|
|
1095
1095
|
enabled: boolValue(crash, "enabled", defaultValue: true),
|
|
1096
|
-
|
|
1096
|
+
hostHandoffEnabled: boolValue(crash, "hostHandoffEnabled", defaultValue: true),
|
|
1097
1097
|
offlineCaptureAttachmentEnabled: boolValue(crash, "offlineCaptureAttachmentEnabled", defaultValue: true),
|
|
1098
1098
|
maximumPendingReports: intValue(crash, "maximumPendingReports", defaultValue: 8),
|
|
1099
1099
|
retentionDays: intValue(crash, "retentionDays", defaultValue: 7),
|