waygraph 0.10.5 → 0.10.6
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 +1 -1
- package/dist/cli.js +18 -12
- package/package.json +1 -1
- package/templates/quickstart/package.json +1 -1
- package/templates/scaffold/package.json +6 -4
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A typed graph of reusable Blocks for driving a browser through E2E flows, in place of a
|
|
4
4
|
flat pile of ad hoc helper functions.
|
|
5
5
|
|
|
6
|
-
**Current:** `0.10.
|
|
6
|
+
**Current:** `0.10.6` — `try auto` headed by default; `init` / create-waygraph scaffolds on 0.10 + `.flow.ts` scripts.
|
|
7
7
|
|
|
8
8
|
This repo is the `waygraph` npm package itself. The full live **Sauce Demo** example
|
|
9
9
|
(Page inventory hub, Effect Add/Remove, MemNav Open details, `waygraph auto`) ships
|
package/dist/cli.js
CHANGED
|
@@ -2557,26 +2557,27 @@ async function runTryDemo() {
|
|
|
2557
2557
|
const TRY_AUTO_DATA = '{"saucedemo.credentials":{"username":"standard_user","password":"secret_sauce"}}';
|
|
2558
2558
|
/**
|
|
2559
2559
|
* `waygraph try auto` / `try auto:cli` - temp Sauce Demo explore.
|
|
2560
|
-
* Default is
|
|
2560
|
+
* Default is the **headed** browser panel. Pass `auto:cli` or `--cli` for the
|
|
2561
|
+
* terminal menu (same rows).
|
|
2561
2562
|
*
|
|
2562
2563
|
* Runs as a child in the temp project so Block imports share that install's
|
|
2563
2564
|
* `@playwright/test`. In-process explore from the outer CLI against a packed
|
|
2564
2565
|
* `file:*.tgz` copy double-loads Playwright and silently yields 0 graph edges
|
|
2565
2566
|
* ("LoginPage / No moves").
|
|
2566
2567
|
*/
|
|
2567
|
-
async function runTryAuto(opts = { cli:
|
|
2568
|
+
async function runTryAuto(opts = { cli: false }) {
|
|
2568
2569
|
const destDir = await prepareTryQuickstart("waygraph-try-auto");
|
|
2569
2570
|
if (!destDir)
|
|
2570
2571
|
return;
|
|
2571
2572
|
process.env.WAYGRAPH_BASE_URL ??= "https://www.saucedemo.com";
|
|
2572
|
-
const cli = opts.cli
|
|
2573
|
+
const cli = opts.cli === true;
|
|
2573
2574
|
console.log(cli
|
|
2574
2575
|
? "waygraph try auto: CLI explore on Sauce Demo (temp dir).\n" +
|
|
2575
2576
|
" Creds pre-seeded (saucedemo.credentials).\n" +
|
|
2576
2577
|
" Pick [1] submit-login, then inventory Add/Remove / Open details.\n" +
|
|
2577
|
-
" Type q to quit. Headed panel: waygraph try auto
|
|
2578
|
+
" Type q to quit. Headed panel: waygraph try auto\n"
|
|
2578
2579
|
: "waygraph try auto: headed explore on Sauce Demo (temp dir).\n" +
|
|
2579
|
-
" Creds pre-seeded.
|
|
2580
|
+
" Creds pre-seeded. CLI menu: waygraph try auto:cli\n" +
|
|
2580
2581
|
" Pick submit-login, then inventory menus. Quit from the panel.\n");
|
|
2581
2582
|
const bin = join(destDir, "node_modules", ".bin", "waygraph");
|
|
2582
2583
|
const args = ["auto"];
|
|
@@ -2589,8 +2590,8 @@ async function runTryAuto(opts = { cli: true }) {
|
|
|
2589
2590
|
console.log("\nwaygraph try auto: explorer closed.\n\n" +
|
|
2590
2591
|
`Temp project:\n ${destDir}\n\n` +
|
|
2591
2592
|
"Run again:\n" +
|
|
2592
|
-
` cd ${destDir} && npm run auto
|
|
2593
|
-
` cd ${destDir} && npm run auto\n\n` +
|
|
2593
|
+
` cd ${destDir} && npm run auto\n` +
|
|
2594
|
+
` cd ${destDir} && npm run auto:cli\n\n` +
|
|
2594
2595
|
"In-package: examples/saucedemo\n" +
|
|
2595
2596
|
"Docs: https://deviate-dv8.github.io/waygraph/auto.html\n");
|
|
2596
2597
|
}
|
|
@@ -2721,8 +2722,11 @@ function initCommand(projectName) {
|
|
|
2721
2722
|
console.log(" npm install");
|
|
2722
2723
|
console.log(" npx playwright install chromium");
|
|
2723
2724
|
console.log(" npm test");
|
|
2725
|
+
console.log(" waygraph list # .flow.ts → export map");
|
|
2724
2726
|
console.log(" waygraph check # nav hygiene + orphan Blocks");
|
|
2725
|
-
console.log(" waygraph auto # interactive explore (
|
|
2727
|
+
console.log(" waygraph auto # interactive explore (headed panel)");
|
|
2728
|
+
console.log(" waygraph auto --cli # same menus in the terminal");
|
|
2729
|
+
console.log(" waygraph demo src/flows/example.flow.ts");
|
|
2726
2730
|
console.log(" waygraph graph # static state graph JSON");
|
|
2727
2731
|
}
|
|
2728
2732
|
async function checkCommand(projectDir) {
|
|
@@ -3076,13 +3080,16 @@ Primary (less is more):
|
|
|
3076
3080
|
Also:
|
|
3077
3081
|
waygraph list | nav | validate | check | graph | init <name>
|
|
3078
3082
|
waygraph try [demo|auto|auto:cli] One-shot saucedemo in a temp dir
|
|
3079
|
-
try auto
|
|
3083
|
+
try auto Headed browser panel (default)
|
|
3084
|
+
try auto:cli / --cli Terminal menu instead
|
|
3085
|
+
try auto --headed Same as try auto (compat)
|
|
3080
3086
|
|
|
3081
3087
|
Examples:
|
|
3082
3088
|
waygraph list # file → export map
|
|
3083
3089
|
waygraph run src/flows/shop.flow.ts --data '{...}'
|
|
3084
3090
|
waygraph run --blocks shopFlow --non-headless --video
|
|
3085
3091
|
waygraph demo --blocks src/flows/cart-bulk.flow.ts --auto-next
|
|
3092
|
+
waygraph try auto
|
|
3086
3093
|
waygraph try auto:cli
|
|
3087
3094
|
waygraph auto src/flows/shop.flow.ts --data '{...}' # run by file (same as run)
|
|
3088
3095
|
waygraph auto --cli --data '{"saucedemo.credentials":{...}}'
|
|
@@ -3310,19 +3317,18 @@ async function main() {
|
|
|
3310
3317
|
const flags = parseRunFlags(args.slice(1));
|
|
3311
3318
|
applyRunFlags(flags);
|
|
3312
3319
|
const modeRaw = (flags.positionals[0] ?? "demo").toLowerCase();
|
|
3313
|
-
// auto:cli /
|
|
3320
|
+
// auto:cli / --cli = CLI; bare try auto = headed panel
|
|
3314
3321
|
const mode = modeRaw === "auto:cli" || modeRaw === "auto-cli"
|
|
3315
3322
|
? "auto:cli"
|
|
3316
3323
|
: modeRaw === "auto"
|
|
3317
3324
|
? "auto"
|
|
3318
3325
|
: modeRaw;
|
|
3319
3326
|
if (mode === "auto" || mode === "auto:cli") {
|
|
3320
|
-
// CLI is the default for try auto (same menus as headed). --headed = panel.
|
|
3321
3327
|
const cli = mode === "auto:cli" || flags.cli === true
|
|
3322
3328
|
? true
|
|
3323
3329
|
: flags.headed === true || flags.nonHeadless === true
|
|
3324
3330
|
? false
|
|
3325
|
-
:
|
|
3331
|
+
: false; // try auto default = headed
|
|
3326
3332
|
await runTryAuto({ cli });
|
|
3327
3333
|
}
|
|
3328
3334
|
else if (mode === "demo" || mode === "") {
|
package/package.json
CHANGED
|
@@ -6,17 +6,19 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
8
8
|
"test": "playwright test",
|
|
9
|
-
"
|
|
9
|
+
"list": "waygraph list",
|
|
10
10
|
"check": "waygraph check",
|
|
11
11
|
"auto": "waygraph auto",
|
|
12
|
-
"
|
|
13
|
-
"demo": "waygraph demo
|
|
12
|
+
"auto:cli": "waygraph auto --cli",
|
|
13
|
+
"demo": "waygraph demo src/flows/example.flow.ts",
|
|
14
|
+
"run": "waygraph run src/flows/example.flow.ts",
|
|
15
|
+
"graph": "waygraph graph"
|
|
14
16
|
},
|
|
15
17
|
"waygraph": {
|
|
16
18
|
"baseUrl": "https://example.com"
|
|
17
19
|
},
|
|
18
20
|
"dependencies": {
|
|
19
|
-
"waygraph": "^0.
|
|
21
|
+
"waygraph": "^0.10.6"
|
|
20
22
|
},
|
|
21
23
|
"devDependencies": {
|
|
22
24
|
"@playwright/test": "^1.55.0",
|