testdriverai 7.2.63 → 7.2.65
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/agent/index.js +77 -59
- package/agent/interface.js +11 -251
- package/agent/lib/debugger-server.js +2 -1
- package/agent/lib/logger.js +56 -0
- package/agent/lib/sandbox.js +79 -29
- package/ai/agents/test-writer.md +457 -0
- package/{docs/v7/ai.mdx → ai/skills/testdriver:ai/SKILL.md} +3 -5
- package/{docs/v7/assert.mdx → ai/skills/testdriver:assert/SKILL.md} +3 -4
- package/{docs/v7/aws-setup.mdx → ai/skills/testdriver:aws-setup/SKILL.md} +3 -4
- package/{docs/v7/caching.mdx → ai/skills/testdriver:caching/SKILL.md} +3 -7
- package/{docs/v7/captcha.mdx → ai/skills/testdriver:captcha/SKILL.md} +4 -5
- package/{docs/v7/ci-cd.mdx → ai/skills/testdriver:ci-cd/SKILL.md} +3 -4
- package/{docs/v7/click.mdx → ai/skills/testdriver:click/SKILL.md} +3 -4
- package/{docs/v7/client.mdx → ai/skills/testdriver:client/SKILL.md} +11 -5
- package/{docs/v7/cloud.mdx → ai/skills/testdriver:cloud/SKILL.md} +3 -4
- package/{docs/v7/customizing-devices.mdx → ai/skills/testdriver:customizing-devices/SKILL.md} +36 -26
- package/{docs/v7/dashcam.mdx → ai/skills/testdriver:dashcam/SKILL.md} +3 -4
- package/{docs/v7/device-config.mdx → ai/skills/testdriver:device-config/SKILL.md} +3 -3
- package/{docs/v7/double-click.mdx → ai/skills/testdriver:double-click/SKILL.md} +3 -3
- package/{docs/v7/elements.mdx → ai/skills/testdriver:elements/SKILL.md} +3 -4
- package/{docs/v7/enterprise.mdx → ai/skills/testdriver:enterprise/SKILL.md} +3 -5
- package/ai/skills/testdriver:examples/SKILL.md +7 -0
- package/{docs/v7/exec.mdx → ai/skills/testdriver:exec/SKILL.md} +3 -4
- package/{docs/v7/find.mdx → ai/skills/testdriver:find/SKILL.md} +81 -4
- package/{docs/v7/focus-application.mdx → ai/skills/testdriver:focus-application/SKILL.md} +3 -4
- package/{docs/v7/generating-tests.mdx → ai/skills/testdriver:generating-tests/SKILL.md} +3 -3
- package/{docs/v7/hover.mdx → ai/skills/testdriver:hover/SKILL.md} +3 -4
- package/{docs/v7/locating-elements.mdx → ai/skills/testdriver:locating-elements/SKILL.md} +3 -3
- package/{docs/v7/making-assertions.mdx → ai/skills/testdriver:making-assertions/SKILL.md} +3 -3
- package/ai/skills/testdriver:mcp-workflow/SKILL.md +410 -0
- package/{docs/v7/mouse-down.mdx → ai/skills/testdriver:mouse-down/SKILL.md} +3 -3
- package/{docs/v7/mouse-up.mdx → ai/skills/testdriver:mouse-up/SKILL.md} +3 -3
- package/{docs/v7/performing-actions.mdx → ai/skills/testdriver:performing-actions/SKILL.md} +3 -3
- package/{docs/v7/press-keys.mdx → ai/skills/testdriver:press-keys/SKILL.md} +3 -4
- package/{docs/v7/quickstart.mdx → ai/skills/testdriver:quickstart/SKILL.md} +3 -4
- package/{docs/v7/reusable-code.mdx → ai/skills/testdriver:reusable-code/SKILL.md} +3 -3
- package/{docs/v7/right-click.mdx → ai/skills/testdriver:right-click/SKILL.md} +3 -3
- package/{docs/v7/running-tests.mdx → ai/skills/testdriver:running-tests/SKILL.md} +3 -3
- package/{docs/v7/screenshot.mdx → ai/skills/testdriver:screenshot/SKILL.md} +3 -4
- package/{docs/v7/scroll.mdx → ai/skills/testdriver:scroll/SKILL.md} +3 -4
- package/{docs/v7/secrets.mdx → ai/skills/testdriver:secrets/SKILL.md} +3 -3
- package/{docs/v7/self-hosted.mdx → ai/skills/testdriver:self-hosted/SKILL.md} +3 -4
- package/ai/skills/testdriver:testdriver/SKILL.md +31 -0
- package/{docs/v7/type.mdx → ai/skills/testdriver:type/SKILL.md} +3 -4
- package/{docs/v7/variables.mdx → ai/skills/testdriver:variables/SKILL.md} +3 -3
- package/{docs/v7/waiting-for-elements.mdx → ai/skills/testdriver:waiting-for-elements/SKILL.md} +3 -3
- package/{docs/v7/what-is-testdriver.mdx → ai/skills/testdriver:what-is-testdriver/SKILL.md} +3 -3
- package/interfaces/cli/commands/init.js +278 -1
- package/interfaces/cli/commands/setup.js +382 -0
- package/interfaces/vitest-plugin.mjs +190 -122
- package/lib/core/Dashcam.js +22 -15
- package/lib/sentry.js +4 -3
- package/lib/vitest/hooks.mjs +70 -16
- package/lib/vitest/setup-aws.mjs +0 -10
- package/package.json +29 -9
- package/sdk.d.ts +32 -5
- package/sdk.js +10 -9
- package/.env.example +0 -4
- package/.github/workflows/acceptance-linux-scheduled.yaml +0 -45
- package/.github/workflows/acceptance-windows-scheduled.yaml +0 -54
- package/.github/workflows/acceptance.yaml +0 -87
- package/.github/workflows/publish.yaml +0 -68
- package/.github/workflows/test-init.yml +0 -145
- package/.github/workflows/testdriver.yml +0 -170
- package/.github/workflows/windows-self-hosted.yaml +0 -82
- package/.prettierignore +0 -4
- package/.prettierrc +0 -1
- package/CHANGELOG.md +0 -30
- package/agents.md +0 -455
- package/debugger/bg.png +0 -0
- package/debugger/icon.png +0 -0
- package/debugger/index.html +0 -797
- package/debugger/td.png +0 -0
- package/debugger/tray-buffered.png +0 -0
- package/debugger/tray.png +0 -0
- package/docs/GITHUB_COMMENTS.md +0 -330
- package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +0 -167
- package/docs/QUICK-START-GITHUB-COMMENTS.md +0 -84
- package/docs/TEST-GITHUB-COMMENTS.md +0 -129
- package/docs/_scripts/link-replacer.js +0 -164
- package/docs/_scripts/upload-docs-to-openai.js +0 -284
- package/docs/docs.json +0 -393
- package/docs/github-integration-setup.md +0 -266
- package/docs/guide/best-practices-polling.mdx +0 -154
- package/docs/images/content/account/newprojectsettings.png +0 -0
- package/docs/images/content/account/projectpage.png +0 -0
- package/docs/images/content/account/projectreplays.png +0 -0
- package/docs/images/content/account/team-manage.png +0 -0
- package/docs/images/content/account/teampage.png +0 -0
- package/docs/images/content/extension/cursor.svg +0 -1
- package/docs/images/content/extension/vscode.svg +0 -57
- package/docs/images/content/extension/windsurf.svg +0 -3
- package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
- package/docs/images/content/side-by-side.png +0 -0
- package/docs/images/content/vscode/ide-full.png +0 -0
- package/docs/images/content/vscode/running.png +0 -0
- package/docs/images/content/vscode/vscode-2-assert.png +0 -0
- package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
- package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
- package/docs/images/content/vscode/vscode-file-creation.png +0 -0
- package/docs/images/content/vscode/vscode-install.png +0 -0
- package/docs/images/content/vscode/vscode-overview.png +0 -0
- package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
- package/docs/images/content/vscode/vscode-stopchat.png +0 -0
- package/docs/images/content/vscode/vscode-stoptest.png +0 -0
- package/docs/images/content/vscode/vscode-tdservice.png +0 -0
- package/docs/images/content/vscode/vscode-test-output.png +0 -0
- package/docs/images/content/vscode/vscode-testhistory.png +0 -0
- package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
- package/docs/images/content/vscode/vscode-testpane.png +0 -0
- package/docs/images/template/dark.png +0 -0
- package/docs/images/template/icon.png +0 -0
- package/docs/images/template/light.png +0 -0
- package/docs/snippets/calendar-link.mdx +0 -4
- package/docs/snippets/gitignore-warning.mdx +0 -7
- package/docs/snippets/lifecycle-warning.mdx +0 -6
- package/docs/snippets/test-prereqs.mdx +0 -12
- package/docs/snippets/tests/assert-replay.mdx +0 -7
- package/docs/snippets/tests/assert-yaml.mdx +0 -8
- package/docs/snippets/tests/exec-js-replay.mdx +0 -7
- package/docs/snippets/tests/exec-js-yaml.mdx +0 -32
- package/docs/snippets/tests/exec-shell-replay.mdx +0 -7
- package/docs/snippets/tests/exec-shell-yaml.mdx +0 -15
- package/docs/snippets/tests/hover-image-replay.mdx +0 -7
- package/docs/snippets/tests/hover-image-yaml.mdx +0 -17
- package/docs/snippets/tests/hover-text-replay.mdx +0 -7
- package/docs/snippets/tests/hover-text-with-description-replay.mdx +0 -7
- package/docs/snippets/tests/hover-text-with-description-yaml.mdx +0 -24
- package/docs/snippets/tests/hover-text-yaml.mdx +0 -14
- package/docs/snippets/tests/match-image-replay.mdx +0 -7
- package/docs/snippets/tests/match-image-yaml.mdx +0 -17
- package/docs/snippets/tests/press-keys-replay.mdx +0 -7
- package/docs/snippets/tests/press-keys-yaml.mdx +0 -36
- package/docs/snippets/tests/remember-replay.mdx +0 -7
- package/docs/snippets/tests/remember-yaml.mdx +0 -28
- package/docs/snippets/tests/scroll-replay.mdx +0 -7
- package/docs/snippets/tests/scroll-until-image-replay.mdx +0 -7
- package/docs/snippets/tests/scroll-until-image-yaml.mdx +0 -14
- package/docs/snippets/tests/scroll-until-text-replay.mdx +0 -7
- package/docs/snippets/tests/scroll-until-text-yaml.mdx +0 -17
- package/docs/snippets/tests/scroll-yaml.mdx +0 -30
- package/docs/snippets/tests/type-repeated-replay.mdx +0 -7
- package/docs/snippets/tests/type-repeated-yaml.mdx +0 -22
- package/docs/snippets/tests/type-replay.mdx +0 -7
- package/docs/snippets/tests/type-yaml.mdx +0 -28
- package/docs/snippets/tests/wait-for-image-replay.mdx +0 -7
- package/docs/snippets/tests/wait-for-image-yaml.mdx +0 -18
- package/docs/snippets/tests/wait-for-text-replay.mdx +0 -7
- package/docs/snippets/tests/wait-for-text-yaml.mdx +0 -18
- package/docs/snippets/tests/wait-replay.mdx +0 -7
- package/docs/snippets/tests/wait-yaml.mdx +0 -13
- package/docs/styles.css +0 -65
- package/docs/v6/account/dashboard.mdx +0 -16
- package/docs/v6/account/enterprise.mdx +0 -110
- package/docs/v6/account/pricing.mdx +0 -33
- package/docs/v6/account/projects.mdx +0 -33
- package/docs/v6/account/team.mdx +0 -35
- package/docs/v6/action/ami.mdx +0 -109
- package/docs/v6/action/performance.mdx +0 -105
- package/docs/v6/action/secrets.mdx +0 -93
- package/docs/v6/apps/chrome-extensions.mdx +0 -48
- package/docs/v6/apps/desktop-apps.mdx +0 -93
- package/docs/v6/apps/mobile-apps.mdx +0 -26
- package/docs/v6/apps/static-websites.mdx +0 -54
- package/docs/v6/apps/tauri-apps.mdx +0 -361
- package/docs/v6/bugs/jira.mdx +0 -232
- package/docs/v6/cli/overview.mdx +0 -66
- package/docs/v6/commands/assert.mdx +0 -45
- package/docs/v6/commands/exec.mdx +0 -282
- package/docs/v6/commands/focus-application.mdx +0 -44
- package/docs/v6/commands/hover-image.mdx +0 -69
- package/docs/v6/commands/hover-text.mdx +0 -47
- package/docs/v6/commands/if.mdx +0 -53
- package/docs/v6/commands/match-image.mdx +0 -67
- package/docs/v6/commands/press-keys.mdx +0 -87
- package/docs/v6/commands/remember.mdx +0 -49
- package/docs/v6/commands/run.mdx +0 -44
- package/docs/v6/commands/scroll-until-image.mdx +0 -66
- package/docs/v6/commands/scroll-until-text.mdx +0 -60
- package/docs/v6/commands/scroll.mdx +0 -69
- package/docs/v6/commands/type.mdx +0 -45
- package/docs/v6/commands/wait-for-image.mdx +0 -54
- package/docs/v6/commands/wait-for-text.mdx +0 -48
- package/docs/v6/commands/wait.mdx +0 -45
- package/docs/v6/exporting/junit.mdx +0 -218
- package/docs/v6/exporting/playwright.mdx +0 -197
- package/docs/v6/features/auto-healing.mdx +0 -144
- package/docs/v6/features/generation.mdx +0 -116
- package/docs/v6/features/parallel-testing.mdx +0 -151
- package/docs/v6/features/reusable-snippets.mdx +0 -131
- package/docs/v6/features/selectorless.mdx +0 -80
- package/docs/v6/features/visual-assertions.mdx +0 -139
- package/docs/v6/getting-started/ci.mdx +0 -146
- package/docs/v6/getting-started/cli.mdx +0 -91
- package/docs/v6/getting-started/editing.mdx +0 -100
- package/docs/v6/getting-started/playwright.mdx +0 -342
- package/docs/v6/getting-started/running.mdx +0 -48
- package/docs/v6/getting-started/self-hosting.mdx +0 -408
- package/docs/v6/getting-started/vscode.mdx +0 -89
- package/docs/v6/guide/assertions.mdx +0 -189
- package/docs/v6/guide/authentication.mdx +0 -136
- package/docs/v6/guide/code.mdx +0 -65
- package/docs/v6/guide/dashcam.mdx +0 -118
- package/docs/v6/guide/environment-variables.mdx +0 -26
- package/docs/v6/guide/lifecycle.mdx +0 -242
- package/docs/v6/guide/locating.mdx +0 -141
- package/docs/v6/guide/protips.mdx +0 -43
- package/docs/v6/guide/variables.mdx +0 -143
- package/docs/v6/guide/waiting.mdx +0 -130
- package/docs/v6/importing/csv.mdx +0 -196
- package/docs/v6/importing/gherkin.mdx +0 -143
- package/docs/v6/importing/jira.mdx +0 -164
- package/docs/v6/importing/testrail.mdx +0 -162
- package/docs/v6/integrations/electron.mdx +0 -146
- package/docs/v6/integrations/netlify.mdx +0 -100
- package/docs/v6/integrations/vercel.mdx +0 -125
- package/docs/v6/interactive/explore.mdx +0 -99
- package/docs/v6/interactive/run.mdx +0 -52
- package/docs/v6/interactive/save.mdx +0 -63
- package/docs/v6/overview/comparison.mdx +0 -101
- package/docs/v6/overview/faq.mdx +0 -162
- package/docs/v6/overview/performance.mdx +0 -52
- package/docs/v6/overview/quickstart.mdx +0 -137
- package/docs/v6/overview/what-is-testdriver.mdx +0 -85
- package/docs/v6/scenarios/ai-chatbot.mdx +0 -28
- package/docs/v6/scenarios/cookie-banner.mdx +0 -32
- package/docs/v6/scenarios/file-upload.mdx +0 -33
- package/docs/v6/scenarios/form-filling.mdx +0 -32
- package/docs/v6/scenarios/log-in.mdx +0 -75
- package/docs/v6/scenarios/pdf-generation.mdx +0 -25
- package/docs/v6/scenarios/spell-check.mdx +0 -22
- package/docs/v6/security/action.mdx +0 -84
- package/docs/v6/security/agent.mdx +0 -73
- package/docs/v6/security/platform.mdx +0 -77
- package/docs/v6/tutorials/advanced-test.mdx +0 -81
- package/docs/v6/tutorials/basic-test.mdx +0 -45
- package/docs/v7/_drafts/agents.mdx +0 -852
- package/docs/v7/_drafts/architecture.mdx +0 -399
- package/docs/v7/_drafts/auto-cache-key.mdx +0 -167
- package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +0 -100
- package/docs/v7/_drafts/best-practices.mdx +0 -486
- package/docs/v7/_drafts/caching-ai.mdx +0 -215
- package/docs/v7/_drafts/caching-selectors.mdx +0 -424
- package/docs/v7/_drafts/caching.mdx +0 -366
- package/docs/v7/_drafts/cli-to-sdk-migration.mdx +0 -425
- package/docs/v7/_drafts/commands/assert.mdx +0 -45
- package/docs/v7/_drafts/commands/exec.mdx +0 -282
- package/docs/v7/_drafts/commands/focus-application.mdx +0 -44
- package/docs/v7/_drafts/commands/hover-image.mdx +0 -69
- package/docs/v7/_drafts/commands/hover-text.mdx +0 -47
- package/docs/v7/_drafts/commands/if.mdx +0 -53
- package/docs/v7/_drafts/commands/match-image.mdx +0 -67
- package/docs/v7/_drafts/commands/press-keys.mdx +0 -87
- package/docs/v7/_drafts/commands/remember.mdx +0 -49
- package/docs/v7/_drafts/commands/run.mdx +0 -44
- package/docs/v7/_drafts/commands/scroll-until-image.mdx +0 -66
- package/docs/v7/_drafts/commands/scroll-until-text.mdx +0 -60
- package/docs/v7/_drafts/commands/scroll.mdx +0 -69
- package/docs/v7/_drafts/commands/type.mdx +0 -45
- package/docs/v7/_drafts/commands/wait-for-image.mdx +0 -54
- package/docs/v7/_drafts/commands/wait-for-text.mdx +0 -48
- package/docs/v7/_drafts/commands/wait.mdx +0 -45
- package/docs/v7/_drafts/configuration.mdx +0 -378
- package/docs/v7/_drafts/contributing.mdx +0 -174
- package/docs/v7/_drafts/core.mdx +0 -458
- package/docs/v7/_drafts/dashcam-title-feature.mdx +0 -89
- package/docs/v7/_drafts/debugging.mdx +0 -349
- package/docs/v7/_drafts/error-handling.mdx +0 -501
- package/docs/v7/_drafts/faq.mdx +0 -393
- package/docs/v7/_drafts/hooks.mdx +0 -360
- package/docs/v7/_drafts/init-command.mdx +0 -95
- package/docs/v7/_drafts/installation.mdx +0 -420
- package/docs/v7/_drafts/migration.mdx +0 -562
- package/docs/v7/_drafts/observable.mdx +0 -604
- package/docs/v7/_drafts/playwright.mdx +0 -342
- package/docs/v7/_drafts/plugin-migration.mdx +0 -220
- package/docs/v7/_drafts/powerful.mdx +0 -419
- package/docs/v7/_drafts/presets.mdx +0 -210
- package/docs/v7/_drafts/progressive-disclosure.mdx +0 -230
- package/docs/v7/_drafts/prompt-cache.mdx +0 -200
- package/docs/v7/_drafts/provision.mdx +0 -390
- package/docs/v7/_drafts/quick-start-test-recording.mdx +0 -214
- package/docs/v7/_drafts/readme.mdx +0 -135
- package/docs/v7/_drafts/reports.mdx +0 -414
- package/docs/v7/_drafts/scalable.mdx +0 -754
- package/docs/v7/_drafts/screenshot.mdx +0 -155
- package/docs/v7/_drafts/sdk-awesome-logs.mdx +0 -468
- package/docs/v7/_drafts/sdk-browser-rendering.mdx +0 -167
- package/docs/v7/_drafts/sdk-migration.mdx +0 -474
- package/docs/v7/_drafts/sdk-v7-complete.mdx +0 -345
- package/docs/v7/_drafts/self-hosting.mdx +0 -369
- package/docs/v7/_drafts/test-recording.mdx +0 -382
- package/docs/v7/_drafts/troubleshooting.mdx +0 -526
- package/docs/v7/_drafts/vitest-plugin.mdx +0 -477
- package/docs/v7/_drafts/vitest.mdx +0 -535
- package/docs/v7/_drafts/writing-tests.mdx +0 -25
- package/docs/v7/examples.mdx +0 -5
- package/eslint.config.js +0 -67
- package/examples/ai.test.mjs +0 -30
- package/examples/assert.test.mjs +0 -46
- package/examples/captcha-api.test.mjs +0 -50
- package/examples/chrome-extension.test.mjs +0 -94
- package/examples/drag-and-drop.test.mjs +0 -58
- package/examples/element-not-found.test.mjs +0 -26
- package/examples/exec-output.test.mjs +0 -59
- package/examples/exec-pwsh.test.mjs +0 -57
- package/examples/focus-window.test.mjs +0 -36
- package/examples/formatted-logging.test.mjs +0 -26
- package/examples/hover-image.test.mjs +0 -52
- package/examples/hover-text-with-description.test.mjs +0 -56
- package/examples/hover-text.test.mjs +0 -27
- package/examples/installer.test.mjs +0 -49
- package/examples/launch-vscode-linux.test.mjs +0 -54
- package/examples/match-image.test.mjs +0 -54
- package/examples/no-provision.test.mjs +0 -23
- package/examples/press-keys.test.mjs +0 -50
- package/examples/prompt.test.mjs +0 -33
- package/examples/scroll-keyboard.test.mjs +0 -37
- package/examples/scroll-until-image.test.mjs +0 -39
- package/examples/scroll-until-text.test.mjs +0 -67
- package/examples/scroll.test.mjs +0 -41
- package/examples/type.test.mjs +0 -45
- package/examples/windows-installer.test.mjs +0 -53
- package/interfaces/cli/commands/edit.js +0 -3
- package/interfaces/cli/commands/generate.js +0 -3
- package/interfaces/cli/commands/run.js +0 -3
- package/interfaces/cli/utils/factory.js +0 -71
- package/jsconfig.json +0 -26
- package/manual/test-init-command.js +0 -223
- package/sdk-log-formatter.js +0 -930
- package/setup/aws/cloudformation.yaml +0 -470
- package/setup/aws/spawn-runner.sh +0 -190
- package/test/api-resilience.test.mjs +0 -0
- package/test/captcha-solver.test.mjs +0 -70
- package/test/chrome-remote-debugging.test.mjs +0 -66
- package/test/manual/debug-locate-response.js +0 -82
- package/test/manual/reconnect-provision.test.mjs +0 -49
- package/test/manual/test-console-logs.test.mjs +0 -42
- package/test/manual/test-find-api.js +0 -73
- package/test/manual/test-init.sh +0 -54
- package/test/manual/test-prompt-cache.js +0 -96
- package/test/manual/test-provision-auth.mjs +0 -22
- package/test/manual/test-sandbox-render.js +0 -28
- package/test/manual/test-sdk-methods.js +0 -15
- package/test/manual/test-sdk-refactor.js +0 -53
- package/test/manual/test-stack-trace.mjs +0 -57
- package/test/manual/verify-element-api.js +0 -89
- package/test/manual/verify-types.js +0 -0
- package/test/manual-unawaited-promise.test.mjs +0 -31
- package/testdriver-plugin/skills/actions/SKILL.md +0 -93
- package/testdriver-plugin/skills/assertions/SKILL.md +0 -77
- package/testdriver-plugin/skills/caching/SKILL.md +0 -66
- package/testdriver-plugin/skills/creating-tests/SKILL.md +0 -104
- package/testdriver-plugin/skills/finding-elements/SKILL.md +0 -77
- package/testdriver-plugin/skills/github-actions/SKILL.md +0 -100
- package/testdriver-plugin/skills/running-tests/SKILL.md +0 -77
- package/testdriver-plugin/skills/secrets/SKILL.md +0 -87
- package/testdriver-plugin/skills/self-hosting/SKILL.md +0 -89
- package/testdriver-plugin/skills/setup/SKILL.md +0 -76
- package/testdriver-plugin/skills/variables/SKILL.md +0 -88
- package/testdriver-plugin/skills/waiting/SKILL.md +0 -72
- package/vitest.config.mjs +0 -29
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Match Image Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/match-image.yaml
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import path, { dirname } from "path";
|
|
7
|
-
import { fileURLToPath } from "url";
|
|
8
|
-
import { describe, expect, it } from "vitest";
|
|
9
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Perform login flow for SauceLabs demo app
|
|
13
|
-
* @param {TestDriver} client - TestDriver client
|
|
14
|
-
* @param {string} username - Username (default: 'standard_user')
|
|
15
|
-
*/
|
|
16
|
-
async function performLogin(client, username = "standard_user") {
|
|
17
|
-
await client.focusApplication("Google Chrome");
|
|
18
|
-
const password = await client.extract("the password");
|
|
19
|
-
const usernameField = await client.find(
|
|
20
|
-
"username input",
|
|
21
|
-
);
|
|
22
|
-
await usernameField.click();
|
|
23
|
-
await client.type(username);
|
|
24
|
-
await client.pressKeys(["tab"]);
|
|
25
|
-
await client.type(password, { secret: true });
|
|
26
|
-
await client.pressKeys(["tab"]);
|
|
27
|
-
await client.pressKeys(["enter"]);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Get the directory of the current module
|
|
31
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
32
|
-
const __dirname = dirname(__filename);
|
|
33
|
-
|
|
34
|
-
describe("Match Image Test", () => {
|
|
35
|
-
it.skip("should match shopping cart image and verify empty cart", async (context) => {
|
|
36
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
37
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
// Perform login first
|
|
41
|
-
await performLogin(testdriver);
|
|
42
|
-
|
|
43
|
-
// Match and click the shopping cart icon
|
|
44
|
-
const cartImagePath = path.resolve(
|
|
45
|
-
__dirname,
|
|
46
|
-
"../../_testdriver/acceptance/screenshots/cart.png",
|
|
47
|
-
);
|
|
48
|
-
await testdriver.matchImage(cartImagePath, "click");
|
|
49
|
-
|
|
50
|
-
// Assert that you see an empty shopping cart
|
|
51
|
-
const result = await testdriver.assert("Your cart is empty");
|
|
52
|
-
expect(result).toBeTruthy();
|
|
53
|
-
});
|
|
54
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Assert Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/assert.yaml
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
9
|
-
describe("Assert Test", () => {
|
|
10
|
-
it("should assert the testdriver login page shows", async (context) => {
|
|
11
|
-
const testdriver = TestDriver(context, {
|
|
12
|
-
ip: context.ip || process.env.TD_IP,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// Assert the TestDriver.ai Sandbox login page is displayed
|
|
16
|
-
const result = await testdriver.assert(
|
|
17
|
-
"A desktop is visible",
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
expect(result).toBeTruthy();
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Press Keys Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/press-keys.yaml
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
9
|
-
describe("Press Keys Test", () => {
|
|
10
|
-
it("should create tabs and navigate using keyboard shortcuts", async (context) => {
|
|
11
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
12
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
13
|
-
|
|
14
|
-
const signInButton = await testdriver.find(
|
|
15
|
-
"Sign In, black button below the password field",
|
|
16
|
-
);
|
|
17
|
-
await signInButton.click();
|
|
18
|
-
|
|
19
|
-
// Open new tab
|
|
20
|
-
await testdriver.pressKeys(["ctrl", "t"]);
|
|
21
|
-
|
|
22
|
-
// Poll for "Learn more" to appear
|
|
23
|
-
let learnMore = await testdriver.find("Learn more");
|
|
24
|
-
for (let i = 0; i < 10; i++) {
|
|
25
|
-
learnMore = await learnMore.find();
|
|
26
|
-
if (learnMore.found()) break;
|
|
27
|
-
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Open DevTools
|
|
31
|
-
await testdriver.pressKeys(["ctrl", "shift", "i"]);
|
|
32
|
-
|
|
33
|
-
// Poll for "Elements" to appear
|
|
34
|
-
let elements = await testdriver.find("Elements");
|
|
35
|
-
for (let i = 0; i < 10; i++) {
|
|
36
|
-
elements = await elements.find();
|
|
37
|
-
if (elements.found()) break;
|
|
38
|
-
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Open another tab and navigate
|
|
42
|
-
await testdriver.pressKeys(["ctrl", "t"]);
|
|
43
|
-
await testdriver.type("google.com");
|
|
44
|
-
await testdriver.pressKeys(["enter"]);
|
|
45
|
-
|
|
46
|
-
// Assert Google appears
|
|
47
|
-
const result = await testdriver.assert("google appears");
|
|
48
|
-
expect(result).toBeTruthy();
|
|
49
|
-
});
|
|
50
|
-
});
|
package/examples/prompt.test.mjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Prompt Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/prompt.yaml
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
9
|
-
describe.skip("Prompt Test", () => {
|
|
10
|
-
it("should execute AI-driven prompts", async (context) => {
|
|
11
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
12
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
// Note: The SDK doesn't have a direct equivalent to YAML prompts without commands.
|
|
16
|
-
// This would typically be handled by the AI agent interpreting natural language.
|
|
17
|
-
// For SDK usage, you need to use explicit commands.
|
|
18
|
-
|
|
19
|
-
// Original prompts were:
|
|
20
|
-
// 1. "log in"
|
|
21
|
-
// 2. "add an item to the cart"
|
|
22
|
-
// 3. "click on the cart icon"
|
|
23
|
-
// 4. "complete checkout"
|
|
24
|
-
|
|
25
|
-
// This test is skipped as it requires explicit SDK implementation
|
|
26
|
-
// You would need to implement these as explicit SDK calls
|
|
27
|
-
|
|
28
|
-
await testdriver.act("log in");
|
|
29
|
-
|
|
30
|
-
const result = await testdriver.assert("the testdriver sandbox is visible");
|
|
31
|
-
expect(result).toBeTruthy();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Scroll Keyboard Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/scroll-keyboard.yaml
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
9
|
-
describe("Scroll Keyboard Test", () => {
|
|
10
|
-
it("should navigate to webhamster.com and scroll with keyboard", async (context) => {
|
|
11
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
12
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
// Navigate to https://www.webhamster.com/
|
|
16
|
-
await testdriver.focusApplication("Google Chrome");
|
|
17
|
-
const urlBar = await testdriver.find(
|
|
18
|
-
"testdriver-sandbox.vercel.app/login, the URL in the omnibox showing the current page",
|
|
19
|
-
);
|
|
20
|
-
await urlBar.click();
|
|
21
|
-
await testdriver.pressKeys(["ctrl", "a"]);
|
|
22
|
-
await testdriver.type("https://www.webhamster.com/");
|
|
23
|
-
await testdriver.pressKeys(["enter"]);
|
|
24
|
-
|
|
25
|
-
// Scroll down with keyboard 1000 pixels
|
|
26
|
-
const heading = await testdriver.find(
|
|
27
|
-
"The Hamster Dance, large heading at top of page",
|
|
28
|
-
);
|
|
29
|
-
await heading.click();
|
|
30
|
-
await testdriver.scroll("down", { amount: 1000 });
|
|
31
|
-
|
|
32
|
-
// Assert the page is scrolled down
|
|
33
|
-
const result = await testdriver.assert("The text 'The Hamster Dance' is not visible on the webpage content. It's ok if it's visible in the tab title.");
|
|
34
|
-
|
|
35
|
-
expect(result).toBeTruthy();
|
|
36
|
-
});
|
|
37
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Scroll Until Image Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/scroll-until-image.yaml
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
9
|
-
describe("Scroll Until Image Test", () => {
|
|
10
|
-
it.skip("should scroll until brown colored house image appears", async (context) => {
|
|
11
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
12
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
// Navigate to Wikipedia page
|
|
16
|
-
await testdriver.pressKeys(["ctrl", "l"]);
|
|
17
|
-
await testdriver.type("https://en.wikipedia.org/wiki/Leonardo_da_Vinci");
|
|
18
|
-
await testdriver.pressKeys(["enter"]);
|
|
19
|
-
|
|
20
|
-
// sleep for 5 seconds
|
|
21
|
-
await new Promise((r) => setTimeout(r, 5000));
|
|
22
|
-
|
|
23
|
-
// Click on heading
|
|
24
|
-
const heading = await testdriver.find(
|
|
25
|
-
"Leonardo Da Vinci, the page heading",
|
|
26
|
-
0,
|
|
27
|
-
);
|
|
28
|
-
await heading.click();
|
|
29
|
-
|
|
30
|
-
// Scroll until image appears
|
|
31
|
-
await testdriver.scrollUntilImage("a brown colored house", "down", 10000);
|
|
32
|
-
|
|
33
|
-
// Assert image of brown colored house appears on screen
|
|
34
|
-
const result = await testdriver.assert(
|
|
35
|
-
"image of brown colored house appears on screen",
|
|
36
|
-
);
|
|
37
|
-
expect(result).toBeTruthy();
|
|
38
|
-
});
|
|
39
|
-
});
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Scroll Until Text Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/scroll-until-text.yaml
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Perform login flow for SauceLabs demo app
|
|
11
|
-
* @param {TestDriver} client - TestDriver client
|
|
12
|
-
* @param {string} username - Username (default: 'standard_user')
|
|
13
|
-
*/
|
|
14
|
-
async function performLogin(client, username = "standard_user") {
|
|
15
|
-
await client.focusApplication("Google Chrome");
|
|
16
|
-
const password = await client.extract("the password");
|
|
17
|
-
const usernameField = await client.find(
|
|
18
|
-
"username input",
|
|
19
|
-
);
|
|
20
|
-
await usernameField.click();
|
|
21
|
-
await client.type(username);
|
|
22
|
-
await client.pressKeys(["tab"]);
|
|
23
|
-
await client.type(password, { secret: true });
|
|
24
|
-
await client.pressKeys(["tab"]);
|
|
25
|
-
await client.pressKeys(["enter"]);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
describe("Scroll Until Text Test", () => {
|
|
29
|
-
it('should scroll until "testdriver socks" appears', async (context) => {
|
|
30
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
31
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
// Perform login first
|
|
35
|
-
await performLogin(testdriver);
|
|
36
|
-
|
|
37
|
-
// Scroll until text appears
|
|
38
|
-
await testdriver.focusApplication("Google Chrome");
|
|
39
|
-
|
|
40
|
-
await testdriver.find('TestDriver.ai Sandbox heading').click();
|
|
41
|
-
|
|
42
|
-
// Scroll until text appears
|
|
43
|
-
let found = false;
|
|
44
|
-
let scrollCount = 0;
|
|
45
|
-
const maxScrolls = 10;
|
|
46
|
-
|
|
47
|
-
while (!found && scrollCount < maxScrolls) {
|
|
48
|
-
const findResult = await testdriver.find("testdriver socks product text is fully visible");
|
|
49
|
-
|
|
50
|
-
if (findResult.found()) {
|
|
51
|
-
found = true;
|
|
52
|
-
} else {
|
|
53
|
-
await testdriver.scroll();
|
|
54
|
-
scrollCount++;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (!found) {
|
|
59
|
-
throw new Error(`Failed to find "testdriver socks" after ${maxScrolls} scrolls`);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Assert testdriver socks appears on screen
|
|
63
|
-
await testdriver.focusApplication("Google Chrome");
|
|
64
|
-
const result = await testdriver.assert("TestDriver Socks appears on screen");
|
|
65
|
-
expect(result).toBeTruthy();
|
|
66
|
-
});
|
|
67
|
-
});
|
package/examples/scroll.test.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Scroll Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/scroll.yaml
|
|
4
|
-
*
|
|
5
|
-
* UPDATED: Now using chrome preset for automatic setup
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { describe, expect, it } from "vitest";
|
|
9
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
10
|
-
|
|
11
|
-
describe("Scroll Test", () => {
|
|
12
|
-
it("should navigate and scroll down the page", async (context) => {
|
|
13
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
14
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
15
|
-
|
|
16
|
-
// Give Chrome a moment to fully render the UI
|
|
17
|
-
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
18
|
-
|
|
19
|
-
// Navigate to webhamster.com - just look for the domain, not the full path
|
|
20
|
-
const urlBar = await testdriver.find(
|
|
21
|
-
"testdriver-sandbox.vercel.app, the URL in the address bar",
|
|
22
|
-
);
|
|
23
|
-
await urlBar.click();
|
|
24
|
-
await testdriver.pressKeys(["ctrl", "a"]);
|
|
25
|
-
await testdriver.type("https://www.webhamster.com/");
|
|
26
|
-
await testdriver.pressKeys(["enter"]);
|
|
27
|
-
|
|
28
|
-
// Wait for page to load and click heading
|
|
29
|
-
const heading = await testdriver.find(
|
|
30
|
-
"The Hamster Dance, large heading at top of page",
|
|
31
|
-
);
|
|
32
|
-
await heading.click();
|
|
33
|
-
|
|
34
|
-
// Scroll down
|
|
35
|
-
await testdriver.scroll("down", { amount: 1000 });
|
|
36
|
-
|
|
37
|
-
// Assert page is scrolled
|
|
38
|
-
const result = await testdriver.assert("The text 'The Hamster Dance' is not visible on the webpage content. It's ok if it's visible in the tab title.");
|
|
39
|
-
expect(result).toBeTruthy();
|
|
40
|
-
});
|
|
41
|
-
});
|
package/examples/type.test.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
3
|
-
|
|
4
|
-
describe("Type Test", () => {
|
|
5
|
-
it("should enter standard_user in username field", async (context) => {
|
|
6
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
7
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
const usernameField = await testdriver.find(
|
|
11
|
-
"Username, input field for username",
|
|
12
|
-
);
|
|
13
|
-
await usernameField.click();
|
|
14
|
-
await testdriver.type("standard_user");
|
|
15
|
-
|
|
16
|
-
const result = await testdriver.assert(
|
|
17
|
-
'the username field contains "standard_user"',
|
|
18
|
-
);
|
|
19
|
-
expect(result).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it("should show validation message when clicking Sign In without password", async (context) => {
|
|
23
|
-
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
|
|
24
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
25
|
-
|
|
26
|
-
// First fill in username
|
|
27
|
-
const usernameField = await testdriver.find(
|
|
28
|
-
"Username, input field for username",
|
|
29
|
-
);
|
|
30
|
-
await usernameField.click();
|
|
31
|
-
await testdriver.type("standard_user");
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
const signInButton = await testdriver.find(
|
|
35
|
-
"Sign in, black button below the password field",
|
|
36
|
-
);
|
|
37
|
-
await signInButton.click();
|
|
38
|
-
|
|
39
|
-
await testdriver.focusApplication("Google Chrome");
|
|
40
|
-
const result = await testdriver.assert(
|
|
41
|
-
"Please fill out this field is visible near the password field",
|
|
42
|
-
);
|
|
43
|
-
expect(result).toBeTruthy();
|
|
44
|
-
});
|
|
45
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Windows Installer Example (Vitest)
|
|
3
|
-
*
|
|
4
|
-
* This example demonstrates how to download and install a Windows application
|
|
5
|
-
* using PowerShell commands, then launch and interact with it.
|
|
6
|
-
*
|
|
7
|
-
* Based on the v6 GitButler provisioning workflow.
|
|
8
|
-
*
|
|
9
|
-
* Run: TD_OS=windows npx vitest run examples/windows-installer.test.mjs
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { describe, it } from "vitest";
|
|
13
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
14
|
-
|
|
15
|
-
const isLinux = (process.env.TD_OS || "linux") === "linux";
|
|
16
|
-
|
|
17
|
-
describe("Windows App Installation", () => {
|
|
18
|
-
|
|
19
|
-
it.skipIf(isLinux)("should download, install, and launch GitButler on Windows", async (context) => {
|
|
20
|
-
// Alternative approach using provision.installer helper
|
|
21
|
-
const testdriver = TestDriver(context, {
|
|
22
|
-
ip: context.ip || process.env.TD_IP,
|
|
23
|
-
os: 'windows'
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// Download the MSI installer
|
|
27
|
-
const installerPath = await testdriver.provision.installer({
|
|
28
|
-
url: 'https://app.gitbutler.com/downloads/release/windows/x86_64/msi',
|
|
29
|
-
launch: false, // Don't auto-launch, we'll install manually
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
console.log('Installer downloaded to:', installerPath);
|
|
33
|
-
|
|
34
|
-
// Install the MSI silently (the file might not have an extension, so we try MSI first)
|
|
35
|
-
await testdriver.exec('pwsh',
|
|
36
|
-
`Start-Process msiexec.exe -ArgumentList "/i \`"${installerPath}\`" /qn /norestart" -Wait`,
|
|
37
|
-
120000
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
// Verify installation by checking if executable exists
|
|
41
|
-
const verifyScript = `
|
|
42
|
-
$exePath = "C:\\Program Files\\GitButler\\gitbutler-tauri.exe"
|
|
43
|
-
if (Test-Path $exePath) {
|
|
44
|
-
Write-Host "GitButler installed successfully at $exePath"
|
|
45
|
-
} else {
|
|
46
|
-
Write-Error "GitButler not found"
|
|
47
|
-
exit 1
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
await testdriver.exec('pwsh', verifyScript, 5000);
|
|
52
|
-
});
|
|
53
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
const BaseCommand = require("../lib/base.js");
|
|
2
|
-
const { createCommandDefinitions } = require("../../../agent/interface.js");
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Creates an oclif command class from a unified command definition
|
|
6
|
-
*/
|
|
7
|
-
function createOclifCommand(commandName) {
|
|
8
|
-
// Get the command definition once during class creation
|
|
9
|
-
const tempAgent = { workingDir: process.cwd() };
|
|
10
|
-
const definitions = createCommandDefinitions(tempAgent);
|
|
11
|
-
const commandDef = definitions[commandName];
|
|
12
|
-
|
|
13
|
-
const DynamicCommand = class extends BaseCommand {
|
|
14
|
-
async run() {
|
|
15
|
-
try {
|
|
16
|
-
const { args, flags } = await this.parse(this.constructor);
|
|
17
|
-
|
|
18
|
-
// Special handling for edit mode
|
|
19
|
-
if (commandName === "edit") {
|
|
20
|
-
await this.setupAgent(args.file, flags);
|
|
21
|
-
|
|
22
|
-
// Build environment for edit mode
|
|
23
|
-
await this.agent.buildEnv(flags);
|
|
24
|
-
|
|
25
|
-
// Start interactive mode
|
|
26
|
-
const ReadlineInterface = require("../../readline.js");
|
|
27
|
-
const readlineInterface = new ReadlineInterface(this.agent);
|
|
28
|
-
this.agent.readlineInterface = readlineInterface;
|
|
29
|
-
await readlineInterface.start();
|
|
30
|
-
} else {
|
|
31
|
-
// For run and generate commands, use the unified command system
|
|
32
|
-
let commandArgs;
|
|
33
|
-
if (commandName === "generate") {
|
|
34
|
-
// Generate command: pass prompt as first argument
|
|
35
|
-
await this.setupAgent(args.prompt, flags);
|
|
36
|
-
commandArgs = [args.prompt];
|
|
37
|
-
} else {
|
|
38
|
-
// Run and other commands use file argument
|
|
39
|
-
const fileArg = args.file || args.action || null;
|
|
40
|
-
await this.setupAgent(fileArg, flags);
|
|
41
|
-
commandArgs = [fileArg];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (commandName === "run") {
|
|
45
|
-
// Set error limit higher for run command
|
|
46
|
-
this.agent.errorLimit = 100;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Execute through unified command system
|
|
50
|
-
await this.agent.executeUnifiedCommand(
|
|
51
|
-
commandName,
|
|
52
|
-
commandArgs,
|
|
53
|
-
flags,
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
} catch (error) {
|
|
57
|
-
console.error(`Error executing ${commandName} command:`, error);
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// Set static properties directly on the class
|
|
64
|
-
DynamicCommand.description = commandDef?.description || "";
|
|
65
|
-
DynamicCommand.args = commandDef?.args || {};
|
|
66
|
-
DynamicCommand.flags = commandDef?.flags || {};
|
|
67
|
-
|
|
68
|
-
return DynamicCommand;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
module.exports = { createOclifCommand };
|
package/jsconfig.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "ESNext",
|
|
4
|
-
"moduleResolution": "bundler",
|
|
5
|
-
"target": "ES2022",
|
|
6
|
-
"checkJs": true,
|
|
7
|
-
"strict": false,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"baseUrl": ".",
|
|
11
|
-
"typeRoots": ["."]
|
|
12
|
-
},
|
|
13
|
-
"include": [
|
|
14
|
-
"**/*.js",
|
|
15
|
-
"**/*.mjs",
|
|
16
|
-
"**/*.d.ts",
|
|
17
|
-
"sdk.d.ts",
|
|
18
|
-
"lib/**/*.d.ts",
|
|
19
|
-
"interfaces/**/*.d.ts"
|
|
20
|
-
],
|
|
21
|
-
"exclude": [
|
|
22
|
-
"node_modules",
|
|
23
|
-
"dist",
|
|
24
|
-
"build"
|
|
25
|
-
]
|
|
26
|
-
}
|