spana-test 0.11.0 → 0.13.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/.agents/skills/spana-testing/SKILL.md +0 -0
- package/LICENSE +0 -0
- package/README.md +5 -2
- package/dist/{accessibility-audit-YZOPUY3D.js → accessibility-audit-MHQ65DUD.js} +61 -12
- package/dist/accessibility-audit-MHQ65DUD.js.map +1 -0
- package/dist/agent/index.d.ts +3 -11
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +38 -15
- package/dist/agent/index.js.map +1 -1
- package/dist/{session-uT8xL03K.d.ts → agent/session.d.ts} +14 -46
- package/dist/agent/session.d.ts.map +1 -0
- package/dist/{agent-fixture-5C4MCWRD.js → agent-fixture-H6GOUHNX.js} +3 -3
- package/dist/{agent-fixture-5C4MCWRD.js.map → agent-fixture-H6GOUHNX.js.map} +0 -0
- package/dist/{allure-FGVR5LND.js → allure-XOM7BXL5.js} +5 -2
- package/dist/{allure-FGVR5LND.js.map → allure-XOM7BXL5.js.map} +1 -1
- package/dist/{android-6BOQTMM3.js → android-C2S4B4TH.js} +3 -3
- package/dist/{android-6BOQTMM3.js.map → android-C2S4B4TH.js.map} +0 -0
- package/dist/api/agent-fixture.d.ts +119 -0
- package/dist/api/agent-fixture.d.ts.map +1 -0
- package/dist/api/app.d.ts +399 -0
- package/dist/api/app.d.ts.map +1 -0
- package/dist/api/expect.d.ts +180 -0
- package/dist/api/expect.d.ts.map +1 -0
- package/dist/api/fixtures.d.ts +165 -0
- package/dist/api/fixtures.d.ts.map +1 -0
- package/dist/api/flow.d.ts +123 -0
- package/dist/api/flow.d.ts.map +1 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/snapshots.d.ts +26 -0
- package/dist/api/snapshots.d.ts.map +1 -0
- package/dist/api/storybook.d.ts +18 -0
- package/dist/api/storybook.d.ts.map +1 -0
- package/dist/api/suite.d.ts +46 -0
- package/dist/api/suite.d.ts.map +1 -0
- package/dist/app-W6PRRBMD.js +13 -0
- package/dist/{app-RSDPDTKT.js.map → app-W6PRRBMD.js.map} +0 -0
- package/dist/appium-CC77BJNK.js +935 -0
- package/dist/appium-CC77BJNK.js.map +1 -0
- package/dist/{appium-server-66GVUL24.js → appium-server-M6CWWUWF.js} +5 -2
- package/dist/{appium-server-66GVUL24.js.map → appium-server-M6CWWUWF.js.map} +1 -1
- package/dist/{baseline-manager-5TIUCNP5.js → baseline-manager-LVUVH2MJ.js} +5 -2
- package/dist/{baseline-manager-5TIUCNP5.js.map → baseline-manager-LVUVH2MJ.js.map} +1 -1
- package/dist/bridge-server-S3DHK7XE.js +12 -0
- package/dist/{cache-command-PANUAEMZ.js.map → bridge-server-S3DHK7XE.js.map} +0 -0
- package/dist/{cache-command-PANUAEMZ.js → cache-command-OL7HUK2K.js} +3 -3
- package/dist/{chunk-DGUM43GV.js.map → cache-command-OL7HUK2K.js.map} +0 -0
- package/dist/channels/android-cdp.d.ts +71 -0
- package/dist/channels/android-cdp.d.ts.map +1 -0
- package/dist/channels/apple-webinspector.d.ts +85 -0
- package/dist/channels/apple-webinspector.d.ts.map +1 -0
- package/dist/channels/bidi-client.d.ts +79 -0
- package/dist/channels/bidi-client.d.ts.map +1 -0
- package/dist/channels/bridge-server.d.ts +69 -0
- package/dist/channels/bridge-server.d.ts.map +1 -0
- package/dist/channels/cdp-client.d.ts +115 -0
- package/dist/channels/cdp-client.d.ts.map +1 -0
- package/dist/channels/dom-channel.d.ts +246 -0
- package/dist/channels/dom-channel.d.ts.map +1 -0
- package/dist/channels/index.d.ts +8 -0
- package/dist/channels/index.d.ts.map +1 -0
- package/dist/channels/webkit-inspector.d.ts +85 -0
- package/dist/channels/webkit-inspector.d.ts.map +1 -0
- package/dist/channels/ws-server.d.ts +21 -0
- package/dist/channels/ws-server.d.ts.map +1 -0
- package/dist/chunk-27H6NDA5.js +845 -0
- package/dist/chunk-27H6NDA5.js.map +1 -0
- package/dist/{chunk-WV3ALL3H.js → chunk-2MA5G2VH.js} +6 -2
- package/dist/{chunk-WV3ALL3H.js.map → chunk-2MA5G2VH.js.map} +1 -1
- package/dist/chunk-4LJ3KYCX.js +94 -0
- package/dist/chunk-4LJ3KYCX.js.map +1 -0
- package/dist/chunk-5SDVP53E.js +1046 -0
- package/dist/chunk-5SDVP53E.js.map +1 -0
- package/dist/{chunk-FPQAJNE3.js → chunk-5T7LSBDM.js} +288 -101
- package/dist/chunk-5T7LSBDM.js.map +1 -0
- package/dist/chunk-6C2EILMC.js +2589 -0
- package/dist/chunk-6C2EILMC.js.map +1 -0
- package/dist/{chunk-3IZMPNE7.js → chunk-7IUD55GY.js} +1333 -941
- package/dist/chunk-7IUD55GY.js.map +1 -0
- package/dist/{chunk-JPZCZHL4.js → chunk-7Q7TSUNL.js} +6 -1
- package/dist/{chunk-JPZCZHL4.js.map → chunk-7Q7TSUNL.js.map} +1 -1
- package/dist/{chunk-X2TJP7LB.js → chunk-7WHQIQPM.js} +11 -1
- package/dist/chunk-7WHQIQPM.js.map +1 -0
- package/dist/chunk-A7Z52TDQ.js +97 -0
- package/dist/chunk-A7Z52TDQ.js.map +1 -0
- package/dist/{chunk-WZAQANN6.js → chunk-BUNMIMGA.js} +9 -3
- package/dist/{chunk-WZAQANN6.js.map → chunk-BUNMIMGA.js.map} +1 -1
- package/dist/chunk-DMF2BPPA.js +547 -0
- package/dist/chunk-DMF2BPPA.js.map +1 -0
- package/dist/{chunk-Z6K4QQAR.js → chunk-FHCOPLYB.js} +36 -7
- package/dist/chunk-FHCOPLYB.js.map +1 -0
- package/dist/{chunk-3SH5JQF7.js → chunk-FSPMFRJO.js} +6 -1
- package/dist/{chunk-3SH5JQF7.js.map → chunk-FSPMFRJO.js.map} +1 -1
- package/dist/chunk-FTXUQMGH.js +56 -0
- package/dist/chunk-FTXUQMGH.js.map +1 -0
- package/dist/chunk-FUXFXFBM.js +1962 -0
- package/dist/chunk-FUXFXFBM.js.map +1 -0
- package/dist/{chunk-SIJJVN2D.js → chunk-FV7ONGQ7.js} +9 -3
- package/dist/{chunk-SIJJVN2D.js.map → chunk-FV7ONGQ7.js.map} +1 -1
- package/dist/{chunk-VUNH4AJD.js → chunk-GDVHJBR2.js} +9 -5
- package/dist/{chunk-VUNH4AJD.js.map → chunk-GDVHJBR2.js.map} +1 -1
- package/dist/chunk-GLNTGHR6.js +330 -0
- package/dist/chunk-GLNTGHR6.js.map +1 -0
- package/dist/{chunk-OPTNFLBL.js → chunk-HIGFQRWM.js} +7 -1
- package/dist/{chunk-OPTNFLBL.js.map → chunk-HIGFQRWM.js.map} +1 -1
- package/dist/chunk-HJY5YN4N.js +272 -0
- package/dist/chunk-HJY5YN4N.js.map +1 -0
- package/dist/chunk-HNQLWFHL.js +40 -0
- package/dist/chunk-HNQLWFHL.js.map +1 -0
- package/dist/chunk-HUYC4OAL.js +72 -0
- package/dist/chunk-HUYC4OAL.js.map +1 -0
- package/dist/chunk-HWS3XUEF.js +109 -0
- package/dist/chunk-HWS3XUEF.js.map +1 -0
- package/dist/chunk-IDIHDVGC.js +328 -0
- package/dist/chunk-IDIHDVGC.js.map +1 -0
- package/dist/{chunk-4SA7JK5D.js → chunk-IUK3RJ6W.js} +38 -20
- package/dist/{chunk-4SA7JK5D.js.map → chunk-IUK3RJ6W.js.map} +1 -1
- package/dist/chunk-K4K2ACT2.js +179 -0
- package/dist/chunk-K4K2ACT2.js.map +1 -0
- package/dist/chunk-LKGF75QJ.js +654 -0
- package/dist/chunk-LKGF75QJ.js.map +1 -0
- package/dist/chunk-MAKZK7GY.js +935 -0
- package/dist/chunk-MAKZK7GY.js.map +1 -0
- package/dist/chunk-MPJCUL2B.js +154 -0
- package/dist/chunk-MPJCUL2B.js.map +1 -0
- package/dist/chunk-MUMIMDRJ.js +24 -0
- package/dist/chunk-MUMIMDRJ.js.map +1 -0
- package/dist/{chunk-KJPHH2TW.js → chunk-NHT3XSX3.js} +6 -1
- package/dist/{chunk-KJPHH2TW.js.map → chunk-NHT3XSX3.js.map} +1 -1
- package/dist/{chunk-6PTUVG6A.js → chunk-NWGA3R2E.js} +7 -18
- package/dist/chunk-NWGA3R2E.js.map +1 -0
- package/dist/{chunk-3FSZNKEF.js → chunk-NXET4BFJ.js} +7 -1
- package/dist/{chunk-3FSZNKEF.js.map → chunk-NXET4BFJ.js.map} +1 -1
- package/dist/chunk-PPRNCRTS.js +1104 -0
- package/dist/chunk-PPRNCRTS.js.map +1 -0
- package/dist/{chunk-64UZQP7Z.js → chunk-PRQTAIYA.js} +30 -4
- package/dist/chunk-PRQTAIYA.js.map +1 -0
- package/dist/{chunk-4KK4E3N3.js → chunk-RHQJSPOS.js} +1289 -187
- package/dist/chunk-RHQJSPOS.js.map +1 -0
- package/dist/{chunk-CY3DKTBZ.js → chunk-RIXZISMX.js} +6 -1
- package/dist/{chunk-CY3DKTBZ.js.map → chunk-RIXZISMX.js.map} +1 -1
- package/dist/{chunk-S7MSBZ3F.js → chunk-TFEXYI6N.js} +6 -1
- package/dist/{chunk-S7MSBZ3F.js.map → chunk-TFEXYI6N.js.map} +1 -1
- package/dist/chunk-U56N5JCJ.js +19842 -0
- package/dist/chunk-U56N5JCJ.js.map +1 -0
- package/dist/{chunk-IHVZKQQW.js → chunk-UKUXNFQP.js} +6 -1
- package/dist/{chunk-IHVZKQQW.js.map → chunk-UKUXNFQP.js.map} +1 -1
- package/dist/{chunk-SGZMO456.js → chunk-VWJNINPX.js} +667 -123
- package/dist/chunk-VWJNINPX.js.map +1 -0
- package/dist/chunk-WFC4DCFF.js +529 -0
- package/dist/chunk-WFC4DCFF.js.map +1 -0
- package/dist/{chunk-26NJXP55.js → chunk-WJH5K42V.js} +6 -2
- package/dist/{chunk-26NJXP55.js.map → chunk-WJH5K42V.js.map} +1 -1
- package/dist/chunk-X5FRYDZ3.js +91 -0
- package/dist/chunk-X5FRYDZ3.js.map +1 -0
- package/dist/{chunk-VP6V4XEJ.js → chunk-XD6A3VXB.js} +10 -5
- package/dist/{chunk-VP6V4XEJ.js.map → chunk-XD6A3VXB.js.map} +1 -1
- package/dist/{chunk-2AFWVHQK.js → chunk-XVL4FHXA.js} +6 -1
- package/dist/{chunk-2AFWVHQK.js.map → chunk-XVL4FHXA.js.map} +1 -1
- package/dist/chunk-YFTHJRDO.js +37 -0
- package/dist/chunk-YFTHJRDO.js.map +1 -0
- package/dist/{chunk-LAMTF4LX.js → chunk-ZIETAMAD.js} +6 -1
- package/dist/{chunk-LAMTF4LX.js.map → chunk-ZIETAMAD.js.map} +1 -1
- package/dist/cli/cache-command.d.ts +29 -0
- package/dist/cli/cache-command.d.ts.map +1 -0
- package/dist/cli/command-errors.d.ts +7 -0
- package/dist/cli/command-errors.d.ts.map +1 -0
- package/dist/cli/config-loader.d.ts +11 -0
- package/dist/cli/config-loader.d.ts.map +1 -0
- package/dist/cli/doctor-command.d.ts +64 -0
- package/dist/cli/doctor-command.d.ts.map +1 -0
- package/dist/cli/gen-types-command.d.ts +2 -0
- package/dist/cli/gen-types-command.d.ts.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/init-command.d.ts +7 -0
- package/dist/cli/init-command.d.ts.map +1 -0
- package/dist/cli/init-flow-command.d.ts +11 -0
- package/dist/cli/init-flow-command.d.ts.map +1 -0
- package/dist/cli/iteration.d.ts +44 -0
- package/dist/cli/iteration.d.ts.map +1 -0
- package/dist/cli/scaffolds.d.ts +13 -0
- package/dist/cli/scaffolds.d.ts.map +1 -0
- package/dist/cli/studio-command.d.ts +8 -0
- package/dist/cli/studio-command.d.ts.map +1 -0
- package/dist/cli/test-command.d.ts +61 -0
- package/dist/cli/test-command.d.ts.map +1 -0
- package/dist/cli/watch-mode.d.ts +9 -0
- package/dist/cli/watch-mode.d.ts.map +1 -0
- package/dist/cli.js +86 -30
- package/dist/cli.js.map +1 -1
- package/dist/cloud/browserstack.d.ts +9 -0
- package/dist/cloud/browserstack.d.ts.map +1 -0
- package/dist/cloud/common.d.ts +26 -0
- package/dist/cloud/common.d.ts.map +1 -0
- package/dist/cloud/provider.d.ts +21 -0
- package/dist/cloud/provider.d.ts.map +1 -0
- package/dist/cloud/saucelabs.d.ts +9 -0
- package/dist/cloud/saucelabs.d.ts.map +1 -0
- package/dist/{compiler-X6WTFMYF.js → compiler-44UW2FID.js} +7 -3
- package/dist/{compiler-X6WTFMYF.js.map → compiler-44UW2FID.js.map} +1 -1
- package/dist/config-loader-7W7OEWRG.js +10 -0
- package/dist/{config-loader-CNGIW2XK.js.map → config-loader-7W7OEWRG.js.map} +0 -0
- package/dist/{console-DIYEJSSP.js → console-T6TVZ65G.js} +8 -2
- package/dist/console-T6TVZ65G.js.map +1 -0
- package/dist/core/accessibility-audit.d.ts +29 -0
- package/dist/core/accessibility-audit.d.ts.map +1 -0
- package/dist/core/artifacts.d.ts +27 -0
- package/dist/core/artifacts.d.ts.map +1 -0
- package/dist/core/baseline-manager.d.ts +18 -0
- package/dist/core/baseline-manager.d.ts.map +1 -0
- package/dist/core/benchmark.d.ts +21 -0
- package/dist/core/benchmark.d.ts.map +1 -0
- package/dist/core/debug-repl.d.ts +17 -0
- package/dist/core/debug-repl.d.ts.map +1 -0
- package/dist/core/engine.d.ts +51 -0
- package/dist/core/engine.d.ts.map +1 -0
- package/dist/core/filters.d.ts +248 -0
- package/dist/core/filters.d.ts.map +1 -0
- package/dist/core/flow-generator.d.ts +13 -0
- package/dist/core/flow-generator.d.ts.map +1 -0
- package/dist/core/graphemes.d.ts +2 -0
- package/dist/core/graphemes.d.ts.map +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/native-accel.d.ts +21 -0
- package/dist/core/native-accel.d.ts.map +1 -0
- package/dist/core/network-cache.d.ts +68 -0
- package/dist/core/network-cache.d.ts.map +1 -0
- package/dist/core/orchestrator.d.ts +44 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/parallel.d.ts +42 -0
- package/dist/core/parallel.d.ts.map +1 -0
- package/dist/core/port-allocator.d.ts +16 -0
- package/dist/core/port-allocator.d.ts.map +1 -0
- package/dist/core/projects.d.ts +60 -0
- package/dist/core/projects.d.ts.map +1 -0
- package/dist/core/replay-cache.d.ts +127 -0
- package/dist/core/replay-cache.d.ts.map +1 -0
- package/dist/core/runner.d.ts +50 -0
- package/dist/core/runner.d.ts.map +1 -0
- package/dist/core/screenshot-compare.d.ts +50 -0
- package/dist/core/screenshot-compare.d.ts.map +1 -0
- package/dist/core/session-manager.d.ts +35 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/step-recorder.d.ts +20 -0
- package/dist/core/step-recorder.d.ts.map +1 -0
- package/dist/core/target-matrix.d.ts +29 -0
- package/dist/core/target-matrix.d.ts.map +1 -0
- package/dist/core/trace-viewer.d.ts +91 -0
- package/dist/core/trace-viewer.d.ts.map +1 -0
- package/dist/core/validator.d.ts +18 -0
- package/dist/core/validator.d.ts.map +1 -0
- package/dist/core/video-recorder.d.ts +120 -0
- package/dist/core/video-recorder.d.ts.map +1 -0
- package/dist/core/worker-pool.d.ts +87 -0
- package/dist/core/worker-pool.d.ts.map +1 -0
- package/dist/{daemon-manager-2EQDVUVM.js → daemon-manager-2SK5PHJR.js} +3 -3
- package/dist/{daemon-manager-2EQDVUVM.js.map → daemon-manager-2SK5PHJR.js.map} +0 -0
- package/dist/device/android.d.ts +66 -0
- package/dist/device/android.d.ts.map +1 -0
- package/dist/device/discover.d.ts +15 -0
- package/dist/device/discover.d.ts.map +1 -0
- package/dist/device/index.d.ts +4 -0
- package/dist/device/index.d.ts.map +1 -0
- package/dist/device/ios.d.ts +126 -0
- package/dist/device/ios.d.ts.map +1 -0
- package/dist/diagnostics/live-inspector.d.ts +121 -0
- package/dist/diagnostics/live-inspector.d.ts.map +1 -0
- package/dist/diagnostics/native-logs.d.ts +38 -0
- package/dist/diagnostics/native-logs.d.ts.map +1 -0
- package/dist/discover-6ULCTB5T.js +15 -0
- package/dist/{discover-NKDMB4UI.js.map → discover-6ULCTB5T.js.map} +0 -0
- package/dist/{doctor-command-6ZVJWCW7.js → doctor-command-4CQQLB7M.js} +24 -14
- package/dist/{doctor-command-6ZVJWCW7.js.map → doctor-command-4CQQLB7M.js.map} +1 -1
- package/dist/driver-3MEIFYST.js +19 -0
- package/dist/{filters-MQG2RMPX.js.map → driver-3MEIFYST.js.map} +0 -0
- package/dist/driver-QTIAADUZ.js +19 -0
- package/dist/{github-pr-YMWIPCCZ.js.map → driver-QTIAADUZ.js.map} +0 -0
- package/dist/drivers/adapter-registry.d.ts +96 -0
- package/dist/drivers/adapter-registry.d.ts.map +1 -0
- package/dist/drivers/appium/android.d.ts +22 -0
- package/dist/drivers/appium/android.d.ts.map +1 -0
- package/dist/drivers/appium/client.d.ts +26 -0
- package/dist/drivers/appium/client.d.ts.map +1 -0
- package/dist/drivers/appium/ios.d.ts +28 -0
- package/dist/drivers/appium/ios.d.ts.map +1 -0
- package/dist/drivers/appium/window-size.d.ts +8 -0
- package/dist/drivers/appium/window-size.d.ts.map +1 -0
- package/dist/drivers/browser-extensions.d.ts +62 -0
- package/dist/drivers/browser-extensions.d.ts.map +1 -0
- package/dist/drivers/cdp-browser.d.ts +129 -0
- package/dist/drivers/cdp-browser.d.ts.map +1 -0
- package/dist/drivers/common/xml-tokenizer.d.ts +26 -0
- package/dist/drivers/common/xml-tokenizer.d.ts.map +1 -0
- package/dist/drivers/device-controls.d.ts +36 -0
- package/dist/drivers/device-controls.d.ts.map +1 -0
- package/dist/drivers/electrobun.d.ts +47 -0
- package/dist/drivers/electrobun.d.ts.map +1 -0
- package/dist/drivers/electron.d.ts +36 -0
- package/dist/drivers/electron.d.ts.map +1 -0
- package/dist/drivers/index.d.ts +2 -0
- package/dist/drivers/index.d.ts.map +1 -0
- package/dist/drivers/launch-options.d.ts +10 -0
- package/dist/drivers/launch-options.d.ts.map +1 -0
- package/dist/drivers/network-profiles.d.ts +9 -0
- package/dist/drivers/network-profiles.d.ts.map +1 -0
- package/dist/drivers/playwright-parser.d.ts +16 -0
- package/dist/drivers/playwright-parser.d.ts.map +1 -0
- package/dist/drivers/playwright.d.ts +65 -0
- package/dist/drivers/playwright.d.ts.map +1 -0
- package/dist/drivers/raw-driver.d.ts +403 -0
- package/dist/drivers/raw-driver.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/client.d.ts +77 -0
- package/dist/drivers/uiautomator2/client.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/driver.d.ts +20 -0
- package/dist/drivers/uiautomator2/driver.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/index.d.ts +5 -0
- package/dist/drivers/uiautomator2/index.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/installer.d.ts +20 -0
- package/dist/drivers/uiautomator2/installer.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/pagesource.d.ts +12 -0
- package/dist/drivers/uiautomator2/pagesource.d.ts.map +1 -0
- package/dist/drivers/wasm-utils.d.ts +100 -0
- package/dist/drivers/wasm-utils.d.ts.map +1 -0
- package/dist/drivers/wasm.d.ts +57 -0
- package/dist/drivers/wasm.d.ts.map +1 -0
- package/dist/drivers/wda/client.d.ts +116 -0
- package/dist/drivers/wda/client.d.ts.map +1 -0
- package/dist/drivers/wda/driver.d.ts +26 -0
- package/dist/drivers/wda/driver.d.ts.map +1 -0
- package/dist/drivers/wda/index.d.ts +5 -0
- package/dist/drivers/wda/index.d.ts.map +1 -0
- package/dist/drivers/wda/installer.d.ts +51 -0
- package/dist/drivers/wda/installer.d.ts.map +1 -0
- package/dist/drivers/wda/pagesource.d.ts +12 -0
- package/dist/drivers/wda/pagesource.d.ts.map +1 -0
- package/dist/electrobun-MPAHMSI2.js +15 -0
- package/dist/{installer-5UHTYQTB.js.map → electrobun-MPAHMSI2.js.map} +0 -0
- package/dist/electron-SQACDON3.js +9 -0
- package/dist/{ios-Y4TO5MBR.js.map → electron-SQACDON3.js.map} +0 -0
- package/dist/errors.d.ts +82 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/{filters-MQG2RMPX.js → filters-5DCGGJRN.js} +3 -3
- package/dist/{local-DM3YBSV5.js.map → filters-5DCGGJRN.js.map} +0 -0
- package/dist/gherkin/compiler.d.ts +3 -0
- package/dist/gherkin/compiler.d.ts.map +1 -0
- package/dist/gherkin/index.d.ts +7 -0
- package/dist/gherkin/index.d.ts.map +1 -0
- package/dist/gherkin/matcher.d.ts +9 -0
- package/dist/gherkin/matcher.d.ts.map +1 -0
- package/dist/gherkin/registry.d.ts +28 -0
- package/dist/gherkin/registry.d.ts.map +1 -0
- package/dist/gherkin/steps.d.ts +13 -31
- package/dist/gherkin/steps.d.ts.map +1 -0
- package/dist/gherkin/steps.js +5 -2
- package/dist/gherkin/steps.js.map +1 -1
- package/dist/gherkin/world.d.ts +15 -0
- package/dist/gherkin/world.d.ts.map +1 -0
- package/dist/{github-pr-YMWIPCCZ.js → github-pr-RYO6IAKD.js} +3 -3
- package/dist/{machine-6H25TRTU.js.map → github-pr-RYO6IAKD.js.map} +0 -0
- package/dist/{html-FLMWPFQD.js → html-KJ2QAGF4.js} +6 -3
- package/dist/{html-FLMWPFQD.js.map → html-KJ2QAGF4.js.map} +1 -1
- package/dist/index.d.ts +57 -2267
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +460 -69
- package/dist/index.js.map +1 -1
- package/dist/{init-command-Z3QREABL.js → init-command-V5VGN3IS.js} +5 -2
- package/dist/{init-command-Z3QREABL.js.map → init-command-V5VGN3IS.js.map} +1 -1
- package/dist/{init-flow-command-4EKRVTNT.js → init-flow-command-INYUCC6N.js} +6 -3
- package/dist/{init-flow-command-4EKRVTNT.js.map → init-flow-command-INYUCC6N.js.map} +1 -1
- package/dist/{installer-5UHTYQTB.js → installer-DMTY47SI.js} +5 -5
- package/dist/{provider-YIPU5K42.js.map → installer-DMTY47SI.js.map} +0 -0
- package/dist/installer-KL2NCILK.js +17 -0
- package/dist/{runner-WOVZWUQR.js.map → installer-KL2NCILK.js.map} +0 -0
- package/dist/{ios-Y4TO5MBR.js → ios-SZ4RBI7Q.js} +4 -4
- package/dist/{server-ING5D5ZJ.js.map → ios-SZ4RBI7Q.js.map} +0 -0
- package/dist/json-57Z2YSES.js +39 -0
- package/dist/json-57Z2YSES.js.map +1 -0
- package/dist/{junit-CGB3LKHD.js → junit-MHD5AXBU.js} +26 -6
- package/dist/junit-MHD5AXBU.js.map +1 -0
- package/dist/{local-DM3YBSV5.js → local-SWHWINSA.js} +11 -12
- package/dist/{session-5TNWVGQQ.js.map → local-SWHWINSA.js.map} +0 -0
- package/dist/{machine-6H25TRTU.js → machine-NOOFRT45.js} +3 -3
- package/dist/{validator-WO5IL7IY.js.map → machine-NOOFRT45.js.map} +0 -0
- package/dist/machine.d.ts +20 -0
- package/dist/machine.d.ts.map +1 -0
- package/dist/mcp/server.d.ts +73 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/pagesource-KIQ5T5MA.js +9 -0
- package/dist/pagesource-KIQ5T5MA.js.map +1 -0
- package/dist/pagesource-KKG7WMFJ.js +9 -0
- package/dist/pagesource-KKG7WMFJ.js.map +1 -0
- package/dist/playwright-42QYIZEE.js +28 -0
- package/dist/playwright-42QYIZEE.js.map +1 -0
- package/dist/{provider-YIPU5K42.js → provider-CBAXZ2VA.js} +3 -3
- package/dist/provider-CBAXZ2VA.js.map +1 -0
- package/dist/{redact-U72BUBBR.js → redact-OG4M3IEU.js} +5 -2
- package/dist/{redact-U72BUBBR.js.map → redact-OG4M3IEU.js.map} +1 -1
- package/dist/report/allure.d.ts +3 -0
- package/dist/report/allure.d.ts.map +1 -0
- package/dist/report/classify-error.d.ts +7 -0
- package/dist/report/classify-error.d.ts.map +1 -0
- package/dist/report/code-frame.d.ts +16 -0
- package/dist/report/code-frame.d.ts.map +1 -0
- package/dist/report/console.d.ts +7 -0
- package/dist/report/console.d.ts.map +1 -0
- package/dist/report/failure-bundle.d.ts +66 -0
- package/dist/report/failure-bundle.d.ts.map +1 -0
- package/dist/report/failure-diagnostics.d.ts +11 -0
- package/dist/report/failure-diagnostics.d.ts.map +1 -0
- package/dist/report/github-pr.d.ts +20 -0
- package/dist/report/github-pr.d.ts.map +1 -0
- package/dist/report/html.d.ts +3 -0
- package/dist/report/html.d.ts.map +1 -0
- package/dist/report/index.d.ts +8 -0
- package/dist/report/index.d.ts.map +1 -0
- package/dist/report/json.d.ts +3 -0
- package/dist/report/json.d.ts.map +1 -0
- package/dist/report/junit.d.ts +3 -0
- package/dist/report/junit.d.ts.map +1 -0
- package/dist/report/redact.d.ts +29 -0
- package/dist/report/redact.d.ts.map +1 -0
- package/dist/report/selector-guardrails.d.ts +12 -0
- package/dist/report/selector-guardrails.d.ts.map +1 -0
- package/dist/report/types.d.ts +164 -0
- package/dist/report/types.d.ts.map +1 -0
- package/dist/{runner-WOVZWUQR.js → runner-ABGUVOJG.js} +5 -3
- package/dist/runner-ABGUVOJG.js.map +1 -0
- package/dist/runtime/appium-server.d.ts +34 -0
- package/dist/runtime/appium-server.d.ts.map +1 -0
- package/dist/runtime/appium.d.ts +5 -0
- package/dist/runtime/appium.d.ts.map +1 -0
- package/dist/runtime/capabilities.d.ts +19 -0
- package/dist/runtime/capabilities.d.ts.map +1 -0
- package/dist/runtime/daemon-manager.d.ts +83 -0
- package/dist/runtime/daemon-manager.d.ts.map +1 -0
- package/dist/runtime/local.d.ts +38 -0
- package/dist/runtime/local.d.ts.map +1 -0
- package/dist/runtime/types.d.ts +21 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/web-server.d.ts +57 -0
- package/dist/runtime/web-server.d.ts.map +1 -0
- package/dist/schemas/config.d.ts +812 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/device.d.ts +12 -0
- package/dist/schemas/device.d.ts.map +1 -0
- package/dist/schemas/element.d.ts +66 -0
- package/dist/schemas/element.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/selector.d.ts +193 -0
- package/dist/schemas/selector.d.ts.map +1 -0
- package/dist/screenshot-compare-BJRJHKNQ.js +12 -0
- package/dist/screenshot-compare-BJRJHKNQ.js.map +1 -0
- package/dist/server-2Y46CDVB.js +6749 -0
- package/dist/server-2Y46CDVB.js.map +1 -0
- package/dist/{server-ING5D5ZJ.js → server-ZCBZ4UYF.js} +3 -3
- package/dist/server-ZCBZ4UYF.js.map +1 -0
- package/dist/session-5XW6TKF4.js +39 -0
- package/dist/session-5XW6TKF4.js.map +1 -0
- package/dist/smart/auto-wait.d.ts +38 -0
- package/dist/smart/auto-wait.d.ts.map +1 -0
- package/dist/smart/channel-resolver.d.ts +90 -0
- package/dist/smart/channel-resolver.d.ts.map +1 -0
- package/dist/smart/coordinator.d.ts +162 -0
- package/dist/smart/coordinator.d.ts.map +1 -0
- package/dist/smart/diagnostics.d.ts +15 -0
- package/dist/smart/diagnostics.d.ts.map +1 -0
- package/dist/smart/element-matcher.d.ts +24 -0
- package/dist/smart/element-matcher.d.ts.map +1 -0
- package/dist/smart/hierarchy-cache.d.ts +16 -0
- package/dist/smart/hierarchy-cache.d.ts.map +1 -0
- package/dist/smart/index.d.ts +4 -0
- package/dist/smart/index.d.ts.map +1 -0
- package/dist/studio/api.d.ts +317 -0
- package/dist/studio/api.d.ts.map +1 -0
- package/dist/studio/context.d.ts +7 -0
- package/dist/studio/context.d.ts.map +1 -0
- package/dist/studio/core/element-tree.d.ts +15 -0
- package/dist/studio/core/element-tree.d.ts.map +1 -0
- package/dist/studio/effect-handler.d.ts +3 -0
- package/dist/studio/effect-handler.d.ts.map +1 -0
- package/dist/studio/procedures.d.ts +4 -0
- package/dist/studio/procedures.d.ts.map +1 -0
- package/dist/studio/recording-session.d.ts +31 -0
- package/dist/studio/recording-session.d.ts.map +1 -0
- package/dist/studio/routers/devices.d.ts +11 -0
- package/dist/studio/routers/devices.d.ts.map +1 -0
- package/dist/studio/routers/inspector.d.ts +104 -0
- package/dist/studio/routers/inspector.d.ts.map +1 -0
- package/dist/studio/routers/recording.d.ts +130 -0
- package/dist/studio/routers/recording.d.ts.map +1 -0
- package/dist/studio/routers/tests.d.ts +93 -0
- package/dist/studio/routers/tests.d.ts.map +1 -0
- package/dist/studio/server.d.ts +12 -0
- package/dist/studio/server.d.ts.map +1 -0
- package/dist/{studio-command-KK7A3KN6.js → studio-command-BNBOL424.js} +6 -3
- package/dist/{studio-command-KK7A3KN6.js.map → studio-command-BNBOL424.js.map} +1 -1
- package/dist/{test-command-QGIJBRH7.js → test-command-T4PLAZXU.js} +311 -1080
- package/dist/test-command-T4PLAZXU.js.map +1 -0
- package/dist/{validator-WO5IL7IY.js → validator-AJNOFBQM.js} +4 -4
- package/dist/validator-AJNOFBQM.js.map +1 -0
- package/dist/watch-mode-NR5MHNNL.js +10 -0
- package/dist/watch-mode-NR5MHNNL.js.map +1 -0
- package/native/darwin-arm64/libspana_native.dylib +0 -0
- package/native/darwin-x64/libspana_native.dylib +0 -0
- package/native/linux-arm64/libspana_native.so +0 -0
- package/native/linux-x64/libspana_native.so +0 -0
- package/native/win32-x64/spana_native.dll +0 -0
- package/package.json +16 -19
- package/studio-dist/assets/index-CHLA4F7b.css +2 -0
- package/studio-dist/assets/index-DXGUfzm3.js +23 -0
- package/studio-dist/index.html +2 -2
- package/dist/accessibility-audit-YZOPUY3D.js.map +0 -1
- package/dist/app-RSDPDTKT.js +0 -10
- package/dist/chunk-3IZMPNE7.js.map +0 -1
- package/dist/chunk-4KK4E3N3.js.map +0 -1
- package/dist/chunk-54ASKII6.js +0 -183
- package/dist/chunk-54ASKII6.js.map +0 -1
- package/dist/chunk-64UZQP7Z.js.map +0 -1
- package/dist/chunk-6PTUVG6A.js.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -11
- package/dist/chunk-FPQAJNE3.js.map +0 -1
- package/dist/chunk-FXBWACUT.js +0 -4378
- package/dist/chunk-FXBWACUT.js.map +0 -1
- package/dist/chunk-SGZMO456.js.map +0 -1
- package/dist/chunk-WS2TVNMY.js +0 -2494
- package/dist/chunk-WS2TVNMY.js.map +0 -1
- package/dist/chunk-X2TJP7LB.js.map +0 -1
- package/dist/chunk-XA6LWLZQ.js +0 -310
- package/dist/chunk-XA6LWLZQ.js.map +0 -1
- package/dist/chunk-Z6K4QQAR.js.map +0 -1
- package/dist/config-loader-CNGIW2XK.js +0 -9
- package/dist/console-DIYEJSSP.js.map +0 -1
- package/dist/discover-NKDMB4UI.js +0 -15
- package/dist/flow-DddAj1xv.d.ts +0 -1913
- package/dist/json-JMRPUVY2.js +0 -20
- package/dist/json-JMRPUVY2.js.map +0 -1
- package/dist/junit-CGB3LKHD.js.map +0 -1
- package/dist/screenshot-compare-POTXVUTL.js +0 -136
- package/dist/screenshot-compare-POTXVUTL.js.map +0 -1
- package/dist/server-JNQ2PLCC.js +0 -855
- package/dist/server-JNQ2PLCC.js.map +0 -1
- package/dist/session-5TNWVGQQ.js +0 -21
- package/dist/test-command-QGIJBRH7.js.map +0 -1
- package/studio-dist/assets/index-CBFsOh-9.js +0 -193
- package/studio-dist/assets/index-DH_18EyL.css +0 -1
package/dist/chunk-XA6LWLZQ.js
DELETED
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
// src/schemas/config.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var platformSchema = z.enum(["web", "android", "ios", "electron", "electrobun"]);
|
|
4
|
-
var reporterSchema = z.string().min(1);
|
|
5
|
-
var hookSchema = z.custom(
|
|
6
|
-
(value) => typeof value === "function",
|
|
7
|
-
{ message: "Expected function" }
|
|
8
|
-
);
|
|
9
|
-
var iosSigningConfigSchema = z.object({
|
|
10
|
-
teamId: z.string().min(1, "teamId is required"),
|
|
11
|
-
signingIdentity: z.string().min(1).optional()
|
|
12
|
-
}).strict();
|
|
13
|
-
var bridgeConfigSchema = z.object({
|
|
14
|
-
enabled: z.boolean().optional(),
|
|
15
|
-
port: z.number().int().positive().optional(),
|
|
16
|
-
host: z.string().min(1).optional(),
|
|
17
|
-
url: z.string().min(1).optional(),
|
|
18
|
-
connectTimeout: z.number().positive().optional()
|
|
19
|
-
}).strict();
|
|
20
|
-
var warmDaemonConfigSchema = z.object({
|
|
21
|
-
enabled: z.boolean().optional(),
|
|
22
|
-
reuseBrowserProcess: z.boolean().optional(),
|
|
23
|
-
reuseSession: z.boolean().optional(),
|
|
24
|
-
stateFile: z.string().min(1).optional()
|
|
25
|
-
}).strict();
|
|
26
|
-
var appConfigSchema = z.object({
|
|
27
|
-
url: z.string().url().optional(),
|
|
28
|
-
packageName: z.string().min(1).optional(),
|
|
29
|
-
bundleId: z.string().min(1).optional(),
|
|
30
|
-
appPath: z.string().min(1).optional(),
|
|
31
|
-
signing: iosSigningConfigSchema.optional(),
|
|
32
|
-
webkitInspectorUrl: z.string().min(1).optional(),
|
|
33
|
-
webkitInspectorPort: z.number().int().positive().optional(),
|
|
34
|
-
cdpPort: z.number().int().positive().optional(),
|
|
35
|
-
locale: z.string().min(1).optional(),
|
|
36
|
-
bridge: bridgeConfigSchema.optional()
|
|
37
|
-
}).strict();
|
|
38
|
-
var electronAppConfigSchema = z.object({
|
|
39
|
-
entry: z.string().min(1).optional(),
|
|
40
|
-
executablePath: z.string().min(1).optional(),
|
|
41
|
-
args: z.array(z.string()).optional(),
|
|
42
|
-
cwd: z.string().min(1).optional(),
|
|
43
|
-
env: z.record(z.string(), z.string()).optional(),
|
|
44
|
-
cdpUrl: z.string().url().optional(),
|
|
45
|
-
cdpPort: z.number().int().positive().optional(),
|
|
46
|
-
url: z.string().url().optional(),
|
|
47
|
-
bridge: bridgeConfigSchema.optional()
|
|
48
|
-
}).strict();
|
|
49
|
-
var electrobunAppConfigSchema = z.object({
|
|
50
|
-
executablePath: z.string().min(1).optional(),
|
|
51
|
-
appDir: z.string().min(1).optional(),
|
|
52
|
-
args: z.array(z.string()).optional(),
|
|
53
|
-
cwd: z.string().min(1).optional(),
|
|
54
|
-
env: z.record(z.string(), z.string()).optional(),
|
|
55
|
-
renderer: z.enum(["native", "cef"]).optional(),
|
|
56
|
-
cdpUrl: z.string().url().optional(),
|
|
57
|
-
cdpPort: z.number().int().positive().optional(),
|
|
58
|
-
webkitInspectorPort: z.number().int().positive().optional(),
|
|
59
|
-
url: z.string().url().optional(),
|
|
60
|
-
bridge: bridgeConfigSchema.optional()
|
|
61
|
-
}).strict();
|
|
62
|
-
var cloudAppReferenceSchema = z.object({
|
|
63
|
-
id: z.string().min(1).optional(),
|
|
64
|
-
path: z.string().min(1).optional(),
|
|
65
|
-
name: z.string().min(1).optional()
|
|
66
|
-
}).strict();
|
|
67
|
-
var browserStackAppSchema = cloudAppReferenceSchema.extend({
|
|
68
|
-
customId: z.string().min(1).optional()
|
|
69
|
-
}).strict();
|
|
70
|
-
var browserStackLocalSchema = z.object({
|
|
71
|
-
enabled: z.boolean().optional(),
|
|
72
|
-
binary: z.string().min(1).optional(),
|
|
73
|
-
identifier: z.string().min(1).optional(),
|
|
74
|
-
args: z.array(z.string().min(1)).optional()
|
|
75
|
-
}).strict();
|
|
76
|
-
var browserStackHelperSchema = z.object({
|
|
77
|
-
app: browserStackAppSchema.optional(),
|
|
78
|
-
local: browserStackLocalSchema.optional(),
|
|
79
|
-
options: z.record(z.string(), z.unknown()).optional()
|
|
80
|
-
}).strict();
|
|
81
|
-
var sauceConnectSchema = z.object({
|
|
82
|
-
enabled: z.boolean().optional(),
|
|
83
|
-
binary: z.string().min(1).optional(),
|
|
84
|
-
tunnelName: z.string().min(1).optional(),
|
|
85
|
-
args: z.array(z.string().min(1)).optional()
|
|
86
|
-
}).strict();
|
|
87
|
-
var sauceLabsHelperSchema = z.object({
|
|
88
|
-
app: cloudAppReferenceSchema.optional(),
|
|
89
|
-
connect: sauceConnectSchema.optional(),
|
|
90
|
-
options: z.record(z.string(), z.unknown()).optional()
|
|
91
|
-
}).strict();
|
|
92
|
-
var storybookConfigSchema = z.object({
|
|
93
|
-
url: z.string().url().optional(),
|
|
94
|
-
iframePath: z.string().min(1).optional()
|
|
95
|
-
}).strict();
|
|
96
|
-
var appiumExecutionConfigSchema = z.object({
|
|
97
|
-
serverUrl: z.string().url().optional(),
|
|
98
|
-
capabilities: z.record(z.string(), z.unknown()).optional(),
|
|
99
|
-
platformCapabilities: z.object({
|
|
100
|
-
android: z.record(z.string(), z.unknown()).optional(),
|
|
101
|
-
ios: z.record(z.string(), z.unknown()).optional()
|
|
102
|
-
}).strict().optional(),
|
|
103
|
-
capabilitiesFile: z.string().min(1).optional(),
|
|
104
|
-
reportToProvider: z.boolean().optional(),
|
|
105
|
-
browserstack: browserStackHelperSchema.optional(),
|
|
106
|
-
saucelabs: sauceLabsHelperSchema.optional(),
|
|
107
|
-
cloudProvider: z.string().min(1).optional(),
|
|
108
|
-
autoStart: z.boolean().optional(),
|
|
109
|
-
autoStartBinary: z.string().min(1).optional(),
|
|
110
|
-
autoStartArgs: z.array(z.string()).optional()
|
|
111
|
-
}).strict();
|
|
112
|
-
var virtualAuthenticatorOptionsSchema = z.object({
|
|
113
|
-
protocol: z.enum(["ctap2", "u2f"]).optional(),
|
|
114
|
-
transport: z.enum(["usb", "nfc", "ble", "cable", "internal"]).optional(),
|
|
115
|
-
hasResidentKey: z.boolean().optional(),
|
|
116
|
-
hasUserVerification: z.boolean().optional(),
|
|
117
|
-
isUserVerified: z.boolean().optional(),
|
|
118
|
-
automaticPresenceSimulation: z.boolean().optional()
|
|
119
|
-
}).strict();
|
|
120
|
-
var webExecutionConfigSchema = z.object({
|
|
121
|
-
browser: z.enum(["chromium", "firefox", "webkit"]).optional(),
|
|
122
|
-
engine: z.enum(["auto", "playwright", "cdp", "lightpanda"]).optional(),
|
|
123
|
-
cdpUrl: z.string().url().optional(),
|
|
124
|
-
wsEndpoint: z.string().url().optional(),
|
|
125
|
-
executablePath: z.string().min(1).optional(),
|
|
126
|
-
channel: z.string().min(1).optional(),
|
|
127
|
-
headless: z.boolean().optional(),
|
|
128
|
-
waitUntil: z.enum(["domcontentloaded", "load", "networkidle", "commit"]).optional(),
|
|
129
|
-
instantAnimations: z.boolean().optional(),
|
|
130
|
-
blockResources: z.array(z.enum(["image", "font", "media", "stylesheet"])).optional(),
|
|
131
|
-
warmBrowser: z.boolean().optional(),
|
|
132
|
-
warmBrowserScope: z.string().min(1).optional(),
|
|
133
|
-
freshContextPerFlow: z.boolean().optional(),
|
|
134
|
-
contextIsolation: z.enum(["fresh", "hot-cache"]).optional(),
|
|
135
|
-
maxContextsPerBrowser: z.number().int().positive().optional(),
|
|
136
|
-
virtualAuthenticator: z.union([z.boolean(), virtualAuthenticatorOptionsSchema]).optional(),
|
|
137
|
-
storageState: z.string().min(1).optional(),
|
|
138
|
-
verboseLogging: z.boolean().optional(),
|
|
139
|
-
storybook: storybookConfigSchema.optional(),
|
|
140
|
-
extensions: z.array(z.string().min(1)).optional(),
|
|
141
|
-
colorScheme: z.enum(["dark", "light", "no-preference"]).optional(),
|
|
142
|
-
reducedMotion: z.enum(["reduce", "no-preference"]).optional(),
|
|
143
|
-
timezoneId: z.string().min(1).optional()
|
|
144
|
-
}).strict();
|
|
145
|
-
var executionConfigSchema = z.object({
|
|
146
|
-
mode: z.enum(["local", "appium"]).optional(),
|
|
147
|
-
web: webExecutionConfigSchema.optional(),
|
|
148
|
-
appium: appiumExecutionConfigSchema.optional(),
|
|
149
|
-
bridge: bridgeConfigSchema.optional(),
|
|
150
|
-
warmDaemons: warmDaemonConfigSchema.optional()
|
|
151
|
-
}).strict();
|
|
152
|
-
var artifactConfigSchema = z.object({
|
|
153
|
-
outputDir: z.string().min(1).optional(),
|
|
154
|
-
captureOnFailure: z.boolean().optional(),
|
|
155
|
-
captureOnSuccess: z.boolean().optional(),
|
|
156
|
-
captureSteps: z.boolean().optional(),
|
|
157
|
-
screenshot: z.boolean().optional(),
|
|
158
|
-
uiHierarchy: z.boolean().optional(),
|
|
159
|
-
consoleLogs: z.boolean().optional(),
|
|
160
|
-
jsErrors: z.boolean().optional(),
|
|
161
|
-
har: z.boolean().optional(),
|
|
162
|
-
jsCoverage: z.boolean().optional(),
|
|
163
|
-
video: z.enum(["off", "on", "retain-on-failure"]).optional(),
|
|
164
|
-
playback: z.boolean().optional(),
|
|
165
|
-
trace: z.boolean().optional(),
|
|
166
|
-
nativeLogs: z.boolean().optional()
|
|
167
|
-
}).strict();
|
|
168
|
-
var deviceStateSchema = z.object({
|
|
169
|
-
language: z.string().min(1).optional(),
|
|
170
|
-
locale: z.string().min(1).optional(),
|
|
171
|
-
timeZone: z.string().min(1).optional()
|
|
172
|
-
}).strict();
|
|
173
|
-
var launchOptionsSchema = z.object({
|
|
174
|
-
clearState: z.boolean().optional(),
|
|
175
|
-
clearKeychain: z.boolean().optional(),
|
|
176
|
-
deepLink: z.string().min(1).optional(),
|
|
177
|
-
launchArguments: z.record(z.string(), z.unknown()).optional(),
|
|
178
|
-
deviceState: deviceStateSchema.optional()
|
|
179
|
-
}).strict();
|
|
180
|
-
var provConfigSchema = z.object({
|
|
181
|
-
apps: z.object({
|
|
182
|
-
web: appConfigSchema.optional(),
|
|
183
|
-
android: appConfigSchema.optional(),
|
|
184
|
-
ios: appConfigSchema.optional(),
|
|
185
|
-
electron: electronAppConfigSchema.optional(),
|
|
186
|
-
electrobun: electrobunAppConfigSchema.optional()
|
|
187
|
-
}).strict().optional(),
|
|
188
|
-
defaults: z.object({
|
|
189
|
-
waitTimeout: z.number().positive().optional(),
|
|
190
|
-
pollInterval: z.number().positive().optional(),
|
|
191
|
-
settleTimeout: z.number().nonnegative().optional(),
|
|
192
|
-
retries: z.number().int().nonnegative().optional(),
|
|
193
|
-
waitForIdleTimeout: z.number().nonnegative().optional(),
|
|
194
|
-
typingDelay: z.number().nonnegative().optional(),
|
|
195
|
-
initialPollInterval: z.number().positive().optional(),
|
|
196
|
-
hierarchyCacheTtl: z.number().nonnegative().optional(),
|
|
197
|
-
snapshotMaxDepth: z.number().int().positive().optional(),
|
|
198
|
-
retryDelay: z.number().nonnegative().optional(),
|
|
199
|
-
workers: z.number().int().positive().optional(),
|
|
200
|
-
processes: z.number().int().positive().optional(),
|
|
201
|
-
maxWorkersPerProcess: z.number().int().positive().optional(),
|
|
202
|
-
tapMode: z.enum(["native", "dom"]).optional(),
|
|
203
|
-
locale: z.string().min(1).optional(),
|
|
204
|
-
failFastWhenIdle: z.boolean().optional(),
|
|
205
|
-
actionStableFrames: z.number().int().nonnegative().optional()
|
|
206
|
-
}).strict().optional(),
|
|
207
|
-
platforms: z.array(platformSchema).optional(),
|
|
208
|
-
parallelPlatforms: z.boolean().optional(),
|
|
209
|
-
flowDir: z.string().min(1).optional(),
|
|
210
|
-
launchOptions: launchOptionsSchema.optional(),
|
|
211
|
-
reporters: z.array(reporterSchema).optional(),
|
|
212
|
-
hooks: z.object({
|
|
213
|
-
beforeAll: hookSchema.optional(),
|
|
214
|
-
beforeEach: hookSchema.optional(),
|
|
215
|
-
afterEach: hookSchema.optional(),
|
|
216
|
-
afterAll: hookSchema.optional()
|
|
217
|
-
}).strict().optional(),
|
|
218
|
-
artifacts: artifactConfigSchema.optional(),
|
|
219
|
-
execution: executionConfigSchema.optional(),
|
|
220
|
-
visualRegression: z.object({
|
|
221
|
-
threshold: z.number().min(0).max(1).optional(),
|
|
222
|
-
maxDiffPixelRatio: z.number().min(0).max(1).optional(),
|
|
223
|
-
baselinesDir: z.string().optional(),
|
|
224
|
-
mode: z.enum(["pixel", "layout-tolerant"]).optional()
|
|
225
|
-
}).optional(),
|
|
226
|
-
filters: z.array(
|
|
227
|
-
z.custom(
|
|
228
|
-
(value) => typeof value === "object" && value !== null && typeof value.name === "string" && typeof value.filter === "function",
|
|
229
|
-
{ message: "Expected TestFilter ({ name, filter })" }
|
|
230
|
-
)
|
|
231
|
-
).optional(),
|
|
232
|
-
replayCache: z.object({
|
|
233
|
-
mode: z.enum(["read-write", "strict", "off"]).optional(),
|
|
234
|
-
dir: z.string().min(1).optional()
|
|
235
|
-
}).strict().optional(),
|
|
236
|
-
webServer: z.union([
|
|
237
|
-
z.object({
|
|
238
|
-
command: z.string().min(1),
|
|
239
|
-
url: z.string().url().optional(),
|
|
240
|
-
port: z.number().int().positive().optional(),
|
|
241
|
-
cwd: z.string().min(1).optional(),
|
|
242
|
-
env: z.record(z.string(), z.string()).optional(),
|
|
243
|
-
timeout: z.number().positive().optional(),
|
|
244
|
-
reuseExistingServer: z.boolean().optional(),
|
|
245
|
-
stdout: z.enum(["pipe", "ignore", "inherit"]).optional(),
|
|
246
|
-
stderr: z.enum(["pipe", "ignore", "inherit"]).optional(),
|
|
247
|
-
ignoreHTTPSErrors: z.boolean().optional(),
|
|
248
|
-
gracefulShutdownMs: z.number().nonnegative().optional()
|
|
249
|
-
}).strict(),
|
|
250
|
-
z.array(
|
|
251
|
-
z.object({
|
|
252
|
-
command: z.string().min(1),
|
|
253
|
-
url: z.string().url().optional(),
|
|
254
|
-
port: z.number().int().positive().optional(),
|
|
255
|
-
cwd: z.string().min(1).optional(),
|
|
256
|
-
env: z.record(z.string(), z.string()).optional(),
|
|
257
|
-
timeout: z.number().positive().optional(),
|
|
258
|
-
reuseExistingServer: z.boolean().optional(),
|
|
259
|
-
stdout: z.enum(["pipe", "ignore", "inherit"]).optional(),
|
|
260
|
-
stderr: z.enum(["pipe", "ignore", "inherit"]).optional(),
|
|
261
|
-
ignoreHTTPSErrors: z.boolean().optional(),
|
|
262
|
-
gracefulShutdownMs: z.number().nonnegative().optional()
|
|
263
|
-
}).strict()
|
|
264
|
-
)
|
|
265
|
-
]).optional(),
|
|
266
|
-
projects: z.array(
|
|
267
|
-
z.object({
|
|
268
|
-
name: z.string().min(1),
|
|
269
|
-
platform: platformSchema.optional(),
|
|
270
|
-
browser: z.enum(["chromium", "firefox", "webkit"]).optional(),
|
|
271
|
-
baseUrl: z.string().url().optional(),
|
|
272
|
-
storageState: z.string().min(1).optional(),
|
|
273
|
-
flowDir: z.string().min(1).optional(),
|
|
274
|
-
testMatch: z.array(z.union([z.string().min(1), z.instanceof(RegExp)])).optional(),
|
|
275
|
-
testIgnore: z.array(z.union([z.string().min(1), z.instanceof(RegExp)])).optional(),
|
|
276
|
-
tags: z.array(z.string().min(1)).optional(),
|
|
277
|
-
grep: z.string().min(1).optional(),
|
|
278
|
-
dependencies: z.array(z.string().min(1)).optional(),
|
|
279
|
-
teardown: z.string().min(1).optional(),
|
|
280
|
-
retries: z.number().int().nonnegative().optional(),
|
|
281
|
-
use: z.record(z.string(), z.unknown()).optional()
|
|
282
|
-
}).strict()
|
|
283
|
-
).optional(),
|
|
284
|
-
agent: z.object({
|
|
285
|
-
model: z.string().min(1).optional(),
|
|
286
|
-
baseUrl: z.string().url().optional(),
|
|
287
|
-
apiKey: z.string().min(1).optional(),
|
|
288
|
-
apiKeyEnv: z.string().min(1).optional(),
|
|
289
|
-
maxSteps: z.number().int().positive().optional()
|
|
290
|
-
}).strict().optional()
|
|
291
|
-
}).strict();
|
|
292
|
-
function defineConfig(config) {
|
|
293
|
-
return config;
|
|
294
|
-
}
|
|
295
|
-
function validateConfig(config) {
|
|
296
|
-
return provConfigSchema.parse(config);
|
|
297
|
-
}
|
|
298
|
-
function formatConfigValidationError(error) {
|
|
299
|
-
return error.issues.map((issue) => {
|
|
300
|
-
const path = issue.path.length > 0 ? issue.path.join(".") : "config";
|
|
301
|
-
return `- ${path}: ${issue.message}`;
|
|
302
|
-
}).join("\n");
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export {
|
|
306
|
-
defineConfig,
|
|
307
|
-
validateConfig,
|
|
308
|
-
formatConfigValidationError
|
|
309
|
-
};
|
|
310
|
-
//# sourceMappingURL=chunk-XA6LWLZQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schemas/config.ts"],"sourcesContent":["import type { Platform, TapMode } from \"./selector.js\";\nimport type {\n DeviceStateConfig,\n LaunchOptions,\n VirtualAuthenticatorOptions,\n} from \"../drivers/raw-driver.js\";\nimport type { WebServerConfig } from \"../runtime/web-server.js\";\nimport type { ProjectConfig } from \"../core/projects.js\";\nimport type { AgentProviderConfig } from \"../api/agent-fixture.js\";\nimport { z, type ZodError } from \"zod\";\n\nexport type {\n DeviceStateConfig,\n LaunchOptions,\n VirtualAuthenticatorOptions,\n WebServerConfig,\n ProjectConfig,\n AgentProviderConfig,\n};\n\nexport interface IOSSigningConfig {\n /** Apple Development Team ID (from developer.apple.com or Xcode) */\n teamId: string;\n /** Code signing identity (default: \"Apple Development\") */\n signingIdentity?: string;\n}\n\nexport interface BridgeConfig {\n /** Enable the in-app spana-bridge WebSocket server. Default: auto-detected when port/url is set. */\n enabled?: boolean;\n /** Port for the runner's spana-bridge WebSocket server (default: 9333). */\n port?: number;\n /** Host to bind the bridge server on (default: \"127.0.0.1\"). */\n host?: string;\n /** Explicit external bridge URL if already running (e.g. ws://127.0.0.1:9333). */\n url?: string;\n /** Connection timeout in ms when waiting for the app bridge to connect (default: 5000). */\n connectTimeout?: number;\n}\n\nexport interface WarmDaemonConfig {\n /** Keep WDA / UiAutomator2 daemons alive across test runs and reuse them. Default: false. */\n enabled?: boolean;\n /** Reuse a single browser process across flows with fresh BrowserContexts. Default: true. */\n reuseBrowserProcess?: boolean;\n /** Reuse an active WDA/UiAutomator2 session across flows instead of recreating. Default: true when warm daemons enabled. */\n reuseSession?: boolean;\n /** Optional path to store warm daemon metadata. */\n stateFile?: string;\n}\n\nexport interface AppConfig {\n url?: string;\n packageName?: string;\n bundleId?: string;\n /** Path to .app or .ipa for auto-install on device/simulator */\n appPath?: string;\n /** iOS code signing config for physical devices */\n signing?: IOSSigningConfig;\n /** Explicit WebKit Inspector URL or port for iOS WKWebView direct DOM access */\n webkitInspectorUrl?: string;\n webkitInspectorPort?: number;\n /** Explicit CDP port for Android WebView or desktop targets */\n cdpPort?: number;\n /** Pin device locale (e.g. \"en_US\", \"sv_SE\") for predictable system UI labels */\n locale?: string;\n /** Optional spana-bridge override for this app target */\n bridge?: BridgeConfig;\n}\n\nexport interface ElectronAppConfig {\n /** Path to Electron main entry file or app directory (passed to Playwright _electron.launch) */\n entry?: string;\n /** Path to a packaged Electron executable */\n executablePath?: string;\n /** Extra CLI arguments passed to Electron */\n args?: string[];\n /** Working directory for Electron launch */\n cwd?: string;\n /** Additional environment variables for Electron */\n env?: Record<string, string>;\n /** Attach to an already-running Electron app over CDP instead of launching */\n cdpUrl?: string;\n /** Remote debugging port when launching or attaching over CDP */\n cdpPort?: number;\n /** Optional URL to navigate to after launch */\n url?: string;\n /** Optional spana-bridge config */\n bridge?: BridgeConfig;\n}\n\nexport type ElectrobunRenderer = \"native\" | \"cef\";\n\nexport interface ElectrobunAppConfig {\n /** Path to Electrobun binary or packaged .app/.exe */\n executablePath?: string;\n /** Path to Electrobun project root (containing electrobun.config.ts) */\n appDir?: string;\n /** Extra CLI arguments passed to the Electrobun process */\n args?: string[];\n /** Working directory for launch */\n cwd?: string;\n /** Additional environment variables */\n env?: Record<string, string>;\n /** Renderer engine used by the Electrobun build: \"native\" (WKWebView/WebView2/WebKitGTK) or \"cef\" */\n renderer?: ElectrobunRenderer;\n /** Attach to an already-running Electrobun CEF/WebView2 app over CDP */\n cdpUrl?: string;\n /** Remote debugging port (ELECTROBUN_CDP_PORT / WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS) */\n cdpPort?: number;\n /** WebKit Inspector port for macOS WKWebView or Linux WebKitGTK */\n webkitInspectorPort?: number;\n /** Optional URL to navigate to after launch */\n url?: string;\n /** Optional spana-bridge config */\n bridge?: BridgeConfig;\n}\n\nexport type BrowserName = \"chromium\" | \"firefox\" | \"webkit\";\nexport type WebBrowserEngine = \"auto\" | \"playwright\" | \"cdp\" | \"lightpanda\";\nexport type WebContextIsolation = \"fresh\" | \"hot-cache\";\nexport type WebResourceBlockType = \"image\" | \"font\" | \"media\" | \"stylesheet\";\nexport type VideoRecordingMode = \"off\" | \"on\" | \"retain-on-failure\";\n\nexport type StorybookValue = string | number | boolean | null;\n\nexport interface StorybookConfig {\n /** Optional dedicated Storybook URL (falls back to apps.web.url when omitted) */\n url?: string;\n /** Preview iframe path used to render isolated stories (default: /iframe.html) */\n iframePath?: string;\n}\n\nexport interface WebExecutionConfig {\n browser?: BrowserName;\n /** Browser engine backend: \"playwright\" (default), \"cdp\" (direct CDP WebSocket — zero Playwright pipe), or \"lightpanda\". */\n engine?: WebBrowserEngine;\n /** Connect to an existing CDP browser / Lightpanda endpoint (e.g. \"http://127.0.0.1:9222\"). */\n cdpUrl?: string;\n /** Connect to a remote Playwright server WebSocket (e.g. BrowserStack Automate Web `wss://cdp.browserstack.com/playwright?...`). */\n wsEndpoint?: string;\n /** Explicit browser executable path (e.g. system Chrome or custom Chromium binary). */\n executablePath?: string;\n /** Browser release channel (e.g. \"chrome\", \"chrome-beta\", \"msedge\"). */\n channel?: string;\n headless?: boolean;\n /** Navigation readiness event for launchApp/openLink (default: \"load\"). */\n waitUntil?: \"domcontentloaded\" | \"load\" | \"networkidle\" | \"commit\";\n /** Collapse CSS transitions & animations to 0.001ms for faster deterministic runs. */\n instantAnimations?: boolean;\n /** Abort heavy asset requests (\"image\" | \"font\" | \"media\" | \"stylesheet\") during web runs. */\n blockResources?: WebResourceBlockType[];\n /** Reuse a persistent warm Chromium daemon across runs via CDP (chromium only). */\n warmBrowser?: boolean;\n /** Scope key for isolating warm Chromium daemons across concurrent repos/runs (defaults to cwd hash). */\n warmBrowserScope?: string;\n /** Create a fresh isolated BrowserContext per flow using pre-warmed context pooling + background teardown. */\n freshContextPerFlow?: boolean;\n /**\n * Context isolation strategy when `freshContextPerFlow` is enabled (Direct CDP):\n * - `\"fresh\"` (default): new `Target.createBrowserContext` per flow (strictest isolation).\n * - `\"hot-cache\"`: keeps Chromium's HTTP & V8 bytecode cache hot while wiping cookies, localStorage,\n * sessionStorage, IndexedDB, CacheStorage, and service workers between flows (~4 ms reset!).\n */\n contextIsolation?: WebContextIsolation;\n /** Max worker contexts sharing one Chromium browser process under `--parallel` (default: 2 to avoid CDP/IO contention). */\n maxContextsPerBrowser?: number;\n /** Automatically attach a CDP WebAuthn virtual authenticator (passkey) to every fresh context. */\n virtualAuthenticator?: boolean | VirtualAuthenticatorOptions;\n /** Optional Playwright storage state JSON file to preload for web runs */\n storageState?: string;\n /** Print verbose Playwright runtime events to stdout for local web debugging */\n verboseLogging?: boolean;\n /** Optional Storybook config for isolated component/story flows in the browser runtime */\n storybook?: StorybookConfig;\n /** Unpacked Chromium browser extension directories to load at launch. */\n extensions?: string[];\n /** Emulate `prefers-color-scheme` on web launch (`\"dark\"` | `\"light\"` | `\"no-preference\"`). */\n colorScheme?: \"dark\" | \"light\" | \"no-preference\";\n /** Emulate `prefers-reduced-motion` on web launch (`\"reduce\"` | `\"no-preference\"`). */\n reducedMotion?: \"reduce\" | \"no-preference\";\n /** Emulate IANA timezone ID on Chromium launch (e.g. `\"America/New_York\"`). */\n timezoneId?: string;\n}\n\nexport interface CloudAppReferenceConfig {\n /** Existing remote app reference, e.g. bs://... or storage:... */\n id?: string;\n /** Local file path to upload when the provider supports managed upload */\n path?: string;\n /** Override the uploaded file name when the provider supports it */\n name?: string;\n}\n\nexport interface BrowserStackAppConfig extends CloudAppReferenceConfig {\n /** Stable BrowserStack app alias */\n customId?: string;\n}\n\nexport interface BrowserStackLocalConfig {\n enabled?: boolean;\n binary?: string;\n identifier?: string;\n args?: string[];\n}\n\nexport interface BrowserStackHelperConfig {\n app?: BrowserStackAppConfig;\n local?: BrowserStackLocalConfig;\n options?: Record<string, unknown>;\n}\n\nexport interface SauceConnectConfig {\n enabled?: boolean;\n binary?: string;\n tunnelName?: string;\n args?: string[];\n}\n\nexport interface SauceLabsHelperConfig {\n app?: CloudAppReferenceConfig;\n connect?: SauceConnectConfig;\n options?: Record<string, unknown>;\n}\n\nexport interface AppiumExecutionConfig {\n serverUrl?: string;\n capabilities?: Record<string, unknown>;\n /**\n * Platform-specific capabilities merged on top of `capabilities` when the\n * matching platform runs. Useful when you want different `appium:deviceName`\n * or `appium:platformVersion` for Android vs iOS.\n */\n platformCapabilities?: {\n android?: Record<string, unknown>;\n ios?: Record<string, unknown>;\n };\n capabilitiesFile?: string;\n reportToProvider?: boolean;\n browserstack?: BrowserStackHelperConfig;\n saucelabs?: SauceLabsHelperConfig;\n /** Path to a custom cloud provider module (default export must conform to CloudProvider interface). */\n cloudProvider?: string;\n /**\n * Opt in to having spana spawn a local `appium` subprocess for the\n * duration of the test run. Requires `appium` to be on PATH. When true,\n * `serverUrl` (if set) is ignored and a URL is assigned to the\n * auto-started server instead. Off by default — spana never spawns\n * background processes unless you ask.\n */\n autoStart?: boolean;\n /** Override the `appium` binary name. Default: \"appium\". */\n autoStartBinary?: string;\n /** Extra CLI args to forward to the spawned Appium process. */\n autoStartArgs?: readonly string[];\n}\n\nexport interface ExecutionConfig {\n mode?: \"local\" | \"appium\";\n web?: WebExecutionConfig;\n appium?: AppiumExecutionConfig;\n /** In-app spana-bridge configuration shared across webview targets */\n bridge?: BridgeConfig;\n /** Warm daemon & process reuse settings for fast repeated runs */\n warmDaemons?: WarmDaemonConfig;\n}\n\nexport interface ArtifactConfig {\n outputDir?: string;\n captureOnFailure?: boolean;\n captureOnSuccess?: boolean;\n captureSteps?: boolean;\n screenshot?: boolean;\n uiHierarchy?: boolean;\n consoleLogs?: boolean;\n jsErrors?: boolean;\n har?: boolean;\n jsCoverage?: boolean;\n /** Video / screencast recording mode: \"off\" (default), \"on\", or \"retain-on-failure\". */\n video?: VideoRecordingMode;\n /** Embed interactive step-by-step visual playback timeline inside report.html (auto-enabled when video !== \"off\"). */\n playback?: boolean;\n /** Write Playwright-style interactive `trace.json` + `trace-viewer.html` bundle per flow. */\n trace?: boolean;\n /** Automatically attach Android `adb logcat` / iOS Simulator crash logs on native failure (default: true). */\n nativeLogs?: boolean;\n}\n\nexport interface HookContext {\n app: unknown; // Will be typed properly when App is defined\n expect?: unknown;\n platform?: Platform;\n result?: unknown;\n summary?: unknown;\n}\n\nexport interface ProvConfig {\n apps?: {\n web?: AppConfig;\n android?: AppConfig;\n ios?: AppConfig;\n electron?: ElectronAppConfig;\n electrobun?: ElectrobunAppConfig;\n };\n defaults?: {\n waitTimeout?: number;\n pollInterval?: number;\n settleTimeout?: number;\n retries?: number;\n /** Pause after each action (tap, scroll) to let the UI settle. Default: 0 (disabled). */\n waitForIdleTimeout?: number;\n /** Delay between each character when typing. Default: 0 (instant). */\n typingDelay?: number;\n /** Starting poll interval for adaptive backoff. Default: 50ms. Set equal to pollInterval to disable adaptive backoff. */\n initialPollInterval?: number;\n /** Max age in ms before cached hierarchy is stale. Default: 100. Set to 0 to disable. */\n hierarchyCacheTtl?: number;\n /** Max depth for UI hierarchy snapshots on iOS. Default: 100. */\n snapshotMaxDepth?: number;\n /** Delay in ms between retry attempts of a failed flow. Default: 0 (immediate). */\n retryDelay?: number;\n /** Max workers per platform when using --parallel. */\n workers?: number;\n /** Number of isolated OS worker processes sharing a dynamic longest-first flow queue (`--processes M`). */\n processes?: number;\n /** Max in-process workers before automatically sharding across multiple OS processes (default: 8). */\n maxWorkersPerProcess?: number;\n /** Default tap mode when a DOM channel resolves an element: \"native\" (real touch, default) or \"dom\" (fast synthetic click). */\n tapMode?: TapMode;\n /** Pin device locale across targets so system UI sheet labels stay deterministic. */\n locale?: string;\n /** Fail web element waits early when the page is idle & readyState === \"complete\" instead of waiting full waitTimeout. */\n failFastWhenIdle?: boolean;\n /** Consecutive stable animation frames required before pointer actions on web. Default: 2. Set 0 to disable. */\n actionStableFrames?: number;\n };\n platforms?: Platform[];\n /** Run platforms concurrently when they use independent resources. Default: false (serial). */\n parallelPlatforms?: boolean;\n flowDir?: string;\n launchOptions?: LaunchOptions;\n /**\n * Reporter names or module paths. Built-in: \"console\", \"json\", \"junit\", \"html\", \"allure\".\n * Custom reporters: provide a relative path (e.g., \"./reporters/slack.ts\") that default-exports\n * a Reporter object or a `(options: { outputDir: string }) => Reporter` factory function.\n */\n reporters?: string[];\n hooks?: {\n beforeAll?: (ctx: HookContext) => Promise<void>;\n beforeEach?: (ctx: HookContext) => Promise<void>;\n afterEach?: (ctx: HookContext) => Promise<void>;\n afterAll?: (ctx: HookContext) => Promise<void>;\n };\n artifacts?: ArtifactConfig;\n execution?: ExecutionConfig;\n visualRegression?: {\n threshold?: number;\n maxDiffPixelRatio?: number;\n baselinesDir?: string;\n mode?: \"pixel\" | \"layout-tolerant\";\n };\n /** Pluggable CI filters evaluated when `--changed-since <ref>` is passed. */\n filters?: Array<{\n name: string;\n filter: (flows: any[], context: any) => Promise<any> | any;\n }>;\n /** Verified replay cache settings for optional agentic steps (`.spana/cache/`). */\n replayCache?: {\n mode?: \"read-write\" | \"strict\" | \"off\";\n dir?: string;\n };\n /** Auto-boot one or more dev servers before tests run and tear them down cleanly afterwards. */\n webServer?: WebServerConfig | WebServerConfig[];\n /** Named test projects with dependency DAG (`dependencies`, `teardown`, per-project `storageState` / `browser` / `testMatch`). */\n projects?: ProjectConfig[];\n /** Optional LLM provider configuration for `agent.act()` / `agent.verify()` / `agent.extract()` and `spana explore`. */\n agent?: Omit<AgentProviderConfig, \"fetchFn\">;\n}\n\nconst platformSchema = z.enum([\"web\", \"android\", \"ios\", \"electron\", \"electrobun\"]);\nconst reporterSchema = z.string().min(1);\nconst hookSchema = z.custom<(...args: unknown[]) => Promise<void>>(\n (value) => typeof value === \"function\",\n { message: \"Expected function\" },\n);\n\nconst iosSigningConfigSchema = z\n .object({\n teamId: z.string().min(1, \"teamId is required\"),\n signingIdentity: z.string().min(1).optional(),\n })\n .strict();\n\nconst bridgeConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n port: z.number().int().positive().optional(),\n host: z.string().min(1).optional(),\n url: z.string().min(1).optional(),\n connectTimeout: z.number().positive().optional(),\n })\n .strict();\n\nconst warmDaemonConfigSchema = z\n .object({\n enabled: z.boolean().optional(),\n reuseBrowserProcess: z.boolean().optional(),\n reuseSession: z.boolean().optional(),\n stateFile: z.string().min(1).optional(),\n })\n .strict();\n\nconst appConfigSchema = z\n .object({\n url: z.string().url().optional(),\n packageName: z.string().min(1).optional(),\n bundleId: z.string().min(1).optional(),\n appPath: z.string().min(1).optional(),\n signing: iosSigningConfigSchema.optional(),\n webkitInspectorUrl: z.string().min(1).optional(),\n webkitInspectorPort: z.number().int().positive().optional(),\n cdpPort: z.number().int().positive().optional(),\n locale: z.string().min(1).optional(),\n bridge: bridgeConfigSchema.optional(),\n })\n .strict();\n\nconst electronAppConfigSchema = z\n .object({\n entry: z.string().min(1).optional(),\n executablePath: z.string().min(1).optional(),\n args: z.array(z.string()).optional(),\n cwd: z.string().min(1).optional(),\n env: z.record(z.string(), z.string()).optional(),\n cdpUrl: z.string().url().optional(),\n cdpPort: z.number().int().positive().optional(),\n url: z.string().url().optional(),\n bridge: bridgeConfigSchema.optional(),\n })\n .strict();\n\nconst electrobunAppConfigSchema = z\n .object({\n executablePath: z.string().min(1).optional(),\n appDir: z.string().min(1).optional(),\n args: z.array(z.string()).optional(),\n cwd: z.string().min(1).optional(),\n env: z.record(z.string(), z.string()).optional(),\n renderer: z.enum([\"native\", \"cef\"]).optional(),\n cdpUrl: z.string().url().optional(),\n cdpPort: z.number().int().positive().optional(),\n webkitInspectorPort: z.number().int().positive().optional(),\n url: z.string().url().optional(),\n bridge: bridgeConfigSchema.optional(),\n })\n .strict();\n\nconst cloudAppReferenceSchema = z\n .object({\n id: z.string().min(1).optional(),\n path: z.string().min(1).optional(),\n name: z.string().min(1).optional(),\n })\n .strict();\n\nconst browserStackAppSchema = cloudAppReferenceSchema\n .extend({\n customId: z.string().min(1).optional(),\n })\n .strict();\n\nconst browserStackLocalSchema = z\n .object({\n enabled: z.boolean().optional(),\n binary: z.string().min(1).optional(),\n identifier: z.string().min(1).optional(),\n args: z.array(z.string().min(1)).optional(),\n })\n .strict();\n\nconst browserStackHelperSchema = z\n .object({\n app: browserStackAppSchema.optional(),\n local: browserStackLocalSchema.optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict();\n\nconst sauceConnectSchema = z\n .object({\n enabled: z.boolean().optional(),\n binary: z.string().min(1).optional(),\n tunnelName: z.string().min(1).optional(),\n args: z.array(z.string().min(1)).optional(),\n })\n .strict();\n\nconst sauceLabsHelperSchema = z\n .object({\n app: cloudAppReferenceSchema.optional(),\n connect: sauceConnectSchema.optional(),\n options: z.record(z.string(), z.unknown()).optional(),\n })\n .strict();\n\nconst storybookConfigSchema = z\n .object({\n url: z.string().url().optional(),\n iframePath: z.string().min(1).optional(),\n })\n .strict();\n\nconst appiumExecutionConfigSchema = z\n .object({\n serverUrl: z.string().url().optional(),\n capabilities: z.record(z.string(), z.unknown()).optional(),\n platformCapabilities: z\n .object({\n android: z.record(z.string(), z.unknown()).optional(),\n ios: z.record(z.string(), z.unknown()).optional(),\n })\n .strict()\n .optional(),\n capabilitiesFile: z.string().min(1).optional(),\n reportToProvider: z.boolean().optional(),\n browserstack: browserStackHelperSchema.optional(),\n saucelabs: sauceLabsHelperSchema.optional(),\n cloudProvider: z.string().min(1).optional(),\n autoStart: z.boolean().optional(),\n autoStartBinary: z.string().min(1).optional(),\n autoStartArgs: z.array(z.string()).optional(),\n })\n .strict();\n\nconst virtualAuthenticatorOptionsSchema = z\n .object({\n protocol: z.enum([\"ctap2\", \"u2f\"]).optional(),\n transport: z.enum([\"usb\", \"nfc\", \"ble\", \"cable\", \"internal\"]).optional(),\n hasResidentKey: z.boolean().optional(),\n hasUserVerification: z.boolean().optional(),\n isUserVerified: z.boolean().optional(),\n automaticPresenceSimulation: z.boolean().optional(),\n })\n .strict();\n\nconst webExecutionConfigSchema = z\n .object({\n browser: z.enum([\"chromium\", \"firefox\", \"webkit\"]).optional(),\n engine: z.enum([\"auto\", \"playwright\", \"cdp\", \"lightpanda\"]).optional(),\n cdpUrl: z.string().url().optional(),\n wsEndpoint: z.string().url().optional(),\n executablePath: z.string().min(1).optional(),\n channel: z.string().min(1).optional(),\n headless: z.boolean().optional(),\n waitUntil: z.enum([\"domcontentloaded\", \"load\", \"networkidle\", \"commit\"]).optional(),\n instantAnimations: z.boolean().optional(),\n blockResources: z.array(z.enum([\"image\", \"font\", \"media\", \"stylesheet\"])).optional(),\n warmBrowser: z.boolean().optional(),\n warmBrowserScope: z.string().min(1).optional(),\n freshContextPerFlow: z.boolean().optional(),\n contextIsolation: z.enum([\"fresh\", \"hot-cache\"]).optional(),\n maxContextsPerBrowser: z.number().int().positive().optional(),\n virtualAuthenticator: z.union([z.boolean(), virtualAuthenticatorOptionsSchema]).optional(),\n storageState: z.string().min(1).optional(),\n verboseLogging: z.boolean().optional(),\n storybook: storybookConfigSchema.optional(),\n extensions: z.array(z.string().min(1)).optional(),\n colorScheme: z.enum([\"dark\", \"light\", \"no-preference\"]).optional(),\n reducedMotion: z.enum([\"reduce\", \"no-preference\"]).optional(),\n timezoneId: z.string().min(1).optional(),\n })\n .strict();\n\nconst executionConfigSchema = z\n .object({\n mode: z.enum([\"local\", \"appium\"]).optional(),\n web: webExecutionConfigSchema.optional(),\n appium: appiumExecutionConfigSchema.optional(),\n bridge: bridgeConfigSchema.optional(),\n warmDaemons: warmDaemonConfigSchema.optional(),\n })\n .strict();\n\nconst artifactConfigSchema = z\n .object({\n outputDir: z.string().min(1).optional(),\n captureOnFailure: z.boolean().optional(),\n captureOnSuccess: z.boolean().optional(),\n captureSteps: z.boolean().optional(),\n screenshot: z.boolean().optional(),\n uiHierarchy: z.boolean().optional(),\n consoleLogs: z.boolean().optional(),\n jsErrors: z.boolean().optional(),\n har: z.boolean().optional(),\n jsCoverage: z.boolean().optional(),\n video: z.enum([\"off\", \"on\", \"retain-on-failure\"]).optional(),\n playback: z.boolean().optional(),\n trace: z.boolean().optional(),\n nativeLogs: z.boolean().optional(),\n })\n .strict();\n\nconst deviceStateSchema = z\n .object({\n language: z.string().min(1).optional(),\n locale: z.string().min(1).optional(),\n timeZone: z.string().min(1).optional(),\n })\n .strict();\n\nconst launchOptionsSchema = z\n .object({\n clearState: z.boolean().optional(),\n clearKeychain: z.boolean().optional(),\n deepLink: z.string().min(1).optional(),\n launchArguments: z.record(z.string(), z.unknown()).optional(),\n deviceState: deviceStateSchema.optional(),\n })\n .strict();\n\nexport const provConfigSchema = z\n .object({\n apps: z\n .object({\n web: appConfigSchema.optional(),\n android: appConfigSchema.optional(),\n ios: appConfigSchema.optional(),\n electron: electronAppConfigSchema.optional(),\n electrobun: electrobunAppConfigSchema.optional(),\n })\n .strict()\n .optional(),\n defaults: z\n .object({\n waitTimeout: z.number().positive().optional(),\n pollInterval: z.number().positive().optional(),\n settleTimeout: z.number().nonnegative().optional(),\n retries: z.number().int().nonnegative().optional(),\n waitForIdleTimeout: z.number().nonnegative().optional(),\n typingDelay: z.number().nonnegative().optional(),\n initialPollInterval: z.number().positive().optional(),\n hierarchyCacheTtl: z.number().nonnegative().optional(),\n snapshotMaxDepth: z.number().int().positive().optional(),\n retryDelay: z.number().nonnegative().optional(),\n workers: z.number().int().positive().optional(),\n processes: z.number().int().positive().optional(),\n maxWorkersPerProcess: z.number().int().positive().optional(),\n tapMode: z.enum([\"native\", \"dom\"]).optional(),\n locale: z.string().min(1).optional(),\n failFastWhenIdle: z.boolean().optional(),\n actionStableFrames: z.number().int().nonnegative().optional(),\n })\n .strict()\n .optional(),\n platforms: z.array(platformSchema).optional(),\n parallelPlatforms: z.boolean().optional(),\n flowDir: z.string().min(1).optional(),\n launchOptions: launchOptionsSchema.optional(),\n reporters: z.array(reporterSchema).optional(),\n hooks: z\n .object({\n beforeAll: hookSchema.optional(),\n beforeEach: hookSchema.optional(),\n afterEach: hookSchema.optional(),\n afterAll: hookSchema.optional(),\n })\n .strict()\n .optional(),\n artifacts: artifactConfigSchema.optional(),\n execution: executionConfigSchema.optional(),\n visualRegression: z\n .object({\n threshold: z.number().min(0).max(1).optional(),\n maxDiffPixelRatio: z.number().min(0).max(1).optional(),\n baselinesDir: z.string().optional(),\n mode: z.enum([\"pixel\", \"layout-tolerant\"]).optional(),\n })\n .optional(),\n filters: z\n .array(\n z.custom<{ name: string; filter: (...args: unknown[]) => unknown }>(\n (value) =>\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as Record<string, unknown>).name === \"string\" &&\n typeof (value as Record<string, unknown>).filter === \"function\",\n { message: \"Expected TestFilter ({ name, filter })\" },\n ),\n )\n .optional(),\n replayCache: z\n .object({\n mode: z.enum([\"read-write\", \"strict\", \"off\"]).optional(),\n dir: z.string().min(1).optional(),\n })\n .strict()\n .optional(),\n webServer: z\n .union([\n z\n .object({\n command: z.string().min(1),\n url: z.string().url().optional(),\n port: z.number().int().positive().optional(),\n cwd: z.string().min(1).optional(),\n env: z.record(z.string(), z.string()).optional(),\n timeout: z.number().positive().optional(),\n reuseExistingServer: z.boolean().optional(),\n stdout: z.enum([\"pipe\", \"ignore\", \"inherit\"]).optional(),\n stderr: z.enum([\"pipe\", \"ignore\", \"inherit\"]).optional(),\n ignoreHTTPSErrors: z.boolean().optional(),\n gracefulShutdownMs: z.number().nonnegative().optional(),\n })\n .strict(),\n z.array(\n z\n .object({\n command: z.string().min(1),\n url: z.string().url().optional(),\n port: z.number().int().positive().optional(),\n cwd: z.string().min(1).optional(),\n env: z.record(z.string(), z.string()).optional(),\n timeout: z.number().positive().optional(),\n reuseExistingServer: z.boolean().optional(),\n stdout: z.enum([\"pipe\", \"ignore\", \"inherit\"]).optional(),\n stderr: z.enum([\"pipe\", \"ignore\", \"inherit\"]).optional(),\n ignoreHTTPSErrors: z.boolean().optional(),\n gracefulShutdownMs: z.number().nonnegative().optional(),\n })\n .strict(),\n ),\n ])\n .optional(),\n projects: z\n .array(\n z\n .object({\n name: z.string().min(1),\n platform: platformSchema.optional(),\n browser: z.enum([\"chromium\", \"firefox\", \"webkit\"]).optional(),\n baseUrl: z.string().url().optional(),\n storageState: z.string().min(1).optional(),\n flowDir: z.string().min(1).optional(),\n testMatch: z.array(z.union([z.string().min(1), z.instanceof(RegExp)])).optional(),\n testIgnore: z.array(z.union([z.string().min(1), z.instanceof(RegExp)])).optional(),\n tags: z.array(z.string().min(1)).optional(),\n grep: z.string().min(1).optional(),\n dependencies: z.array(z.string().min(1)).optional(),\n teardown: z.string().min(1).optional(),\n retries: z.number().int().nonnegative().optional(),\n use: z.record(z.string(), z.unknown()).optional(),\n })\n .strict(),\n )\n .optional(),\n agent: z\n .object({\n model: z.string().min(1).optional(),\n baseUrl: z.string().url().optional(),\n apiKey: z.string().min(1).optional(),\n apiKeyEnv: z.string().min(1).optional(),\n maxSteps: z.number().int().positive().optional(),\n })\n .strict()\n .optional(),\n })\n .strict();\n\nexport function defineConfig(config: ProvConfig): ProvConfig {\n return config;\n}\n\nexport function validateConfig(config: unknown): ProvConfig {\n return provConfigSchema.parse(config) as ProvConfig;\n}\n\nexport function formatConfigValidationError(error: ZodError): string {\n return error.issues\n .map((issue) => {\n const path = issue.path.length > 0 ? issue.path.join(\".\") : \"config\";\n return `- ${path}: ${issue.message}`;\n })\n .join(\"\\n\");\n}\n"],"mappings":";AASA,SAAS,SAAwB;AAkXjC,IAAM,iBAAiB,EAAE,KAAK,CAAC,OAAO,WAAW,OAAO,YAAY,YAAY,CAAC;AACjF,IAAM,iBAAiB,EAAE,OAAO,EAAE,IAAI,CAAC;AACvC,IAAM,aAAa,EAAE;AAAA,EACnB,CAAC,UAAU,OAAO,UAAU;AAAA,EAC5B,EAAE,SAAS,oBAAoB;AACjC;AAEA,IAAM,yBAAyB,EAC5B,OAAO;AAAA,EACN,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,oBAAoB;AAAA,EAC9C,iBAAiB,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAC9C,CAAC,EACA,OAAO;AAEV,IAAM,qBAAqB,EACxB,OAAO;AAAA,EACN,SAAS,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC9B,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EAC3C,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EACjC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EAChC,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AACjD,CAAC,EACA,OAAO;AAEV,IAAM,yBAAyB,EAC5B,OAAO;AAA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a,QAAgC;AAC3D,SAAO;AACT;AAEO,SAAS,eAAe,QAA6B;AAC1D,SAAO,iBAAiB,MAAM,MAAM;AACtC;AAEO,SAAS,4BAA4B,OAAyB;AACnE,SAAO,MAAM,OACV,IAAI,CAAC,UAAU;AACd,UAAM,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,KAAK,GAAG,IAAI;AAC5D,WAAO,KAAK,IAAI,KAAK,MAAM,OAAO;AAAA,EACpC,CAAC,EACA,KAAK,IAAI;AACd;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/runtime/daemon-manager.ts"],"sourcesContent":["import { execFileSync } from \"node:child_process\";\nimport { createHash } from \"node:crypto\";\nimport {\n existsSync,\n mkdirSync,\n readdirSync,\n readFileSync,\n renameSync,\n rmSync,\n unlinkSync,\n writeFileSync,\n} from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\n\nexport type WarmDaemonKind = \"wda\" | \"uiautomator2\" | \"iproxy\" | \"chromium\";\n\nexport const DEFAULT_WARM_DAEMON_IDLE_TTL_MS = 30 * 60 * 1000;\n\nexport interface WarmDaemonRecord {\n kind: WarmDaemonKind;\n deviceId: string;\n host: string;\n port: number;\n pid?: number;\n tunnelPid?: number;\n xctestrunPath?: string;\n /** Optional temporary profile directory created for this daemon (cleaned up on stop). */\n userDataDir?: string;\n /** Optional reusable WDA/UiAutomator2 session ID persisted across runs */\n sessionId?: string;\n bundleId?: string;\n startedAt: string;\n /** Last timestamp this daemon was verified healthy / reused (used for idle TTL reaping). */\n lastUsedAt?: string;\n}\n\ninterface DaemonRegistryFile {\n version: 1;\n daemons: Record<string, WarmDaemonRecord>;\n}\n\nexport function defaultDaemonStatePath(): string {\n return join(tmpdir(), \"spana-warm-daemons.json\");\n}\n\n/** Per-scope atomic state directory so concurrent OS processes never overwrite each other's daemon records. */\nexport function defaultDaemonStateDir(): string {\n return join(tmpdir(), \"spana-daemons\");\n}\n\nfunction daemonKey(kind: WarmDaemonKind, deviceId: string): string {\n return `${kind}:${deviceId}`;\n}\n\nfunction scopeRecordPath(kind: WarmDaemonKind, deviceId: string): string {\n const safe = `${kind}-${deviceId}`.replaceAll(/[^a-zA-Z0-9._-]/g, \"_\").slice(0, 64);\n const hash = createHash(\"sha256\").update(daemonKey(kind, deviceId)).digest(\"hex\").slice(0, 10);\n return join(defaultDaemonStateDir(), `${safe}-${hash}.json`);\n}\n\nfunction isUsingDefaultStateFile(stateFile?: string): boolean {\n return !stateFile || stateFile === defaultDaemonStatePath();\n}\n\nfunction atomicWriteJson(filePath: string, data: unknown): void {\n mkdirSync(dirname(filePath), { recursive: true });\n const tmpPath = `${filePath}.${process.pid}.${Math.random().toString(36).slice(2, 8)}.tmp`;\n writeFileSync(tmpPath, JSON.stringify(data, null, 2), \"utf-8\");\n renameSync(tmpPath, filePath);\n}\n\nfunction loadScopeRecords(): Record<string, WarmDaemonRecord> {\n const dir = defaultDaemonStateDir();\n const out: Record<string, WarmDaemonRecord> = {};\n if (!existsSync(dir)) return out;\n try {\n for (const file of readdirSync(dir)) {\n if (!file.endsWith(\".json\")) continue;\n try {\n const parsed = JSON.parse(readFileSync(join(dir, file), \"utf-8\")) as WarmDaemonRecord;\n if (parsed && typeof parsed.kind === \"string\" && typeof parsed.deviceId === \"string\") {\n out[daemonKey(parsed.kind, parsed.deviceId)] = parsed;\n }\n } catch {\n // skip corrupted scope file\n }\n }\n } catch {\n // ignore unreadable dir\n }\n return out;\n}\n\nfunction readScopeRecord(kind: WarmDaemonKind, deviceId: string): WarmDaemonRecord | undefined {\n const filePath = scopeRecordPath(kind, deviceId);\n if (!existsSync(filePath)) return undefined;\n try {\n return JSON.parse(readFileSync(filePath, \"utf-8\")) as WarmDaemonRecord;\n } catch {\n return undefined;\n }\n}\n\nfunction deleteScopeRecord(kind: WarmDaemonKind, deviceId: string): void {\n const filePath = scopeRecordPath(kind, deviceId);\n try {\n if (existsSync(filePath)) unlinkSync(filePath);\n } catch {\n // already removed\n }\n}\n\nfunction killPidTree(pid: number | undefined): void {\n if (!pid || pid <= 0 || pid === process.pid) return;\n const targets = process.platform !== \"win32\" ? [-pid, pid] : [pid];\n for (const target of targets) {\n try {\n process.kill(target, \"SIGTERM\");\n } catch {\n // process or group already exited\n }\n }\n // If the detached daemon ignores SIGTERM, escalate to SIGKILL immediately when still alive\n if (isPidAlive(pid)) {\n for (const target of targets) {\n try {\n process.kill(target, \"SIGKILL\");\n } catch {\n // already exited\n }\n }\n }\n}\n\nexport function loadDaemonRegistry(stateFile = defaultDaemonStatePath()): DaemonRegistryFile {\n const merged: Record<string, WarmDaemonRecord> = {};\n if (existsSync(stateFile)) {\n try {\n const raw = readFileSync(stateFile, \"utf-8\");\n const parsed = JSON.parse(raw) as DaemonRegistryFile;\n if (parsed && parsed.version === 1 && typeof parsed.daemons === \"object\") {\n Object.assign(merged, parsed.daemons);\n }\n } catch {\n // corrupted state file — reset cleanly\n }\n }\n if (isUsingDefaultStateFile(stateFile)) {\n Object.assign(merged, loadScopeRecords());\n }\n return { version: 1, daemons: merged };\n}\n\nexport function saveDaemonRegistry(\n registry: DaemonRegistryFile,\n stateFile = defaultDaemonStatePath(),\n): void {\n atomicWriteJson(stateFile, registry);\n}\n\nfunction resolveIdleTtlMs(explicit?: number): number {\n if (explicit !== undefined) return explicit;\n const envRaw = process.env[\"SPANA_DAEMON_IDLE_TTL_MS\"];\n if (envRaw !== undefined) {\n const parsed = Number(envRaw);\n if (Number.isFinite(parsed) && parsed >= 0) return parsed;\n }\n return DEFAULT_WARM_DAEMON_IDLE_TTL_MS;\n}\n\nexport function registerWarmDaemon(\n record: WarmDaemonRecord,\n stateFile = defaultDaemonStatePath(),\n): void {\n const key = daemonKey(record.kind, record.deviceId);\n const existing = loadDaemonRegistry(stateFile);\n // Fail loudly if another live daemon with a DIFFERENT scope already owns this exact host:port\n for (const [otherKey, other] of Object.entries(existing.daemons)) {\n if (\n otherKey !== key &&\n other.host === record.host &&\n other.port === record.port &&\n isPidAlive(other.pid)\n ) {\n throw new Error(\n `Warm daemon port clash on ${record.host}:${record.port}: scope \"${otherKey}\" (pid ${other.pid}) already owns this port.`,\n );\n }\n }\n\n // If this exact scope already had a previous live daemon PID, terminate & clean it up\n // before overwriting the scope record so we never orphan a running browser/daemon process.\n const prev = existing.daemons[key];\n if (prev) {\n if (prev.pid && prev.pid !== record.pid && isPidAlive(prev.pid)) {\n killPidTree(prev.pid);\n }\n if (prev.tunnelPid && prev.tunnelPid !== record.tunnelPid && isPidAlive(prev.tunnelPid)) {\n killPidTree(prev.tunnelPid);\n }\n if (prev.userDataDir && prev.userDataDir !== record.userDataDir) {\n try {\n rmSync(prev.userDataDir, { recursive: true, force: true });\n } catch {\n // ignore temp profile cleanup error\n }\n }\n }\n\n const stamped: WarmDaemonRecord = {\n ...record,\n lastUsedAt: record.lastUsedAt ?? record.startedAt ?? new Date().toISOString(),\n };\n\n if (isUsingDefaultStateFile(stateFile)) {\n atomicWriteJson(scopeRecordPath(record.kind, record.deviceId), stamped);\n return;\n }\n\n existing.daemons[key] = stamped;\n saveDaemonRegistry(existing, stateFile);\n}\n\n/** Persist a warm WDA/UiAutomator2 session ID on an existing daemon record for cross-run reuse. */\nexport function updateWarmDaemonSession(\n kind: WarmDaemonKind,\n deviceId: string,\n sessionId: string,\n bundleId?: string,\n stateFile = defaultDaemonStatePath(),\n): void {\n if (isUsingDefaultStateFile(stateFile)) {\n const scopeRec = readScopeRecord(kind, deviceId);\n if (scopeRec) {\n atomicWriteJson(scopeRecordPath(kind, deviceId), {\n ...scopeRec,\n sessionId,\n ...(bundleId ? { bundleId } : {}),\n });\n return;\n }\n }\n const registry = loadDaemonRegistry(stateFile);\n const key = daemonKey(kind, deviceId);\n const existing = registry.daemons[key];\n if (!existing) return;\n registry.daemons[key] = { ...existing, sessionId, ...(bundleId ? { bundleId } : {}) };\n saveDaemonRegistry(registry, stateFile);\n}\n\nexport function unregisterWarmDaemon(\n kind: WarmDaemonKind,\n deviceId: string,\n stateFile = defaultDaemonStatePath(),\n): void {\n if (isUsingDefaultStateFile(stateFile)) {\n deleteScopeRecord(kind, deviceId);\n }\n if (existsSync(stateFile)) {\n const raw = loadDaemonRegistry(stateFile);\n if (daemonKey(kind, deviceId) in raw.daemons) {\n delete raw.daemons[daemonKey(kind, deviceId)];\n saveDaemonRegistry(raw, stateFile);\n }\n }\n}\n\nexport function listWarmDaemons(stateFile = defaultDaemonStatePath()): WarmDaemonRecord[] {\n return Object.values(loadDaemonRegistry(stateFile).daemons);\n}\n\nexport function isPidAlive(pid: number | undefined): boolean {\n if (!pid || pid <= 0) return false;\n try {\n process.kill(pid, 0);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Probe whether a recorded warm WDA / UiAutomator2 / Chromium daemon is still healthy.\n * Removes stale or idle-expired records automatically.\n */\nexport async function getHealthyWarmDaemon(\n kind: WarmDaemonKind,\n deviceId: string,\n options: {\n stateFile?: string;\n fetchFn?: typeof fetch;\n timeoutMs?: number;\n /** HTTP health endpoint path (default: \"/status\", use \"/json/version\" for chromium). */\n statusPath?: string;\n /** Idle TTL in ms (default: 30 minutes or `SPANA_DAEMON_IDLE_TTL_MS`). Pass 0 to disable. */\n idleTtlMs?: number;\n /** Current wall-clock time in ms (for deterministic testing). */\n nowMs?: number;\n } = {},\n): Promise<WarmDaemonRecord | null> {\n const stateFile = options.stateFile ?? defaultDaemonStatePath();\n const fetchFn = options.fetchFn ?? fetch;\n const timeoutMs = options.timeoutMs ?? 1500;\n const statusPath = options.statusPath ?? (kind === \"chromium\" ? \"/json/version\" : \"/status\");\n const idleTtlMs = resolveIdleTtlMs(options.idleTtlMs);\n const nowMs = options.nowMs ?? Date.now();\n\n const record = isUsingDefaultStateFile(stateFile)\n ? (readScopeRecord(kind, deviceId) ??\n loadDaemonRegistry(stateFile).daemons[daemonKey(kind, deviceId)])\n : loadDaemonRegistry(stateFile).daemons[daemonKey(kind, deviceId)];\n if (!record) return null;\n\n if (idleTtlMs > 0) {\n const lastTs = Date.parse(record.lastUsedAt ?? record.startedAt);\n if (Number.isFinite(lastTs) && nowMs - lastTs > idleTtlMs) {\n stopWarmDaemon(kind, deviceId, stateFile);\n return null;\n }\n }\n\n try {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n const res = await fetchFn(`http://${record.host}:${record.port}${statusPath}`, {\n signal: controller.signal,\n });\n if (res.ok) {\n const touched: WarmDaemonRecord = {\n ...record,\n lastUsedAt: new Date(nowMs).toISOString(),\n };\n if (isUsingDefaultStateFile(stateFile)) {\n try {\n atomicWriteJson(scopeRecordPath(kind, deviceId), touched);\n } catch {\n // ignore touch errors\n }\n } else {\n try {\n const registry = loadDaemonRegistry(stateFile);\n registry.daemons[daemonKey(kind, deviceId)] = touched;\n saveDaemonRegistry(registry, stateFile);\n } catch {\n // ignore touch errors\n }\n }\n return touched;\n }\n } finally {\n clearTimeout(timer);\n }\n } catch {\n // unreachable — prune stale entry\n }\n\n stopWarmDaemon(kind, deviceId, stateFile);\n return null;\n}\n\n/**\n * Stop any warm daemons whose `lastUsedAt` (or `startedAt`) exceeds `idleTtlMs`.\n */\nexport function reapIdleWarmDaemons(\n options: { stateFile?: string; idleTtlMs?: number; nowMs?: number } = {},\n): number {\n const stateFile = options.stateFile ?? defaultDaemonStatePath();\n const idleTtlMs = resolveIdleTtlMs(options.idleTtlMs);\n if (idleTtlMs <= 0) return 0;\n const nowMs = options.nowMs ?? Date.now();\n const records = listWarmDaemons(stateFile);\n let reaped = 0;\n for (const record of records) {\n const lastTs = Date.parse(record.lastUsedAt ?? record.startedAt);\n if (Number.isFinite(lastTs) && nowMs - lastTs > idleTtlMs) {\n if (stopWarmDaemon(record.kind, record.deviceId, stateFile)) {\n reaped++;\n }\n }\n }\n return reaped;\n}\n\nconst SPANA_BROWSER_PROFILE_MARKERS = [\n \"spana-cdp-profile-\",\n \"spana-pw-profile-\",\n \"spana-browser-profile-\",\n];\n\n/**\n * Sweep orphaned Chromium processes launched by Spana (identified by Spana's unique\n * temporary `--user-data-dir=.../spana-*-profile-*` argument) whose PIDs are no longer\n * tracked in the daemon registry, and remove their temporary profile directories.\n */\nexport function sweepOrphanedSpanaBrowsers(options: { excludePids?: Set<number> } = {}): number {\n if (process.platform === \"win32\") return 0;\n let psOut = \"\";\n try {\n psOut = execFileSync(\"ps\", [\"-ax\", \"-o\", \"pid=,command=\"], {\n encoding: \"utf8\",\n stdio: [\"ignore\", \"pipe\", \"ignore\"],\n });\n } catch {\n return 0;\n }\n\n const exclude = options.excludePids ?? new Set<number>();\n let killed = 0;\n const profileDirsToClean = new Set<string>();\n\n for (const rawLine of psOut.split(\"\\n\")) {\n const line = rawLine.trim();\n if (!line) continue;\n const match = /^(\\d+)\\s+(.*)$/.exec(line);\n if (!match) continue;\n const pid = Number.parseInt(match[1]!, 10);\n const cmd = match[2] ?? \"\";\n if (!Number.isFinite(pid) || pid <= 0 || pid === process.pid || exclude.has(pid)) continue;\n if (!SPANA_BROWSER_PROFILE_MARKERS.some((marker) => cmd.includes(marker))) continue;\n\n // Extract --user-data-dir=<path> for cleanup\n const dirMatch = /--user-data-dir=([^\\s]+)/.exec(cmd);\n if (dirMatch?.[1] && SPANA_BROWSER_PROFILE_MARKERS.some((m) => dirMatch[1]!.includes(m))) {\n profileDirsToClean.add(dirMatch[1]!);\n }\n\n killPidTree(pid);\n killed++;\n }\n\n for (const dir of profileDirsToClean) {\n try {\n rmSync(dir, { recursive: true, force: true });\n } catch {\n // ignore temp profile cleanup errors\n }\n }\n\n return killed;\n}\n\n/**\n * Stop the specific process PIDs (and process groups) started by Spana for this daemon record.\n */\nexport function stopWarmDaemon(\n kind: WarmDaemonKind,\n deviceId: string,\n stateFile = defaultDaemonStatePath(),\n): boolean {\n const key = daemonKey(kind, deviceId);\n const record = isUsingDefaultStateFile(stateFile)\n ? (readScopeRecord(kind, deviceId) ?? loadDaemonRegistry(stateFile).daemons[key])\n : loadDaemonRegistry(stateFile).daemons[key];\n if (!record) return false;\n\n killPidTree(record.pid);\n killPidTree(record.tunnelPid);\n\n if (record.userDataDir) {\n try {\n rmSync(record.userDataDir, { recursive: true, force: true });\n } catch {\n // ignore temp profile cleanup error\n }\n }\n\n unregisterWarmDaemon(kind, deviceId, stateFile);\n return true;\n}\n\nexport function stopAllWarmDaemons(stateFile = defaultDaemonStatePath()): number {\n const records = listWarmDaemons(stateFile);\n let stopped = 0;\n for (const record of records) {\n if (stopWarmDaemon(record.kind, record.deviceId, stateFile)) {\n stopped++;\n }\n }\n if (isUsingDefaultStateFile(stateFile)) {\n stopped += sweepOrphanedSpanaBrowsers();\n }\n return stopped;\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,SAAS,YAAY;AAIvB,IAAM,kCAAkC,KAAK,KAAK;AAyBlD,SAAS,yBAAiC;AAC/C,SAAO,KAAK,OAAO,GAAG,yBAAyB;AACjD;AAGO,SAAS,wBAAgC;AAC9C,SAAO,KAAK,OAAO,GAAG,eAAe;AACvC;AAEA,SAAS,UAAU,MAAsB,UAA0B;AACjE,SAAO,GAAG,IAAI,IAAI,QAAQ;AAC5B;AAEA,SAAS,gBAAgB,MAAsB,UAA0B;AACvE,QAAM,OAAO,GAAG,IAAI,IAAI,QAAQ,GAAG,WAAW,oBAAoB,GAAG,EAAE,MAAM,GAAG,EAAE;AAClF,QAAM,OAAO,WAAW,QAAQ,EAAE,OAAO,UAAU,MAAM,QAAQ,CAAC,EAAE,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE;AAC7F,SAAO,KAAK,sBAAsB,GAAG,GAAG,IAAI,IAAI,IAAI,OAAO;AAC7D;AAEA,SAAS,wBAAwB,WAA6B;AAC5D,SAAO,CAAC,aAAa,cAAc,uBAAuB;AAC5D;AAEA,SA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AO,UAAU,SAAS,GAAG;AAC3D;AAAA,IACF;AAAA,EACF;AACA,MAAI,wBAAwB,SAAS,GAAG;AACtC,eAAW,2BAA2B;AAAA,EACxC;AACA,SAAO;AACT;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/report/selector-guardrails.ts","../src/report/console.ts"],"sourcesContent":["import type { StepResult } from \"./types.js\";\n\nexport interface SelectorWarning {\n rule: \"coordinate-tap\" | \"text-heavy\" | \"bare-string\";\n stepIndex?: number;\n message: string;\n}\n\nfunction isCoordinateTap(step: StepResult): boolean {\n if (step.command === \"tapXY\" || step.command === \"longPressXY\") return true;\n if (\n step.selector &&\n typeof step.selector === \"object\" &&\n \"point\" in (step.selector as Record<string, unknown>)\n ) {\n return true;\n }\n return false;\n}\n\nfunction isSystemUILabel(selector: unknown): boolean {\n return (\n selector !== null &&\n typeof selector === \"object\" &&\n \"systemUI\" in (selector as Record<string, unknown>) &&\n (selector as Record<string, unknown>)[\"systemUI\"] === true\n );\n}\n\nfunction isTextSelector(selector: unknown): boolean {\n if (isSystemUILabel(selector)) return false;\n if (typeof selector === \"string\") return true;\n if (selector && typeof selector === \"object\" && \"text\" in (selector as Record<string, unknown>)) {\n return true;\n }\n return false;\n}\n\nfunction isBareString(selector: unknown): boolean {\n return typeof selector === \"string\";\n}\n\n/**\n * Analyze recorded steps for brittle selector patterns.\n * Returns advisory warnings — never blocks execution.\n */\nexport function analyzeStepQuality(steps: StepResult[]): SelectorWarning[] {\n const warnings: SelectorWarning[] = [];\n\n // Only consider steps that have selectors (skip inputText, pressKey, etc.)\n const selectorSteps = steps.filter((s) => s.selector !== undefined);\n\n for (const [i, step] of steps.entries()) {\n // Rule: coordinate-tap\n if (isCoordinateTap(step)) {\n warnings.push({\n rule: \"coordinate-tap\",\n stepIndex: i,\n message: `Step ${i + 1} used coordinate tap — prefer testID or text selectors for stability`,\n });\n }\n\n // Rule: bare-string\n if (step.selector !== undefined && isBareString(step.selector)) {\n warnings.push({\n rule: \"bare-string\",\n stepIndex: i,\n message: `Step ${i + 1} uses bare string selector '${step.selector}' — prefer { testID: '...' } for unambiguous targeting`,\n });\n }\n }\n\n // Rule: text-heavy (>50% of selector steps use text/string selectors)\n if (selectorSteps.length >= 2) {\n const textCount = selectorSteps.filter((s) => isTextSelector(s.selector)).length;\n if (textCount > selectorSteps.length / 2) {\n warnings.push({\n rule: \"text-heavy\",\n message: `Flow uses text selectors for ${textCount}/${selectorSteps.length} steps — consider adding testID attributes for reliability`,\n });\n }\n }\n\n return warnings;\n}\n","import type { Platform } from \"../schemas/selector.js\";\nimport { analyzeStepQuality } from \"./selector-guardrails.js\";\nimport type { FlowResult, Reporter, ScenarioStepResult } from \"./types.js\";\n\nexport interface ConsoleReporterOptions {\n /** Only show failures and the final summary. */\n quiet?: boolean;\n}\n\nfunction printResultAttachments(result: FlowResult): void {\n for (const attachment of result.attachments ?? []) {\n console.log(` ↳ ${attachment.name}: ${attachment.path}`);\n }\n\n for (const [index, step] of (result.steps ?? []).entries()) {\n for (const attachment of step.attachments ?? []) {\n console.log(` ↳ step ${index + 1} ${step.command}: ${attachment.path}`);\n }\n }\n}\n\nfunction printScenarioSteps(steps: ScenarioStepResult[]): void {\n for (const step of steps) {\n const icon = step.status === \"passed\" ? \"✓\" : step.status === \"failed\" ? \"✗\" : \"○\";\n const duration = step.durationMs > 0 ? ` (${step.durationMs}ms)` : \"\";\n console.log(` ${icon} ${step.keyword} ${step.text}${duration}`);\n if (step.error) {\n console.log(` ${step.error}`);\n }\n }\n}\n\nfunction printSelectorWarnings(result: FlowResult): void {\n if (!result.steps || result.steps.length === 0) return;\n const warnings = analyzeStepQuality(result.steps);\n if (warnings.length === 0) return;\n console.log(\" Selector warnings:\");\n for (const w of warnings) {\n console.log(` ! ${w.message}`);\n }\n}\n\nfunction workerPrefix(workerName?: string): string {\n return workerName ? `[${workerName}] ` : \"\";\n}\n\nconst driverNames: Record<Platform, string> = {\n web: \"Playwright\",\n android: \"UiAutomator2\",\n ios: \"WebDriverAgent\",\n electron: \"Electron\",\n electrobun: \"Electrobun\",\n};\n\nfunction printA11yViolations(result: FlowResult): void {\n for (const step of result.steps ?? []) {\n if (step.status === \"failed\" && step.command.includes(\"AccessibilityAudit\") && step.error) {\n console.log(` Accessibility violations (${step.command}):`);\n for (const line of step.error.split(\"\\n\")) {\n console.log(` ${line}`);\n }\n }\n }\n}\n\nexport function createConsoleReporter(options?: ConsoleReporterOptions): Reporter {\n const quiet = options?.quiet ?? false;\n let completed = 0;\n let total = 0;\n let currentPlatform: Platform | undefined;\n const platformDone = new Map<Platform, number>();\n let platformTotals: Partial<Record<Platform, number>> | undefined;\n\n function progressPrefix(platform?: Platform): string {\n if (platformTotals && platform) {\n const done = platformDone.get(platform) ?? 0;\n const ptotal = platformTotals[platform] ?? 0;\n if (ptotal > 0) {\n const pct = Math.round((done / ptotal) * 100);\n return `${platform} [${done}/${ptotal} ${pct}%]`;\n }\n }\n return total > 0 ? `[${completed}/${total}]` : \"\";\n }\n\n return {\n onFlowStart(name, platform, workerName) {\n if (quiet) return;\n\n // Print platform header when switching to a new platform\n if (platform !== currentPlatform) {\n currentPlatform = platform;\n console.log(`\\n ${platform} (${driverNames[platform]})`);\n }\n\n if (process.stderr.isTTY) {\n process.stderr.write(\n ` ▸ ${workerPrefix(workerName)}${progressPrefix(platform)} ${name}...\\r`,\n );\n }\n },\n\n onFlowPass(result) {\n completed++;\n platformDone.set(result.platform, (platformDone.get(result.platform) ?? 0) + 1);\n if (quiet) return;\n\n // Clear progress line\n if (process.stderr.isTTY) {\n process.stderr.write(\"\\x1b[2K\");\n }\n\n const duration = `(${result.durationMs}ms)`;\n const flakyTag = result.flaky ? ` [flaky, passed on attempt ${result.attempts}]` : \"\";\n console.log(\n ` ✓ ${workerPrefix(result.workerName)}${progressPrefix(result.platform)} ${result.name} ${duration}${flakyTag}`,\n );\n if (result.scenarioSteps) printScenarioSteps(result.scenarioSteps);\n printResultAttachments(result);\n printSelectorWarnings(result);\n },\n\n onFlowFail(result) {\n completed++;\n platformDone.set(result.platform, (platformDone.get(result.platform) ?? 0) + 1);\n\n // Clear progress line\n if (process.stderr.isTTY) {\n process.stderr.write(\"\\x1b[2K\");\n }\n\n // Always show failures, even in quiet mode\n const duration = `(${result.durationMs}ms)`;\n console.log(\n ` ✗ ${workerPrefix(result.workerName)}${progressPrefix(result.platform)} [${result.platform}] ${result.name} ${duration}`,\n );\n if (result.scenarioSteps) printScenarioSteps(result.scenarioSteps);\n printResultAttachments(result);\n printA11yViolations(result);\n },\n\n onRunComplete(summary) {\n console.log(\"\");\n\n // Group results by platform\n const byPlatform = new Map<Platform, FlowResult[]>();\n for (const r of summary.results) {\n const list = byPlatform.get(r.platform) ?? [];\n list.push(r);\n byPlatform.set(r.platform, list);\n }\n\n for (const [platform, results] of byPlatform) {\n const passed = results.filter((r) => r.status === \"passed\").length;\n const totalCount = results.length;\n const symbols = results\n .map((r) =>\n r.flaky ? \"~\" : r.status === \"passed\" ? \"✓\" : r.status === \"skipped\" ? \"–\" : \"✗\",\n )\n .join(\"\");\n const label = `${platform} (${driverNames[platform]})`;\n const duration = Math.max(...results.map((r) => r.durationMs));\n console.log(\n `${label.padEnd(25)} ${symbols} ${passed}/${totalCount} passed (${(duration / 1000).toFixed(1)}s)`,\n );\n }\n\n for (const result of summary.results.filter((r) => r.status === \"skipped\" && r.modifier)) {\n console.log(\n ` – [${result.platform}] ${result.name} (${result.modifier}${result.skipReason ? `: ${result.skipReason}` : \"\"})`,\n );\n }\n\n // Failures detail with suggestions\n const failures = summary.results.filter((r) => r.status === \"failed\");\n if (failures.length > 0) {\n console.log(\"\\n--- Failures ---\");\n for (const f of failures) {\n const deviceLabel = f.workerName ? `${f.platform} on ${f.workerName}` : f.platform;\n console.log(`✗ [${deviceLabel}] ${f.name}`);\n if (f.error) {\n console.log(` Category: ${f.error.category}`);\n console.log(` ${f.error.message}`);\n if (f.error.location) {\n console.log(\n ` At: ${f.error.location.file}:${f.error.location.line}:${f.error.location.column}`,\n );\n }\n if (f.error.codeFrame) {\n for (const line of f.error.codeFrame.split(\"\\n\")) {\n console.log(` ${line}`);\n }\n }\n if (f.error.suggestion) {\n for (const line of f.error.suggestion.split(\"\\n\")) {\n console.log(` 💡 ${line}`);\n }\n }\n }\n }\n }\n\n // Flaky detail\n const flakyResults = summary.results.filter((r) => r.flaky);\n if (flakyResults.length > 0) {\n console.log(\"\\n--- Flaky ---\");\n for (const f of flakyResults) {\n console.log(`~ [${f.platform}] ${f.name} (passed on attempt ${f.attempts})`);\n }\n }\n\n // Worker stats\n if (summary.workerStats && summary.workerStats.size > 0) {\n console.log(\"\\nWorker Stats:\");\n for (const [id, stats] of summary.workerStats) {\n console.log(` [${id}] ${stats.flowCount} flows ${(stats.totalMs / 1000).toFixed(1)}s`);\n }\n }\n\n if (summary.bailedOut) {\n console.log(\n `\\nBailed out after ${summary.failed} failure(s)${\n summary.bailLimit ? ` (limit: ${summary.bailLimit})` : \"\"\n }.`,\n );\n }\n\n // Final summary\n const flakyStr = summary.flaky > 0 ? `, ${summary.flaky} flaky` : \"\";\n console.log(\n `\\n${summary.passed}/${summary.total} passed, ${summary.failed} failed${flakyStr} (${(summary.durationMs / 1000).toFixed(1)}s)`,\n );\n },\n\n // Allow callers to set total for progress tracking\n set flowCount(n: number) {\n total = n;\n },\n\n set platformFlowCounts(counts: Partial<Record<Platform, number>>) {\n platformTotals = counts;\n },\n };\n}\n"],"mappings":";;;AAQA,SAAS,gBAAgB,MAA2B;AAClD,MAAI,KAAK,YAAY,WAAW,KAAK,YAAY,cAAe,QAAO;AACvE,MACE,KAAK,YACL,OAAO,KAAK,aAAa,YACzB,WAAY,KAAK,UACjB;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,SAAS,gBAAgB,UAA4B;AACnD,SACE,aAAa,QACb,OAAO,aAAa,YACpB,cAAe,YACd,SAAqC,UAAU,MAAM;AAE1D;AAEA,SAAS,eAAe,UAA4B;AAClD,MAAI,gBA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B;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
discoverDevices,
|
|
3
|
-
findDeviceById,
|
|
4
|
-
firstDeviceForPlatform
|
|
5
|
-
} from "./chunk-VUNH4AJD.js";
|
|
6
|
-
import "./chunk-2AFWVHQK.js";
|
|
7
|
-
import "./chunk-WV3ALL3H.js";
|
|
8
|
-
import "./chunk-JPZCZHL4.js";
|
|
9
|
-
import "./chunk-DGUM43GV.js";
|
|
10
|
-
export {
|
|
11
|
-
discoverDevices,
|
|
12
|
-
findDeviceById,
|
|
13
|
-
firstDeviceForPlatform
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=discover-NKDMB4UI.js.map
|