@ddwang/magnitude-core 0.3.1-ddwang.2 → 0.3.1-ddwang.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +2 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.mjs +1 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.cjs +2704 -1522
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +188 -50
- package/dist/index.d.ts +1147 -23
- package/dist/index.mjs +2527 -1362
- package/dist/index.mjs.map +1 -0
- package/node_modules/patchright-core/README.md +3 -0
- package/node_modules/patchright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/patchright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/patchright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/patchright-core/browsers.json +52 -0
- package/node_modules/patchright-core/cli.js +22 -0
- package/node_modules/patchright-core/index.d.ts +17 -0
- package/node_modules/patchright-core/index.js +17 -0
- package/node_modules/patchright-core/index.mjs +28 -0
- package/node_modules/patchright-core/lib/bootstrap.js +149 -0
- package/node_modules/patchright-core/lib/coreBundle.js +80653 -0
- package/node_modules/patchright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/patchright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/patchright-core/lib/entry/mcp.js +10 -0
- package/node_modules/patchright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/patchright-core/lib/package.js +50 -0
- package/node_modules/patchright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/patchright-core/lib/server/electron/loader.js +112 -0
- package/node_modules/patchright-core/lib/serverRegistry.js +1939 -0
- package/node_modules/patchright-core/lib/serverRegistry.js.LICENSE +65 -0
- package/node_modules/patchright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/patchright-core/lib/tools/cli-client/cli.js +7 -0
- package/node_modules/patchright-core/lib/tools/cli-client/help.json +808 -0
- package/node_modules/patchright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/patchright-core/lib/tools/cli-client/output.js +352 -0
- package/node_modules/patchright-core/lib/tools/cli-client/program.js +422 -0
- package/node_modules/patchright-core/lib/tools/cli-client/registry.js +180 -0
- package/node_modules/patchright-core/lib/tools/cli-client/session.js +261 -0
- package/node_modules/patchright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/SKILL.md +493 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/node_modules/patchright-core/lib/tools/utils/extension.js +112 -0
- package/node_modules/patchright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/patchright-core/lib/utilsBundle.js +86225 -0
- package/node_modules/patchright-core/lib/utilsBundle.js.LICENSE +1890 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/patchright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codeMirrorModule-GBnsXk4c.js +32 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/index-CVDOfo-j.js +129 -0
- package/node_modules/patchright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/patchright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/codeMirrorModule-G79327TW.js +32 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/defaultSettingsView-D9EV0iaS.js +184 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/xtermModule-Al_u-Nk5.js +7 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.CMB2-c8e.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.C3yLoy2G.js +5 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/patchright-core/lib/webp_codec.LICENSE +173 -0
- package/node_modules/patchright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/patchright-core/lib/xdg-open +1267 -0
- package/node_modules/patchright-core/package.json +34 -0
- package/node_modules/patchright-core/types/protocol.d.ts +24776 -0
- package/node_modules/patchright-core/types/structs.d.ts +52 -0
- package/node_modules/patchright-core/types/types.d.ts +27167 -0
- package/node_modules/playwright/.bun-tag-91d746a6045e143f +0 -0
- package/node_modules/playwright/README.md +300 -0
- package/node_modules/playwright/ThirdPartyNotices.txt +14 -0
- package/node_modules/playwright/cli.js +19 -0
- package/node_modules/playwright/index.d.ts +17 -0
- package/node_modules/playwright/index.js +17 -0
- package/node_modules/playwright/index.mjs +18 -0
- package/node_modules/playwright/lib/agents/agentParser.js +89 -0
- package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
- package/node_modules/playwright/lib/agents/generateAgents.js +395 -0
- package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
- package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
- package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
- package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
- package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
- package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
- package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
- package/node_modules/playwright/lib/cli/reportActions.js +78 -0
- package/node_modules/playwright/lib/cli/testActions.js +217 -0
- package/node_modules/playwright/lib/common/index.js +2937 -0
- package/node_modules/playwright/lib/common/index.js.txt +33 -0
- package/node_modules/playwright/lib/errorContext.js +129 -0
- package/node_modules/playwright/lib/globals.js +58 -0
- package/node_modules/playwright/lib/index.js +827 -0
- package/node_modules/playwright/lib/isomorphic.js +260 -0
- package/node_modules/playwright/lib/isomorphic.js.txt +9 -0
- package/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
- package/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
- package/node_modules/playwright/lib/matchers/expect.js +13496 -0
- package/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
- package/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
- package/node_modules/playwright/lib/mcp/test/browserBackend.js +135 -0
- package/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
- package/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/node_modules/playwright/lib/mcp/test/streams.js +44 -0
- package/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
- package/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
- package/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
- package/node_modules/playwright/lib/package.js +47 -0
- package/node_modules/playwright/lib/program.js +242 -0
- package/node_modules/playwright/lib/runner/index.js +8721 -0
- package/node_modules/playwright/lib/runner/index.js.txt +62 -0
- package/node_modules/playwright/lib/transform/babelBundle.js +72490 -0
- package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
- package/node_modules/playwright/lib/transform/babelBundle.js.txt +328 -0
- package/node_modules/playwright/lib/transform/esmLoader.js +8213 -0
- package/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
- package/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
- package/node_modules/playwright/lib/util.js +373 -0
- package/node_modules/playwright/lib/worker/workerProcessEntry.js +1860 -0
- package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
- package/node_modules/playwright/package.json +50 -0
- package/node_modules/playwright/test.d.ts +18 -0
- package/node_modules/playwright/test.js +24 -0
- package/node_modules/playwright/test.mjs +35 -0
- package/node_modules/playwright/types/test.d.ts +11191 -0
- package/node_modules/playwright/types/testReporter.d.ts +950 -0
- package/package.json +21 -12
- package/dist/actions/desktopActions.d.ts +0 -58
- package/dist/actions/desktopActions.js +0 -155
- package/dist/actions/index.d.ts +0 -27
- package/dist/actions/index.js +0 -11
- package/dist/actions/memoryActions.d.ts +0 -9
- package/dist/actions/memoryActions.js +0 -34
- package/dist/actions/taskActions.d.ts +0 -8
- package/dist/actions/taskActions.js +0 -27
- package/dist/actions/types.d.ts +0 -35
- package/dist/actions/types.js +0 -5
- package/dist/actions/util.d.ts +0 -21
- package/dist/actions/util.js +0 -280
- package/dist/actions/webActions.d.ts +0 -87
- package/dist/actions/webActions.js +0 -214
- package/dist/actions/webActions.test.d.ts +0 -1
- package/dist/actions/webActions.test.js +0 -43
- package/dist/agent/browserAgent.d.ts +0 -31
- package/dist/agent/browserAgent.js +0 -136
- package/dist/agent/errors.d.ts +0 -22
- package/dist/agent/errors.js +0 -97
- package/dist/agent/index.d.ts +0 -64
- package/dist/agent/index.js +0 -505
- package/dist/agent/narrator.d.ts +0 -4
- package/dist/agent/narrator.js +0 -63
- package/dist/agent/pause.test.d.ts +0 -1
- package/dist/agent/pause.test.js +0 -194
- package/dist/ai/baml_client/async_client.d.ts +0 -64
- package/dist/ai/baml_client/async_client.js +0 -284
- package/dist/ai/baml_client/async_request.d.ts +0 -39
- package/dist/ai/baml_client/async_request.js +0 -134
- package/dist/ai/baml_client/config.d.ts +0 -11
- package/dist/ai/baml_client/config.js +0 -20
- package/dist/ai/baml_client/globals.d.ts +0 -16
- package/dist/ai/baml_client/globals.js +0 -37
- package/dist/ai/baml_client/index.d.ts +0 -17
- package/dist/ai/baml_client/index.js +0 -42
- package/dist/ai/baml_client/inlinedbaml.d.ts +0 -19
- package/dist/ai/baml_client/inlinedbaml.js +0 -31
- package/dist/ai/baml_client/parser.d.ts +0 -53
- package/dist/ai/baml_client/parser.js +0 -86
- package/dist/ai/baml_client/partial_types.d.ts +0 -61
- package/dist/ai/baml_client/partial_types.js +0 -10
- package/dist/ai/baml_client/sync_client.d.ts +0 -57
- package/dist/ai/baml_client/sync_client.js +0 -142
- package/dist/ai/baml_client/sync_request.d.ts +0 -37
- package/dist/ai/baml_client/sync_request.js +0 -134
- package/dist/ai/baml_client/tracing.d.ts +0 -16
- package/dist/ai/baml_client/tracing.js +0 -18
- package/dist/ai/baml_client/type_builder.d.ts +0 -40
- package/dist/ai/baml_client/type_builder.js +0 -120
- package/dist/ai/baml_client/types.d.ts +0 -69
- package/dist/ai/baml_client/types.js +0 -15
- package/dist/ai/baml_client/watchers.d.ts +0 -32
- package/dist/ai/baml_client/watchers.js +0 -50
- package/dist/ai/baseten.d.ts +0 -4
- package/dist/ai/baseten.js +0 -10
- package/dist/ai/claudeCode.d.ts +0 -1
- package/dist/ai/claudeCode.js +0 -186
- package/dist/ai/modelHarness.d.ts +0 -39
- package/dist/ai/modelHarness.js +0 -324
- package/dist/ai/modelResponseError.d.ts +0 -4
- package/dist/ai/modelResponseError.js +0 -8
- package/dist/ai/multiModelHarness.d.ts +0 -24
- package/dist/ai/multiModelHarness.js +0 -52
- package/dist/ai/plannerResponse.d.ts +0 -34
- package/dist/ai/plannerResponse.js +0 -96
- package/dist/ai/plannerResponse.test.d.ts +0 -1
- package/dist/ai/plannerResponse.test.js +0 -112
- package/dist/ai/structuredOutput.d.ts +0 -11
- package/dist/ai/structuredOutput.js +0 -94
- package/dist/ai/structuredOutput.test.d.ts +0 -1
- package/dist/ai/structuredOutput.test.js +0 -91
- package/dist/ai/types.d.ts +0 -119
- package/dist/ai/types.js +0 -5
- package/dist/ai/util.d.ts +0 -13
- package/dist/ai/util.js +0 -200
- package/dist/ai/util.test.d.ts +0 -1
- package/dist/ai/util.test.js +0 -95
- package/dist/cli.js +0 -3
- package/dist/common/actions.js +0 -14
- package/dist/common/events.d.ts +0 -17
- package/dist/common/events.js +0 -3
- package/dist/common/failure.d.ts +0 -68
- package/dist/common/failure.js +0 -1
- package/dist/common/index.d.ts +0 -3
- package/dist/common/index.js +0 -3
- package/dist/common/operation.d.ts +0 -31
- package/dist/common/operation.js +0 -102
- package/dist/common/operation.test.d.ts +0 -1
- package/dist/common/operation.test.js +0 -53
- package/dist/common/retry.d.ts +0 -16
- package/dist/common/retry.js +0 -35
- package/dist/common/util.d.ts +0 -23
- package/dist/common/util.js +0 -139
- package/dist/connectors/browserConnector.d.ts +0 -53
- package/dist/connectors/browserConnector.js +0 -290
- package/dist/connectors/desktopConnector.d.ts +0 -58
- package/dist/connectors/desktopConnector.js +0 -68
- package/dist/connectors/index.d.ts +0 -14
- package/dist/connectors/index.js +0 -2
- package/dist/index.js +0 -28
- package/dist/logger.d.ts +0 -3
- package/dist/logger.js +0 -15
- package/dist/memory/agentMemory.d.ts +0 -47
- package/dist/memory/agentMemory.js +0 -167
- package/dist/memory/agentMemory.test.d.ts +0 -1
- package/dist/memory/agentMemory.test.js +0 -150
- package/dist/memory/image.d.ts +0 -28
- package/dist/memory/image.js +0 -95
- package/dist/memory/image.test.d.ts +0 -1
- package/dist/memory/image.test.js +0 -46
- package/dist/memory/index.d.ts +0 -3
- package/dist/memory/index.js +0 -3
- package/dist/memory/masking.d.ts +0 -7
- package/dist/memory/masking.js +0 -141
- package/dist/memory/masking.test.d.ts +0 -1
- package/dist/memory/masking.test.js +0 -117
- package/dist/memory/notebook.d.ts +0 -58
- package/dist/memory/notebook.js +0 -75
- package/dist/memory/notebook.test.d.ts +0 -1
- package/dist/memory/notebook.test.js +0 -99
- package/dist/memory/observation.d.ts +0 -38
- package/dist/memory/observation.js +0 -79
- package/dist/memory/rendering/index.d.ts +0 -10
- package/dist/memory/rendering/index.js +0 -13
- package/dist/memory/rendering/renderJsonParts.d.ts +0 -3
- package/dist/memory/rendering/renderJsonParts.js +0 -115
- package/dist/memory/rendering/renderJsonParts.test.d.ts +0 -1
- package/dist/memory/rendering/renderJsonParts.test.js +0 -217
- package/dist/memory/rendering/renderXmlParts.d.ts +0 -7
- package/dist/memory/rendering/renderXmlParts.js +0 -127
- package/dist/memory/serde.d.ts +0 -20
- package/dist/memory/serde.js +0 -67
- package/dist/memory/serde.test.d.ts +0 -1
- package/dist/memory/serde.test.js +0 -64
- package/dist/memory/util.d.ts +0 -2
- package/dist/memory/util.js +0 -17
- package/dist/telemetry/events.d.ts +0 -9
- package/dist/telemetry/events.js +0 -80
- package/dist/telemetry/index.d.ts +0 -6
- package/dist/telemetry/index.js +0 -91
- package/dist/types.d.ts +0 -30
- package/dist/types.js +0 -1
- package/dist/util.d.ts +0 -1
- package/dist/util.js +0 -12
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -3
- package/dist/web/browserProvider.d.ts +0 -24
- package/dist/web/browserProvider.js +0 -164
- package/dist/web/browserProvider.test.d.ts +0 -1
- package/dist/web/browserProvider.test.js +0 -44
- package/dist/web/harness.d.ts +0 -109
- package/dist/web/harness.js +0 -401
- package/dist/web/recovery.d.ts +0 -46
- package/dist/web/recovery.js +0 -137
- package/dist/web/recovery.test.d.ts +0 -1
- package/dist/web/recovery.test.js +0 -182
- package/dist/web/stability.d.ts +0 -57
- package/dist/web/stability.js +0 -323
- package/dist/web/tabs.d.ts +0 -58
- package/dist/web/tabs.js +0 -293
- package/dist/web/transformer.d.ts +0 -7
- package/dist/web/transformer.js +0 -41
- package/dist/web/types.d.ts +0 -37
- package/dist/web/types.js +0 -2
- package/dist/web/util.d.ts +0 -3
- package/dist/web/util.js +0 -81
- package/dist/web/visualizer/cursor.d.ts +0 -16
- package/dist/web/visualizer/cursor.js +0 -153
- package/dist/web/visualizer/index.d.ts +0 -22
- package/dist/web/visualizer/index.js +0 -47
- package/dist/web/visualizer/mouseEffects.d.ts +0 -18
- package/dist/web/visualizer/mouseEffects.js +0 -287
- package/dist/web/visualizer/typeEffects.d.ts +0 -10
- package/dist/web/visualizer/typeEffects.js +0 -190
- package/dist/web/zodReexport.test.d.ts +0 -1
- package/dist/web/zodReexport.test.js +0 -14
- /package/{dist/common/actions.d.ts → node_modules/patchright-core/.bun-tag-19f23bd68c84ec1f} +0 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var session_exports = {};
|
|
30
|
+
__export(session_exports, {
|
|
31
|
+
Session: () => Session
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(session_exports);
|
|
34
|
+
var import_child_process = require("child_process");
|
|
35
|
+
var import_fs = __toESM(require("fs"));
|
|
36
|
+
var import_net = __toESM(require("net"));
|
|
37
|
+
var import_os = __toESM(require("os"));
|
|
38
|
+
var import_path = __toESM(require("path"));
|
|
39
|
+
var import_package = require("../../package");
|
|
40
|
+
var import_socketConnection = require("../utils/socketConnection");
|
|
41
|
+
var import_registry = require("./registry");
|
|
42
|
+
class Session {
|
|
43
|
+
constructor(sessionFile) {
|
|
44
|
+
this.config = sessionFile.config;
|
|
45
|
+
this.name = this.config.name;
|
|
46
|
+
this._sessionFile = sessionFile;
|
|
47
|
+
}
|
|
48
|
+
isCompatible(clientInfo) {
|
|
49
|
+
return (0, import_socketConnection.compareSemver)(clientInfo.version, this.config.version) >= 0;
|
|
50
|
+
}
|
|
51
|
+
async run(clientInfo, args, options) {
|
|
52
|
+
if (!this.isCompatible(clientInfo))
|
|
53
|
+
throw new Error(`Client is v${clientInfo.version}, session '${this.name}' is v${this.config.version}. Run
|
|
54
|
+
|
|
55
|
+
playwright-cli${this.name !== "default" ? ` -s=${this.name}` : ""} open
|
|
56
|
+
|
|
57
|
+
to restart the browser session.`);
|
|
58
|
+
const { socket } = await this._connect();
|
|
59
|
+
if (!socket)
|
|
60
|
+
throw new Error(`Browser '${this.name}' is not open. Run
|
|
61
|
+
|
|
62
|
+
playwright-cli${this.name !== "default" ? ` -s=${this.name}` : ""} open
|
|
63
|
+
|
|
64
|
+
to start the browser session.`);
|
|
65
|
+
return await SocketConnectionClient.sendAndClose(socket, "run", { args, cwd: process.cwd(), raw: options?.raw, json: options?.json });
|
|
66
|
+
}
|
|
67
|
+
async stop() {
|
|
68
|
+
if (!await this.canConnect())
|
|
69
|
+
return { wasOpen: false };
|
|
70
|
+
await this._stopDaemon();
|
|
71
|
+
return { wasOpen: true };
|
|
72
|
+
}
|
|
73
|
+
async deleteData() {
|
|
74
|
+
await this.stop();
|
|
75
|
+
const dataDirs = await import_fs.default.promises.readdir(this._sessionFile.daemonDir).catch(() => []);
|
|
76
|
+
const matchingEntries = dataDirs.filter((file) => file === `${this.name}.session` || file.startsWith(`ud-${this.name}-`));
|
|
77
|
+
if (matchingEntries.length === 0)
|
|
78
|
+
return { existed: false, deletedUserDataDir: false };
|
|
79
|
+
let deletedUserDataDir = false;
|
|
80
|
+
for (const entry of matchingEntries) {
|
|
81
|
+
const userDataDir = import_path.default.resolve(this._sessionFile.daemonDir, entry);
|
|
82
|
+
for (let i = 0; i < 5; i++) {
|
|
83
|
+
try {
|
|
84
|
+
await import_fs.default.promises.rm(userDataDir, { recursive: true });
|
|
85
|
+
if (entry.startsWith("ud-"))
|
|
86
|
+
deletedUserDataDir = true;
|
|
87
|
+
break;
|
|
88
|
+
} catch (e) {
|
|
89
|
+
if (e.code === "ENOENT")
|
|
90
|
+
break;
|
|
91
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
92
|
+
if (i === 4)
|
|
93
|
+
throw e;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return { existed: true, deletedUserDataDir };
|
|
98
|
+
}
|
|
99
|
+
async _connect() {
|
|
100
|
+
return await new Promise((resolve) => {
|
|
101
|
+
const socket = import_net.default.createConnection(this.config.socketPath, () => {
|
|
102
|
+
resolve({ socket });
|
|
103
|
+
});
|
|
104
|
+
socket.on("error", (error) => {
|
|
105
|
+
if (import_os.default.platform() !== "win32")
|
|
106
|
+
void import_fs.default.promises.unlink(this.config.socketPath).catch(() => {
|
|
107
|
+
}).then(() => resolve({ error }));
|
|
108
|
+
else
|
|
109
|
+
resolve({ error });
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
async canConnect() {
|
|
114
|
+
const { socket } = await this._connect();
|
|
115
|
+
if (socket) {
|
|
116
|
+
socket.destroy();
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
static async startDaemon(clientInfo, cliArgs, mode) {
|
|
122
|
+
await import_fs.default.promises.mkdir(clientInfo.daemonProfilesDir, { recursive: true });
|
|
123
|
+
const cliPath = (0, import_package.libPath)("entry", "cliDaemon.js");
|
|
124
|
+
const sessionName = (0, import_registry.resolveSessionName)(cliArgs.session);
|
|
125
|
+
const errLog = import_path.default.join(clientInfo.daemonProfilesDir, sessionName + ".err");
|
|
126
|
+
const err = import_fs.default.openSync(errLog, "w");
|
|
127
|
+
const args = [
|
|
128
|
+
cliPath,
|
|
129
|
+
sessionName
|
|
130
|
+
];
|
|
131
|
+
if (cliArgs.headed)
|
|
132
|
+
args.push("--headed");
|
|
133
|
+
if (cliArgs.mobile)
|
|
134
|
+
args.push("--mobile");
|
|
135
|
+
if (cliArgs.device)
|
|
136
|
+
args.push(`--device=${cliArgs.device}`);
|
|
137
|
+
if (cliArgs.browser)
|
|
138
|
+
args.push(`--browser=${cliArgs.browser}`);
|
|
139
|
+
if (cliArgs.persistent)
|
|
140
|
+
args.push("--persistent");
|
|
141
|
+
if (cliArgs.profile)
|
|
142
|
+
args.push(`--profile=${cliArgs.profile}`);
|
|
143
|
+
if (cliArgs.config)
|
|
144
|
+
args.push(`--config=${cliArgs.config}`);
|
|
145
|
+
if (cliArgs["idle-timeout"] !== void 0)
|
|
146
|
+
args.push(`--idle-timeout=${cliArgs["idle-timeout"]}`);
|
|
147
|
+
if (cliArgs.extension)
|
|
148
|
+
args.push("--extension");
|
|
149
|
+
else if (cliArgs.cdp)
|
|
150
|
+
args.push(`--cdp=${cliArgs.cdp}`);
|
|
151
|
+
else if (cliArgs.endpoint)
|
|
152
|
+
args.push(`--endpoint=${cliArgs.endpoint}`);
|
|
153
|
+
const child = (0, import_child_process.spawn)(process.execPath, args, {
|
|
154
|
+
detached: true,
|
|
155
|
+
stdio: ["ignore", "pipe", err],
|
|
156
|
+
cwd: process.cwd(),
|
|
157
|
+
// Will be used as root.
|
|
158
|
+
windowsHide: true
|
|
159
|
+
});
|
|
160
|
+
let signalled = false;
|
|
161
|
+
const sigintHandler = () => {
|
|
162
|
+
signalled = true;
|
|
163
|
+
child.kill("SIGINT");
|
|
164
|
+
};
|
|
165
|
+
const sigtermHandler = () => {
|
|
166
|
+
signalled = true;
|
|
167
|
+
child.kill("SIGTERM");
|
|
168
|
+
};
|
|
169
|
+
process.on("SIGINT", sigintHandler);
|
|
170
|
+
process.on("SIGTERM", sigtermHandler);
|
|
171
|
+
let outLog = "";
|
|
172
|
+
const rejectWithPid = (reject, message) => reject(Object.assign(new Error(`Daemon pid=${child.pid}: ${message}`), { daemonPid: child.pid }));
|
|
173
|
+
await new Promise((resolve, reject) => {
|
|
174
|
+
child.stdout.on("data", (data) => {
|
|
175
|
+
outLog += data.toString();
|
|
176
|
+
if (outLog.includes("Daemon listening on"))
|
|
177
|
+
resolve();
|
|
178
|
+
});
|
|
179
|
+
child.on("close", (code) => {
|
|
180
|
+
if (!signalled) {
|
|
181
|
+
const errLogContent = import_fs.default.readFileSync(errLog, "utf-8");
|
|
182
|
+
rejectWithPid(reject, `Daemon process exited with code ${code}` + (outLog ? "\n" + outLog : "") + (errLogContent ? "\n" + errLogContent : ""));
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
process.off("SIGINT", sigintHandler);
|
|
187
|
+
process.off("SIGTERM", sigtermHandler);
|
|
188
|
+
child.stdout.destroy();
|
|
189
|
+
child.unref();
|
|
190
|
+
return { pid: child.pid, sessionName, endpoint: cliArgs.endpoint };
|
|
191
|
+
}
|
|
192
|
+
async _stopDaemon() {
|
|
193
|
+
const { socket } = await this._connect();
|
|
194
|
+
if (!socket)
|
|
195
|
+
return;
|
|
196
|
+
let error;
|
|
197
|
+
await SocketConnectionClient.sendAndClose(socket, "stop", {}).catch((e) => error = e);
|
|
198
|
+
if (error && !error?.message?.includes("Session closed"))
|
|
199
|
+
throw error;
|
|
200
|
+
}
|
|
201
|
+
async deleteSessionConfig() {
|
|
202
|
+
await import_fs.default.promises.rm(this._sessionFile.file).catch(() => {
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
class SocketConnectionClient {
|
|
207
|
+
constructor(socket) {
|
|
208
|
+
this._nextMessageId = 1;
|
|
209
|
+
this._callbacks = /* @__PURE__ */ new Map();
|
|
210
|
+
this._connection = new import_socketConnection.SocketConnection(socket);
|
|
211
|
+
this._connection.onmessage = (message) => this._onMessage(message);
|
|
212
|
+
this._connection.onclose = () => this._rejectCallbacks();
|
|
213
|
+
}
|
|
214
|
+
async send(method, params = {}) {
|
|
215
|
+
const messageId = this._nextMessageId++;
|
|
216
|
+
const message = {
|
|
217
|
+
id: messageId,
|
|
218
|
+
method,
|
|
219
|
+
params
|
|
220
|
+
};
|
|
221
|
+
const responsePromise = new Promise((resolve, reject) => {
|
|
222
|
+
this._callbacks.set(messageId, { resolve, reject, method, params });
|
|
223
|
+
});
|
|
224
|
+
const [result] = await Promise.all([responsePromise, this._connection.send(message)]);
|
|
225
|
+
return result;
|
|
226
|
+
}
|
|
227
|
+
static async sendAndClose(socket, method, params = {}) {
|
|
228
|
+
const connection = new SocketConnectionClient(socket);
|
|
229
|
+
try {
|
|
230
|
+
return await connection.send(method, params);
|
|
231
|
+
} finally {
|
|
232
|
+
connection.close();
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
close() {
|
|
236
|
+
this._connection.close();
|
|
237
|
+
}
|
|
238
|
+
_onMessage(object) {
|
|
239
|
+
if (object.id && this._callbacks.has(object.id)) {
|
|
240
|
+
const callback = this._callbacks.get(object.id);
|
|
241
|
+
this._callbacks.delete(object.id);
|
|
242
|
+
if (object.error)
|
|
243
|
+
callback.reject(new Error(object.error));
|
|
244
|
+
else
|
|
245
|
+
callback.resolve(object.result);
|
|
246
|
+
} else if (object.id) {
|
|
247
|
+
throw new Error(`Unexpected message id: ${object.id}`);
|
|
248
|
+
} else {
|
|
249
|
+
throw new Error(`Unexpected message without id: ${JSON.stringify(object)}`);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
_rejectCallbacks() {
|
|
253
|
+
for (const callback of this._callbacks.values())
|
|
254
|
+
callback.reject(new Error("Session closed"));
|
|
255
|
+
this._callbacks.clear();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
259
|
+
0 && (module.exports = {
|
|
260
|
+
Session
|
|
261
|
+
});
|
|
Binary file
|