waygraph 0.15.51 → 0.15.53
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 +8 -1
- package/dist/analysis/graph.d.ts +1 -1
- package/dist/analysis/graph.js +10 -15
- package/dist/analysis/map-check.d.ts +3 -2
- package/dist/analysis/practices-check.d.ts +0 -1
- package/dist/analysis/practices-check.js +0 -13
- package/dist/auto-session/session.d.ts +1 -1
- package/dist/auto-session/session.js +13 -8
- package/dist/blocks-select.d.ts +7 -4
- package/dist/blocks-select.js +0 -14
- package/dist/browser.d.ts +27 -0
- package/dist/browser.js +62 -0
- package/dist/cli/flags.js +3 -1
- package/dist/cli/run-chain.js +4 -0
- package/dist/cli/usage.js +17 -1
- package/dist/cli.js +13 -1
- package/dist/commands/agent-dive-scaffold.d.ts +5 -20
- package/dist/commands/agent-dive-scaffold.js +10 -3
- package/dist/commands/extensions.d.ts +1 -0
- package/dist/commands/extensions.js +22 -0
- package/dist/commands/init.js +43 -5
- package/dist/commands/test.js +16 -2
- package/dist/commands/try.js +2 -1
- package/dist/commands/upgrade.d.ts +6 -0
- package/dist/commands/upgrade.js +113 -0
- package/dist/config.d.ts +81 -3
- package/dist/config.js +91 -16
- package/dist/core/block.d.ts +19 -2
- package/dist/core/block.js +43 -3
- package/dist/core/blocks/nav.d.ts +11 -0
- package/dist/core/blocks/nav.js +8 -0
- package/dist/core/config.d.ts +5 -0
- package/dist/core/engine.d.ts +19 -16
- package/dist/core/engine.js +6 -4
- package/dist/core/flow.d.ts +27 -0
- package/dist/core/flow.js +75 -28
- package/dist/core/map-builder.d.ts +30 -4
- package/dist/core/map-builder.js +45 -7
- package/dist/env-file.d.ts +7 -7
- package/dist/env-file.js +29 -16
- package/dist/extensions.d.ts +21 -0
- package/dist/extensions.js +178 -0
- package/dist/highlights/demo-pace.d.ts +0 -1
- package/dist/highlights/demo-pace.js +24 -3
- package/dist/index.d.ts +7 -5
- package/dist/index.js +3 -2
- package/dist/pilot-overlay/action-ring.d.ts +0 -9
- package/dist/pilot-overlay/action-ring.js +1 -1
- package/dist/pilot-overlay/overlay-fixtures.d.ts +0 -7
- package/dist/pilot-overlay/overlay-fixtures.js +0 -45
- package/dist/pilot-overlay/panel.d.ts +2 -1
- package/dist/playwright-config.d.ts +4 -0
- package/dist/playwright-config.js +15 -0
- package/dist/playwright.config.d.ts +2 -0
- package/dist/playwright.config.js +6 -0
- package/dist/runner/demo-log.js +1 -7
- package/dist/runner/inpage/core.d.ts +1 -1
- package/dist/runner/inpage/core.js +8 -7
- package/dist/runner/interaction-patch.js +32 -1
- package/dist/runner/main.js +22 -11
- package/dist/runner/rings.js +0 -49
- package/dist/runner/step-mode.js +10 -4
- package/dist/session/auto-explore-run.js +9 -5
- package/dist/session/auto-explore.d.ts +2 -1
- package/dist/session/auto-explore.js +6 -4
- package/dist/session/auto-session-ipc.d.ts +1 -2
- package/dist/session/auto-session-ipc.js +1 -1
- package/dist/session/block-inject.d.ts +0 -13
- package/dist/session/block-inject.js +3 -3
- package/dist/session/pilot.d.ts +0 -2
- package/dist/session/pilot.js +1 -2
- package/dist/session/step-overlay.js +3 -1
- package/dist/traverse/coverage.d.ts +0 -4
- package/dist/traverse/coverage.js +1 -1
- package/dist/traverse/run.js +3 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui/components/ring.js +1 -0
- package/dist/ui/overlay.css +1 -0
- package/dist/ui/shadow.d.ts +1 -3
- package/dist/ui/shadow.js +0 -4
- package/dist/ui/tokens.d.ts +0 -11
- package/dist/ui/tokens.js +0 -5
- package/dist/video-dir.d.ts +8 -0
- package/dist/video-dir.js +60 -0
- package/dist/webserver.js +5 -1
- package/package.json +11 -5
- package/templates/scaffold/README.md +5 -3
- package/templates/scaffold/STRUCTURE.md +10 -4
- package/templates/scaffold/config/waygraph.config.ts +45 -0
- package/templates/scaffold/package.json +7 -7
- package/templates/scaffold/src/flows/(external)/hoppscotch/auth.flow.ts +36 -0
- package/templates/scaffold/src/flows/(external)/hoppscotch/get.flow.ts +24 -0
- package/templates/scaffold/src/flows/(external)/hoppscotch/post.flow.ts +34 -0
- package/templates/scaffold/src/flows/(user-stories)/email-verification.flow.ts +47 -0
- package/templates/scaffold/src/flows/README.md +35 -14
- package/templates/scaffold/src/flows/home/cart.flow.ts +51 -0
- package/templates/scaffold/src/flows/home/hello.flow.ts +42 -0
- package/templates/scaffold/src/map/(app_base)/docs/_nav.block.ts +0 -9
- package/templates/scaffold/src/map/(app_base)/docs/_page.block.ts +0 -5
- package/templates/scaffold/src/map/(app_base)/docs/_sel.ts +1 -1
- package/templates/scaffold/src/map/(app_base)/home/_methods/add-item.effect.block.ts +3 -19
- package/templates/scaffold/src/map/(app_base)/home/_methods/assert-hello.method.block.ts +2 -25
- package/templates/scaffold/src/map/(app_base)/home/_methods/assert-item-added.method.block.ts +2 -19
- package/templates/scaffold/src/map/(app_base)/home/_methods/clear-cart.method.block.ts +1 -17
- package/templates/scaffold/src/map/(app_base)/home/_methods/remove-item.effect.block.ts +1 -10
- package/templates/scaffold/src/map/(app_base)/home/_nav.block.ts +1 -12
- package/templates/scaffold/src/map/(app_base)/home/_page.block.ts +0 -9
- package/templates/scaffold/src/map/(app_base)/home/_sel.ts +3 -1
- package/templates/scaffold/src/map/(app_base)/home/nav-verification-link.block.ts +1 -23
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-response-body.method.block.ts +21 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-response-header.method.block.ts +19 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/assert-status.method.block.ts +20 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/pick-extension-interceptor.method.block.ts +18 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/read-response-body.method.block.ts +21 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/read-response-headers.method.block.ts +21 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/send-request.method.block.ts +15 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-bearer-token.method.block.ts +20 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-headers.method.block.ts +23 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-json-body.method.block.ts +36 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-method.method.block.ts +17 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-query-params.method.block.ts +22 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_methods/set-url.method.block.ts +18 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_nav.block.ts +11 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_page.block.ts +36 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/_sel.ts +27 -0
- package/templates/scaffold/src/map/(external)/hoppscotch/settings/_nav.block.ts +10 -0
- package/templates/scaffold/src/map/(external)/mailpit/_methods/assert-email-content.method.block.ts +2 -27
- package/templates/scaffold/src/map/(external)/mailpit/_methods/assert-email-received.method.block.ts +2 -21
- package/templates/scaffold/src/map/(external)/mailpit/_methods/extract-email-link.method.block.ts +1 -19
- package/templates/scaffold/src/map/(external)/mailpit/_methods/open-message.method.block.ts +1 -11
- package/templates/scaffold/src/map/(external)/mailpit/_nav.block.ts +1 -9
- package/templates/scaffold/src/map/(external)/mailpit/_page.block.ts +0 -11
- package/templates/scaffold/src/states/demo.mem-keys.ts +20 -19
- package/templates/scaffold/src/states/demo.mem-stubs.ts +4 -0
- package/templates/scaffold/src/states/demo.states.ts +5 -1
- package/templates/scaffold/tests/example.spec.ts +6 -7
- package/templates/scaffold/tests/hoppscotch.spec.ts +97 -0
- package/templates/scaffold/tests/mail-verify.spec.ts +8 -17
- package/templates/scaffold/tsconfig.json +1 -1
- package/templates/skills/waygraph-convention.skill.md +40 -3
- package/templates/skills/waygraph-pilot.skill.md +4 -5
- package/dist/browser-path.d.ts +0 -5
- package/dist/browser-path.js +0 -18
- package/dist/runner/overlay-present.d.ts +0 -8
- package/dist/runner/overlay-present.js +0 -57
- package/dist/ui/components/banner.d.ts +0 -2
- package/dist/ui/components/banner.js +0 -10
- package/dist/ui/components/cursor.d.ts +0 -2
- package/dist/ui/components/cursor.js +0 -19
- package/templates/scaffold/playwright.config.ts +0 -12
- package/templates/scaffold/src/flows/example.flow.ts +0 -29
- package/templates/scaffold/src/flows/mail-verify.flow.ts +0 -85
- package/templates/scaffold/src/flows/shop.flow.ts +0 -74
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { Engine, start, end, withTitle, withHighlightFixtures } from "waygraph";
|
|
2
|
-
import { NavMailpitInboxBlock } from "../map/(external)/mailpit/_nav.block.js";
|
|
3
|
-
import { AssertEmailReceivedBlock } from "../map/(external)/mailpit/_methods/assert-email-received.method.block.js";
|
|
4
|
-
import { OpenMessageBlock } from "../map/(external)/mailpit/_methods/open-message.method.block.js";
|
|
5
|
-
import { AssertEmailContentBlock } from "../map/(external)/mailpit/_methods/assert-email-content.method.block.js";
|
|
6
|
-
import { ExtractEmailLinkBlock } from "../map/(external)/mailpit/_methods/extract-email-link.method.block.js";
|
|
7
|
-
import { NavVerificationLinkBlock } from "../map/(app_base)/home/nav-verification-link.block.js";
|
|
8
|
-
import "../map/(external)/mailpit/_page.block.js";
|
|
9
|
-
import { MailpitSel } from "../map/(external)/mailpit/_sel.js";
|
|
10
|
-
|
|
11
|
-
const engine = new Engine();
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Cross-origin mail demo, QA-rich: navigate to a real Mailpit inbox (a real,
|
|
15
|
-
* separate web UI - not this app), confirm the email actually arrived,
|
|
16
|
-
* open it, confirm its body says what it's supposed to, read a link
|
|
17
|
-
* straight out of the DOM, then navigate back into the app with it - six
|
|
18
|
-
* atomic Blocks, no mail-catcher REST API anywhere.
|
|
19
|
-
*
|
|
20
|
-
* The four mail-reading Blocks (`assert-email-received`, `open-message`,
|
|
21
|
-
* `assert-email-content`, `extract-email-link`) are reusable across any
|
|
22
|
-
* number of different email scenarios in a project (signup confirmation,
|
|
23
|
-
* password reset, magic link, ...) with zero new Blocks per scenario - only
|
|
24
|
-
* mem varies per run: `ExpectedRecipient` (who), `ExpectedLinkPattern`
|
|
25
|
-
* (which link in the body to follow), `ExpectedEmailContent` (what the body
|
|
26
|
-
* should say). This particular flow wires them to this scaffold's own
|
|
27
|
-
* "verified" landing route (`nav-verification-link`, app-specific by
|
|
28
|
-
* nature - a different scenario would use a different landing Nav) - see
|
|
29
|
-
* tests/mail-verify.spec.ts for two different scenarios driven through the
|
|
30
|
-
* same four mail-reading Blocks.
|
|
31
|
-
*
|
|
32
|
-
* Needs a real Mailpit instance reachable at WAYGRAPH_MAIL_URL (default
|
|
33
|
-
* http://127.0.0.1:8025) with a message already waiting for
|
|
34
|
-
* ExpectedRecipient's email - see tests/mail-verify.spec.ts for how the test
|
|
35
|
-
* drives this end to end (spins up a real Mailpit container, sends a real
|
|
36
|
-
* email, then runs this exact flow) - including the negative cases: no email
|
|
37
|
-
* arriving, or content that doesn't match, each fail loud, naming
|
|
38
|
-
* themselves, not a silent pass.
|
|
39
|
-
*/
|
|
40
|
-
export const mailVerifyFlow = withHighlightFixtures(
|
|
41
|
-
withTitle(
|
|
42
|
-
engine.defineFlow([
|
|
43
|
-
start,
|
|
44
|
-
NavMailpitInboxBlock,
|
|
45
|
-
AssertEmailReceivedBlock,
|
|
46
|
-
OpenMessageBlock,
|
|
47
|
-
AssertEmailContentBlock,
|
|
48
|
-
ExtractEmailLinkBlock,
|
|
49
|
-
NavVerificationLinkBlock,
|
|
50
|
-
end,
|
|
51
|
-
]),
|
|
52
|
-
"Scaffold: Cross-origin mail verification (QA-rich)",
|
|
53
|
-
),
|
|
54
|
-
{
|
|
55
|
-
"assert-email-received": {
|
|
56
|
-
stubAfter: {
|
|
57
|
-
note: {
|
|
58
|
-
selector: MailpitSel.messageRow,
|
|
59
|
-
label: "AC · email arrived",
|
|
60
|
-
detail: "Confirmed before opening anything.",
|
|
61
|
-
tag: "AC",
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
"assert-email-content": {
|
|
66
|
-
stubAfter: {
|
|
67
|
-
note: {
|
|
68
|
-
selector: MailpitSel.previewIframe,
|
|
69
|
-
label: "AC · email body matches expected copy",
|
|
70
|
-
tag: "AC",
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
"extract-email-link": {
|
|
75
|
-
stubAfter: {
|
|
76
|
-
note: {
|
|
77
|
-
selector: MailpitSel.previewIframe,
|
|
78
|
-
label: "AC · link found",
|
|
79
|
-
detail: "Read from the message preview iframe.",
|
|
80
|
-
tag: "AC",
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
);
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Engine,
|
|
3
|
-
start,
|
|
4
|
-
end,
|
|
5
|
-
withTitle,
|
|
6
|
-
withHighlightFixtures,
|
|
7
|
-
withSessionReset,
|
|
8
|
-
withMemStub,
|
|
9
|
-
registerMemStub,
|
|
10
|
-
} from "waygraph";
|
|
11
|
-
import { NavHomeBlock } from "../map/(app_base)/home/_nav.block.js";
|
|
12
|
-
import { AddItemBlock } from "../map/(app_base)/home/_methods/add-item.effect.block.js";
|
|
13
|
-
import { AssertItemAddedBlock } from "../map/(app_base)/home/_methods/assert-item-added.method.block.js";
|
|
14
|
-
import { RemoveItemBlock } from "../map/(app_base)/home/_methods/remove-item.effect.block.js";
|
|
15
|
-
import { ClearCartBlock } from "../map/(app_base)/home/_methods/clear-cart.method.block.js";
|
|
16
|
-
import { SelectedItem } from "../states/demo.mem-keys.js";
|
|
17
|
-
import "../map/(app_base)/home/_page.block.js";
|
|
18
|
-
|
|
19
|
-
const engine = new Engine();
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* memStub: a real fixture row (`alpha`/`Alpha`), registered once so this Flow never needs
|
|
23
|
-
* --data at all. Still override-able - `--data '{"demo.selectedItem":{"id":"beta",...}}'`
|
|
24
|
-
* wins over this registration, same as any other memStub (see docs/REFERENCE.md's own
|
|
25
|
-
* "memStub - fake values for requires" section).
|
|
26
|
-
*/
|
|
27
|
-
registerMemStub(SelectedItem.key, () => ({ id: "alpha", name: "Alpha" }));
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Effect + Method demo. `requires: [SelectedItem.key]` (on `add-item`) is filled automatically
|
|
31
|
-
* by the memStub registration above - no --data needed. Override it with real data, or use
|
|
32
|
-
* `waygraph auto` which fills SelectedItem via instanceOptions instead:
|
|
33
|
-
*
|
|
34
|
-
* waygraph demo --blocks shopFlow # memStub fills it
|
|
35
|
-
* waygraph demo --blocks shopFlow --data '{"demo.selectedItem":{"id":"beta","name":"Beta"}}'
|
|
36
|
-
* waygraph auto # after landing on home, pick Add Alpha / Add Beta / Remove ...
|
|
37
|
-
*
|
|
38
|
-
* Add -> assert it actually landed (mem-matched Remove button + cart count,
|
|
39
|
-
* only provable from the method's real effect, not a static page state) ->
|
|
40
|
-
* Remove that same row (per-item Effect, `remove-item`) -> Add again ->
|
|
41
|
-
* Clear cart (bulk Method, `clear-cart`) - keeps both the per-item and bulk
|
|
42
|
-
* clear paths atomic and each wired into a real flow, not orphaned.
|
|
43
|
-
*/
|
|
44
|
-
export const shopFlow = withMemStub(
|
|
45
|
-
withHighlightFixtures(
|
|
46
|
-
withTitle(
|
|
47
|
-
withSessionReset(
|
|
48
|
-
engine.defineFlow([
|
|
49
|
-
start,
|
|
50
|
-
NavHomeBlock,
|
|
51
|
-
AddItemBlock,
|
|
52
|
-
AssertItemAddedBlock,
|
|
53
|
-
RemoveItemBlock,
|
|
54
|
-
AddItemBlock,
|
|
55
|
-
ClearCartBlock,
|
|
56
|
-
end,
|
|
57
|
-
]),
|
|
58
|
-
),
|
|
59
|
-
"Scaffold: Shop (Effect + clear)",
|
|
60
|
-
),
|
|
61
|
-
{
|
|
62
|
-
"add-item": {
|
|
63
|
-
stubAfter: {
|
|
64
|
-
cart: {
|
|
65
|
-
label: "AC · item in cart",
|
|
66
|
-
detail: "Cart count bumped after Add.",
|
|
67
|
-
tag: "AC",
|
|
68
|
-
duration: true,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
),
|
|
74
|
-
);
|