execbro 0.0.1-reserve → 1.10.13
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/LICENSE +32 -0
- package/README.md +496 -0
- package/build/__tests__/helpers/fake-cdp-server.d.ts +56 -0
- package/build/__tests__/helpers/fake-cdp-server.d.ts.map +1 -0
- package/build/__tests__/helpers/fake-cdp-server.js +120 -0
- package/build/__tests__/helpers/fake-cdp-server.js.map +1 -0
- package/build/__tests__/helpers/tap-test-helpers.d.ts +36 -0
- package/build/__tests__/helpers/tap-test-helpers.d.ts.map +1 -0
- package/build/__tests__/helpers/tap-test-helpers.js +130 -0
- package/build/__tests__/helpers/tap-test-helpers.js.map +1 -0
- package/build/__tests__/integration/auto-reconnect.test.d.ts +2 -0
- package/build/__tests__/integration/auto-reconnect.test.d.ts.map +1 -0
- package/build/__tests__/integration/auto-reconnect.test.js +118 -0
- package/build/__tests__/integration/auto-reconnect.test.js.map +1 -0
- package/build/__tests__/integration/connection-health.test.d.ts +2 -0
- package/build/__tests__/integration/connection-health.test.d.ts.map +1 -0
- package/build/__tests__/integration/connection-health.test.js +157 -0
- package/build/__tests__/integration/connection-health.test.js.map +1 -0
- package/build/__tests__/integration/execute-in-app.test.d.ts +2 -0
- package/build/__tests__/integration/execute-in-app.test.d.ts.map +1 -0
- package/build/__tests__/integration/execute-in-app.test.js +124 -0
- package/build/__tests__/integration/execute-in-app.test.js.map +1 -0
- package/build/__tests__/integration/per-call-timeout.test.d.ts +2 -0
- package/build/__tests__/integration/per-call-timeout.test.d.ts.map +1 -0
- package/build/__tests__/integration/per-call-timeout.test.js +103 -0
- package/build/__tests__/integration/per-call-timeout.test.js.map +1 -0
- package/build/__tests__/integration/tap-strategies.test.d.ts +2 -0
- package/build/__tests__/integration/tap-strategies.test.d.ts.map +1 -0
- package/build/__tests__/integration/tap-strategies.test.js +330 -0
- package/build/__tests__/integration/tap-strategies.test.js.map +1 -0
- package/build/__tests__/integration/tools.test.d.ts +2 -0
- package/build/__tests__/integration/tools.test.d.ts.map +1 -0
- package/build/__tests__/integration/tools.test.js +227 -0
- package/build/__tests__/integration/tools.test.js.map +1 -0
- package/build/__tests__/setup.d.ts +2 -0
- package/build/__tests__/setup.d.ts.map +1 -0
- package/build/__tests__/setup.js +15 -0
- package/build/__tests__/setup.js.map +1 -0
- package/build/__tests__/unit/androidEmulatorAvds.test.d.ts +2 -0
- package/build/__tests__/unit/androidEmulatorAvds.test.d.ts.map +1 -0
- package/build/__tests__/unit/androidEmulatorAvds.test.js +98 -0
- package/build/__tests__/unit/androidEmulatorAvds.test.js.map +1 -0
- package/build/__tests__/unit/buildToken.test.d.ts +2 -0
- package/build/__tests__/unit/buildToken.test.d.ts.map +1 -0
- package/build/__tests__/unit/buildToken.test.js +22 -0
- package/build/__tests__/unit/buildToken.test.js.map +1 -0
- package/build/__tests__/unit/bundle.test.d.ts +2 -0
- package/build/__tests__/unit/bundle.test.d.ts.map +1 -0
- package/build/__tests__/unit/bundle.test.js +53 -0
- package/build/__tests__/unit/bundle.test.js.map +1 -0
- package/build/__tests__/unit/burst.test.d.ts +2 -0
- package/build/__tests__/unit/burst.test.d.ts.map +1 -0
- package/build/__tests__/unit/burst.test.js +54 -0
- package/build/__tests__/unit/burst.test.js.map +1 -0
- package/build/__tests__/unit/connection-health.test.d.ts +2 -0
- package/build/__tests__/unit/connection-health.test.d.ts.map +1 -0
- package/build/__tests__/unit/connection-health.test.js +38 -0
- package/build/__tests__/unit/connection-health.test.js.map +1 -0
- package/build/__tests__/unit/debugGlobals.test.d.ts +2 -0
- package/build/__tests__/unit/debugGlobals.test.d.ts.map +1 -0
- package/build/__tests__/unit/debugGlobals.test.js +14 -0
- package/build/__tests__/unit/debugGlobals.test.js.map +1 -0
- package/build/__tests__/unit/deviceDiscovery.test.d.ts +2 -0
- package/build/__tests__/unit/deviceDiscovery.test.d.ts.map +1 -0
- package/build/__tests__/unit/deviceDiscovery.test.js +119 -0
- package/build/__tests__/unit/deviceDiscovery.test.js.map +1 -0
- package/build/__tests__/unit/deviceResolver.test.d.ts +2 -0
- package/build/__tests__/unit/deviceResolver.test.d.ts.map +1 -0
- package/build/__tests__/unit/deviceResolver.test.js +261 -0
- package/build/__tests__/unit/deviceResolver.test.js.map +1 -0
- package/build/__tests__/unit/escapeNonAscii.test.d.ts +2 -0
- package/build/__tests__/unit/escapeNonAscii.test.d.ts.map +1 -0
- package/build/__tests__/unit/escapeNonAscii.test.js +76 -0
- package/build/__tests__/unit/escapeNonAscii.test.js.map +1 -0
- package/build/__tests__/unit/exec.test.d.ts +2 -0
- package/build/__tests__/unit/exec.test.d.ts.map +1 -0
- package/build/__tests__/unit/exec.test.js +54 -0
- package/build/__tests__/unit/exec.test.js.map +1 -0
- package/build/__tests__/unit/executor.test.d.ts +2 -0
- package/build/__tests__/unit/executor.test.d.ts.map +1 -0
- package/build/__tests__/unit/executor.test.js +220 -0
- package/build/__tests__/unit/executor.test.js.map +1 -0
- package/build/__tests__/unit/failureArtifact.test.d.ts +2 -0
- package/build/__tests__/unit/failureArtifact.test.d.ts.map +1 -0
- package/build/__tests__/unit/failureArtifact.test.js +207 -0
- package/build/__tests__/unit/failureArtifact.test.js.map +1 -0
- package/build/__tests__/unit/fastRefreshRecorder.test.d.ts +2 -0
- package/build/__tests__/unit/fastRefreshRecorder.test.d.ts.map +1 -0
- package/build/__tests__/unit/fastRefreshRecorder.test.js +68 -0
- package/build/__tests__/unit/fastRefreshRecorder.test.js.map +1 -0
- package/build/__tests__/unit/fastRefreshTools.test.d.ts +2 -0
- package/build/__tests__/unit/fastRefreshTools.test.d.ts.map +1 -0
- package/build/__tests__/unit/fastRefreshTools.test.js +112 -0
- package/build/__tests__/unit/fastRefreshTools.test.js.map +1 -0
- package/build/__tests__/unit/fiberMatch.test.d.ts +2 -0
- package/build/__tests__/unit/fiberMatch.test.d.ts.map +1 -0
- package/build/__tests__/unit/fiberMatch.test.js +114 -0
- package/build/__tests__/unit/fiberMatch.test.js.map +1 -0
- package/build/__tests__/unit/fingerprint.test.d.ts +2 -0
- package/build/__tests__/unit/fingerprint.test.d.ts.map +1 -0
- package/build/__tests__/unit/fingerprint.test.js +99 -0
- package/build/__tests__/unit/fingerprint.test.js.map +1 -0
- package/build/__tests__/unit/focusedInput.test.d.ts +2 -0
- package/build/__tests__/unit/focusedInput.test.d.ts.map +1 -0
- package/build/__tests__/unit/focusedInput.test.js +58 -0
- package/build/__tests__/unit/focusedInput.test.js.map +1 -0
- package/build/__tests__/unit/focusedInputTools.test.d.ts +2 -0
- package/build/__tests__/unit/focusedInputTools.test.d.ts.map +1 -0
- package/build/__tests__/unit/focusedInputTools.test.js +79 -0
- package/build/__tests__/unit/focusedInputTools.test.js.map +1 -0
- package/build/__tests__/unit/iconSemantics.test.d.ts +2 -0
- package/build/__tests__/unit/iconSemantics.test.d.ts.map +1 -0
- package/build/__tests__/unit/iconSemantics.test.js +80 -0
- package/build/__tests__/unit/iconSemantics.test.js.map +1 -0
- package/build/__tests__/unit/imageBuffer.test.d.ts +2 -0
- package/build/__tests__/unit/imageBuffer.test.d.ts.map +1 -0
- package/build/__tests__/unit/imageBuffer.test.js +128 -0
- package/build/__tests__/unit/imageBuffer.test.js.map +1 -0
- package/build/__tests__/unit/logs.test.d.ts +2 -0
- package/build/__tests__/unit/logs.test.d.ts.map +1 -0
- package/build/__tests__/unit/logs.test.js +90 -0
- package/build/__tests__/unit/logs.test.js.map +1 -0
- package/build/__tests__/unit/measureComponent.test.d.ts +2 -0
- package/build/__tests__/unit/measureComponent.test.d.ts.map +1 -0
- package/build/__tests__/unit/measureComponent.test.js +66 -0
- package/build/__tests__/unit/measureComponent.test.js.map +1 -0
- package/build/__tests__/unit/measureComponentTools.test.d.ts +2 -0
- package/build/__tests__/unit/measureComponentTools.test.d.ts.map +1 -0
- package/build/__tests__/unit/measureComponentTools.test.js +94 -0
- package/build/__tests__/unit/measureComponentTools.test.js.map +1 -0
- package/build/__tests__/unit/metro.test.d.ts +2 -0
- package/build/__tests__/unit/metro.test.d.ts.map +1 -0
- package/build/__tests__/unit/metro.test.js +61 -0
- package/build/__tests__/unit/metro.test.js.map +1 -0
- package/build/__tests__/unit/network.test.d.ts +2 -0
- package/build/__tests__/unit/network.test.d.ts.map +1 -0
- package/build/__tests__/unit/network.test.js +102 -0
- package/build/__tests__/unit/network.test.js.map +1 -0
- package/build/__tests__/unit/networkInterceptor.test.d.ts +2 -0
- package/build/__tests__/unit/networkInterceptor.test.d.ts.map +1 -0
- package/build/__tests__/unit/networkInterceptor.test.js +104 -0
- package/build/__tests__/unit/networkInterceptor.test.js.map +1 -0
- package/build/__tests__/unit/probe.test.d.ts +2 -0
- package/build/__tests__/unit/probe.test.d.ts.map +1 -0
- package/build/__tests__/unit/probe.test.js +62 -0
- package/build/__tests__/unit/probe.test.js.map +1 -0
- package/build/__tests__/unit/rnGlobalsBootstrap.test.d.ts +2 -0
- package/build/__tests__/unit/rnGlobalsBootstrap.test.d.ts.map +1 -0
- package/build/__tests__/unit/rnGlobalsBootstrap.test.js +29 -0
- package/build/__tests__/unit/rnGlobalsBootstrap.test.js.map +1 -0
- package/build/__tests__/unit/screenState.test.d.ts +2 -0
- package/build/__tests__/unit/screenState.test.d.ts.map +1 -0
- package/build/__tests__/unit/screenState.test.js +384 -0
- package/build/__tests__/unit/screenState.test.js.map +1 -0
- package/build/__tests__/unit/screenshot-diff.test.d.ts +2 -0
- package/build/__tests__/unit/screenshot-diff.test.d.ts.map +1 -0
- package/build/__tests__/unit/screenshot-diff.test.js +97 -0
- package/build/__tests__/unit/screenshot-diff.test.js.map +1 -0
- package/build/__tests__/unit/tap-evidence.test.d.ts +2 -0
- package/build/__tests__/unit/tap-evidence.test.d.ts.map +1 -0
- package/build/__tests__/unit/tap-evidence.test.js +89 -0
- package/build/__tests__/unit/tap-evidence.test.js.map +1 -0
- package/build/__tests__/unit/tap.test.d.ts +2 -0
- package/build/__tests__/unit/tap.test.d.ts.map +1 -0
- package/build/__tests__/unit/tap.test.js +767 -0
- package/build/__tests__/unit/tap.test.js.map +1 -0
- package/build/__tests__/unit/timeoutClamp.test.d.ts +2 -0
- package/build/__tests__/unit/timeoutClamp.test.d.ts.map +1 -0
- package/build/__tests__/unit/timeoutClamp.test.js +17 -0
- package/build/__tests__/unit/timeoutClamp.test.js.map +1 -0
- package/build/__tests__/unit/toolDescriptions.test.d.ts +2 -0
- package/build/__tests__/unit/toolDescriptions.test.d.ts.map +1 -0
- package/build/__tests__/unit/toolDescriptions.test.js +145 -0
- package/build/__tests__/unit/toolDescriptions.test.js.map +1 -0
- package/build/__tests__/unit/transportClassify.test.d.ts +2 -0
- package/build/__tests__/unit/transportClassify.test.d.ts.map +1 -0
- package/build/__tests__/unit/transportClassify.test.js +60 -0
- package/build/__tests__/unit/transportClassify.test.js.map +1 -0
- package/build/__tests__/unit/verifyAction.test.d.ts +2 -0
- package/build/__tests__/unit/verifyAction.test.d.ts.map +1 -0
- package/build/__tests__/unit/verifyAction.test.js +26 -0
- package/build/__tests__/unit/verifyAction.test.js.map +1 -0
- package/build/core/android.d.ts +299 -0
- package/build/core/android.d.ts.map +1 -0
- package/build/core/android.js +1582 -0
- package/build/core/android.js.map +1 -0
- package/build/core/appDetection.d.ts +20 -0
- package/build/core/appDetection.d.ts.map +1 -0
- package/build/core/appDetection.js +167 -0
- package/build/core/appDetection.js.map +1 -0
- package/build/core/bundle.d.ts +49 -0
- package/build/core/bundle.d.ts.map +1 -0
- package/build/core/bundle.js +356 -0
- package/build/core/bundle.js.map +1 -0
- package/build/core/componentSearch.d.ts +41 -0
- package/build/core/componentSearch.d.ts.map +1 -0
- package/build/core/componentSearch.js +588 -0
- package/build/core/componentSearch.js.map +1 -0
- package/build/core/componentTree.d.ts +13 -0
- package/build/core/componentTree.d.ts.map +1 -0
- package/build/core/componentTree.js +275 -0
- package/build/core/componentTree.js.map +1 -0
- package/build/core/config.d.ts +9 -0
- package/build/core/config.d.ts.map +1 -0
- package/build/core/config.js +28 -0
- package/build/core/config.js.map +1 -0
- package/build/core/connection.d.ts +102 -0
- package/build/core/connection.d.ts.map +1 -0
- package/build/core/connection.js +1710 -0
- package/build/core/connection.js.map +1 -0
- package/build/core/connectionState.d.ts +122 -0
- package/build/core/connectionState.d.ts.map +1 -0
- package/build/core/connectionState.js +313 -0
- package/build/core/connectionState.js.map +1 -0
- package/build/core/debugGlobals.d.ts +6 -0
- package/build/core/debugGlobals.d.ts.map +1 -0
- package/build/core/debugGlobals.js +370 -0
- package/build/core/debugGlobals.js.map +1 -0
- package/build/core/deviceDiscovery.d.ts +52 -0
- package/build/core/deviceDiscovery.d.ts.map +1 -0
- package/build/core/deviceDiscovery.js +74 -0
- package/build/core/deviceDiscovery.js.map +1 -0
- package/build/core/deviceResolver.d.ts +44 -0
- package/build/core/deviceResolver.d.ts.map +1 -0
- package/build/core/deviceResolver.js +225 -0
- package/build/core/deviceResolver.js.map +1 -0
- package/build/core/errorScreenParser.d.ts +30 -0
- package/build/core/errorScreenParser.d.ts.map +1 -0
- package/build/core/errorScreenParser.js +198 -0
- package/build/core/errorScreenParser.js.map +1 -0
- package/build/core/errors.d.ts +14 -0
- package/build/core/errors.d.ts.map +1 -0
- package/build/core/errors.js +17 -0
- package/build/core/errors.js.map +1 -0
- package/build/core/escapeNonAscii.d.ts +18 -0
- package/build/core/escapeNonAscii.d.ts.map +1 -0
- package/build/core/escapeNonAscii.js +352 -0
- package/build/core/escapeNonAscii.js.map +1 -0
- package/build/core/exec.d.ts +22 -0
- package/build/core/exec.d.ts.map +1 -0
- package/build/core/exec.js +54 -0
- package/build/core/exec.js.map +1 -0
- package/build/core/executor.d.ts +9 -0
- package/build/core/executor.d.ts.map +1 -0
- package/build/core/executor.js +12 -0
- package/build/core/executor.js.map +1 -0
- package/build/core/failureArtifact.d.ts +120 -0
- package/build/core/failureArtifact.d.ts.map +1 -0
- package/build/core/failureArtifact.js +113 -0
- package/build/core/failureArtifact.js.map +1 -0
- package/build/core/fastRefreshRecorder.d.ts +23 -0
- package/build/core/fastRefreshRecorder.d.ts.map +1 -0
- package/build/core/fastRefreshRecorder.js +83 -0
- package/build/core/fastRefreshRecorder.js.map +1 -0
- package/build/core/fastRefreshTools.d.ts +19 -0
- package/build/core/fastRefreshTools.d.ts.map +1 -0
- package/build/core/fastRefreshTools.js +71 -0
- package/build/core/fastRefreshTools.js.map +1 -0
- package/build/core/feedback.d.ts +18 -0
- package/build/core/feedback.d.ts.map +1 -0
- package/build/core/feedback.js +73 -0
- package/build/core/feedback.js.map +1 -0
- package/build/core/fiberMatch.d.ts +25 -0
- package/build/core/fiberMatch.d.ts.map +1 -0
- package/build/core/fiberMatch.js +35 -0
- package/build/core/fiberMatch.js.map +1 -0
- package/build/core/fingerprint.d.ts +4 -0
- package/build/core/fingerprint.d.ts.map +1 -0
- package/build/core/fingerprint.js +47 -0
- package/build/core/fingerprint.js.map +1 -0
- package/build/core/focusedInput.d.ts +27 -0
- package/build/core/focusedInput.d.ts.map +1 -0
- package/build/core/focusedInput.js +110 -0
- package/build/core/focusedInput.js.map +1 -0
- package/build/core/focusedInputTools.d.ts +21 -0
- package/build/core/focusedInputTools.d.ts.map +1 -0
- package/build/core/focusedInputTools.js +51 -0
- package/build/core/focusedInputTools.js.map +1 -0
- package/build/core/format.d.ts +8 -0
- package/build/core/format.d.ts.map +1 -0
- package/build/core/format.js +34 -0
- package/build/core/format.js.map +1 -0
- package/build/core/guides.d.ts +21 -0
- package/build/core/guides.d.ts.map +1 -0
- package/build/core/guides.js +397 -0
- package/build/core/guides.js.map +1 -0
- package/build/core/iconSemantics.d.ts +18 -0
- package/build/core/iconSemantics.d.ts.map +1 -0
- package/build/core/iconSemantics.js +114 -0
- package/build/core/iconSemantics.js.map +1 -0
- package/build/core/imageBuffer.d.ts +37 -0
- package/build/core/imageBuffer.d.ts.map +1 -0
- package/build/core/imageBuffer.js +58 -0
- package/build/core/imageBuffer.js.map +1 -0
- package/build/core/index.d.ts +37 -0
- package/build/core/index.d.ts.map +1 -0
- package/build/core/index.js +66 -0
- package/build/core/index.js.map +1 -0
- package/build/core/inspector.d.ts +55 -0
- package/build/core/inspector.d.ts.map +1 -0
- package/build/core/inspector.js +603 -0
- package/build/core/inspector.js.map +1 -0
- package/build/core/ios.d.ts +263 -0
- package/build/core/ios.d.ts.map +1 -0
- package/build/core/ios.js +1705 -0
- package/build/core/ios.js.map +1 -0
- package/build/core/jsExecute.d.ts +62 -0
- package/build/core/jsExecute.d.ts.map +1 -0
- package/build/core/jsExecute.js +696 -0
- package/build/core/jsExecute.js.map +1 -0
- package/build/core/license.d.ts +48 -0
- package/build/core/license.d.ts.map +1 -0
- package/build/core/license.js +267 -0
- package/build/core/license.js.map +1 -0
- package/build/core/logbox.d.ts +58 -0
- package/build/core/logbox.d.ts.map +1 -0
- package/build/core/logbox.js +330 -0
- package/build/core/logbox.js.map +1 -0
- package/build/core/logs.d.ts +44 -0
- package/build/core/logs.d.ts.map +1 -0
- package/build/core/logs.js +149 -0
- package/build/core/logs.js.map +1 -0
- package/build/core/measureComponent.d.ts +19 -0
- package/build/core/measureComponent.d.ts.map +1 -0
- package/build/core/measureComponent.js +94 -0
- package/build/core/measureComponent.js.map +1 -0
- package/build/core/measureComponentTools.d.ts +6 -0
- package/build/core/measureComponentTools.d.ts.map +1 -0
- package/build/core/measureComponentTools.js +43 -0
- package/build/core/measureComponentTools.js.map +1 -0
- package/build/core/metro.d.ts +31 -0
- package/build/core/metro.d.ts.map +1 -0
- package/build/core/metro.js +124 -0
- package/build/core/metro.js.map +1 -0
- package/build/core/nativeOnlyHints.d.ts +14 -0
- package/build/core/nativeOnlyHints.d.ts.map +1 -0
- package/build/core/nativeOnlyHints.js +58 -0
- package/build/core/nativeOnlyHints.js.map +1 -0
- package/build/core/network.d.ts +43 -0
- package/build/core/network.d.ts.map +1 -0
- package/build/core/network.js +217 -0
- package/build/core/network.js.map +1 -0
- package/build/core/networkInterceptor.d.ts +30 -0
- package/build/core/networkInterceptor.d.ts.map +1 -0
- package/build/core/networkInterceptor.js +211 -0
- package/build/core/networkInterceptor.js.map +1 -0
- package/build/core/ocr.d.ts +87 -0
- package/build/core/ocr.d.ts.map +1 -0
- package/build/core/ocr.js +335 -0
- package/build/core/ocr.js.map +1 -0
- package/build/core/paths.d.ts +2 -0
- package/build/core/paths.d.ts.map +1 -0
- package/build/core/paths.js +28 -0
- package/build/core/paths.js.map +1 -0
- package/build/core/posthog.d.ts +5 -0
- package/build/core/posthog.d.ts.map +1 -0
- package/build/core/posthog.js +52 -0
- package/build/core/posthog.js.map +1 -0
- package/build/core/pressables.d.ts +46 -0
- package/build/core/pressables.d.ts.map +1 -0
- package/build/core/pressables.js +1719 -0
- package/build/core/pressables.js.map +1 -0
- package/build/core/probe.d.ts +12 -0
- package/build/core/probe.d.ts.map +1 -0
- package/build/core/probe.js +56 -0
- package/build/core/probe.js.map +1 -0
- package/build/core/redux.d.ts +22 -0
- package/build/core/redux.d.ts.map +1 -0
- package/build/core/redux.js +116 -0
- package/build/core/redux.js.map +1 -0
- package/build/core/register.d.ts +8 -0
- package/build/core/register.d.ts.map +1 -0
- package/build/core/register.js +202 -0
- package/build/core/register.js.map +1 -0
- package/build/core/rnGlobalsBootstrap.d.ts +16 -0
- package/build/core/rnGlobalsBootstrap.d.ts.map +1 -0
- package/build/core/rnGlobalsBootstrap.js +116 -0
- package/build/core/rnGlobalsBootstrap.js.map +1 -0
- package/build/core/screenLayout.d.ts +53 -0
- package/build/core/screenLayout.d.ts.map +1 -0
- package/build/core/screenLayout.js +878 -0
- package/build/core/screenLayout.js.map +1 -0
- package/build/core/screenState.d.ts +166 -0
- package/build/core/screenState.d.ts.map +1 -0
- package/build/core/screenState.js +1352 -0
- package/build/core/screenState.js.map +1 -0
- package/build/core/sdkBridge.d.ts +67 -0
- package/build/core/sdkBridge.d.ts.map +1 -0
- package/build/core/sdkBridge.js +148 -0
- package/build/core/sdkBridge.js.map +1 -0
- package/build/core/state.d.ts +37 -0
- package/build/core/state.d.ts.map +1 -0
- package/build/core/state.js +124 -0
- package/build/core/state.js.map +1 -0
- package/build/core/telemetry.d.ts +50 -0
- package/build/core/telemetry.d.ts.map +1 -0
- package/build/core/telemetry.js +653 -0
- package/build/core/telemetry.js.map +1 -0
- package/build/core/toolHelpers.d.ts +24 -0
- package/build/core/toolHelpers.d.ts.map +1 -0
- package/build/core/toolHelpers.js +118 -0
- package/build/core/toolHelpers.js.map +1 -0
- package/build/core/types.d.ts +162 -0
- package/build/core/types.d.ts.map +1 -0
- package/build/core/types.js +2 -0
- package/build/core/types.js.map +1 -0
- package/build/index.d.ts +4 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +132 -0
- package/build/index.js.map +1 -0
- package/build/pro/screenshot-diff.d.ts +10 -0
- package/build/pro/screenshot-diff.d.ts.map +1 -0
- package/build/pro/screenshot-diff.js +38 -0
- package/build/pro/screenshot-diff.js.map +1 -0
- package/build/pro/tap.d.ts +291 -0
- package/build/pro/tap.d.ts.map +1 -0
- package/build/pro/tap.js +1839 -0
- package/build/pro/tap.js.map +1 -0
- package/build/pro/verifyAction.d.ts +50 -0
- package/build/pro/verifyAction.d.ts.map +1 -0
- package/build/pro/verifyAction.js +285 -0
- package/build/pro/verifyAction.js.map +1 -0
- package/build/tools/_deviceArg.d.ts +45 -0
- package/build/tools/_deviceArg.d.ts.map +1 -0
- package/build/tools/_deviceArg.js +58 -0
- package/build/tools/_deviceArg.js.map +1 -0
- package/build/tools/accountTools.d.ts +46 -0
- package/build/tools/accountTools.d.ts.map +1 -0
- package/build/tools/accountTools.js +223 -0
- package/build/tools/accountTools.js.map +1 -0
- package/build/tools/bundleTools.d.ts +3 -0
- package/build/tools/bundleTools.d.ts.map +1 -0
- package/build/tools/bundleTools.js +375 -0
- package/build/tools/bundleTools.js.map +1 -0
- package/build/tools/componentTools.d.ts +3 -0
- package/build/tools/componentTools.d.ts.map +1 -0
- package/build/tools/componentTools.js +746 -0
- package/build/tools/componentTools.js.map +1 -0
- package/build/tools/connectionTools.d.ts +3 -0
- package/build/tools/connectionTools.d.ts.map +1 -0
- package/build/tools/connectionTools.js +625 -0
- package/build/tools/connectionTools.js.map +1 -0
- package/build/tools/deviceTools.d.ts +3 -0
- package/build/tools/deviceTools.d.ts.map +1 -0
- package/build/tools/deviceTools.js +423 -0
- package/build/tools/deviceTools.js.map +1 -0
- package/build/tools/executionTools.d.ts +3 -0
- package/build/tools/executionTools.d.ts.map +1 -0
- package/build/tools/executionTools.js +243 -0
- package/build/tools/executionTools.js.map +1 -0
- package/build/tools/interactionTools.d.ts +3 -0
- package/build/tools/interactionTools.d.ts.map +1 -0
- package/build/tools/interactionTools.js +539 -0
- package/build/tools/interactionTools.js.map +1 -0
- package/build/tools/logTools.d.ts +3 -0
- package/build/tools/logTools.d.ts.map +1 -0
- package/build/tools/logTools.js +371 -0
- package/build/tools/logTools.js.map +1 -0
- package/build/tools/metaTools.d.ts +7 -0
- package/build/tools/metaTools.d.ts.map +1 -0
- package/build/tools/metaTools.js +186 -0
- package/build/tools/metaTools.js.map +1 -0
- package/build/tools/networkTools.d.ts +3 -0
- package/build/tools/networkTools.d.ts.map +1 -0
- package/build/tools/networkTools.js +478 -0
- package/build/tools/networkTools.js.map +1 -0
- package/build/tools/reduxTools.d.ts +3 -0
- package/build/tools/reduxTools.d.ts.map +1 -0
- package/build/tools/reduxTools.js +83 -0
- package/build/tools/reduxTools.js.map +1 -0
- package/build/tools/screenshotTools.d.ts +3 -0
- package/build/tools/screenshotTools.d.ts.map +1 -0
- package/build/tools/screenshotTools.js +703 -0
- package/build/tools/screenshotTools.js.map +1 -0
- package/package.json +63 -2
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { executeInApp } from "./jsExecute.js";
|
|
2
|
+
function formatTreeToTonl(node, indent = 0) {
|
|
3
|
+
const prefix = " ".repeat(indent);
|
|
4
|
+
let result = `${prefix}${node.component}`;
|
|
5
|
+
// Add props inline if present
|
|
6
|
+
if (node.props && Object.keys(node.props).length > 0) {
|
|
7
|
+
const propsStr = Object.entries(node.props)
|
|
8
|
+
.map(([k, v]) => `${k}=${typeof v === "string" ? v : JSON.stringify(v)}`)
|
|
9
|
+
.join(",");
|
|
10
|
+
result += ` (${propsStr})`;
|
|
11
|
+
}
|
|
12
|
+
// Add layout inline if present
|
|
13
|
+
if (node.layout && Object.keys(node.layout).length > 0) {
|
|
14
|
+
const layoutStr = Object.entries(node.layout)
|
|
15
|
+
.map(([k, v]) => `${k}:${v}`)
|
|
16
|
+
.join(",");
|
|
17
|
+
result += ` [${layoutStr}]`;
|
|
18
|
+
}
|
|
19
|
+
result += "\n";
|
|
20
|
+
// Recurse children
|
|
21
|
+
if (node.children && node.children.length > 0) {
|
|
22
|
+
for (const child of node.children) {
|
|
23
|
+
result += formatTreeToTonl(child, indent + 1);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
// Ultra-compact structure-only tree format (just component names, indented)
|
|
29
|
+
function formatTreeStructureOnly(node, indent = 0) {
|
|
30
|
+
const prefix = " ".repeat(indent);
|
|
31
|
+
let result = `${prefix}${node.component}\n`;
|
|
32
|
+
if (node.children && node.children.length > 0) {
|
|
33
|
+
for (const child of node.children) {
|
|
34
|
+
result += formatTreeStructureOnly(child, indent + 1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
export async function getComponentTree(options = {}) {
|
|
40
|
+
const { includeProps = false, includeStyles = false, hideInternals = true, format = "tonl", structureOnly = false, focusedOnly = false, device, timeoutMs } = options;
|
|
41
|
+
// Use lower default depth for structureOnly to keep output compact (~2-5KB)
|
|
42
|
+
// Full mode uses higher depth since TONL format handles it better
|
|
43
|
+
// focusedOnly mode uses moderate depth since we're already filtering to active screen
|
|
44
|
+
const maxDepth = options.maxDepth ?? 5000;
|
|
45
|
+
const expression = `
|
|
46
|
+
(function() {
|
|
47
|
+
const hook = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
48
|
+
if (!hook) return { error: 'React DevTools hook not found. Make sure you are running a development build.' };
|
|
49
|
+
|
|
50
|
+
// Try to get fiber roots (renderer ID is usually 1)
|
|
51
|
+
let roots = [];
|
|
52
|
+
if (hook.getFiberRoots) {
|
|
53
|
+
roots = [...(hook.getFiberRoots(1) || [])];
|
|
54
|
+
}
|
|
55
|
+
if (roots.length === 0 && hook.renderers) {
|
|
56
|
+
// Try all renderers
|
|
57
|
+
for (const [id] of hook.renderers) {
|
|
58
|
+
const r = hook.getFiberRoots ? [...(hook.getFiberRoots(id) || [])] : [];
|
|
59
|
+
if (r.length > 0) {
|
|
60
|
+
roots = r;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (roots.length === 0) return { error: 'No fiber roots found. The app may not have rendered yet.' };
|
|
66
|
+
|
|
67
|
+
const maxDepth = ${maxDepth};
|
|
68
|
+
const includeProps = ${includeProps};
|
|
69
|
+
const includeStyles = ${includeStyles};
|
|
70
|
+
const hideInternals = ${hideInternals};
|
|
71
|
+
const focusedOnly = ${focusedOnly};
|
|
72
|
+
|
|
73
|
+
// Internal RN components to hide
|
|
74
|
+
const internalPatterns = /^(RCT|RNS|Animated\\(|AnimatedComponent|VirtualizedList|CellRenderer|ScrollViewContext|PerformanceLoggerContext|RootTagContext|HeaderShownContext|HeaderHeightContext|HeaderBackContext|SafeAreaFrameContext|SafeAreaInsetsContext|VirtualizedListContext|VirtualizedListCellContextProvider|StaticContainer|DelayedFreeze|Freeze|Suspender|DebugContainer|MaybeNestedStack|SceneView|NavigationContent|PreventRemoveProvider|EnsureSingleNavigator)/;
|
|
75
|
+
|
|
76
|
+
// Screen component patterns - user's actual screens (strict matching)
|
|
77
|
+
// Only match *Screen and *Page to avoid false positives like BottomTabView
|
|
78
|
+
const screenPatterns = /^[A-Z][a-zA-Z0-9]*(Screen|Page)$/;
|
|
79
|
+
|
|
80
|
+
// Navigation/internal screen patterns to SKIP (these look like screens but are framework components)
|
|
81
|
+
const internalScreenPatterns = /^(MaybeScreen|Screen$|ScreenContainer|ScreenStack|SceneView|Background$)/;
|
|
82
|
+
|
|
83
|
+
// Provider/wrapper patterns to skip when finding focused screen
|
|
84
|
+
const wrapperPatterns = /^(App|AppContainer|Provider|Context|SafeArea|Gesture|Theme|Redux|Root|Navigator|Stack|Tab|Drawer|Navigation|Container|Wrapper|Layout|ErrorBoundary|Suspense|PersistGate|LinkingContext|AppState|View|Fragment|NativeStack|BottomTab|Screen$)/i;
|
|
85
|
+
|
|
86
|
+
// Global overlay patterns - stop traversing into these subtrees
|
|
87
|
+
// Be specific to avoid blocking BottomSheetDrawer, PortalProvider, etc.
|
|
88
|
+
const overlayPatterns = /^(BottomSheet$|BottomSheetGlobal|Modal$|Toast$|Snackbar$|Dialog$|Overlay$|Popup$|MyToast$|PaywallModal$|FullScreenBannerModal$)/i;
|
|
89
|
+
|
|
90
|
+
// Navigation container patterns - skip traversing into these (screens inside are nav screens, not focused content)
|
|
91
|
+
const navContainerPatterns = /^(RootNavigation|NativeStackNavigator|BottomTabNavigator|DrawerNavigator|TabNavigator|StackNavigator)/;
|
|
92
|
+
|
|
93
|
+
function getComponentName(fiber) {
|
|
94
|
+
if (!fiber || !fiber.type) return null;
|
|
95
|
+
if (typeof fiber.type === 'string') return fiber.type; // Host component (View, Text, etc.)
|
|
96
|
+
return fiber.type.displayName || fiber.type.name || null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function shouldHide(name) {
|
|
100
|
+
if (!hideInternals || !name) return false;
|
|
101
|
+
return internalPatterns.test(name);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function extractLayoutStyles(style) {
|
|
105
|
+
try {
|
|
106
|
+
if (!style) return null;
|
|
107
|
+
const merged = Array.isArray(style)
|
|
108
|
+
? Object.assign({}, ...style.filter(Boolean).map(s => {
|
|
109
|
+
try { return typeof s === 'object' ? s : {}; }
|
|
110
|
+
catch { return {}; }
|
|
111
|
+
}))
|
|
112
|
+
: (typeof style === 'object' ? style : {});
|
|
113
|
+
|
|
114
|
+
const layout = {};
|
|
115
|
+
const layoutKeys = [
|
|
116
|
+
'padding', 'paddingTop', 'paddingBottom', 'paddingLeft', 'paddingRight',
|
|
117
|
+
'paddingHorizontal', 'paddingVertical',
|
|
118
|
+
'margin', 'marginTop', 'marginBottom', 'marginLeft', 'marginRight',
|
|
119
|
+
'marginHorizontal', 'marginVertical',
|
|
120
|
+
'width', 'height', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight',
|
|
121
|
+
'flex', 'flexDirection', 'flexWrap', 'flexGrow', 'flexShrink',
|
|
122
|
+
'justifyContent', 'alignItems', 'alignSelf', 'alignContent',
|
|
123
|
+
'position', 'top', 'bottom', 'left', 'right',
|
|
124
|
+
'gap', 'rowGap', 'columnGap',
|
|
125
|
+
'borderWidth', 'borderTopWidth', 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth'
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
for (const key of layoutKeys) {
|
|
129
|
+
if (merged[key] !== undefined) layout[key] = merged[key];
|
|
130
|
+
}
|
|
131
|
+
return Object.keys(layout).length > 0 ? layout : null;
|
|
132
|
+
} catch { return null; }
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function walkFiber(fiber, depth) {
|
|
136
|
+
if (!fiber || depth > maxDepth) return null;
|
|
137
|
+
|
|
138
|
+
const name = getComponentName(fiber);
|
|
139
|
+
|
|
140
|
+
// Skip anonymous/internal components unless they have meaningful children
|
|
141
|
+
if (!name || shouldHide(name)) {
|
|
142
|
+
// Still traverse children
|
|
143
|
+
let child = fiber.child;
|
|
144
|
+
const children = [];
|
|
145
|
+
while (child) {
|
|
146
|
+
const childResult = walkFiber(child, depth);
|
|
147
|
+
if (childResult) children.push(childResult);
|
|
148
|
+
child = child.sibling;
|
|
149
|
+
}
|
|
150
|
+
// Return first meaningful child or null
|
|
151
|
+
return children.length === 1 ? children[0] : (children.length > 1 ? { component: '(Fragment)', children } : null);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const node = { component: name };
|
|
155
|
+
|
|
156
|
+
// Include props if requested (excluding children and style for cleaner output)
|
|
157
|
+
if (includeProps && fiber.memoizedProps) {
|
|
158
|
+
const props = {};
|
|
159
|
+
for (const key of Object.keys(fiber.memoizedProps)) {
|
|
160
|
+
if (key === 'children' || key === 'style') continue;
|
|
161
|
+
try {
|
|
162
|
+
const val = fiber.memoizedProps[key];
|
|
163
|
+
if (typeof val === 'function') {
|
|
164
|
+
props[key] = '[Function]';
|
|
165
|
+
} else if (typeof val === 'object' && val !== null) {
|
|
166
|
+
props[key] = Array.isArray(val) ? '[Array]' : '[Object]';
|
|
167
|
+
} else {
|
|
168
|
+
props[key] = val;
|
|
169
|
+
}
|
|
170
|
+
} catch {
|
|
171
|
+
props[key] = '[Animated Value]';
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (Object.keys(props).length > 0) node.props = props;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Include layout styles if requested
|
|
178
|
+
try {
|
|
179
|
+
if (includeStyles && fiber.memoizedProps?.style) {
|
|
180
|
+
const layout = extractLayoutStyles(fiber.memoizedProps.style);
|
|
181
|
+
if (layout) node.layout = layout;
|
|
182
|
+
}
|
|
183
|
+
} catch { /* animated style — skip */ }
|
|
184
|
+
|
|
185
|
+
// Traverse children
|
|
186
|
+
let child = fiber.child;
|
|
187
|
+
const children = [];
|
|
188
|
+
while (child) {
|
|
189
|
+
const childResult = walkFiber(child, depth + 1);
|
|
190
|
+
if (childResult) children.push(childResult);
|
|
191
|
+
child = child.sibling;
|
|
192
|
+
}
|
|
193
|
+
if (children.length > 0) node.children = children;
|
|
194
|
+
|
|
195
|
+
return node;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Find focused screen if requested
|
|
199
|
+
function findFocusedScreen(fiber, depth = 0) {
|
|
200
|
+
if (!fiber || depth > 5000) return null;
|
|
201
|
+
|
|
202
|
+
const name = getComponentName(fiber);
|
|
203
|
+
|
|
204
|
+
// Skip overlays (BottomSheet, Modal, Toast, etc.) - don't traverse into them
|
|
205
|
+
if (name && overlayPatterns.test(name)) {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Skip navigation containers - screens inside are nav screens, not focused content
|
|
210
|
+
if (name && navContainerPatterns.test(name)) {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Check if this is a user's screen component (not framework internals)
|
|
215
|
+
if (name && screenPatterns.test(name) && !wrapperPatterns.test(name) && !internalScreenPatterns.test(name)) {
|
|
216
|
+
return fiber;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Search children
|
|
220
|
+
let child = fiber.child;
|
|
221
|
+
while (child) {
|
|
222
|
+
const found = findFocusedScreen(child, depth + 1);
|
|
223
|
+
if (found) return found;
|
|
224
|
+
child = child.sibling;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
let startFiber = roots[0].current;
|
|
231
|
+
let focusedScreenName = null;
|
|
232
|
+
|
|
233
|
+
if (focusedOnly) {
|
|
234
|
+
const focused = findFocusedScreen(roots[0].current);
|
|
235
|
+
if (focused) {
|
|
236
|
+
startFiber = focused;
|
|
237
|
+
focusedScreenName = getComponentName(focused);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const tree = walkFiber(startFiber, 0);
|
|
242
|
+
|
|
243
|
+
if (focusedOnly && focusedScreenName) {
|
|
244
|
+
return { focusedScreen: focusedScreenName, tree };
|
|
245
|
+
}
|
|
246
|
+
return { tree };
|
|
247
|
+
})()
|
|
248
|
+
`;
|
|
249
|
+
// Use a longer timeout for component tree traversal — large apps can exceed 10s
|
|
250
|
+
const result = await executeInApp(expression, false, { timeoutMs: timeoutMs ?? 30000, originatingToolName: "get_component_tree" }, device);
|
|
251
|
+
// Apply formatting if requested
|
|
252
|
+
if (result.success && result.result) {
|
|
253
|
+
try {
|
|
254
|
+
const parsed = JSON.parse(result.result);
|
|
255
|
+
if (parsed.tree) {
|
|
256
|
+
const prefix = parsed.focusedScreen ? `Focused: ${parsed.focusedScreen}\n\n` : "";
|
|
257
|
+
// Structure-only mode: ultra-compact format with just component names
|
|
258
|
+
if (structureOnly) {
|
|
259
|
+
const structure = formatTreeStructureOnly(parsed.tree);
|
|
260
|
+
return { success: true, result: prefix + structure };
|
|
261
|
+
}
|
|
262
|
+
// TONL format: compact with props/layout
|
|
263
|
+
if (format === "tonl") {
|
|
264
|
+
const tonl = formatTreeToTonl(parsed.tree);
|
|
265
|
+
return { success: true, result: prefix + tonl };
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
// If parsing fails, return original result
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return result;
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=componentTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentTree.js","sourceRoot":"","sources":["../../src/core/componentTree.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAa9C,SAAS,gBAAgB,CAAC,IAAuB,EAAE,MAAM,GAAG,CAAC;IACzD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,MAAM,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;IAE1C,8BAA8B;IAC9B,IAAI,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnD,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;aACtC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GA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AAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACzC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBACd,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,aAAa,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;gBAElF,sEAAsE;gBACtE,IAAI,aAAa,EAAE,CAAC;oBAChB,MAAM,SAAS,GAAG,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;oBACvD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC;gBACzD,CAAC;gBACD,yCAAyC;gBACzC,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;oBACpB,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;oBAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC;gBACpD,CAAC;YACL,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACL,2CAA2C;QAC/C,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,MAC8D,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from "fs";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
import { CONFIG_DIR } from "./paths.js";
|
|
4
|
+
const CONFIG_FILE = join(CONFIG_DIR, "config.json");
|
|
5
|
+
const IS_DEV = process.argv.includes("--http");
|
|
6
|
+
const PRODUCTION_URL = "https://execbro.com";
|
|
7
|
+
const LOCAL_URL = "http://localhost:3000";
|
|
8
|
+
function loadConfig() {
|
|
9
|
+
if (!existsSync(CONFIG_FILE))
|
|
10
|
+
return {};
|
|
11
|
+
try {
|
|
12
|
+
const raw = readFileSync(CONFIG_FILE, "utf-8");
|
|
13
|
+
return JSON.parse(raw);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const config = loadConfig();
|
|
20
|
+
/**
|
|
21
|
+
* Resolution order:
|
|
22
|
+
* 1. EXECBRO_API_URL env var (if set)
|
|
23
|
+
* 2. config.json apiUrl (if set)
|
|
24
|
+
* 3. --http flag → localhost:3000
|
|
25
|
+
* 4. Default → production URL
|
|
26
|
+
*/
|
|
27
|
+
export const API_BASE_URL = process.env.EXECBRO_API_URL ?? config.apiUrl ?? (IS_DEV ? LOCAL_URL : PRODUCTION_URL);
|
|
28
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAE/C,MAAM,cAAc,GAAG,qBAAqB,CAAC;AAC7C,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAM1C,SAAS,UAAU;IACf,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAAE,OAAO,EAAE,CAAC;IACxC,IAAI,CAAC;QACD,MAAM,GAAG,GAAG,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GACrB,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import WebSocket from "ws";
|
|
2
|
+
import { DeviceInfo, RemoteObject, ConnectedApp, ConnectOptions, EnsureConnectionResult, ConnectionCheckResult } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Suppress auto-reconnection for all current connections.
|
|
5
|
+
* Used by disconnect_metro to prevent close handlers from re-connecting.
|
|
6
|
+
*/
|
|
7
|
+
export declare function suppressReconnection(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Suppress auto-reconnection for a specific connection key.
|
|
10
|
+
* Used by disconnect_metro with device targeting.
|
|
11
|
+
*/
|
|
12
|
+
export declare function suppressReconnectionForKey(appKey: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Clear reconnection suppression (called when user explicitly reconnects via scan_metro).
|
|
15
|
+
*/
|
|
16
|
+
export declare function clearReconnectionSuppression(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a WebSocket connection with Origin header fallback.
|
|
19
|
+
* RN 0.85+ Metro requires the Origin header, but Expo SDK 55 Bridgeless
|
|
20
|
+
* rejects connections that include one. The rejection can manifest as:
|
|
21
|
+
* - Connection refused before open (error/close before open event)
|
|
22
|
+
* - Immediate close after open (open fires, then close with code 1006)
|
|
23
|
+
* Tries with Origin first, falls back to without on quick failure.
|
|
24
|
+
*/
|
|
25
|
+
export declare function createWebSocketWithOriginFallback(url: string, timeoutMs?: number): Promise<WebSocket>;
|
|
26
|
+
export declare function getWebSocketStateName(state: number): string;
|
|
27
|
+
/**
|
|
28
|
+
* Purge stale connections for scanned ports.
|
|
29
|
+
* When Metro restarts with a different app, /json returns new device IDs.
|
|
30
|
+
* Old connections keyed by the previous device IDs remain in connectedApps.
|
|
31
|
+
* This function removes connections on scanned ports whose device IDs
|
|
32
|
+
* are no longer present in the fresh device list from Metro.
|
|
33
|
+
*/
|
|
34
|
+
export declare function purgeStaleConnectionsForPorts(freshDevicesByPort: Map<number, DeviceInfo[]>): string[];
|
|
35
|
+
export declare function formatRemoteObject(result: RemoteObject): string;
|
|
36
|
+
export declare function handleCDPMessage(message: Record<string, unknown>, device: DeviceInfo, ws?: WebSocket): void;
|
|
37
|
+
export declare function connectToDevice(device: DeviceInfo, port: number, options?: ConnectOptions): Promise<string>;
|
|
38
|
+
export declare function getConnectedApps(): Array<{
|
|
39
|
+
key: string;
|
|
40
|
+
app: ConnectedApp;
|
|
41
|
+
isConnected: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function getFirstConnectedApp(): ConnectedApp | null;
|
|
44
|
+
/**
|
|
45
|
+
* Find the connected RN app running on a specific iOS simulator (by UDID).
|
|
46
|
+
* Returns null if no connected app matches — caller should skip any CDP-based
|
|
47
|
+
* enrichment to avoid pulling data from a different simulator's app.
|
|
48
|
+
*/
|
|
49
|
+
export declare function getConnectedAppBySimulatorUdid(udid: string): ConnectedApp | null;
|
|
50
|
+
/**
|
|
51
|
+
* Find the connected RN app running on a specific Android device.
|
|
52
|
+
* Falls back to the sole connected Android app when `deviceId` is not provided
|
|
53
|
+
* or cannot be resolved via deviceName substring match — this keeps the common
|
|
54
|
+
* single-device case working while preventing cross-device data leakage when
|
|
55
|
+
* multiple Android apps are connected.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getConnectedAppByAndroidDeviceId(deviceId?: string): ConnectedApp | null;
|
|
58
|
+
export declare function getConnectedAppByDevice(device?: string): ConnectedApp | null;
|
|
59
|
+
export declare function hasConnectedApp(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Run a quick health check to verify the page context is responsive
|
|
62
|
+
* Returns true if the context can execute code, false otherwise
|
|
63
|
+
*/
|
|
64
|
+
export declare function runQuickHealthCheck(app: ConnectedApp): Promise<boolean>;
|
|
65
|
+
export interface LogPipelineResult {
|
|
66
|
+
ok: boolean;
|
|
67
|
+
recovered: boolean;
|
|
68
|
+
message: string | null;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* End-to-end log pipeline verification with automatic recovery.
|
|
72
|
+
*
|
|
73
|
+
* 1. Injects a sentinel console.log via CDP and verifies it appears in the buffer.
|
|
74
|
+
* 2. If the marker doesn't arrive, attempts recovery:
|
|
75
|
+
* a. Re-sends Runtime.enable + Log.enable (fixes missing domain subscription)
|
|
76
|
+
* b. Retries the marker once
|
|
77
|
+
* 3. If still broken, force-reconnects via ensureConnection and retries.
|
|
78
|
+
*
|
|
79
|
+
* Returns { ok, recovered, message } — the caller decides what to show.
|
|
80
|
+
*/
|
|
81
|
+
export declare function verifyLogPipeline(app: ConnectedApp): Promise<LogPipelineResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Check if a log message is a health check marker (for filtering from output).
|
|
84
|
+
*/
|
|
85
|
+
export declare function isHealthCheckMarker(message: string): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Ensure a healthy connection to a React Native app
|
|
88
|
+
* This will verify or establish a connection, optionally running a health check
|
|
89
|
+
*/
|
|
90
|
+
export declare function ensureConnection(options?: {
|
|
91
|
+
port?: number;
|
|
92
|
+
healthCheck?: boolean;
|
|
93
|
+
forceRefresh?: boolean;
|
|
94
|
+
}): Promise<EnsureConnectionResult>;
|
|
95
|
+
export interface PassiveConnectionStatus {
|
|
96
|
+
connected: boolean;
|
|
97
|
+
needsPing: boolean;
|
|
98
|
+
reason: "ok" | "no_connection" | "context_stale" | "no_activity" | "activity_stale";
|
|
99
|
+
}
|
|
100
|
+
export declare function getPassiveConnectionStatus(targetAppKey?: string): PassiveConnectionStatus;
|
|
101
|
+
export declare function checkAndEnsureConnection(device?: string): Promise<ConnectionCheckResult>;
|
|
102
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/core/connection.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,IAAI,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAoB,YAAY,EAAkB,cAAc,EAAsB,sBAAsB,EAAmB,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAkH1M;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD;AAYD;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,SAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CA6DnG;AAaD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ3D;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CACzC,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,GAC9C,MAAM,EAAE,CAoCV;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CA4B/D;AA2RD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,SAAS,GAAG,IAAI,CAoW3G;AAGD,wBAAsB,eAAe,CACjC,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,cAAmB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAoTjB;AA8FD,wBAAgB,gBA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