prowl-tools 0.1.7 → 0.1.9
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 +56 -7
- package/dist/{chunk-R7NUH44M.js → chunk-2RNOK64Y.js} +314 -399
- package/dist/chunk-2RNOK64Y.js.map +1 -0
- package/dist/{chunk-O3OUTZ2P.js → chunk-JFJQNJSJ.js} +394 -2
- package/dist/chunk-JFJQNJSJ.js.map +1 -0
- package/dist/index.cjs +1564 -692
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +597 -40
- package/dist/index.js.map +1 -1
- package/dist/lib.cjs +650 -346
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.d.cts +95 -17
- package/dist/lib.d.ts +95 -17
- package/dist/lib.js +3 -3
- package/dist/{loader-X37URHUV.js → loader-JTHA4BYG.js} +2 -2
- package/examples/hunts/form.yml +53 -0
- package/examples/hunts/macos-hello.yml +49 -0
- package/package.json +1 -1
- package/dist/chunk-O3OUTZ2P.js.map +0 -1
- package/dist/chunk-R7NUH44M.js.map +0 -1
- /package/dist/{loader-X37URHUV.js.map → loader-JTHA4BYG.js.map} +0 -0
package/README.md
CHANGED
|
@@ -145,23 +145,33 @@ prowl init
|
|
|
145
145
|
|
|
146
146
|
<!-- ILLUSTRATION: Terminal screenshot showing `prowl init` output with raccoon mascot and file listing -->
|
|
147
147
|
|
|
148
|
-
This creates a `.prowl/` directory with a config file and
|
|
148
|
+
This creates a `.prowl/` directory with a config file and four starter hunts:
|
|
149
149
|
|
|
150
150
|
```text
|
|
151
151
|
.prowl/
|
|
152
|
-
├── config.yml
|
|
153
|
-
├── .gitignore
|
|
152
|
+
├── config.yml # Target URL, browser settings, guardrails
|
|
153
|
+
├── .gitignore # Keeps runs/, auth-state.json, and .env out of git
|
|
154
154
|
└── hunts/
|
|
155
|
-
├── hello.yml
|
|
156
|
-
|
|
155
|
+
├── hello.yml # Minimal smoke test — verifies the app loads
|
|
156
|
+
├── login-flow.yml # Auth example — fill credentials, verify redirect
|
|
157
|
+
├── form.yml # Forms example — fill, select, submit, assert
|
|
158
|
+
└── macos-hello.yml # Desktop starter — drive TextEdit (macOS, experimental)
|
|
157
159
|
```
|
|
158
160
|
|
|
161
|
+
The web starters (`hello`, `login-flow`, `form`) run against the default web
|
|
162
|
+
target as soon as you point `config.yml` at your app. `macos-hello` is the
|
|
163
|
+
desktop-first first-run hunt: it drives TextEdit through the Accessibility API,
|
|
164
|
+
and its inline comments walk you through switching the target to `macos` and the
|
|
165
|
+
one-time setup (`prowl macdriver install`, Accessibility permission). The macOS
|
|
166
|
+
target is experimental — see [macOS Target](#macos-target-experimental).
|
|
167
|
+
|
|
159
168
|
`prowl init` finishes by pointing you at the first hunt:
|
|
160
169
|
|
|
161
170
|
```text
|
|
162
171
|
Initialized .prowl directory.
|
|
163
172
|
Run prowl run hello to get started.
|
|
164
|
-
See .prowl/hunts/login-flow.yml for
|
|
173
|
+
See .prowl/hunts/login-flow.yml (auth) and .prowl/hunts/form.yml (web forms) for fuller examples.
|
|
174
|
+
Desktop-first? .prowl/hunts/macos-hello.yml is a macOS starter (experimental — see its comments to enable).
|
|
165
175
|
```
|
|
166
176
|
|
|
167
177
|
### 3. Configure
|
|
@@ -384,7 +394,20 @@ macOS target (with a clear error), and `prowl login` / URL guardrails do not app
|
|
|
384
394
|
| `assert: visible` / `notVisible` | `evalScript`, `runScript` |
|
|
385
395
|
| `screenshot`, `assertScreenshot` | `onDialog`, `select` / `selectOption` |
|
|
386
396
|
| `hover`, `scrollTo` | `setInputFiles`, `waitForDownload` |
|
|
387
|
-
| `repeat`, `if`, `runHunt`, `copyText` | `scroll` (directional)
|
|
397
|
+
| `repeat`, `if`, `runHunt`, `copyText` | `scroll` (directional; see below) / `assert: urlIncludes` / `urlEquals` |
|
|
398
|
+
|
|
399
|
+
**Scroll steps** differ per verb across targets:
|
|
400
|
+
|
|
401
|
+
- **`scrollTo: { selector }`** is portable across **web, macOS, iOS, and Android**. macOS
|
|
402
|
+
resolves the element and calls **AXScrollToVisible**; iOS/Android run a bounded down/up
|
|
403
|
+
swipe probe until the element appears; web scrolls the element into view.
|
|
404
|
+
- **`scroll: { direction, amount? }`** (directional) runs on **web, iOS, and Android** but is
|
|
405
|
+
**rejected on macOS** — the mobile path synthesizes a touch swipe (no macOS accessibility
|
|
406
|
+
equivalent), so on macOS use `scrollTo` to bring a specific element into view instead. On
|
|
407
|
+
the mobile targets the swipe starts from the screen centre (direction semantics match the
|
|
408
|
+
web step; `amount` maps to the swipe distance in device points, defaulting to 75% of the
|
|
409
|
+
relevant screen axis; negative amounts reverse direction, matching the web target). An
|
|
410
|
+
explicit `swipe` step is a deferred follow-up.
|
|
388
411
|
|
|
389
412
|
Notes: `press` accepts the same key vocabulary as the web target — single printable
|
|
390
413
|
characters, `Enter`/`Return`/`Space`, `Tab`, `Escape`, `Backspace`, `Delete`, `Home`,
|
|
@@ -1022,6 +1045,10 @@ prowl login
|
|
|
1022
1045
|
prowl init
|
|
1023
1046
|
prowl init --force # Overwrite existing
|
|
1024
1047
|
|
|
1048
|
+
# Doctor — check the environment is ready to run hunts
|
|
1049
|
+
prowl doctor
|
|
1050
|
+
prowl doctor --fix # Install Chromium / scaffold .prowl if missing
|
|
1051
|
+
|
|
1025
1052
|
# List available hunts
|
|
1026
1053
|
prowl list
|
|
1027
1054
|
|
|
@@ -1045,6 +1072,28 @@ prowl mcp --projects ~/.prowl/projects.yml # Drive multiple repos via a regist
|
|
|
1045
1072
|
- Must be a positive integer (`>= 1`).
|
|
1046
1073
|
- Invalid values (for example `0` or `1.5`) fail fast with an argument error.
|
|
1047
1074
|
|
|
1075
|
+
### Environment Check (`prowl doctor`)
|
|
1076
|
+
|
|
1077
|
+
`prowl doctor` verifies your machine is ready to run hunts and prints a
|
|
1078
|
+
color-coded report (green ✓ pass, yellow ⚠ warning, red ✗ failure, gray ○
|
|
1079
|
+
skipped) with a one-line summary. It checks:
|
|
1080
|
+
|
|
1081
|
+
- **Node.js** is version 20 or newer.
|
|
1082
|
+
- **Playwright** is installed, and its **Chromium** browser is available.
|
|
1083
|
+
- A **`.prowl/` directory** exists with a **valid `config.yml`**.
|
|
1084
|
+
- **Target tooling for your configured target only** (desktop-first): the macOS
|
|
1085
|
+
target reuses `prowl macdriver status` to report which helper binary resolved;
|
|
1086
|
+
the iOS target checks that `xcrun simctl` is reachable (macOS only); the
|
|
1087
|
+
Android target checks that `adb` is reachable. Missing native tooling prints
|
|
1088
|
+
the install command — `doctor` never installs system tools for you.
|
|
1089
|
+
|
|
1090
|
+
Warnings do not fail the command; only real failures do (exit code `1`, so it
|
|
1091
|
+
slots into CI). `prowl doctor --fix` performs just the two safe repairs —
|
|
1092
|
+
installing Chromium through Prowl's resolved Playwright dependency and
|
|
1093
|
+
scaffolding a missing `.prowl/` (the same templates `prowl init` writes) — then
|
|
1094
|
+
re-runs the checks and reports the new status. Everything else prints a manual
|
|
1095
|
+
remedy.
|
|
1096
|
+
|
|
1048
1097
|
### Run History
|
|
1049
1098
|
|
|
1050
1099
|
Every `prowl run` and `prowl ci` appends an entry to `.prowl/history.json`
|