waygraph 0.3.2 → 0.5.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 +19 -0
- package/dist/cli.js +721 -79
- package/dist/engine.d.ts +138 -3
- package/dist/engine.js +312 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/types.d.ts +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,9 @@ flat pile of ad hoc helper functions.
|
|
|
6
6
|
This repo is the `waygraph` npm package itself. Consumer projects proving it against real
|
|
7
7
|
sites/apps (saucedemo.com, zsign-app) live in the sibling `projects_waygraph/` repo, not here.
|
|
8
8
|
|
|
9
|
+
See [ROADMAP.md](./ROADMAP.md) for what's shipped, spec'd, and planned by version, and
|
|
10
|
+
`openspec/changes/` for the actual planning artifacts behind each roadmap item.
|
|
11
|
+
|
|
9
12
|
## Install
|
|
10
13
|
|
|
11
14
|
```bash
|
|
@@ -100,6 +103,22 @@ a fresh tab (the run won't close a page you handed it unless you say so), and
|
|
|
100
103
|
so the caller can keep driving it - hands a run tab back instead of losing it. See
|
|
101
104
|
"Recipes" for capture-on-popup, which stays a documented pattern until a second real use
|
|
102
105
|
case promotes it to an engine API.
|
|
106
|
+
`defineNavBlock({ name, checkpoint, url })` builds a Block whose only possible action is
|
|
107
|
+
navigating - `url` accepts a plain string or `(mem) => string` for parameterized routes,
|
|
108
|
+
and the generated `act()` is always exactly `page.goto(url)`, never author-supplied. A
|
|
109
|
+
regular `defineBlock`'s `act()` receives its `page` typed as `ActionPage` instead of raw
|
|
110
|
+
`Page` - structurally identical, every method still fully present and callable, except
|
|
111
|
+
`goto`/`reload`/`goBack`/`goForward` are re-declared `@deprecated`, so a TypeScript-aware
|
|
112
|
+
editor shows navigation struck through the instant it's typed in a regular Block, pointing
|
|
113
|
+
at `defineNavBlock` - nothing is blocked, no build ever fails, existing code that already
|
|
114
|
+
navigates from a regular Block keeps compiling and running unchanged. `waygraph check
|
|
115
|
+
[project]` is the complementary whole-project sweep for contexts with no editor watching
|
|
116
|
+
(CI, generated code) - same warning, on demand, across every `*.block.ts` file at once.
|
|
117
|
+
`new Engine({ browsers: { chromium, firefox, webkit } })` overrides which `BrowserType`
|
|
118
|
+
actually launches for a `mem`-only run, per browser name - waygraph is deliberately "just
|
|
119
|
+
an opinionated Playwright," so a stealth-patched or otherwise customized launcher (e.g.
|
|
120
|
+
`playwright-extra` plus a stealth plugin) drops in unmodified, since those already expose
|
|
121
|
+
the same `.launch()` shape as Playwright's own `chromium`/`firefox`/`webkit`.
|
|
103
122
|
|
|
104
123
|
```bash
|
|
105
124
|
npx create-waygraph my-project && cd my-project && npm install && npm test
|