waygraph 0.15.49 → 0.15.51
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/dist/analysis/map-check.js +5 -2
- package/dist/analysis/practices-check.js +17 -4
- package/dist/auto-session/session.js +3 -2
- package/dist/browser-path.d.ts +5 -0
- package/dist/browser-path.js +18 -0
- package/dist/cli/flags.d.ts +7 -5
- package/dist/cli/flags.js +9 -32
- package/dist/cli/run-chain.js +2 -1
- package/dist/commands/check.js +1 -1
- package/dist/commands/init.js +5 -0
- package/dist/commands/run.js +4 -4
- package/dist/commands/session.js +7 -7
- package/dist/config.d.ts +34 -0
- package/dist/config.js +94 -0
- package/dist/core/blocks/effect.d.ts +0 -3
- package/dist/core/blocks/method.d.ts +0 -6
- package/dist/core/blocks/nav.d.ts +0 -3
- package/dist/core/blocks/page.d.ts +0 -3
- package/dist/core/flow.js +3 -6
- package/dist/env-file.d.ts +10 -0
- package/dist/env-file.js +58 -0
- package/dist/highlights/types.d.ts +9 -8
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -0
- package/dist/runner/inpage/banner.js +10 -2
- package/dist/runner/inpage/caption.js +2 -2
- package/dist/runner/main.js +10 -6
- package/dist/session/auto-explore-run.d.ts +4 -1
- package/dist/session/auto-explore-run.js +18 -28
- package/dist/traverse/run.js +4 -22
- package/dist/types.d.ts +0 -3
- package/dist/webserver.d.ts +14 -0
- package/dist/webserver.js +91 -0
- package/examples/routed-demo/package.json +3 -3
- package/examples/routed-demo/playwright.config.ts +8 -8
- package/examples/routed-demo/scripts/fixture-server.mjs +12 -31
- package/examples/routed-demo/src/map/(app_base)/dashboard/_sel.ts +1 -3
- package/examples/routed-demo/src/map/(external)/docs/_sel.ts +1 -3
- package/examples/routed-demo/src/pages/dashboard.html +1 -1
- package/examples/routed-demo/src/pages/docs.html +1 -1
- package/examples/saucedemo/playwright.config.ts +2 -3
- package/examples/saucedemo/scripts/prove-add-to-cart-menu.mjs +2 -1
- package/examples/saucedemo/scripts/prove-auto-graph.mjs +2 -1
- package/examples/saucedemo/scripts/prove-wrong-login-runtime.mjs +2 -1
- package/examples/saucedemo/tests/flow-block-verify.spec.ts +2 -7
- package/package.json +10 -2
- package/templates/quickstart/playwright.config.ts +0 -6
- package/templates/scaffold/README.md +5 -3
- package/templates/scaffold/STRUCTURE.md +3 -4
- package/templates/scaffold/package.json +8 -12
- package/templates/scaffold/playwright.config.ts +2 -18
- package/templates/scaffold/src/flows/shop.flow.ts +42 -27
- package/templates/scaffold/src/map/(app_base)/docs/_nav.block.ts +1 -1
- package/templates/scaffold/src/map/(app_base)/docs/_sel.ts +2 -3
- package/templates/scaffold/src/map/(app_base)/docs/{docs.html → index.html} +1 -1
- package/templates/scaffold/src/map/(app_base)/home/_methods/add-item.effect.block.ts +12 -13
- package/templates/scaffold/src/map/(app_base)/home/_methods/assert-hello.method.block.ts +19 -22
- package/templates/scaffold/src/map/(app_base)/home/_methods/clear-cart.method.block.ts +7 -8
- package/templates/scaffold/src/map/(app_base)/home/_methods/remove-item.effect.block.ts +4 -8
- package/templates/scaffold/src/map/(app_base)/home/_nav.block.ts +10 -10
- package/templates/scaffold/src/map/(app_base)/home/_sel.ts +2 -4
- package/templates/scaffold/src/map/(app_base)/index.html +17 -0
- package/templates/scaffold/src/states/demo.states.ts +2 -0
- package/templates/scaffold/tests/README.md +3 -2
- package/templates/scaffold/tsconfig.json +1 -1
- package/templates/skills/waygraph-convention.skill.md +5 -3
- package/templates/skills/waygraph-pilot.skill.md +1 -1
- package/examples/routed-demo/.waygraph-auto/4d4902b7.log +0 -0
- package/examples/routed-demo/.waygraph-auto/51ef462e.log +0 -0
- package/examples/routed-demo/.waygraph-auto/71527ad9.log +0 -0
- package/examples/routed-demo/.waygraph-auto/ca16778e.log +0 -0
- package/examples/routed-demo/scripts/with-fixture.mjs +0 -70
- package/examples/saucedemo/.waygraph-auto/00b0c55c.log +0 -22
- package/examples/saucedemo/.waygraph-auto/00d147d1.log +0 -21
- package/examples/saucedemo/.waygraph-auto/00e5d037.log +0 -5
- package/examples/saucedemo/.waygraph-auto/015be8f6.log +0 -6
- package/examples/saucedemo/.waygraph-auto/026e188e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/02f7dd22.log +0 -20
- package/examples/saucedemo/.waygraph-auto/03df352d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0402cfcf.log +0 -6
- package/examples/saucedemo/.waygraph-auto/050e5b55.log +0 -0
- package/examples/saucedemo/.waygraph-auto/05d76fc3.log +0 -0
- package/examples/saucedemo/.waygraph-auto/062b581f.log +0 -20
- package/examples/saucedemo/.waygraph-auto/0681582b.log +0 -6
- package/examples/saucedemo/.waygraph-auto/07845ed1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/07f3e964.log +0 -6
- package/examples/saucedemo/.waygraph-auto/0868ae4d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0924ddaa.log +0 -22
- package/examples/saucedemo/.waygraph-auto/092d6173.log +0 -5
- package/examples/saucedemo/.waygraph-auto/096fea05.log +0 -20
- package/examples/saucedemo/.waygraph-auto/09924510.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0998c941.log +0 -21
- package/examples/saucedemo/.waygraph-auto/0a8c3719.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0bf74300.log +0 -21
- package/examples/saucedemo/.waygraph-auto/0c01fd29.log +0 -4
- package/examples/saucedemo/.waygraph-auto/0c19e232.log +0 -5
- package/examples/saucedemo/.waygraph-auto/0c302590.log +0 -0
- package/examples/saucedemo/.waygraph-auto/0dee62d6.log +0 -5
- package/examples/saucedemo/.waygraph-auto/0eb4c081.log +0 -5
- package/examples/saucedemo/.waygraph-auto/0f0cb120.log +0 -0
- package/examples/saucedemo/.waygraph-auto/102c38ca.log +0 -0
- package/examples/saucedemo/.waygraph-auto/10fd431c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1122c13c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/123d1cad.log +0 -5
- package/examples/saucedemo/.waygraph-auto/12ed8e28.log +0 -0
- package/examples/saucedemo/.waygraph-auto/13c6fe3c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1581b677.log +0 -0
- package/examples/saucedemo/.waygraph-auto/164761a5.log +0 -6
- package/examples/saucedemo/.waygraph-auto/1905ceb2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1b1d55c6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1b80fd24.log +0 -6
- package/examples/saucedemo/.waygraph-auto/1bd7b7bf.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1c30a3c2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1c58a174.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1cb6f44c.log +0 -5
- package/examples/saucedemo/.waygraph-auto/1d90aa9a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1de7d889.log +0 -0
- package/examples/saucedemo/.waygraph-auto/1f233a4c.log +0 -6
- package/examples/saucedemo/.waygraph-auto/1fdb2100.log +0 -0
- package/examples/saucedemo/.waygraph-auto/20e66801.log +0 -0
- package/examples/saucedemo/.waygraph-auto/20e91af6.log +0 -5
- package/examples/saucedemo/.waygraph-auto/20ffdb77.log +0 -0
- package/examples/saucedemo/.waygraph-auto/222d1d09.log +0 -0
- package/examples/saucedemo/.waygraph-auto/22f1a704.log +0 -5
- package/examples/saucedemo/.waygraph-auto/2324269a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/232a1d81.log +0 -0
- package/examples/saucedemo/.waygraph-auto/239cced3.log +0 -20
- package/examples/saucedemo/.waygraph-auto/25204b46.log +0 -4
- package/examples/saucedemo/.waygraph-auto/2553d107.log +0 -0
- package/examples/saucedemo/.waygraph-auto/25e2e90f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2708455e.log +0 -22
- package/examples/saucedemo/.waygraph-auto/272a96fd.log +0 -20
- package/examples/saucedemo/.waygraph-auto/28d7be5d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2a577961.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2a6a8266.log +0 -6
- package/examples/saucedemo/.waygraph-auto/2b3401cf.log +0 -20
- package/examples/saucedemo/.waygraph-auto/2b831907.log +0 -6
- package/examples/saucedemo/.waygraph-auto/2b9b56fc.log +0 -20
- package/examples/saucedemo/.waygraph-auto/2c79c73a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2c94a05b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2ceccd6d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2e2069e7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2e6bc35e.log +0 -6
- package/examples/saucedemo/.waygraph-auto/2efd1983.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2f1b0c13.log +0 -6
- package/examples/saucedemo/.waygraph-auto/2f4f531e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/2f8d4073.log +0 -6
- package/examples/saucedemo/.waygraph-auto/2fdbd916.log +0 -0
- package/examples/saucedemo/.waygraph-auto/30739278.log +0 -6
- package/examples/saucedemo/.waygraph-auto/30a5c848.log +0 -20
- package/examples/saucedemo/.waygraph-auto/31cb2e80.log +0 -0
- package/examples/saucedemo/.waygraph-auto/322d63cd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3239aa8a.log +0 -6
- package/examples/saucedemo/.waygraph-auto/326d87b7.log +0 -6
- package/examples/saucedemo/.waygraph-auto/331c6e8e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3351c0b6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/33a50dc0.log +0 -0
- package/examples/saucedemo/.waygraph-auto/33df0770.log +0 -0
- package/examples/saucedemo/.waygraph-auto/340d624d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/36367ccf.log +0 -0
- package/examples/saucedemo/.waygraph-auto/372536a5.log +0 -6
- package/examples/saucedemo/.waygraph-auto/37b56184.log +0 -0
- package/examples/saucedemo/.waygraph-auto/38f6799d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3a208bb8.log +0 -20
- package/examples/saucedemo/.waygraph-auto/3a412f3c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3a859bd7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3a8674d5.log +0 -6
- package/examples/saucedemo/.waygraph-auto/3bdb2f5a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3c1e5fe0.log +0 -22
- package/examples/saucedemo/.waygraph-auto/3cb0add7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3e3c0f3b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3e42f0d8.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3f088138.log +0 -0
- package/examples/saucedemo/.waygraph-auto/401177a3.log +0 -0
- package/examples/saucedemo/.waygraph-auto/413d934d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4144071d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4176a3c6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/41d0793d.log +0 -4
- package/examples/saucedemo/.waygraph-auto/41e6feae.log +0 -0
- package/examples/saucedemo/.waygraph-auto/424b4d5d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/42e014d1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/43253aba.log +0 -0
- package/examples/saucedemo/.waygraph-auto/432d09e3.log +0 -22
- package/examples/saucedemo/.waygraph-auto/438c6c53.log +0 -22
- package/examples/saucedemo/.waygraph-auto/4477db12.log +0 -0
- package/examples/saucedemo/.waygraph-auto/47247959.log +0 -0
- package/examples/saucedemo/.waygraph-auto/476cff76.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4a1258b7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4ad09ece.log +0 -0
- package/examples/saucedemo/.waygraph-auto/4adcd179.log +0 -20
- package/examples/saucedemo/.waygraph-auto/4c9d9b16.log +0 -21
- package/examples/saucedemo/.waygraph-auto/4cebc228.log +0 -20
- package/examples/saucedemo/.waygraph-auto/4da39c36.log +0 -6
- package/examples/saucedemo/.waygraph-auto/4dbefa7e.log +0 -5
- package/examples/saucedemo/.waygraph-auto/4efa7035.log +0 -6
- package/examples/saucedemo/.waygraph-auto/505affdc.log +0 -4
- package/examples/saucedemo/.waygraph-auto/51bcb60a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/527b6d76.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5291bc78.log +0 -22
- package/examples/saucedemo/.waygraph-auto/535e8922.log +0 -0
- package/examples/saucedemo/.waygraph-auto/54274c39.log +0 -5
- package/examples/saucedemo/.waygraph-auto/5440ce7e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5738175f.log +0 -22
- package/examples/saucedemo/.waygraph-auto/573abedd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/57ce5643.log +0 -22
- package/examples/saucedemo/.waygraph-auto/5984426b.log +0 -6
- package/examples/saucedemo/.waygraph-auto/5a682e7c.log +0 -22
- package/examples/saucedemo/.waygraph-auto/5b79320c.log +0 -21
- package/examples/saucedemo/.waygraph-auto/5b838485.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5c55aaac.log +0 -21
- package/examples/saucedemo/.waygraph-auto/5d13bdde.log +0 -0
- package/examples/saucedemo/.waygraph-auto/5ed00b16.log +0 -4
- package/examples/saucedemo/.waygraph-auto/60b9c066.log +0 -6
- package/examples/saucedemo/.waygraph-auto/610dd127.log +0 -0
- package/examples/saucedemo/.waygraph-auto/61105500.log +0 -5
- package/examples/saucedemo/.waygraph-auto/61333142.log +0 -5
- package/examples/saucedemo/.waygraph-auto/6134afe8.log +0 -20
- package/examples/saucedemo/.waygraph-auto/61937e83.log +0 -22
- package/examples/saucedemo/.waygraph-auto/625e7f65.log +0 -5
- package/examples/saucedemo/.waygraph-auto/62a0bdc9.log +0 -22
- package/examples/saucedemo/.waygraph-auto/6376fc15.log +0 -0
- package/examples/saucedemo/.waygraph-auto/63b0f4cd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6599cbca.log +0 -22
- package/examples/saucedemo/.waygraph-auto/6706ead4.log +0 -0
- package/examples/saucedemo/.waygraph-auto/67aaca30.log +0 -0
- package/examples/saucedemo/.waygraph-auto/685714af.log +0 -0
- package/examples/saucedemo/.waygraph-auto/68b10298.log +0 -0
- package/examples/saucedemo/.waygraph-auto/68be5e12.log +0 -0
- package/examples/saucedemo/.waygraph-auto/68df05a6.log +0 -22
- package/examples/saucedemo/.waygraph-auto/68fa0682.log +0 -0
- package/examples/saucedemo/.waygraph-auto/693f67c4.log +0 -20
- package/examples/saucedemo/.waygraph-auto/69ae030a.log +0 -6
- package/examples/saucedemo/.waygraph-auto/69e73f35.log +0 -6
- package/examples/saucedemo/.waygraph-auto/6b2333b0.log +0 -5
- package/examples/saucedemo/.waygraph-auto/6c4c3817.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6c954911.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6d65a439.log +0 -5
- package/examples/saucedemo/.waygraph-auto/6d700055.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6ead848f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6f05bdc1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/70279fc3.log +0 -0
- package/examples/saucedemo/.waygraph-auto/70c97639.log +0 -0
- package/examples/saucedemo/.waygraph-auto/72675b2d.log +0 -6
- package/examples/saucedemo/.waygraph-auto/731a14bd.log +0 -0
- package/examples/saucedemo/.waygraph-auto/733dd260.log +0 -5
- package/examples/saucedemo/.waygraph-auto/73a41843.log +0 -0
- package/examples/saucedemo/.waygraph-auto/75016486.log +0 -0
- package/examples/saucedemo/.waygraph-auto/752b01c6.log +0 -22
- package/examples/saucedemo/.waygraph-auto/75675227.log +0 -6
- package/examples/saucedemo/.waygraph-auto/756fd326.log +0 -20
- package/examples/saucedemo/.waygraph-auto/75e2e658.log +0 -0
- package/examples/saucedemo/.waygraph-auto/76128a2d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/76ac1a86.log +0 -0
- package/examples/saucedemo/.waygraph-auto/77605295.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7773a809.log +0 -0
- package/examples/saucedemo/.waygraph-auto/78043767.log +0 -20
- package/examples/saucedemo/.waygraph-auto/792671f4.log +0 -22
- package/examples/saucedemo/.waygraph-auto/796ab578.log +0 -0
- package/examples/saucedemo/.waygraph-auto/79915adb.log +0 -20
- package/examples/saucedemo/.waygraph-auto/7a398774.log +0 -6
- package/examples/saucedemo/.waygraph-auto/7a72f66e.log +0 -6
- package/examples/saucedemo/.waygraph-auto/7a984334.log +0 -4
- package/examples/saucedemo/.waygraph-auto/7b226350.log +0 -5
- package/examples/saucedemo/.waygraph-auto/7c6ee793.log +0 -20
- package/examples/saucedemo/.waygraph-auto/7c726dc4.log +0 -22
- package/examples/saucedemo/.waygraph-auto/7c72e8a5.log +0 -4
- package/examples/saucedemo/.waygraph-auto/7c99674f.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7dbee625.log +0 -22
- package/examples/saucedemo/.waygraph-auto/7df66956.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7e053160.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7e8a6b62.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7effd5b2.log +0 -20
- package/examples/saucedemo/.waygraph-auto/7f1b4864.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7f94fd02.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7fdd47ee.log +0 -2
- package/examples/saucedemo/.waygraph-auto/802a0b5b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/80322e0b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/80a4978e.log +0 -6
- package/examples/saucedemo/.waygraph-auto/81257bf0.log +0 -0
- package/examples/saucedemo/.waygraph-auto/81cfe480.log +0 -22
- package/examples/saucedemo/.waygraph-auto/832f5add.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8337b6ad.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8481aa1c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8493928e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/849ed45d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/853bde43.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8598b4c0.log +0 -0
- package/examples/saucedemo/.waygraph-auto/859a261d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/86350ea6.log +0 -22
- package/examples/saucedemo/.waygraph-auto/86bb598a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/86d09876.log +0 -22
- package/examples/saucedemo/.waygraph-auto/878ad01b.log +0 -4
- package/examples/saucedemo/.waygraph-auto/87c88ba5.log +0 -0
- package/examples/saucedemo/.waygraph-auto/87cb80ff.log +0 -0
- package/examples/saucedemo/.waygraph-auto/880b2e78.log +0 -6
- package/examples/saucedemo/.waygraph-auto/88527936.log +0 -5
- package/examples/saucedemo/.waygraph-auto/893023ea.log +0 -5
- package/examples/saucedemo/.waygraph-auto/89416718.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8996a857.log +0 -6
- package/examples/saucedemo/.waygraph-auto/8a64ba0f.log +0 -6
- package/examples/saucedemo/.waygraph-auto/8b1cc2aa.log +0 -6
- package/examples/saucedemo/.waygraph-auto/8b73d13e.log +0 -6
- package/examples/saucedemo/.waygraph-auto/8be93021.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8d960d31.log +0 -1
- package/examples/saucedemo/.waygraph-auto/8d9e5cd2.log +0 -21
- package/examples/saucedemo/.waygraph-auto/8e12e34f.log +0 -22
- package/examples/saucedemo/.waygraph-auto/8ec7d260.log +0 -0
- package/examples/saucedemo/.waygraph-auto/8ed43279.log +0 -0
- package/examples/saucedemo/.waygraph-auto/93acae32.log +0 -5
- package/examples/saucedemo/.waygraph-auto/94221b2b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/96321a08.log +0 -0
- package/examples/saucedemo/.waygraph-auto/9742b6c2.log +0 -6
- package/examples/saucedemo/.waygraph-auto/9761c4c4.log +0 -6
- package/examples/saucedemo/.waygraph-auto/976394cd.log +0 -20
- package/examples/saucedemo/.waygraph-auto/982138cf.log +0 -0
- package/examples/saucedemo/.waygraph-auto/99cc93eb.log +0 -6
- package/examples/saucedemo/.waygraph-auto/9a26134c.log +0 -20
- package/examples/saucedemo/.waygraph-auto/9cbfbedc.log +0 -0
- package/examples/saucedemo/.waygraph-auto/9d827954.log +0 -20
- package/examples/saucedemo/.waygraph-auto/9dc147d2.log +0 -22
- package/examples/saucedemo/.waygraph-auto/9dd78c5e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a1ab5d29.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a215a395.log +0 -22
- package/examples/saucedemo/.waygraph-auto/a23b7086.log +0 -4
- package/examples/saucedemo/.waygraph-auto/a35bd5ec.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a4b36275.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a4f8d355.log +0 -20
- package/examples/saucedemo/.waygraph-auto/a68995e9.log +0 -22
- package/examples/saucedemo/.waygraph-auto/a6e4f936.log +0 -22
- package/examples/saucedemo/.waygraph-auto/a7da862b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a82e2a48.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a8645294.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a94738b7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a952eb91.log +0 -0
- package/examples/saucedemo/.waygraph-auto/a9559653.log +0 -5
- package/examples/saucedemo/.waygraph-auto/aa1beafb.log +0 -0
- package/examples/saucedemo/.waygraph-auto/aa226dd0.log +0 -22
- package/examples/saucedemo/.waygraph-auto/aa478de2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/aa7323f8.log +0 -20
- package/examples/saucedemo/.waygraph-auto/aaae4fb0.log +0 -20
- package/examples/saucedemo/.waygraph-auto/ac350fc7.log +0 -20
- package/examples/saucedemo/.waygraph-auto/ac5dde3d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/acc1b63a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ad0bfad9.log +0 -5
- package/examples/saucedemo/.waygraph-auto/ad12d191.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ae3a9b06.log +0 -0
- package/examples/saucedemo/.waygraph-auto/af2fae12.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b04638f4.log +0 -6
- package/examples/saucedemo/.waygraph-auto/b0752c49.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b14811d7.log +0 -6
- package/examples/saucedemo/.waygraph-auto/b2d2dbb2.log +0 -22
- package/examples/saucedemo/.waygraph-auto/b3d172f3.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b48863e5.log +0 -22
- package/examples/saucedemo/.waygraph-auto/b5569336.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b56968e1.log +0 -6
- package/examples/saucedemo/.waygraph-auto/b57921c5.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b64e0620.log +0 -20
- package/examples/saucedemo/.waygraph-auto/b75168f7.log +0 -1
- package/examples/saucedemo/.waygraph-auto/b86a6218.log +0 -6
- package/examples/saucedemo/.waygraph-auto/b8e9e956.log +0 -22
- package/examples/saucedemo/.waygraph-auto/b9ab0983.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b9b310ff.log +0 -21
- package/examples/saucedemo/.waygraph-auto/bb0e0e46.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bc111745.log +0 -22
- package/examples/saucedemo/.waygraph-auto/bf7a77a2.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bf85a598.log +0 -0
- package/examples/saucedemo/.waygraph-auto/bf8693e7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c0d6f353.log +0 -21
- package/examples/saucedemo/.waygraph-auto/c0febcf2.log +0 -20
- package/examples/saucedemo/.waygraph-auto/c4c52998.log +0 -6
- package/examples/saucedemo/.waygraph-auto/c52bac6d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c60cc55e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c809ceb4.log +0 -22
- package/examples/saucedemo/.waygraph-auto/c851cc53.log +0 -6
- package/examples/saucedemo/.waygraph-auto/c8987b67.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c9d76e32.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ca6de7e7.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ca8561bc.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cae91469.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cb05d223.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cb86d45b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cb9a1978.log +0 -6
- package/examples/saucedemo/.waygraph-auto/cbbc689c.log +0 -6
- package/examples/saucedemo/.waygraph-auto/cc989184.log +0 -20
- package/examples/saucedemo/.waygraph-auto/cd88364b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cd919e1d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ce584949.log +0 -5
- package/examples/saucedemo/.waygraph-auto/cf34b895.log +0 -2
- package/examples/saucedemo/.waygraph-auto/cfff9eef.log +0 -20
- package/examples/saucedemo/.waygraph-auto/d0f59b21.log +0 -4
- package/examples/saucedemo/.waygraph-auto/d1195079.log +0 -20
- package/examples/saucedemo/.waygraph-auto/d2ef067a.log +0 -5
- package/examples/saucedemo/.waygraph-auto/d37719a6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d425471f.log +0 -6
- package/examples/saucedemo/.waygraph-auto/d4afe93f.log +0 -5
- package/examples/saucedemo/.waygraph-auto/d50e58f0.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d5293921.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d62a22c2.log +0 -21
- package/examples/saucedemo/.waygraph-auto/d6d1761f.log +0 -22
- package/examples/saucedemo/.waygraph-auto/d6d5f411.log +0 -22
- package/examples/saucedemo/.waygraph-auto/d6df2771.log +0 -6
- package/examples/saucedemo/.waygraph-auto/d7075012.log +0 -21
- package/examples/saucedemo/.waygraph-auto/d846cd78.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d934da78.log +0 -0
- package/examples/saucedemo/.waygraph-auto/d9ddc297.log +0 -0
- package/examples/saucedemo/.waygraph-auto/da0a06bf.log +0 -0
- package/examples/saucedemo/.waygraph-auto/da6ebb31.log +0 -0
- package/examples/saucedemo/.waygraph-auto/db4ac845.log +0 -0
- package/examples/saucedemo/.waygraph-auto/db6d7774.log +0 -0
- package/examples/saucedemo/.waygraph-auto/db81ba7d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/db839827.log +0 -5
- package/examples/saucedemo/.waygraph-auto/dc58eb72.log +0 -0
- package/examples/saucedemo/.waygraph-auto/dddd057c.log +0 -20
- package/examples/saucedemo/.waygraph-auto/dde5e859.log +0 -22
- package/examples/saucedemo/.waygraph-auto/ddf975e6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/de8cac58.log +0 -0
- package/examples/saucedemo/.waygraph-auto/de8cb83d.log +0 -6
- package/examples/saucedemo/.waygraph-auto/ded5511a.log +0 -6
- package/examples/saucedemo/.waygraph-auto/dedfcb18.log +0 -0
- package/examples/saucedemo/.waygraph-auto/def4d9b1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e03cfd8e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e1549e40.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e1b0676d.log +0 -21
- package/examples/saucedemo/.waygraph-auto/e230f24e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e5111463.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e5127c03.log +0 -22
- package/examples/saucedemo/.waygraph-auto/e5fc1d7c.log +0 -5
- package/examples/saucedemo/.waygraph-auto/e6fd2202.log +0 -0
- package/examples/saucedemo/.waygraph-auto/eb38d92e.log +0 -22
- package/examples/saucedemo/.waygraph-auto/edaa806d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/edaf33de.log +0 -0
- package/examples/saucedemo/.waygraph-auto/edd40cbb.log +0 -20
- package/examples/saucedemo/.waygraph-auto/eddfbffc.log +0 -6
- package/examples/saucedemo/.waygraph-auto/ee86203e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ee9fa1ad.log +0 -5
- package/examples/saucedemo/.waygraph-auto/ef319474.log +0 -22
- package/examples/saucedemo/.waygraph-auto/f1f38eeb.log +0 -22
- package/examples/saucedemo/.waygraph-auto/f24b2915.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f28eee8d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f2943898.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f33bde90.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f43de83c.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f6ba7cb4.log +0 -6
- package/examples/saucedemo/.waygraph-auto/f7ac4d62.log +0 -20
- package/examples/saucedemo/.waygraph-auto/f86224c6.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f929bb79.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f92d4c6c.log +0 -22
- package/examples/saucedemo/.waygraph-auto/f92faf40.log +0 -5
- package/examples/saucedemo/.waygraph-auto/fa784369.log +0 -21
- package/examples/saucedemo/.waygraph-auto/fb55f723.log +0 -20
- package/examples/saucedemo/.waygraph-auto/fba3b738.log +0 -0
- package/examples/saucedemo/.waygraph-auto/fc917c18.log +0 -0
- package/examples/saucedemo/.waygraph-auto/fe83305d.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ff616932.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ffdf2854.log +0 -6
- package/examples/saucedemo/scripts/capture-auto-headful.mjs +0 -120
- package/examples/saucedemo/scripts/capture-wrong-login.mjs +0 -141
- package/examples/saucedemo/scripts/demo-device-presets.mjs +0 -188
- package/examples/saucedemo/scripts/demo-orientation-gestures-video.mjs +0 -262
- package/examples/saucedemo/scripts/show-add-to-cart-menu.mjs +0 -123
- package/examples/saucedemo/scripts/show-auto-menu.mjs +0 -72
- package/templates/scaffold/scripts/README.md +0 -13
- package/templates/scaffold/scripts/fixture-server.mjs +0 -50
- package/templates/scaffold/scripts/with-fixture.mjs +0 -69
- package/templates/scaffold/test-results/.last-run.json +0 -4
- /package/templates/scaffold/src/map/(app_base)/home/{home.html → index.html} +0 -0
|
@@ -117,12 +117,15 @@ export async function checkMap(projectDir) {
|
|
|
117
117
|
continue; // only statically-urled Nav/Page Blocks are checkable
|
|
118
118
|
let pathname;
|
|
119
119
|
try {
|
|
120
|
-
|
|
120
|
+
// Relative URLs (the normal baseUrl case) are paths from the app root.
|
|
121
|
+
pathname = new URL(navUrl, "http://app.invalid/").pathname;
|
|
121
122
|
}
|
|
122
123
|
catch {
|
|
123
|
-
continue;
|
|
124
|
+
continue;
|
|
124
125
|
}
|
|
125
126
|
const urlSegments = pathname.split("/").filter(Boolean);
|
|
127
|
+
if (urlSegments.at(-1) === "index.html")
|
|
128
|
+
urlSegments.pop(); // /docs/index.html is the docs/ folder
|
|
126
129
|
const folderSegments = realSegments(relative(mapRoot, file));
|
|
127
130
|
const matches = urlSegments.length === folderSegments.length && urlSegments.every((s, i) => s === folderSegments[i]);
|
|
128
131
|
if (!matches) {
|
|
@@ -5,8 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { readFileSync, readdirSync } from "node:fs";
|
|
7
7
|
import { dirname, relative } from "node:path";
|
|
8
|
-
/** define*Block
|
|
9
|
-
const
|
|
8
|
+
/** Every define*Block<In, Out> / <Out> generic list - args may themselves be Checkpoint<...>. */
|
|
9
|
+
const BLOCK_GENERICS = /\bdefine(?:Method|Effect|MemEffect|Page|Nav|MemNav|NavClick|Action)Block\s*<\s*((?:Checkpoint\s*<[^>]*>|[^,<>])+?)\s*(?:,\s*((?:Checkpoint\s*<[^>]*>|[^,<>])+?)\s*)?>/g;
|
|
10
|
+
/**
|
|
11
|
+
* A wildcard Out (the Block's result is untyped). A wildcard In is fine - it's the documented
|
|
12
|
+
* "reachable from anywhere" form (graph.ts treats it like a NavBlock's "*").
|
|
13
|
+
*/
|
|
14
|
+
function hasWildcardOut(src) {
|
|
15
|
+
for (const m of src.matchAll(BLOCK_GENERICS)) {
|
|
16
|
+
const out = (m[2] ?? m[1]).trim();
|
|
17
|
+
if (/^Checkpoint\s*<\s*string\s*>$/.test(out))
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
10
22
|
/** defineAssertBlock({ … }) with no explicit Out type — defaults to wildcard. */
|
|
11
23
|
const ASSERT_NO_TYPE_ARG = /\bdefineAssertBlock\s*\(\s*\{/;
|
|
12
24
|
/** defineAssertBlock, any form - used to scope the empty-verify check below. */
|
|
@@ -74,11 +86,12 @@ export function collectPracticeWarnings(projectDir, walkDir, opts) {
|
|
|
74
86
|
const rel = relative(projectDir, file).replace(/\\/g, "/");
|
|
75
87
|
const src = readFileSync(file, "utf-8");
|
|
76
88
|
const ignore = ignoredKindsForFile(src);
|
|
77
|
-
if (!isIgnored("wildcard-checkpoint", ignore) &&
|
|
89
|
+
if (!isIgnored("wildcard-checkpoint", ignore) && hasWildcardOut(src)) {
|
|
78
90
|
warnings.push({
|
|
79
91
|
kind: "wildcard-checkpoint",
|
|
80
92
|
file: rel,
|
|
81
|
-
detail: '
|
|
93
|
+
detail: "the Block's output is Checkpoint<string>, so its result is untyped — use a typed Checkpoint from " +
|
|
94
|
+
"src/states/ (e.g. defineMethodBlock<LoginPage, LoggedIn>); a wildcard input is fine",
|
|
82
95
|
});
|
|
83
96
|
}
|
|
84
97
|
if (!isIgnored("assert-no-type-arg", ignore) && ASSERT_NO_TYPE_ARG.test(src)) {
|
|
@@ -9,6 +9,7 @@ import { collectKnownInteractionSelectors, unmappedInteractionsPageScript } from
|
|
|
9
9
|
import { runStubPhase } from "../highlights.js";
|
|
10
10
|
import { verboseLog } from "./verbose-log.js";
|
|
11
11
|
import { findBlockPathDetailed } from "../analysis/graph.js";
|
|
12
|
+
import { chromiumExecutablePath } from "../browser-path.js";
|
|
12
13
|
/**
|
|
13
14
|
* Non-interactive explore session: same graph/library/mem/browser setup
|
|
14
15
|
* `runAutoExplore` runs in `--cli` mode, driven by `applyPick` instead of a
|
|
@@ -54,7 +55,7 @@ export class AutoSession {
|
|
|
54
55
|
this.headless = headless;
|
|
55
56
|
}
|
|
56
57
|
static async start(init) {
|
|
57
|
-
const baseURL = init.baseURL ?? resolveBaseUrl(init.projectDir);
|
|
58
|
+
const baseURL = init.baseURL ?? (await resolveBaseUrl(init.projectDir));
|
|
58
59
|
const skipNav = init.skipInitialNavigation === true;
|
|
59
60
|
const startUrl = skipNav ? undefined : (init.startUrl ?? baseURL);
|
|
60
61
|
const exploreOpts = {
|
|
@@ -67,7 +68,7 @@ export class AutoSession {
|
|
|
67
68
|
const headless = init.headless ?? true;
|
|
68
69
|
const engine = new Engine({ headless });
|
|
69
70
|
const { chromium } = await import("@playwright/test");
|
|
70
|
-
const executablePath =
|
|
71
|
+
const executablePath = chromiumExecutablePath();
|
|
71
72
|
// Real gap found live: a headed (--non-headless) session kept a fixed
|
|
72
73
|
// 1280x720 content area even when the user maximized/fullscreened the
|
|
73
74
|
// actual window - `viewport: null` alone only makes the PAGE track the
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CHROME_PATH / CHROMIUM_PATH, if set and the file exists. A stale path (browser uninstalled)
|
|
3
|
+
* falls back to Playwright's bundled Chromium with a one-time warning instead of failing the run.
|
|
4
|
+
*/
|
|
5
|
+
export declare function chromiumExecutablePath(): string | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
let warned = false;
|
|
3
|
+
/**
|
|
4
|
+
* CHROME_PATH / CHROMIUM_PATH, if set and the file exists. A stale path (browser uninstalled)
|
|
5
|
+
* falls back to Playwright's bundled Chromium with a one-time warning instead of failing the run.
|
|
6
|
+
*/
|
|
7
|
+
export function chromiumExecutablePath() {
|
|
8
|
+
const path = process.env.CHROME_PATH || process.env.CHROMIUM_PATH;
|
|
9
|
+
if (!path)
|
|
10
|
+
return undefined;
|
|
11
|
+
if (existsSync(path))
|
|
12
|
+
return path;
|
|
13
|
+
if (!warned) {
|
|
14
|
+
warned = true;
|
|
15
|
+
console.error(`waygraph: CHROME_PATH/CHROMIUM_PATH "${path}" does not exist - using Playwright's bundled Chromium`);
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
package/dist/cli/flags.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveBaseUrl } from "../config.js";
|
|
1
2
|
interface RunFlags {
|
|
2
3
|
step?: boolean;
|
|
3
4
|
autoplay?: boolean;
|
|
@@ -73,16 +74,18 @@ export declare function applyRunFlags(flags: RunFlags, opts?: {
|
|
|
73
74
|
allowDemoUi?: boolean;
|
|
74
75
|
}): void;
|
|
75
76
|
/**
|
|
76
|
-
* BASE_URL when neither --base-url nor WAYGRAPH_BASE_URL is set
|
|
77
|
-
*
|
|
77
|
+
* BASE_URL when neither --base-url nor WAYGRAPH_BASE_URL is set - see `../config.js`'s own
|
|
78
|
+
* `resolveBaseUrl` for the full resolution order (env / `.env` / `waygraph.config.*` /
|
|
79
|
+
* package.json / playwright.config). Re-exported here so existing importers of this module
|
|
80
|
+
* don't need to change their import path.
|
|
78
81
|
*/
|
|
79
|
-
export
|
|
82
|
+
export { resolveBaseUrl };
|
|
80
83
|
/**
|
|
81
84
|
* Friendly demo defaults: STEP on; headed only for live watch (no --video).
|
|
82
85
|
* --video / --auto-play-video => headless unless --non-headless.
|
|
83
86
|
* Call after applyRunFlags so explicit flags already won.
|
|
84
87
|
*/
|
|
85
|
-
export declare function applyDemoDefaults(projectDir: string): void
|
|
88
|
+
export declare function applyDemoDefaults(projectDir: string): Promise<void>;
|
|
86
89
|
export declare function resolveProjectDir(flags: RunFlags, fallbackIndex?: number): string;
|
|
87
90
|
export declare function resolveSpec(flags: RunFlags): string | undefined;
|
|
88
91
|
/** `shop.flow.ts` / `src/flows/cart-bulk.flow.ts` / absolute path — not a Checkpoint or export id. */
|
|
@@ -92,4 +95,3 @@ export declare function looksLikeFlowFileRef(ref: string): boolean;
|
|
|
92
95
|
* `src/flows/shop.flow.ts` → `shopFlow`; leaves `loginFlow then nav-cart` alone.
|
|
93
96
|
*/
|
|
94
97
|
export declare function expandSpecFlowFiles(projectDir: string, spec: string): Promise<string>;
|
|
95
|
-
export {};
|
package/dist/cli/flags.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Split out of the former 8,700-line cli.ts (see src/ARCHITECTURE.md). Behavior unchanged.
|
|
2
|
-
import { basename,
|
|
2
|
+
import { basename, relative, resolve } from "node:path";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { walkDir } from "./discover.js";
|
|
5
|
+
import { resolveBaseUrl } from "../config.js";
|
|
5
6
|
function takeFlagValue(argv, i, a, flag) {
|
|
6
7
|
if (a.startsWith(flag + "=")) {
|
|
7
8
|
return { value: a.slice(flag.length + 1), nextI: i };
|
|
@@ -310,42 +311,18 @@ export function applyRunFlags(flags, opts) {
|
|
|
310
311
|
}
|
|
311
312
|
}
|
|
312
313
|
/**
|
|
313
|
-
* BASE_URL when neither --base-url nor WAYGRAPH_BASE_URL is set
|
|
314
|
-
*
|
|
314
|
+
* BASE_URL when neither --base-url nor WAYGRAPH_BASE_URL is set - see `../config.js`'s own
|
|
315
|
+
* `resolveBaseUrl` for the full resolution order (env / `.env` / `waygraph.config.*` /
|
|
316
|
+
* package.json / playwright.config). Re-exported here so existing importers of this module
|
|
317
|
+
* don't need to change their import path.
|
|
315
318
|
*/
|
|
316
|
-
export
|
|
317
|
-
const pkgPath = join(projectDir, "package.json");
|
|
318
|
-
if (existsSync(pkgPath)) {
|
|
319
|
-
try {
|
|
320
|
-
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
321
|
-
const fromPkg = pkg.waygraph?.baseUrl ??
|
|
322
|
-
pkg.waygraph?.baseURL ??
|
|
323
|
-
pkg.config?.waygraph?.baseUrl ??
|
|
324
|
-
pkg.config?.waygraph?.baseURL;
|
|
325
|
-
if (typeof fromPkg === "string" && fromPkg.trim())
|
|
326
|
-
return fromPkg.trim();
|
|
327
|
-
}
|
|
328
|
-
catch {
|
|
329
|
-
// ignore malformed package.json - fall through to playwright
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
for (const name of ["playwright.config.ts", "playwright.config.mts", "playwright.config.js", "playwright.config.mjs"]) {
|
|
333
|
-
const p = join(projectDir, name);
|
|
334
|
-
if (!existsSync(p))
|
|
335
|
-
continue;
|
|
336
|
-
const src = readFileSync(p, "utf-8");
|
|
337
|
-
const m = src.match(/baseURL\s*:\s*["']([^"']+)["']/);
|
|
338
|
-
if (m?.[1])
|
|
339
|
-
return m[1];
|
|
340
|
-
}
|
|
341
|
-
return undefined;
|
|
342
|
-
}
|
|
319
|
+
export { resolveBaseUrl };
|
|
343
320
|
/**
|
|
344
321
|
* Friendly demo defaults: STEP on; headed only for live watch (no --video).
|
|
345
322
|
* --video / --auto-play-video => headless unless --non-headless.
|
|
346
323
|
* Call after applyRunFlags so explicit flags already won.
|
|
347
324
|
*/
|
|
348
|
-
export function applyDemoDefaults(projectDir) {
|
|
325
|
+
export async function applyDemoDefaults(projectDir) {
|
|
349
326
|
if (process.env.WAYGRAPH_STEP === undefined)
|
|
350
327
|
process.env.WAYGRAPH_STEP = "1";
|
|
351
328
|
if (process.env.WAYGRAPH_STEP === "1" && process.env.WAYGRAPH_HEADED === undefined) {
|
|
@@ -363,7 +340,7 @@ export function applyDemoDefaults(projectDir) {
|
|
|
363
340
|
}
|
|
364
341
|
}
|
|
365
342
|
if (!process.env.WAYGRAPH_BASE_URL) {
|
|
366
|
-
const resolved = resolveBaseUrl(projectDir);
|
|
343
|
+
const resolved = await resolveBaseUrl(projectDir);
|
|
367
344
|
if (resolved)
|
|
368
345
|
process.env.WAYGRAPH_BASE_URL = resolved;
|
|
369
346
|
}
|
package/dist/cli/run-chain.js
CHANGED
|
@@ -41,7 +41,7 @@ mod.startRunner();
|
|
|
41
41
|
export async function runChain(projectDir, spec) {
|
|
42
42
|
const expanded = await expandSpecFlowFiles(projectDir, spec);
|
|
43
43
|
if (process.env.WAYGRAPH_VIDEO && !process.env.WAYGRAPH_BASE_URL) {
|
|
44
|
-
const resolved = resolveBaseUrl(projectDir);
|
|
44
|
+
const resolved = await resolveBaseUrl(projectDir);
|
|
45
45
|
if (resolved)
|
|
46
46
|
process.env.WAYGRAPH_BASE_URL = resolved;
|
|
47
47
|
}
|
|
@@ -49,6 +49,7 @@ export async function runChain(projectDir, spec) {
|
|
|
49
49
|
const scriptPath = join(projectDir, `.waygraph-chain-${process.pid}.mjs`);
|
|
50
50
|
writeFileSync(scriptPath, CHAIN_RUNNER_BOOTSTRAP);
|
|
51
51
|
try {
|
|
52
|
+
// webServer is started inside the child (runner/main.js), never here - see CHAIN_RUNNER_BOOTSTRAP.
|
|
52
53
|
const code = await new Promise((res, rej) => {
|
|
53
54
|
const child = spawn(process.execPath, ["--import", tsxEsm, scriptPath, projectDir, expanded], {
|
|
54
55
|
stdio: "inherit",
|
package/dist/commands/check.js
CHANGED
|
@@ -67,7 +67,7 @@ export async function runChainAuto(projectDir, fromTag, toTag) {
|
|
|
67
67
|
const spec = path.join(" then ");
|
|
68
68
|
console.error(`waygraph chain auto: ${fromTag} -> ${toTag} via ${spec}`);
|
|
69
69
|
if (!process.env.WAYGRAPH_BASE_URL) {
|
|
70
|
-
const resolved = resolveBaseUrl(projectDir);
|
|
70
|
+
const resolved = await resolveBaseUrl(projectDir);
|
|
71
71
|
if (resolved)
|
|
72
72
|
process.env.WAYGRAPH_BASE_URL = resolved;
|
|
73
73
|
}
|
package/dist/commands/init.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { packageRoot } from "../cli/util.js";
|
|
3
3
|
import { basename, join, relative, resolve } from "node:path";
|
|
4
4
|
import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
5
6
|
function initCommand(projectName) {
|
|
6
7
|
if (!projectName) {
|
|
7
8
|
console.error("waygraph init: missing <project-name>, e.g. waygraph init my-app");
|
|
@@ -30,8 +31,12 @@ function initCommand(projectName) {
|
|
|
30
31
|
writeFileSync(join(targetDir, ".gitignore"), readFileSync(gitignoreSrc, "utf-8"));
|
|
31
32
|
rmSync(gitignoreSrc);
|
|
32
33
|
}
|
|
34
|
+
// Demo pages open via file://; the absolute path is only known once copied, so it's filled in here.
|
|
35
|
+
const appBaseUrl = pathToFileURL(join(targetDir, "src", "map", "(app_base)", "index.html")).href;
|
|
33
36
|
const packageJsonPath = join(targetDir, "package.json");
|
|
34
37
|
writeFileSync(packageJsonPath, readFileSync(packageJsonPath, "utf-8").replaceAll("__PROJECT_NAME__", pkgName));
|
|
38
|
+
const playwrightConfigPath = join(targetDir, "playwright.config.ts");
|
|
39
|
+
writeFileSync(playwrightConfigPath, readFileSync(playwrightConfigPath, "utf-8").replaceAll("__APP_BASE_URL__", appBaseUrl));
|
|
35
40
|
console.log(`Scaffolded ${pkgName}/`);
|
|
36
41
|
console.log("");
|
|
37
42
|
console.log(` cd ${relative(process.cwd(), targetDir) || pkgName}`);
|
package/dist/commands/run.js
CHANGED
|
@@ -24,7 +24,7 @@ export async function runCase(args) {
|
|
|
24
24
|
process.exit(1);
|
|
25
25
|
}
|
|
26
26
|
if (!process.env.WAYGRAPH_BASE_URL) {
|
|
27
|
-
const resolved = resolveBaseUrl(proj);
|
|
27
|
+
const resolved = await resolveBaseUrl(proj);
|
|
28
28
|
if (resolved)
|
|
29
29
|
process.env.WAYGRAPH_BASE_URL = resolved;
|
|
30
30
|
}
|
|
@@ -60,13 +60,13 @@ export async function chainCase(args) {
|
|
|
60
60
|
}
|
|
61
61
|
const proj = resolve(flags.blocks ? (flags.positionals[0] ?? process.cwd()) : (flags.positionals[1] ?? process.cwd()));
|
|
62
62
|
if (!process.env.WAYGRAPH_BASE_URL) {
|
|
63
|
-
const resolved = resolveBaseUrl(proj);
|
|
63
|
+
const resolved = await resolveBaseUrl(proj);
|
|
64
64
|
if (resolved)
|
|
65
65
|
process.env.WAYGRAPH_BASE_URL = resolved;
|
|
66
66
|
}
|
|
67
67
|
// If caller asked for step overlay, behave like demo; else like run.
|
|
68
68
|
if (flags.step === true || process.env.WAYGRAPH_STEP === "1") {
|
|
69
|
-
applyDemoDefaults(proj);
|
|
69
|
+
await applyDemoDefaults(proj);
|
|
70
70
|
}
|
|
71
71
|
await runChain(proj, spec);
|
|
72
72
|
return;
|
|
@@ -92,7 +92,7 @@ export async function demoCase(args) {
|
|
|
92
92
|
if (flags.step === undefined && process.env.WAYGRAPH_STEP === undefined) {
|
|
93
93
|
process.env.WAYGRAPH_STEP = "1";
|
|
94
94
|
}
|
|
95
|
-
applyDemoDefaults(proj);
|
|
95
|
+
await applyDemoDefaults(proj);
|
|
96
96
|
console.error(`waygraph demo: STEP=${process.env.WAYGRAPH_STEP === "1" ? "on" : "off"}` +
|
|
97
97
|
` AUTO_NEXT=${process.env.WAYGRAPH_AUTOPLAY === "1" ? "on" : "off"}` +
|
|
98
98
|
` HEADED=${process.env.WAYGRAPH_HEADED === "0" ? "off" : "on"}` +
|
package/dist/commands/session.js
CHANGED
|
@@ -62,7 +62,7 @@ export async function sessionCase(args, command) {
|
|
|
62
62
|
console.error(`waygraph browser: no such directory: ${proj}`);
|
|
63
63
|
process.exit(1);
|
|
64
64
|
}
|
|
65
|
-
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
65
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? (await resolveBaseUrl(proj));
|
|
66
66
|
try {
|
|
67
67
|
const inject = flags.inject?.length ? resolveInjectRoots(flags.inject, proj) : undefined;
|
|
68
68
|
const result = await browserStart({
|
|
@@ -148,7 +148,7 @@ export async function sessionCase(args, command) {
|
|
|
148
148
|
const flags = parseRunFlags(flagArgs);
|
|
149
149
|
applyRunFlags(flags);
|
|
150
150
|
const proj = resolve(flags.positionals[0] ?? process.cwd());
|
|
151
|
-
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
151
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? (await resolveBaseUrl(proj));
|
|
152
152
|
try {
|
|
153
153
|
const result = await pilotStart({
|
|
154
154
|
projectDir: proj,
|
|
@@ -483,7 +483,7 @@ export async function sessionCase(args, command) {
|
|
|
483
483
|
process.exit(1);
|
|
484
484
|
}
|
|
485
485
|
if (!process.env.WAYGRAPH_BASE_URL) {
|
|
486
|
-
const resolved = resolveBaseUrl(proj);
|
|
486
|
+
const resolved = await resolveBaseUrl(proj);
|
|
487
487
|
if (resolved)
|
|
488
488
|
process.env.WAYGRAPH_BASE_URL = resolved;
|
|
489
489
|
}
|
|
@@ -510,7 +510,7 @@ export async function sessionCase(args, command) {
|
|
|
510
510
|
console.error("waygraph auto --detach requires --cli (headful has no session control)");
|
|
511
511
|
process.exit(1);
|
|
512
512
|
}
|
|
513
|
-
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
513
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? (await resolveBaseUrl(proj));
|
|
514
514
|
try {
|
|
515
515
|
const meta = await spawnDetachedSession({
|
|
516
516
|
projectDir: proj,
|
|
@@ -535,7 +535,7 @@ export async function sessionCase(args, command) {
|
|
|
535
535
|
}
|
|
536
536
|
if (flags.blocks && isFileSelectToken(flags.blocks)) {
|
|
537
537
|
const blocksSelect = parseBlocksSelect(flags.blocks);
|
|
538
|
-
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
538
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? (await resolveBaseUrl(proj));
|
|
539
539
|
await runAutoExplore(proj, baseURL
|
|
540
540
|
? { cli: cliPicker, baseURL, blocksSelect }
|
|
541
541
|
: { cli: cliPicker, blocksSelect });
|
|
@@ -565,7 +565,7 @@ export async function sessionCase(args, command) {
|
|
|
565
565
|
}
|
|
566
566
|
return;
|
|
567
567
|
}
|
|
568
|
-
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
568
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? (await resolveBaseUrl(proj));
|
|
569
569
|
await runAutoExplore(proj, baseURL ? { cli: cliPicker, baseURL } : { cli: cliPicker });
|
|
570
570
|
return;
|
|
571
571
|
}
|
|
@@ -578,7 +578,7 @@ export async function autoServeCase(args) {
|
|
|
578
578
|
console.error("waygraph __auto-serve: missing --session-id");
|
|
579
579
|
process.exit(1);
|
|
580
580
|
}
|
|
581
|
-
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? resolveBaseUrl(proj);
|
|
581
|
+
const baseURL = flags.baseUrl ?? process.env.WAYGRAPH_BASE_URL ?? (await resolveBaseUrl(proj));
|
|
582
582
|
const inject = flags.inject?.length ? resolveInjectRoots(flags.inject, proj) : undefined;
|
|
583
583
|
let headless;
|
|
584
584
|
if (flags.headlessBrowser)
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface WaygraphConfig {
|
|
2
|
+
/** Same value `resolveBaseUrl` would otherwise read from package.json's `waygraph.baseUrl`. */
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
}
|
|
5
|
+
/** Identity helper, purely for editor type-checking/autocomplete - same role `defineConfig` plays
|
|
6
|
+
* in a `playwright.config.ts` or `vite.config.ts`. `export default defineConfig({ ... })`. */
|
|
7
|
+
export declare function defineConfig(config: WaygraphConfig): WaygraphConfig;
|
|
8
|
+
/**
|
|
9
|
+
* Looks for the first `waygraph.config.*` in `projectDir` and imports it - `.ts` works
|
|
10
|
+
* unmodified because `bin/waygraph` already registers `tsx/esm` before `dist/cli.js` ever runs
|
|
11
|
+
* (the same mechanism that already lets a consumer's `.block.ts`/`.flow.ts` import directly), so
|
|
12
|
+
* no separate loader/transpile step is needed here. A broken config file throws loud, naming the
|
|
13
|
+
* file - silently swallowing it would make a missing `baseUrl` look like "nobody configured
|
|
14
|
+
* anything" instead of "your config file has a bug."
|
|
15
|
+
*/
|
|
16
|
+
export declare function loadWaygraphConfig(projectDir: string): Promise<WaygraphConfig | undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* Single source of truth for a project's base URL. Was three independently drifted copies
|
|
19
|
+
* (`src/cli/flags.ts`, `src/traverse/run.ts`, `src/session/auto-explore-run.ts`), each checking
|
|
20
|
+
* a slightly different subset of sources in a different order - real duplication, not just
|
|
21
|
+
* stylistic, since one copy skipped `config.waygraph.*` nesting and another checked
|
|
22
|
+
* `WAYGRAPH_BASE_URL` first instead of last. Checked in this order:
|
|
23
|
+
*
|
|
24
|
+
* 1. `WAYGRAPH_BASE_URL` - a real shell export, or one loaded from a `.env` file (see
|
|
25
|
+
* `loadEnvFiles`, called here so every caller gets native `.env` support for free, not just
|
|
26
|
+
* whichever command remembered to call it).
|
|
27
|
+
* 2. A `waygraph.config.*` file's `baseUrl`.
|
|
28
|
+
* 3. `package.json`'s `waygraph.baseUrl`/`baseURL` (`config.waygraph.*` also checked - a common
|
|
29
|
+
* nested-config convention some tooling uses).
|
|
30
|
+
* 4. `playwright.config.*`'s own `baseURL` (regex-read as text, never imported - importing a
|
|
31
|
+
* consumer's real playwright.config risks pulling in `@playwright/test`'s own global setup
|
|
32
|
+
* as a side effect, which resolving a URL string has no business doing).
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveBaseUrl(projectDir: string): Promise<string | undefined>;
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// waygraph.config.* - new, additive, optional. package.json's own "waygraph" field (baseUrl)
|
|
2
|
+
// keeps working untouched; this is a second, richer place to put the same kind of project-level
|
|
3
|
+
// setting, for consumers who'd rather have a real typed file than a JSON field. Real ask: "I
|
|
4
|
+
// think its time to add waygraph config now."
|
|
5
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
6
|
+
import { join } from "node:path";
|
|
7
|
+
import { pathToFileURL } from "node:url";
|
|
8
|
+
import { loadEnvFiles } from "./env-file.js";
|
|
9
|
+
/** Identity helper, purely for editor type-checking/autocomplete - same role `defineConfig` plays
|
|
10
|
+
* in a `playwright.config.ts` or `vite.config.ts`. `export default defineConfig({ ... })`. */
|
|
11
|
+
export function defineConfig(config) {
|
|
12
|
+
return config;
|
|
13
|
+
}
|
|
14
|
+
const CONFIG_FILENAMES = [
|
|
15
|
+
"waygraph.config.ts",
|
|
16
|
+
"waygraph.config.mts",
|
|
17
|
+
"waygraph.config.mjs",
|
|
18
|
+
"waygraph.config.js",
|
|
19
|
+
"waygraph.config.cjs",
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* Looks for the first `waygraph.config.*` in `projectDir` and imports it - `.ts` works
|
|
23
|
+
* unmodified because `bin/waygraph` already registers `tsx/esm` before `dist/cli.js` ever runs
|
|
24
|
+
* (the same mechanism that already lets a consumer's `.block.ts`/`.flow.ts` import directly), so
|
|
25
|
+
* no separate loader/transpile step is needed here. A broken config file throws loud, naming the
|
|
26
|
+
* file - silently swallowing it would make a missing `baseUrl` look like "nobody configured
|
|
27
|
+
* anything" instead of "your config file has a bug."
|
|
28
|
+
*/
|
|
29
|
+
export async function loadWaygraphConfig(projectDir) {
|
|
30
|
+
for (const name of CONFIG_FILENAMES) {
|
|
31
|
+
const p = join(projectDir, name);
|
|
32
|
+
if (!existsSync(p))
|
|
33
|
+
continue;
|
|
34
|
+
let mod;
|
|
35
|
+
try {
|
|
36
|
+
mod = (await import(pathToFileURL(p).href));
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
throw new Error(`waygraph: failed to load ${name}: ${err instanceof Error ? err.message : String(err)}`);
|
|
40
|
+
}
|
|
41
|
+
return mod.default ?? mod;
|
|
42
|
+
}
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Single source of truth for a project's base URL. Was three independently drifted copies
|
|
47
|
+
* (`src/cli/flags.ts`, `src/traverse/run.ts`, `src/session/auto-explore-run.ts`), each checking
|
|
48
|
+
* a slightly different subset of sources in a different order - real duplication, not just
|
|
49
|
+
* stylistic, since one copy skipped `config.waygraph.*` nesting and another checked
|
|
50
|
+
* `WAYGRAPH_BASE_URL` first instead of last. Checked in this order:
|
|
51
|
+
*
|
|
52
|
+
* 1. `WAYGRAPH_BASE_URL` - a real shell export, or one loaded from a `.env` file (see
|
|
53
|
+
* `loadEnvFiles`, called here so every caller gets native `.env` support for free, not just
|
|
54
|
+
* whichever command remembered to call it).
|
|
55
|
+
* 2. A `waygraph.config.*` file's `baseUrl`.
|
|
56
|
+
* 3. `package.json`'s `waygraph.baseUrl`/`baseURL` (`config.waygraph.*` also checked - a common
|
|
57
|
+
* nested-config convention some tooling uses).
|
|
58
|
+
* 4. `playwright.config.*`'s own `baseURL` (regex-read as text, never imported - importing a
|
|
59
|
+
* consumer's real playwright.config risks pulling in `@playwright/test`'s own global setup
|
|
60
|
+
* as a side effect, which resolving a URL string has no business doing).
|
|
61
|
+
*/
|
|
62
|
+
export async function resolveBaseUrl(projectDir) {
|
|
63
|
+
loadEnvFiles(projectDir);
|
|
64
|
+
if (process.env.WAYGRAPH_BASE_URL)
|
|
65
|
+
return process.env.WAYGRAPH_BASE_URL;
|
|
66
|
+
const config = await loadWaygraphConfig(projectDir);
|
|
67
|
+
if (config?.baseUrl && config.baseUrl.trim())
|
|
68
|
+
return config.baseUrl.trim();
|
|
69
|
+
const pkgPath = join(projectDir, "package.json");
|
|
70
|
+
if (existsSync(pkgPath)) {
|
|
71
|
+
try {
|
|
72
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
73
|
+
const fromPkg = pkg.waygraph?.baseUrl ??
|
|
74
|
+
pkg.waygraph?.baseURL ??
|
|
75
|
+
pkg.config?.waygraph?.baseUrl ??
|
|
76
|
+
pkg.config?.waygraph?.baseURL;
|
|
77
|
+
if (typeof fromPkg === "string" && fromPkg.trim())
|
|
78
|
+
return fromPkg.trim();
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
// ignore malformed package.json - fall through to playwright.config
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
for (const name of ["playwright.config.ts", "playwright.config.mts", "playwright.config.js", "playwright.config.mjs"]) {
|
|
85
|
+
const p = join(projectDir, name);
|
|
86
|
+
if (!existsSync(p))
|
|
87
|
+
continue;
|
|
88
|
+
const src = readFileSync(p, "utf-8");
|
|
89
|
+
const m = src.match(/baseURL\s*:\s*["']([^"']+)["']/);
|
|
90
|
+
if (m?.[1])
|
|
91
|
+
return m[1];
|
|
92
|
+
}
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
@@ -17,13 +17,10 @@ export type EffectBlock<In extends Checkpoint<string>, Out extends Checkpoint<st
|
|
|
17
17
|
modVerifyAll(patches: Record<string, Trait["check"] | Trait>): EffectBlock<In, Out>;
|
|
18
18
|
stubBefore(stub: import("../../highlights.js").HighlightStubPhase): EffectBlock<In, Out>;
|
|
19
19
|
stubBefore(stub: import("../../highlights.js").StubLifecycleFn<Out>): EffectBlock<In, Out>;
|
|
20
|
-
stubBefore(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): EffectBlock<In, Out>;
|
|
21
20
|
stubAfter(stub: import("../../highlights.js").HighlightStubPhase): EffectBlock<In, Out>;
|
|
22
21
|
stubAfter(stub: import("../../highlights.js").StubLifecycleFn<Out>): EffectBlock<In, Out>;
|
|
23
|
-
stubAfter(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): EffectBlock<In, Out>;
|
|
24
22
|
stubOnError(stub: import("../../highlights.js").HighlightStubPhase): EffectBlock<In, Out>;
|
|
25
23
|
stubOnError(stub: import("../../highlights.js").StubLifecycleFn<Out>): EffectBlock<In, Out>;
|
|
26
|
-
stubOnError(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): EffectBlock<In, Out>;
|
|
27
24
|
};
|
|
28
25
|
/** @deprecated Prefer {@link EffectBlock} - same type; Mem* was an early name. */
|
|
29
26
|
export type MemEffectBlock<In extends Checkpoint<string>, Out extends Checkpoint<string>> = EffectBlock<In, Out>;
|
|
@@ -17,13 +17,10 @@ export type MethodBlock<In extends Checkpoint<string>, Out extends Checkpoint<st
|
|
|
17
17
|
modVerifyAll(patches: Record<string, Trait["check"] | Trait>): MethodBlock<In, Out>;
|
|
18
18
|
stubBefore(stub: import("../../highlights.js").HighlightStubPhase): MethodBlock<In, Out>;
|
|
19
19
|
stubBefore(stub: import("../../highlights.js").StubLifecycleFn<Out>): MethodBlock<In, Out>;
|
|
20
|
-
stubBefore(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): MethodBlock<In, Out>;
|
|
21
20
|
stubAfter(stub: import("../../highlights.js").HighlightStubPhase): MethodBlock<In, Out>;
|
|
22
21
|
stubAfter(stub: import("../../highlights.js").StubLifecycleFn<Out>): MethodBlock<In, Out>;
|
|
23
|
-
stubAfter(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): MethodBlock<In, Out>;
|
|
24
22
|
stubOnError(stub: import("../../highlights.js").HighlightStubPhase): MethodBlock<In, Out>;
|
|
25
23
|
stubOnError(stub: import("../../highlights.js").StubLifecycleFn<Out>): MethodBlock<In, Out>;
|
|
26
|
-
stubOnError(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): MethodBlock<In, Out>;
|
|
27
24
|
};
|
|
28
25
|
/** @deprecated Prefer {@link MethodBlock} - same type; Action was the 0.7 name. */
|
|
29
26
|
export type ActionBlock<In extends Checkpoint<string>, Out extends Checkpoint<string>> = MethodBlock<In, Out>;
|
|
@@ -80,11 +77,8 @@ export type AssertBlock<Out extends Checkpoint<string>> = Omit<DefinedBlock<Out,
|
|
|
80
77
|
modVerifyAll(patches: Record<string, Trait["check"] | Trait>): AssertBlock<Out>;
|
|
81
78
|
stubBefore(stub: import("../../highlights.js").HighlightStubPhase): AssertBlock<Out>;
|
|
82
79
|
stubBefore(stub: import("../../highlights.js").StubLifecycleFn<Out>): AssertBlock<Out>;
|
|
83
|
-
stubBefore(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): AssertBlock<Out>;
|
|
84
80
|
stubAfter(stub: import("../../highlights.js").HighlightStubPhase): AssertBlock<Out>;
|
|
85
81
|
stubAfter(stub: import("../../highlights.js").StubLifecycleFn<Out>): AssertBlock<Out>;
|
|
86
|
-
stubAfter(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): AssertBlock<Out>;
|
|
87
82
|
stubOnError(stub: import("../../highlights.js").HighlightStubPhase): AssertBlock<Out>;
|
|
88
83
|
stubOnError(stub: import("../../highlights.js").StubLifecycleFn<Out>): AssertBlock<Out>;
|
|
89
|
-
stubOnError(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): AssertBlock<Out>;
|
|
90
84
|
};
|
|
@@ -22,13 +22,10 @@ export type NavBlock<Out extends Checkpoint<string>> = Omit<DefinedBlock<Checkpo
|
|
|
22
22
|
modVerifyAll(patches: Record<string, Trait["check"] | Trait>): NavBlock<Out>;
|
|
23
23
|
stubBefore(stub: import("../../highlights.js").HighlightStubPhase): NavBlock<Out>;
|
|
24
24
|
stubBefore(stub: import("../../highlights.js").StubLifecycleFn<Out>): NavBlock<Out>;
|
|
25
|
-
stubBefore(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): NavBlock<Out>;
|
|
26
25
|
stubAfter(stub: import("../../highlights.js").HighlightStubPhase): NavBlock<Out>;
|
|
27
26
|
stubAfter(stub: import("../../highlights.js").StubLifecycleFn<Out>): NavBlock<Out>;
|
|
28
|
-
stubAfter(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): NavBlock<Out>;
|
|
29
27
|
stubOnError(stub: import("../../highlights.js").HighlightStubPhase): NavBlock<Out>;
|
|
30
28
|
stubOnError(stub: import("../../highlights.js").StubLifecycleFn<Out>): NavBlock<Out>;
|
|
31
|
-
stubOnError(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): NavBlock<Out>;
|
|
32
29
|
};
|
|
33
30
|
/**
|
|
34
31
|
* `defineNavBlock`'s own options - exactly one of `url`/`click` required,
|
|
@@ -47,13 +47,10 @@ export type PageBlock<Out extends Checkpoint<string>> = Omit<DefinedBlock<Checkp
|
|
|
47
47
|
modVerifyAll(patches: Record<string, Trait["check"] | Trait>): PageBlock<Out>;
|
|
48
48
|
stubBefore(stub: import("../../highlights.js").HighlightStubPhase): PageBlock<Out>;
|
|
49
49
|
stubBefore(stub: import("../../highlights.js").StubLifecycleFn<Out>): PageBlock<Out>;
|
|
50
|
-
stubBefore(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): PageBlock<Out>;
|
|
51
50
|
stubAfter(stub: import("../../highlights.js").HighlightStubPhase): PageBlock<Out>;
|
|
52
51
|
stubAfter(stub: import("../../highlights.js").StubLifecycleFn<Out>): PageBlock<Out>;
|
|
53
|
-
stubAfter(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): PageBlock<Out>;
|
|
54
52
|
stubOnError(stub: import("../../highlights.js").HighlightStubPhase): PageBlock<Out>;
|
|
55
53
|
stubOnError(stub: import("../../highlights.js").StubLifecycleFn<Out>): PageBlock<Out>;
|
|
56
|
-
stubOnError(stub: (out: Out) => import("../../highlights.js").HighlightStubPhase): PageBlock<Out>;
|
|
57
54
|
};
|
|
58
55
|
/** @see {@link PageBlockOptions} */
|
|
59
56
|
export declare function definePageBlock<Out extends Checkpoint<string>>(options: PageBlockOptions<Out>): PageBlock<Out>;
|
package/dist/core/flow.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Split out of the former 2,900-line engine.ts (see src/ARCHITECTURE.md). Behavior unchanged.
|
|
2
2
|
import { connect } from "../types.js";
|
|
3
|
+
import { chromiumExecutablePath } from "../browser-path.js";
|
|
3
4
|
import { WaygraphError, MSG_CHAINFLOW_BLOCK_NOT_FOUND_BY_INDEX, MSG_CHAINFLOW_BLOCK_NOT_FOUND_BY_NAME, MSG_CHAINFLOW_EMPTY, } from "../errors.js";
|
|
4
5
|
import { preflight, runGraph } from "./run-graph.js";
|
|
5
6
|
import { resolveLauncher } from "./config.js";
|
|
@@ -33,11 +34,7 @@ export function buildFlow(middle, engineConfig) {
|
|
|
33
34
|
preflight(mem, chain);
|
|
34
35
|
const browserName = config.browserName ?? "chromium";
|
|
35
36
|
const launch = resolveLauncher(browserName, config);
|
|
36
|
-
|
|
37
|
-
// or Flatpak Chromium), launch that instead of Playwright's own bundled
|
|
38
|
-
// binary - only for chromium (the env var names a Chromium build, not a
|
|
39
|
-
// Firefox/WebKit one), and a no-op default anywhere that env var isn't set.
|
|
40
|
-
const executablePath = browserName === "chromium" ? process.env.CHROME_PATH || process.env.CHROMIUM_PATH : undefined;
|
|
37
|
+
const executablePath = browserName === "chromium" ? chromiumExecutablePath() : undefined;
|
|
41
38
|
const browser = await launch.launch({
|
|
42
39
|
headless: config.headless ?? true,
|
|
43
40
|
...(config.slowMo !== undefined ? { slowMo: config.slowMo } : {}),
|
|
@@ -324,7 +321,7 @@ export function chainFlow(...flows) {
|
|
|
324
321
|
// session reset, silently making withSessionReset a no-op).
|
|
325
322
|
const browserName = config?.browserName ?? "chromium";
|
|
326
323
|
const launch = resolveLauncher(browserName, config);
|
|
327
|
-
const executablePath = browserName === "chromium" ?
|
|
324
|
+
const executablePath = browserName === "chromium" ? chromiumExecutablePath() : undefined;
|
|
328
325
|
const browser = await launch.launch({
|
|
329
326
|
headless: config?.headless ?? true,
|
|
330
327
|
...(config?.slowMo !== undefined ? { slowMo: config.slowMo } : {}),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-loads `.env` / `.env.local` / `.env.<mode>` / `.env.<mode>.local` from a project's root,
|
|
3
|
+
* same layering Vite/Next use (`mode` defaults to `NODE_ENV`, falling back to "development"),
|
|
4
|
+
* merged into `process.env` in increasing priority. A real, already-set `process.env` value -
|
|
5
|
+
* whatever the shell actually exported - always wins over every file; a `.env` file only fills
|
|
6
|
+
* a gap, it never silently overrides something the caller explicitly set. Safe to call more
|
|
7
|
+
* than once (e.g. once eagerly at `cwd`, again once the real project dir is known) - loading
|
|
8
|
+
* twice is a no-op the second time for any key already filled.
|
|
9
|
+
*/
|
|
10
|
+
export declare function loadEnvFiles(projectDir: string, mode?: string): void;
|