@rn-probe/cli 0.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/LICENSE +21 -0
- package/README.md +75 -0
- package/SKILL.md +146 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +164 -0
- package/dist/cli.js.map +1 -0
- package/dist/daemon/devtools.d.ts +21 -0
- package/dist/daemon/devtools.d.ts.map +1 -0
- package/dist/daemon/devtools.js +227 -0
- package/dist/daemon/devtools.js.map +1 -0
- package/dist/daemon/index.d.ts +7 -0
- package/dist/daemon/index.d.ts.map +1 -0
- package/dist/daemon/index.js +124 -0
- package/dist/daemon/index.js.map +1 -0
- package/dist/daemon/metro.d.ts +16 -0
- package/dist/daemon/metro.d.ts.map +1 -0
- package/dist/daemon/metro.js +118 -0
- package/dist/daemon/metro.js.map +1 -0
- package/dist/daemon/simulator.d.ts +15 -0
- package/dist/daemon/simulator.d.ts.map +1 -0
- package/dist/daemon/simulator.js +134 -0
- package/dist/daemon/simulator.js.map +1 -0
- package/dist/daemon/state.d.ts +13 -0
- package/dist/daemon/state.d.ts.map +1 -0
- package/dist/daemon/state.js +10 -0
- package/dist/daemon/state.js.map +1 -0
- package/dist/ipc.d.ts +27 -0
- package/dist/ipc.d.ts.map +1 -0
- package/dist/ipc.js +78 -0
- package/dist/ipc.js.map +1 -0
- package/dist/spawn.d.ts +2 -0
- package/dist/spawn.d.ts.map +1 -0
- package/dist/spawn.js +28 -0
- package/dist/spawn.js.map +1 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rn-probe contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# rn-probe
|
|
2
|
+
|
|
3
|
+
Claude Code's window into a live React Native app.
|
|
4
|
+
|
|
5
|
+
A daemon + CLI tool that gives Claude Code structured, text-based introspection into a running RN app — component trees, JS errors, native logs, screenshots, tap events, and more. The same pattern as [`@vercel/next-browser`](https://github.com/vercel-labs/next-browser) applied to React Native.
|
|
6
|
+
|
|
7
|
+
Works with bare React Native and Expo (Expo Go + dev builds).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @rn-probe/cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or via the Claude Code skill system:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx skills add rn-probe
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Connect to your running dev server
|
|
29
|
+
rn open
|
|
30
|
+
|
|
31
|
+
# For Expo Go
|
|
32
|
+
rn open --expo-go
|
|
33
|
+
|
|
34
|
+
# For Expo dev build
|
|
35
|
+
rn open --dev-build
|
|
36
|
+
|
|
37
|
+
# See what's on screen
|
|
38
|
+
rn screenshot
|
|
39
|
+
|
|
40
|
+
# Inspect the component tree
|
|
41
|
+
rn tree
|
|
42
|
+
|
|
43
|
+
# Drill into a component
|
|
44
|
+
rn inspect 42
|
|
45
|
+
|
|
46
|
+
# Check for errors
|
|
47
|
+
rn errors
|
|
48
|
+
|
|
49
|
+
# Navigate to a screen
|
|
50
|
+
rn goto myapp://home
|
|
51
|
+
|
|
52
|
+
# Close when done
|
|
53
|
+
rn close
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Commands
|
|
59
|
+
|
|
60
|
+
See [SKILL.md](./SKILL.md) for the full command reference.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Requirements
|
|
65
|
+
|
|
66
|
+
- Node 22+
|
|
67
|
+
- macOS with Xcode CLI tools (for iOS simulator via `xcrun simctl`)
|
|
68
|
+
- Android SDK + `adb` (optional, for Android)
|
|
69
|
+
- A React Native app running in dev mode (Metro on port 8081, RN DevTools on port 8097)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# rn-probe
|
|
2
|
+
|
|
3
|
+
A CLI + daemon tool that gives Claude Code structured, text-based introspection into a live React Native app — the same way `next-browser` does for Next.js in a browser.
|
|
4
|
+
|
|
5
|
+
## Bootstrap
|
|
6
|
+
|
|
7
|
+
When `/rn-probe` is invoked:
|
|
8
|
+
|
|
9
|
+
1. **Check for the CLI**
|
|
10
|
+
```bash
|
|
11
|
+
rn --version
|
|
12
|
+
```
|
|
13
|
+
If not found, install it:
|
|
14
|
+
```bash
|
|
15
|
+
npm install -g @rn-probe/cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. **Ask the user:**
|
|
19
|
+
- Metro URL? (default: `http://localhost:8081`)
|
|
20
|
+
- Target platform? (`ios` / `android`)
|
|
21
|
+
- Project type? (`bare RN` / `Expo dev build` / `Expo Go`)
|
|
22
|
+
|
|
23
|
+
3. **Connect:**
|
|
24
|
+
```bash
|
|
25
|
+
rn open [metroUrl] [--expo-go | --dev-build]
|
|
26
|
+
```
|
|
27
|
+
Omit the flag for bare React Native. `--expo-go` sets the deep-link scheme to `exp://`. `--dev-build` expects a custom app scheme.
|
|
28
|
+
|
|
29
|
+
You are now in **pair programming mode** — use the commands below to inspect the live app.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Command Reference
|
|
34
|
+
|
|
35
|
+
### Lifecycle
|
|
36
|
+
| Command | Description |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `rn open [url]` | Connect to Metro + RN DevTools. Flags: `--expo-go`, `--dev-build`, `--force` |
|
|
39
|
+
| `rn close` | Tear down daemon and disconnect all bridges |
|
|
40
|
+
| `rn restart-metro` | Kill Metro and restart with `--reset-cache` |
|
|
41
|
+
|
|
42
|
+
### Navigation
|
|
43
|
+
| Command | Description |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `rn goto <screen>` | Deep-link navigate. Use `--scheme <scheme>` to override. |
|
|
46
|
+
| `rn back` | Trigger hardware back / navigation pop |
|
|
47
|
+
| `rn reload` | Hot-reload the JS bundle |
|
|
48
|
+
|
|
49
|
+
### Component Inspection
|
|
50
|
+
| Command | Description |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `rn tree` | Print full React component tree (`[id] DisplayName`) |
|
|
53
|
+
| `rn inspect <id>` | Inspect component by ID — props, state, hooks, source |
|
|
54
|
+
| `rn find <name>` | Search tree by display name, return matching IDs |
|
|
55
|
+
|
|
56
|
+
### Errors & Logs
|
|
57
|
+
| Command | Description |
|
|
58
|
+
|---|---|
|
|
59
|
+
| `rn errors` | JS errors, RedBox content, Metro build errors |
|
|
60
|
+
| `rn logs [--lines N]` | Recent Metro dev server output |
|
|
61
|
+
| `rn logs native` | Native device logs filtered to app bundle ID |
|
|
62
|
+
| `rn logs perf` | JS/UI thread FPS and slow frame count |
|
|
63
|
+
|
|
64
|
+
### Visual & Interaction
|
|
65
|
+
| Command | Description |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `rn screenshot` | Save simulator screenshot, print file path |
|
|
68
|
+
| `rn tap <x> <y>` | Tap at screen coordinates |
|
|
69
|
+
| `rn swipe <x1,y1:x2,y2>` | Swipe gesture between two coordinate pairs |
|
|
70
|
+
| `rn viewport [WxH]` | Show or set screen size (e.g. `390x844`) |
|
|
71
|
+
| `rn type <text>` | Type text into the focused input |
|
|
72
|
+
|
|
73
|
+
### Network & Bundle
|
|
74
|
+
| Command | Description |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `rn network [idx]` | List network requests, or inspect one by index |
|
|
77
|
+
| `rn bundle-status` | Metro bundle state, module count, warnings |
|
|
78
|
+
| `rn eval <script>` | Evaluate JS in the RN runtime |
|
|
79
|
+
|
|
80
|
+
### Computer Use Escalation
|
|
81
|
+
| Command | Description |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `rn use-computer` | Signal to activate computer use for the current task |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Tool Escalation Order
|
|
88
|
+
|
|
89
|
+
Always prefer structured commands. Only escalate when the layer below cannot answer.
|
|
90
|
+
|
|
91
|
+
1. **Structured command** — `rn tree`, `rn inspect`, `rn errors`, etc.
|
|
92
|
+
2. **Screenshot + tap** — `rn screenshot` to see the UI, `rn tap` / `rn swipe` to interact
|
|
93
|
+
3. **Computer use** — run `rn use-computer` when vision + mouse/keyboard is the only path
|
|
94
|
+
|
|
95
|
+
Use computer use for:
|
|
96
|
+
- Validating that an animation looks correct
|
|
97
|
+
- Interacting with GUI-only native controls (e.g. native date pickers, modals)
|
|
98
|
+
- Debugging layout issues only visible at runtime
|
|
99
|
+
- Walking through onboarding flows that require visual confirmation
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Reading `rn tree` Output
|
|
104
|
+
|
|
105
|
+
Each line is: `[id] DisplayName`, indented by nesting depth.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
[1] App
|
|
109
|
+
[2] NavigationContainer
|
|
110
|
+
[3] Stack.Navigator
|
|
111
|
+
[4] HomeScreen
|
|
112
|
+
[5] ScrollView
|
|
113
|
+
[6] Text
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Use the `id` with `rn inspect <id>` to drill into a component.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## RN / Expo Gotchas
|
|
121
|
+
|
|
122
|
+
### Hermes vs JSC
|
|
123
|
+
- `rn eval` works differently on Hermes (CDP-based) vs JSC — Hermes is the default since RN 0.70.
|
|
124
|
+
- `rn network` requires Hermes **with** network inspection enabled (set `enableNetworkInspector: true` in your Hermes config or Metro config).
|
|
125
|
+
|
|
126
|
+
### Expo
|
|
127
|
+
- **Expo Go** — uses `exp://127.0.0.1:8081/--/<path>` deep links. Pass `--expo-go` at `rn open`.
|
|
128
|
+
- **Expo dev build** — uses your custom app scheme (e.g. `myapp://`). Pass `--dev-build`.
|
|
129
|
+
- Both Expo modes use the same Metro (port 8081) and RN DevTools (port 8097) — only the deep-link scheme differs.
|
|
130
|
+
|
|
131
|
+
### Bridge vs Bridgeless
|
|
132
|
+
- RN's new architecture (bridgeless mode) does not change the DevTools WebSocket protocol.
|
|
133
|
+
- If `rn tree` returns an empty tree, your app may be running in production mode — ensure you started it with `npx react-native start` or `npx expo start`.
|
|
134
|
+
|
|
135
|
+
### Simulator must be booted
|
|
136
|
+
- `rn screenshot`, `rn tap`, and `rn goto` require a booted iOS simulator or connected Android device.
|
|
137
|
+
- If the simulator is not booted, run `xcrun simctl boot <UDID>` first or boot it from Xcode.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Global Flags
|
|
142
|
+
|
|
143
|
+
| Flag | Description |
|
|
144
|
+
|---|---|
|
|
145
|
+
| `--target <udid>` | Override active simulator/device UDID |
|
|
146
|
+
| `--json` | Output raw JSON (useful for piping) |
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { sendRequest, removeStaleSocket } from "./ipc.js";
|
|
4
|
+
import { ensureDaemon } from "./spawn.js";
|
|
5
|
+
const program = new Command();
|
|
6
|
+
program
|
|
7
|
+
.name("rn")
|
|
8
|
+
.description("rn-probe — Claude Code's window into a live React Native app")
|
|
9
|
+
.version("0.1.0")
|
|
10
|
+
.option("--target <udid>", "Override active simulator/device UDID")
|
|
11
|
+
.option("--json", "Output raw JSON instead of human-readable text");
|
|
12
|
+
// ── Helper: send a request, auto-spawning the daemon if needed ────────────────
|
|
13
|
+
async function dispatch(method, params) {
|
|
14
|
+
await ensureDaemon();
|
|
15
|
+
const opts = program.opts();
|
|
16
|
+
const merged = { ...(params ?? {}), ...(opts.target ? { udid: opts.target } : {}) };
|
|
17
|
+
const result = await sendRequest(method, merged);
|
|
18
|
+
if (opts.json) {
|
|
19
|
+
console.log(JSON.stringify(result, null, 2));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
console.log(typeof result === "string" ? result : JSON.stringify(result, null, 2));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
// ── Lifecycle ─────────────────────────────────────────────────────────────────
|
|
26
|
+
program
|
|
27
|
+
.command("open [metroUrl]")
|
|
28
|
+
.description("Connect to Metro + RN DevTools, optionally boot simulator")
|
|
29
|
+
.option("--expo-go", "Use exp:// deep-link scheme (Expo Go)")
|
|
30
|
+
.option("--dev-build", "Use custom app scheme (Expo dev build)")
|
|
31
|
+
.option("--force", "Kill existing daemon and restart")
|
|
32
|
+
.action(async (metroUrl, opts) => {
|
|
33
|
+
if (opts.force)
|
|
34
|
+
removeStaleSocket();
|
|
35
|
+
const expoMode = opts.expoGo ? "expo-go" : opts.devBuild ? "dev-build" : "bare";
|
|
36
|
+
await dispatch("open", { metroUrl, expoMode });
|
|
37
|
+
});
|
|
38
|
+
program
|
|
39
|
+
.command("close")
|
|
40
|
+
.description("Tear down daemon and disconnect all bridges")
|
|
41
|
+
.action(async () => {
|
|
42
|
+
try {
|
|
43
|
+
await dispatch("close");
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// Daemon may have already exited
|
|
47
|
+
console.log("Daemon stopped.");
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
// ── Metro ─────────────────────────────────────────────────────────────────────
|
|
51
|
+
program
|
|
52
|
+
.command("bundle-status")
|
|
53
|
+
.description("Show Metro bundle status")
|
|
54
|
+
.action(() => dispatch("bundle-status"));
|
|
55
|
+
program
|
|
56
|
+
.command("errors")
|
|
57
|
+
.description("Show JS errors, RedBox content, and Metro build errors")
|
|
58
|
+
.action(() => dispatch("errors"));
|
|
59
|
+
program
|
|
60
|
+
.command("reload")
|
|
61
|
+
.description("Trigger JS bundle reload")
|
|
62
|
+
.action(() => dispatch("reload"));
|
|
63
|
+
program
|
|
64
|
+
.command("restart-metro")
|
|
65
|
+
.description("Kill and restart Metro bundler with cache cleared")
|
|
66
|
+
.action(() => dispatch("restart-metro"));
|
|
67
|
+
// ── Logs subcommand ───────────────────────────────────────────────────────────
|
|
68
|
+
const logs = program
|
|
69
|
+
.command("logs")
|
|
70
|
+
.description("Stream Metro dev server output")
|
|
71
|
+
.option("--lines <n>", "Number of lines to show", "50")
|
|
72
|
+
.action(async (opts) => {
|
|
73
|
+
await dispatch("logs", { lines: Number(opts.lines) });
|
|
74
|
+
});
|
|
75
|
+
logs
|
|
76
|
+
.command("native")
|
|
77
|
+
.description("Stream native device logs filtered to your app")
|
|
78
|
+
.action(() => dispatch("logs-native"));
|
|
79
|
+
logs
|
|
80
|
+
.command("perf")
|
|
81
|
+
.description("Show JS/UI thread performance metrics")
|
|
82
|
+
.action(() => dispatch("logs-perf"));
|
|
83
|
+
// ── Navigation ────────────────────────────────────────────────────────────────
|
|
84
|
+
program
|
|
85
|
+
.command("goto <screen>")
|
|
86
|
+
.description("Deep-link navigate to a screen")
|
|
87
|
+
.option("--scheme <scheme>", "Override deep-link scheme")
|
|
88
|
+
.action((screen, opts) => dispatch("goto", { screen, scheme: opts.scheme }));
|
|
89
|
+
program
|
|
90
|
+
.command("back")
|
|
91
|
+
.description("Trigger hardware back / navigation pop")
|
|
92
|
+
.action(() => dispatch("back"));
|
|
93
|
+
// ── Component inspection ──────────────────────────────────────────────────────
|
|
94
|
+
program
|
|
95
|
+
.command("tree")
|
|
96
|
+
.description("Print full React component tree")
|
|
97
|
+
.action(() => dispatch("tree"));
|
|
98
|
+
program
|
|
99
|
+
.command("inspect <id>")
|
|
100
|
+
.description("Inspect a component by ID: props, state, hooks, source")
|
|
101
|
+
.action((id) => dispatch("inspect", { id }));
|
|
102
|
+
program
|
|
103
|
+
.command("find <name>")
|
|
104
|
+
.description("Search component tree by display name")
|
|
105
|
+
.action((name) => dispatch("find", { name }));
|
|
106
|
+
// ── JS eval ───────────────────────────────────────────────────────────────────
|
|
107
|
+
program
|
|
108
|
+
.command("eval <script>")
|
|
109
|
+
.description("Evaluate JS in the RN runtime context")
|
|
110
|
+
.action((script) => dispatch("eval", { script }));
|
|
111
|
+
// ── Network ───────────────────────────────────────────────────────────────────
|
|
112
|
+
program
|
|
113
|
+
.command("network [idx]")
|
|
114
|
+
.description("List intercepted network requests, or inspect one by index")
|
|
115
|
+
.action((idx) => dispatch("network", idx !== undefined ? { idx: Number(idx) } : {}));
|
|
116
|
+
// ── Visual & interaction ──────────────────────────────────────────────────────
|
|
117
|
+
program
|
|
118
|
+
.command("screenshot")
|
|
119
|
+
.description("Save simulator screenshot to tmp file, print path")
|
|
120
|
+
.action(() => dispatch("screenshot"));
|
|
121
|
+
program
|
|
122
|
+
.command("tap <x> <y>")
|
|
123
|
+
.description("Send a tap event at coordinates")
|
|
124
|
+
.action((x, y) => dispatch("tap", { x: Number(x), y: Number(y) }));
|
|
125
|
+
program
|
|
126
|
+
.command("swipe <coords>")
|
|
127
|
+
.description("Send a swipe gesture — format: x1,y1:x2,y2")
|
|
128
|
+
.action((coords) => {
|
|
129
|
+
const [from, to] = coords.split(":");
|
|
130
|
+
const [x1, y1] = from.split(",").map(Number);
|
|
131
|
+
const [x2, y2] = to.split(",").map(Number);
|
|
132
|
+
return dispatch("swipe", { x1, y1, x2, y2 });
|
|
133
|
+
});
|
|
134
|
+
program
|
|
135
|
+
.command("viewport [size]")
|
|
136
|
+
.description("Show or set simulator screen size (e.g. 390x844)")
|
|
137
|
+
.action((size) => dispatch("viewport", { size }));
|
|
138
|
+
program
|
|
139
|
+
.command("type <text>")
|
|
140
|
+
.description("Type text into the currently focused input")
|
|
141
|
+
.action((text) => dispatch("type", { text }));
|
|
142
|
+
// ── Computer use escalation ───────────────────────────────────────────────────
|
|
143
|
+
program
|
|
144
|
+
.command("use-computer")
|
|
145
|
+
.description("Signal Claude Code to activate computer use for the current task")
|
|
146
|
+
.action(() => {
|
|
147
|
+
console.log([
|
|
148
|
+
"USE-COMPUTER-ESCALATION",
|
|
149
|
+
"─────────────────────────────────────────────────────",
|
|
150
|
+
"All programmatic inspection paths have been exhausted.",
|
|
151
|
+
"Activate computer use (vision + mouse/keyboard) to proceed.",
|
|
152
|
+
"",
|
|
153
|
+
"Suggested actions:",
|
|
154
|
+
" • Take a screenshot with your computer use tool",
|
|
155
|
+
" • Click, scroll, or interact with the simulator visually",
|
|
156
|
+
" • Validate animations, layout, or GUI-only native controls",
|
|
157
|
+
"─────────────────────────────────────────────────────",
|
|
158
|
+
].join("\n"));
|
|
159
|
+
});
|
|
160
|
+
program.parseAsync(process.argv).catch((err) => {
|
|
161
|
+
console.error(`Error: ${err.message}`);
|
|
162
|
+
process.exit(1);
|
|
163
|
+
});
|
|
164
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,OAAO;KACJ,IAAI,CAAC,IAAI,CAAC;KACV,WAAW,CAAC,8DAA8D,CAAC;KAC3E,OAAO,CAAC,OAAO,CAAC;KAChB,MAAM,CAAC,iBAAiB,EAAE,uCAAuC,CAAC;KAClE,MAAM,CAAC,QAAQ,EAAE,gDAAgD,CAAC,CAAC;AAEtE,iFAAiF;AAEjF,KAAK,UAAU,QAAQ,CAAC,MAAc,EAAE,MAAgC;IACtE,MAAM,YAAY,EAAE,CAAC;IACrB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAuC,CAAC;IACjE,MAAM,MAAM,GAAG,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACpF,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,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AO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,iBAAiB,CAAC;KAC1B,WAAW,CAAC,kDAAkD,CAAC;KAC/D,MAAM,CAAC,CAAC,IAAwB,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAExE,OAAO;KACJ,OAAO,CAAC,aAAa,CAAC;KACtB,WAAW,CAAC,4CAA4C,CAAC;KACzD,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAExD,iFAAiF;AAEjF,OAAO;KACJ,OAAO,CAAC,cAAc,CAAC;KACvB,WAAW,CAAC,kEAAkE,CAAC;KAC/E,MAAM,CAAC,GAAG,EAAE;IACX,OAAO,CAAC,GAAG,CACT;QACE,yBAAyB;QACzB,uDAAuD;QACvD,wDAAwD;QACxD,6DAA6D;QAC7D,EAAE;QACF,oBAAoB;QACpB,mDAAmD;QACnD,4DAA4D;QAC5D,8DAA8D;QAC9D,uDAAuD;KACxD,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;IACpD,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class DevToolsBridge {
|
|
2
|
+
private ws;
|
|
3
|
+
private connected;
|
|
4
|
+
private pendingRequests;
|
|
5
|
+
private componentTree;
|
|
6
|
+
private networkLog;
|
|
7
|
+
private perfEvents;
|
|
8
|
+
connect(): Promise<void>;
|
|
9
|
+
private tryConnect;
|
|
10
|
+
disconnect(): void;
|
|
11
|
+
private handleMessage;
|
|
12
|
+
private applyTreeOperations;
|
|
13
|
+
private request;
|
|
14
|
+
getTree(): Promise<string>;
|
|
15
|
+
inspect(id: string): Promise<string>;
|
|
16
|
+
find(name: string): Promise<string>;
|
|
17
|
+
evaluate(script: string): Promise<string>;
|
|
18
|
+
network(idx?: number): string;
|
|
19
|
+
getPerfMetrics(): string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=devtools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../../src/daemon/devtools.ts"],"names":[],"mappings":"AAyCA,qBAAa,cAAc;IACzB,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,eAAe,CAAoF;IAC3G,OAAO,CAAC,aAAa,CAAyC;IAC9D,OAAO,CAAC,UAAU,CAAwB;IAC1C,OAAO,CAAC,UAAU,CAA2D;IAEvE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAM9B,OAAO,CAAC,UAAU;IA6BlB,UAAU;IASV,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,OAAO;IAsBT,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IA0B1B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoCpC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBnC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgB/C,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM;IAiC7B,cAAc,IAAI,MAAM;CAazB"}
|