@copado/agentia-cli 1.1.0 → 1.3.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/CHANGELOG.md +69 -0
- package/README.md +3290 -2095
- package/dist/commands/ai/agent/ask.js +4 -4
- package/dist/commands/ai/agent/chat.js +4 -4
- package/dist/commands/auth/get.js +21 -1
- package/dist/commands/auth/set.js +13 -0
- package/dist/commands/auth/unset.js +37 -0
- package/dist/commands/cicd/cloud/commit.js +2 -2
- package/dist/commands/cicd/cloud/promote.js +19 -5
- package/dist/commands/cicd/credential/auth/status.js +38 -0
- package/dist/commands/cicd/credential/auth/web/login.js +54 -0
- package/dist/commands/cicd/credential/create.js +2 -2
- package/dist/commands/cicd/credential/list.js +15 -19
- package/dist/commands/cicd/credential/open.js +30 -0
- package/dist/commands/cicd/credential/update.js +11 -14
- package/dist/commands/cicd/data/commit/create.js +2 -2
- package/dist/commands/cicd/data/commit/list.js +2 -2
- package/dist/commands/cicd/data/dataset-file/content.js +2 -2
- package/dist/commands/cicd/data/dataset-file/list.js +2 -2
- package/dist/commands/cicd/data/filter/add.js +2 -2
- package/dist/commands/cicd/data/filter/delete.js +2 -2
- package/dist/commands/cicd/data/filter/list.js +2 -2
- package/dist/commands/cicd/data/filter/update.js +2 -2
- package/dist/commands/cicd/data/formula/create.js +2 -2
- package/dist/commands/cicd/data/formula/list.js +2 -2
- package/dist/commands/cicd/data/formula/update.js +2 -2
- package/dist/commands/cicd/data/records/match.js +2 -2
- package/dist/commands/cicd/data/records/search.js +2 -2
- package/dist/commands/cicd/data/sobject/fields.js +2 -2
- package/dist/commands/cicd/data/sobject/relationships.js +2 -2
- package/dist/commands/cicd/data/sync/apply.js +2 -2
- package/dist/commands/cicd/data/sync/preview-updates.js +2 -2
- package/dist/commands/cicd/data/template/convert-old.js +2 -2
- package/dist/commands/cicd/data/template/create.js +2 -2
- package/dist/commands/cicd/data/template/delete.js +2 -2
- package/dist/commands/cicd/data/template/get-detail.js +2 -2
- package/dist/commands/cicd/data/template/get.js +2 -2
- package/dist/commands/cicd/data/template/list.js +2 -2
- package/dist/commands/cicd/data/template/open.js +2 -2
- package/dist/commands/cicd/data/template/save-detail.js +2 -2
- package/dist/commands/cicd/environment/auth/status.js +36 -15
- package/dist/commands/cicd/environment/auth/web/login.js +22 -6
- package/dist/commands/cicd/environment/create.js +2 -2
- package/dist/commands/cicd/environment/get.js +2 -2
- package/dist/commands/cicd/environment/list.js +2 -2
- package/dist/commands/cicd/environment/open.js +8 -24
- package/dist/commands/cicd/environment/update.js +2 -2
- package/dist/commands/cicd/extension/create.js +2 -2
- package/dist/commands/cicd/extension/install.js +2 -2
- package/dist/commands/cicd/extension/package.js +2 -2
- package/dist/commands/cicd/extension/publish.js +2 -2
- package/dist/commands/cicd/extension/uninstall.js +2 -2
- package/dist/commands/cicd/extension/validate.js +2 -2
- package/dist/commands/cicd/extension-configuration/get.js +24 -0
- package/dist/commands/cicd/extension-configuration/list.js +49 -0
- package/dist/commands/cicd/extension-configuration/open.js +38 -0
- package/dist/commands/cicd/function/defaults.js +2 -2
- package/dist/commands/cicd/function/delete.js +2 -2
- package/dist/commands/cicd/function/get.js +2 -2
- package/dist/commands/cicd/function/list.js +2 -2
- package/dist/commands/cicd/function/open.js +2 -2
- package/dist/commands/cicd/function/result/get.js +2 -2
- package/dist/commands/cicd/function/result/log/get.js +2 -2
- package/dist/commands/cicd/function/run-local.js +2 -2
- package/dist/commands/cicd/function/run.js +2 -2
- package/dist/commands/cicd/function/upsert.js +2 -2
- package/dist/commands/cicd/health-check.js +2 -2
- package/dist/commands/cicd/job/get.js +2 -2
- package/dist/commands/cicd/job/kill.js +2 -2
- package/dist/commands/cicd/job/list.js +2 -2
- package/dist/commands/cicd/job/log/get.js +2 -2
- package/dist/commands/cicd/job/open.js +2 -2
- package/dist/commands/cicd/job/pause.js +2 -2
- package/dist/commands/cicd/job/result-file/get.js +2 -2
- package/dist/commands/cicd/job/result-file/list.js +2 -2
- package/dist/commands/cicd/job/resume.js +2 -2
- package/dist/commands/cicd/job/run.js +2 -2
- package/dist/commands/cicd/metadata/content/compare.js +2 -2
- package/dist/commands/cicd/metadata/content/get.js +3 -3
- package/dist/commands/cicd/metadata/dependency/list.js +45 -22
- package/dist/commands/cicd/metadata/explore.js +81 -0
- package/dist/commands/cicd/metadata/index/compare.js +2 -2
- package/dist/commands/cicd/metadata/list.js +5 -5
- package/dist/commands/cicd/metadata/refresh/deleted.js +3 -3
- package/dist/commands/cicd/metadata/refresh/run.js +4 -4
- package/dist/commands/cicd/metadata/refresh/status.js +4 -4
- package/dist/commands/cicd/notification/configure.js +2 -2
- package/dist/commands/cicd/notification/get.js +2 -2
- package/dist/commands/cicd/pipeline/automation/activate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/create.js +33 -0
- package/dist/commands/cicd/pipeline/automation/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/delete.js +45 -0
- package/dist/commands/cicd/pipeline/automation/get.js +32 -0
- package/dist/commands/cicd/pipeline/automation/list.js +38 -0
- package/dist/commands/cicd/pipeline/automation/open.js +38 -0
- package/dist/commands/cicd/pipeline/automation/update.js +38 -0
- package/dist/commands/cicd/pipeline/connection/create.js +2 -2
- package/dist/commands/cicd/pipeline/connection/delete.js +2 -2
- package/dist/commands/cicd/pipeline/connection/list.js +2 -2
- package/dist/commands/cicd/pipeline/connection/open.js +2 -2
- package/dist/commands/cicd/pipeline/connection/update.js +2 -2
- package/dist/commands/cicd/pipeline/create.js +2 -2
- package/dist/commands/cicd/pipeline/get.js +2 -2
- package/dist/commands/cicd/pipeline/list.js +2 -2
- package/dist/commands/cicd/pipeline/open.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/activate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/create.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/delete.js +45 -0
- package/dist/commands/cicd/pipeline/quality-gate/get.js +32 -0
- package/dist/commands/cicd/pipeline/quality-gate/list.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/open.js +38 -0
- package/dist/commands/cicd/pipeline/quality-gate/update.js +38 -0
- package/dist/commands/cicd/pipeline/stage-connection/create.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/delete.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/list.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/open.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/update.js +2 -2
- package/dist/commands/cicd/pipeline/update.js +2 -2
- package/dist/commands/cicd/project/create.js +2 -2
- package/dist/commands/cicd/project/default/get.js +2 -2
- package/dist/commands/cicd/project/default/set.js +2 -2
- package/dist/commands/cicd/project/default/unset.js +2 -2
- package/dist/commands/cicd/project/delete.js +2 -2
- package/dist/commands/cicd/project/get.js +2 -2
- package/dist/commands/cicd/project/list.js +2 -2
- package/dist/commands/cicd/project/open.js +2 -2
- package/dist/commands/cicd/project/update.js +2 -2
- package/dist/commands/cicd/promotion/conflict/get.js +2 -2
- package/dist/commands/cicd/promotion/conflict/list.js +2 -2
- package/dist/commands/cicd/promotion/conflict/resolve.js +2 -2
- package/dist/commands/cicd/promotion/conflict/unresolve.js +2 -2
- package/dist/commands/cicd/promotion/get.js +2 -2
- package/dist/commands/cicd/promotion/job-step/update.js +2 -2
- package/dist/commands/cicd/promotion/list.js +2 -2
- package/dist/commands/cicd/promotion/open.js +2 -2
- package/dist/commands/cicd/promotion/queue/list.js +28 -0
- package/dist/commands/cicd/promotion/queue/remove.js +37 -0
- package/dist/commands/cicd/promotion/run.js +2 -2
- package/dist/commands/cicd/repository/auth/https/configure.js +2 -2
- package/dist/commands/cicd/repository/auth/oauth/login.js +2 -2
- package/dist/commands/cicd/repository/auth/setup.js +2 -2
- package/dist/commands/cicd/repository/auth/ssh/configure.js +2 -2
- package/dist/commands/cicd/repository/create.js +2 -2
- package/dist/commands/cicd/repository/delete.js +2 -2
- package/dist/commands/cicd/repository/get.js +2 -2
- package/dist/commands/cicd/repository/list.js +2 -2
- package/dist/commands/cicd/repository/open.js +2 -2
- package/dist/commands/cicd/repository/reset.js +2 -2
- package/dist/commands/cicd/repository/update.js +2 -2
- package/dist/commands/cicd/repository/validate.js +2 -2
- package/dist/commands/cicd/stage/create.js +2 -2
- package/dist/commands/cicd/stage/delete.js +2 -2
- package/dist/commands/cicd/stage/get.js +2 -2
- package/dist/commands/cicd/stage/list.js +2 -2
- package/dist/commands/cicd/stage/open.js +2 -2
- package/dist/commands/cicd/stage/update.js +2 -2
- package/dist/commands/cicd/template/defaults.js +2 -2
- package/dist/commands/cicd/template/delete.js +2 -2
- package/dist/commands/cicd/template/get.js +2 -2
- package/dist/commands/cicd/template/list.js +2 -2
- package/dist/commands/cicd/template/upsert.js +2 -2
- package/dist/commands/cicd/user/get.js +2 -2
- package/dist/commands/cicd/work/ahead-behind.js +2 -2
- package/dist/commands/cicd/work/create.js +3 -2
- package/dist/commands/cicd/work/delete.js +2 -2
- package/dist/commands/cicd/work/deployment-step/create.js +2 -2
- package/dist/commands/cicd/work/deployment-step/delete.js +2 -2
- package/dist/commands/cicd/work/deployment-step/list.js +2 -2
- package/dist/commands/cicd/work/deployment-step/reorder.js +2 -2
- package/dist/commands/cicd/work/deployment-step/salesforce-flows.js +2 -2
- package/dist/commands/cicd/work/deployment-step/types.js +2 -2
- package/dist/commands/cicd/work/deployment-step/update.js +2 -2
- package/dist/commands/cicd/work/done.js +2 -2
- package/dist/commands/cicd/work/environment-sync.js +10 -9
- package/dist/commands/cicd/work/get.js +2 -2
- package/dist/commands/cicd/work/list.js +2 -2
- package/dist/commands/cicd/work/open.js +2 -2
- package/dist/commands/cicd/work/promote.js +2 -2
- package/dist/commands/cicd/work/publish.js +2 -2
- package/dist/commands/cicd/work/push.js +2 -2
- package/dist/commands/cicd/work/set.js +8 -6
- package/dist/commands/cicd/work/status.js +2 -2
- package/dist/commands/cicd/work/submit.js +5 -4
- package/dist/commands/cicd/work/test/apex.js +2 -2
- package/dist/commands/cicd/work/test.js +2 -2
- package/dist/commands/cicd/work/update.js +3 -2
- package/dist/commands/help-agent.js +15 -0
- package/dist/commands/help.js +38 -0
- package/dist/commands/history/clear.js +42 -0
- package/dist/commands/history/list.js +50 -0
- package/dist/commands/plugins/install.js +2 -5
- package/dist/commands/setup/skills/create.js +28 -2
- package/dist/commands/setup/skills/list.js +55 -0
- package/dist/commands/setup/skills/update.js +36 -3
- package/dist/commands/setup.js +3 -3
- package/dist/commands/support.js +15 -0
- package/dist/commands/testing/browser/execute.js +49 -0
- package/dist/commands/testing/browser/history.js +49 -0
- package/dist/commands/testing/browser/inspect.js +35 -0
- package/dist/commands/testing/browser/recorder.js +52 -0
- package/dist/commands/testing/browser/reports.js +33 -0
- package/dist/commands/testing/browser/screenshot.js +27 -0
- package/dist/commands/testing/browser/set-options.js +35 -0
- package/dist/commands/testing/browser/start.js +51 -0
- package/dist/commands/testing/browser/status.js +26 -0
- package/dist/commands/testing/browser/stop.js +34 -0
- package/dist/commands/testing/browser/view.js +35 -0
- package/dist/commands/testing/data-table/create.js +1 -2
- package/dist/commands/testing/data-table/delete.js +1 -2
- package/dist/commands/testing/data-table/export.js +2 -6
- package/dist/commands/testing/data-table/get.js +2 -4
- package/dist/commands/testing/data-table/list.js +1 -2
- package/dist/commands/testing/data-table/update.js +3 -4
- package/dist/commands/testing/job/create.js +26 -22
- package/dist/commands/testing/job/delete.js +2 -2
- package/dist/commands/testing/job/files/download.js +73 -0
- package/dist/commands/testing/job/files/list.js +43 -0
- package/dist/commands/testing/job/{upload.js → files/upload.js} +13 -9
- package/dist/commands/testing/job/get.js +2 -2
- package/dist/commands/testing/job/list.js +1 -1
- package/dist/commands/testing/job/refs.js +4 -4
- package/dist/commands/testing/job/run.js +134 -1
- package/dist/commands/testing/{build → job/runs}/abort.js +10 -8
- package/dist/commands/testing/job/runs/get.js +42 -0
- package/dist/commands/testing/{build → job/runs}/list.js +19 -10
- package/dist/commands/testing/{logs.js → job/runs/logs.js} +9 -6
- package/dist/commands/testing/{build → job/runs}/search.js +9 -7
- package/dist/commands/testing/job/schedule/get.js +5 -11
- package/dist/commands/testing/job/schedule/remove.js +3 -3
- package/dist/commands/testing/job/schedule/set.js +3 -3
- package/dist/commands/testing/job/update.js +22 -65
- package/dist/commands/testing/project/create.js +1 -17
- package/dist/commands/testing/project/get.js +0 -1
- package/dist/commands/testing/project/list.js +2 -2
- package/dist/commands/testing/project/permission/set.js +3 -7
- package/dist/commands/testing/project/permission/update.js +2 -2
- package/dist/commands/testing/robot/create.js +22 -25
- package/dist/commands/testing/robot/get.js +1 -1
- package/dist/commands/testing/robot/list.js +3 -3
- package/dist/commands/testing/robot/update.js +3 -3
- package/dist/commands/testing/user-parameter/create.js +3 -9
- package/dist/commands/testing/user-parameter/update.js +1 -7
- package/dist/commands/testing/variable/create.js +4 -9
- package/dist/commands/testing/variable/list.js +3 -3
- package/dist/commands/testing/variable/update.js +5 -12
- package/dist/help.js +17 -0
- package/dist/hooks/init/cicd-connection.js +59 -0
- package/dist/lib/agentia-command.js +69 -6
- package/dist/lib/ai-types.js +2 -1
- package/dist/lib/cicd-command.js +3 -0
- package/dist/lib/cicd-connection.js +22 -0
- package/dist/lib/cicd-gateway.js +2 -1
- package/dist/lib/claude-mcp-config.js +15 -0
- package/dist/lib/command-history-sanitization.js +9 -0
- package/dist/lib/command-history.js +11 -0
- package/dist/lib/command-output-buffer.js +6 -1
- package/dist/lib/credential-sync.js +1 -2
- package/dist/lib/defaults-store.js +6 -1
- package/dist/lib/dependency-from-changes.js +3 -1
- package/dist/lib/dependency-source-context.js +3 -0
- package/dist/lib/environment-auth-status.js +2 -1
- package/dist/lib/environment-auth.js +2 -1
- package/dist/lib/environment-credential-flags.js +3 -1
- package/dist/lib/environment-credential-operations.js +8 -2
- package/dist/lib/environment-types.js +3 -1
- package/dist/lib/extension-configuration-ops.js +4 -0
- package/dist/lib/extension-configuration-sanitize.js +7 -0
- package/dist/lib/extension-configuration-types.js +8 -0
- package/dist/lib/help-agent-command.js +3 -0
- package/dist/lib/help-agent-interaction-history.js +10 -0
- package/dist/lib/help-agent-session.js +3 -0
- package/dist/lib/http-proxy.js +13 -0
- package/dist/lib/mcp/ai-tools.js +3 -3
- package/dist/lib/mcp/command-id.js +2 -0
- package/dist/lib/mcp/pipeline-automation-quality-tools.js +452 -0
- package/dist/lib/mcp/result.js +41 -3
- package/dist/lib/mcp/server.js +73 -3
- package/dist/lib/mcp/testing-browser-tools.js +194 -0
- package/dist/lib/mcp/testing-tools.js +242 -552
- package/dist/lib/mcp/tool-annotations.js +59 -30
- package/dist/lib/mcp/tools.js +202 -66
- package/dist/lib/mcp/work-tools.js +18 -4
- package/dist/lib/metadata-explore.js +8 -0
- package/dist/lib/network-error.js +8 -0
- package/dist/lib/pipeline-automation-flags.js +12 -0
- package/dist/lib/pipeline-automation-ops.js +9 -0
- package/dist/lib/pipeline-automation-types.js +18 -0
- package/dist/lib/pipeline-lifecycle-id.js +3 -0
- package/dist/lib/pipeline-quality-gate-flags.js +12 -0
- package/dist/lib/pipeline-quality-gate-ops.js +9 -0
- package/dist/lib/pipeline-quality-gate-types.js +17 -0
- package/dist/lib/plugin-host/ai.js +2 -1
- package/dist/lib/plugin-skills.js +22 -0
- package/dist/lib/plugin-trust/gate.js +1 -2
- package/dist/lib/project-root.js +3 -1
- package/dist/lib/promotion-queue.js +5 -0
- package/dist/lib/promotion-run.js +2 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/salesforce-tooling-check.js +6 -0
- package/dist/lib/skill-packs.js +7 -0
- package/dist/lib/support-ai-context.js +11 -0
- package/dist/lib/support-ai-stream-parser.js +4 -0
- package/dist/lib/support-ai.js +9 -0
- package/dist/lib/testing-archive.js +9 -0
- package/dist/lib/testing-browser-command.js +6 -0
- package/dist/lib/testing-browser-operations.js +17 -0
- package/dist/lib/testing-browser-requests.js +11 -0
- package/dist/lib/testing-browser-robot.js +9 -0
- package/dist/lib/testing-browser-session.js +14 -0
- package/dist/lib/testing-browser-state.js +17 -0
- package/dist/lib/testing-browser-stream.js +7 -0
- package/dist/lib/testing-browser-types.js +3 -0
- package/dist/lib/testing-browser-viewer-key.js +7 -0
- package/dist/lib/testing-data-table.js +39 -0
- package/dist/lib/testing-execution.js +22 -0
- package/dist/lib/testing-flags.js +6 -2
- package/dist/lib/testing-gateway.js +5 -1
- package/dist/lib/testing-operations.js +9 -4
- package/dist/lib/testing-sanitization.js +3 -1
- package/dist/lib/testing-secret-input.js +2 -1
- package/dist/lib/testing-types.js +24 -3
- package/dist/lib/work-environment-sync.js +3 -1
- package/dist/lib/work-flags.js +6 -1
- package/dist/lib/work-local-development-flow.js +4 -0
- package/dist/lib/work-promote.js +2 -1
- package/dist/lib/work-submit-wait.js +3 -1
- package/oclif.manifest.json +8841 -7469
- package/package.json +45 -5
- package/templates/skills/agentia-ai/SKILL.md +9 -6
- package/templates/skills/agentia-ai/references/ai-agents.md +21 -3
- package/templates/skills/agentia-cicd/SKILL.md +8 -5
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +35 -13
- package/templates/skills/agentia-cicd/references/extensions.md +3 -0
- package/templates/skills/agentia-cicd/references/pipelines.md +36 -2
- package/templates/skills/agentia-cicd/references/promotions.md +10 -1
- package/templates/skills/agentia-cicd/references/work.md +20 -5
- package/templates/skills/agentia-metadata/SKILL.md +146 -0
- package/templates/skills/agentia-metadata/references/metadata-dependency.md +70 -0
- package/templates/skills/agentia-metadata/references/metadata-explore.md +146 -0
- package/templates/skills/agentia-testing/SKILL.md +12 -7
- package/templates/skills/agentia-testing/references/browser-testing.md +93 -0
- package/templates/skills/agentia-testing/references/flow-automation.md +112 -0
- package/templates/skills/agentia-testing/references/qforce.md +88 -0
- package/templates/skills/agentia-testing/references/qweb.md +103 -0
- package/templates/skills/agentia-testing/references/tests.md +31 -23
- package/dist/commands/testing/build/get.js +0 -38
- package/dist/commands/testing/build/latest.js +0 -40
- package/dist/commands/testing/build/logs.js +0 -47
- package/dist/commands/testing/build/run.js +0 -26
- package/dist/commands/testing/create.js +0 -2
- package/dist/commands/testing/job/download.js +0 -54
- package/dist/commands/testing/job/files.js +0 -34
- package/dist/commands/testing/live/continue.js +0 -21
- package/dist/commands/testing/live/execute.js +0 -43
- package/dist/commands/testing/live/history.js +0 -35
- package/dist/commands/testing/live/inspect.js +0 -30
- package/dist/commands/testing/live/interrupt.js +0 -21
- package/dist/commands/testing/live/recorder.js +0 -134
- package/dist/commands/testing/live/reports.js +0 -31
- package/dist/commands/testing/live/screenshot.js +0 -25
- package/dist/commands/testing/live/set-options.js +0 -28
- package/dist/commands/testing/live/start.js +0 -53
- package/dist/commands/testing/live/status.js +0 -27
- package/dist/commands/testing/live/stop.js +0 -38
- package/dist/commands/testing/live/view.js +0 -36
- package/dist/commands/testing/run.js +0 -26
- package/dist/commands/testing/status.js +0 -45
- package/dist/commands/testing/test/create.js +0 -2
- package/dist/commands/testing/test/logs.js +0 -2
- package/dist/commands/testing/test/run.js +0 -26
- package/dist/commands/testing/test/status.js +0 -2
- package/dist/commands/testing/test/update.js +0 -2
- package/dist/commands/testing/update.js +0 -65
- package/dist/lib/mcp/testing-live-tools.js +0 -215
- package/dist/lib/testing-data-command.js +0 -8
- package/dist/lib/testing-data-core.js +0 -20
- package/dist/lib/testing-data-export.js +0 -6
- package/dist/lib/testing-data-import.js +0 -6
- package/dist/lib/testing-data-io.js +0 -12
- package/dist/lib/testing-data-operations.js +0 -10
- package/dist/lib/testing-data-types.js +0 -4
- package/dist/lib/testing-live-command.js +0 -6
- package/dist/lib/testing-live-endpoints.js +0 -6
- package/dist/lib/testing-live-history.js +0 -7
- package/dist/lib/testing-live-operations.js +0 -19
- package/dist/lib/testing-live-recorder.js +0 -9
- package/dist/lib/testing-live-robot.js +0 -9
- package/dist/lib/testing-live-state.js +0 -5
- package/dist/lib/testing-live-types.js +0 -3
- package/dist/lib/testing-run-command.js +0 -3
- package/dist/lib/testing-schedule.js +0 -5
- package/dist/lib/testing-session.js +0 -5
- package/dist/lib/testing-watch.js +0 -4
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingBrowserCommonFlags, testingBrowserOptionalJobArg } from '../../../lib/testing-browser-command.js';
|
|
4
|
+
import { executeTestingLive } from '../../../lib/testing-browser-operations.js';
|
|
5
|
+
import { normalizeTestingLiveExecuteSource } from '../../../lib/testing-browser-requests.js';
|
|
6
|
+
import { TESTING_LIVE_MAX_ROBOT_BYTES } from '../../../lib/testing-browser-robot.js';
|
|
7
|
+
import { readBoundedStream } from '../../../lib/testing-secret-input.js';
|
|
8
|
+
export default class TestingBrowserExecute extends AgentiaCommand {
|
|
9
|
+
static args = testingBrowserOptionalJobArg;
|
|
10
|
+
static deprecateAliases = true;
|
|
11
|
+
static description = 'Execute Robot Framework keywords in an active CRT browser session';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --keyword GoTo --arg https://example.com',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --line "GoTo https://example.com"',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --file smoke.robot',
|
|
16
|
+
'cat smoke.robot | <%= config.bin %> <%= command.id %> --project <project-id> --stdin',
|
|
17
|
+
];
|
|
18
|
+
static flags = {
|
|
19
|
+
...testingBrowserCommonFlags,
|
|
20
|
+
arg: Flags.string({ description: 'Keyword argument. Repeat for multiple arguments.', multiple: true }),
|
|
21
|
+
file: Flags.string({ description: 'Robot Framework input file.' }),
|
|
22
|
+
keyword: Flags.string({ description: 'Robot Framework keyword name.' }),
|
|
23
|
+
line: Flags.string({ description: 'Raw Robot Framework keyword line. Repeat for multiple lines.', multiple: true }),
|
|
24
|
+
raw: Flags.boolean({ default: false, description: 'Treat file or stdin input as raw keyword lines.' }),
|
|
25
|
+
stdin: Flags.boolean({ default: false, description: 'Read Robot Framework lines or suite content from stdin.' }),
|
|
26
|
+
};
|
|
27
|
+
static hiddenAliases = ['testing:live:execute'];
|
|
28
|
+
async run() {
|
|
29
|
+
const { args, flags } = await this.parse(TestingBrowserExecute);
|
|
30
|
+
const source = normalizeTestingLiveExecuteSource({ file: flags.file, keyword: flags.keyword, lines: flags.line, stdin: flags.stdin }, { file: '--file', keyword: '--keyword', line: '--line', stdin: '--stdin' });
|
|
31
|
+
const stdinText = source === 'stdin'
|
|
32
|
+
? await readBoundedStream(process.stdin, 'Robot input', TESTING_LIVE_MAX_ROBOT_BYTES)
|
|
33
|
+
: undefined;
|
|
34
|
+
const result = await this.withSpinner('Executing CRT browser keyword', () => executeTestingLive({
|
|
35
|
+
args: flags.arg,
|
|
36
|
+
file: flags.file,
|
|
37
|
+
jobId: args['job-id'],
|
|
38
|
+
keyword: flags.keyword,
|
|
39
|
+
lines: flags.line,
|
|
40
|
+
projectId: flags.project,
|
|
41
|
+
raw: flags.raw,
|
|
42
|
+
sessionId: flags['session-id'],
|
|
43
|
+
text: stdinText,
|
|
44
|
+
}));
|
|
45
|
+
this.display(() => this.log(`Execution ${result.executionId}: ${result.status}`));
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingBrowserCommonFlags } from '../../../lib/testing-browser-command.js';
|
|
4
|
+
import { getTestingLiveHistory } from '../../../lib/testing-browser-operations.js';
|
|
5
|
+
import { formatTestingLiveHistoryLines } from '../../../lib/testing-browser-requests.js';
|
|
6
|
+
export default class TestingBrowserHistory extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
'job-id': Args.integer({ description: 'CRT job ID; defaults to the active session.', required: false }),
|
|
9
|
+
};
|
|
10
|
+
static deprecateAliases = true;
|
|
11
|
+
static description = 'Read local CRT browser execution history';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --limit 20 --json',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --keyword ClickText --lines-only',
|
|
15
|
+
];
|
|
16
|
+
static flags = {
|
|
17
|
+
...testingBrowserCommonFlags,
|
|
18
|
+
'include-failed': Flags.boolean({ default: false, description: 'Include failed keyword executions.' }),
|
|
19
|
+
job: Flags.integer({
|
|
20
|
+
description: 'CRT job ID override; defaults to the positional job-id or active session.',
|
|
21
|
+
min: 1,
|
|
22
|
+
}),
|
|
23
|
+
keyword: Flags.string({ description: 'Filter to records containing this Robot Framework keyword name.' }),
|
|
24
|
+
limit: Flags.integer({ default: 10, description: 'Maximum records to return.', max: 500, min: 1 }),
|
|
25
|
+
'lines-only': Flags.boolean({ default: false, description: 'Print only the keyword lines for script export.' }),
|
|
26
|
+
status: Flags.option({
|
|
27
|
+
description: 'Execution status filter.',
|
|
28
|
+
options: ['completed', 'failed', 'recorded'],
|
|
29
|
+
})(),
|
|
30
|
+
};
|
|
31
|
+
static hiddenAliases = ['testing:live:history'];
|
|
32
|
+
async run() {
|
|
33
|
+
const { args, flags } = await this.parse(TestingBrowserHistory);
|
|
34
|
+
const result = await getTestingLiveHistory({
|
|
35
|
+
includeFailed: flags['include-failed'],
|
|
36
|
+
jobId: args['job-id'] ?? flags.job,
|
|
37
|
+
keyword: flags.keyword,
|
|
38
|
+
limit: flags.limit,
|
|
39
|
+
projectId: flags.project,
|
|
40
|
+
status: flags.status,
|
|
41
|
+
});
|
|
42
|
+
this.display(() => {
|
|
43
|
+
for (const line of formatTestingLiveHistoryLines(result, flags['lines-only']))
|
|
44
|
+
this.log(line);
|
|
45
|
+
});
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingBrowserCommonFlags, testingBrowserOptionalJobArg } from '../../../lib/testing-browser-command.js';
|
|
4
|
+
import { inspectTestingLive } from '../../../lib/testing-browser-operations.js';
|
|
5
|
+
import { normalizeTestingLiveInspectDom } from '../../../lib/testing-browser-requests.js';
|
|
6
|
+
import { formatTestingRecord } from '../../../lib/testing-types.js';
|
|
7
|
+
export default class TestingBrowserInspect extends AgentiaCommand {
|
|
8
|
+
static args = testingBrowserOptionalJobArg;
|
|
9
|
+
static deprecateAliases = true;
|
|
10
|
+
static description = 'Inspect page state from an active CRT browser session';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --json',
|
|
13
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --dom --output page.html',
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
...testingBrowserCommonFlags,
|
|
17
|
+
dom: Flags.boolean({ default: false, description: 'Fetch raw page DOM; requires --output unless --json is used.' }),
|
|
18
|
+
output: Flags.string({ dependsOn: ['dom'], description: 'Output file path for raw DOM.' }),
|
|
19
|
+
};
|
|
20
|
+
static hiddenAliases = ['testing:live:inspect'];
|
|
21
|
+
async run() {
|
|
22
|
+
const { args, flags } = await this.parse(TestingBrowserInspect);
|
|
23
|
+
const dom = normalizeTestingLiveInspectDom({ dom: flags.dom, json: this.jsonEnabled(), output: flags.output });
|
|
24
|
+
const result = await this.withSpinner('Inspecting CRT browser session', () => inspectTestingLive({
|
|
25
|
+
...dom,
|
|
26
|
+
jobId: args['job-id'],
|
|
27
|
+
output: flags.output,
|
|
28
|
+
projectId: flags.project,
|
|
29
|
+
sessionId: flags['session-id'],
|
|
30
|
+
}));
|
|
31
|
+
this.display(() => this.log(flags.dom ? `DOM written to ${String(result.path)}.` : formatTestingRecord(result)));
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=inspect.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingBrowserCommonFlags, testingBrowserOptionalJobArg } from '../../../lib/testing-browser-command.js';
|
|
4
|
+
import { recordTestingLiveSession } from '../../../lib/testing-browser-operations.js';
|
|
5
|
+
export default class TestingBrowserRecorder extends AgentiaCommand {
|
|
6
|
+
static args = testingBrowserOptionalJobArg;
|
|
7
|
+
static deprecateAliases = true;
|
|
8
|
+
static description = 'Record CRT browser interactions as Robot Framework lines';
|
|
9
|
+
static enableJsonFlag = false;
|
|
10
|
+
static examples = [
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --output recorded.robot',
|
|
12
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --json',
|
|
13
|
+
];
|
|
14
|
+
static flags = {
|
|
15
|
+
...testingBrowserCommonFlags,
|
|
16
|
+
debug: Flags.boolean({ default: false, description: 'Print recorder event types and sizes.' }),
|
|
17
|
+
force: Flags.boolean({ default: false, description: 'Override an existing recorder lock for this session.' }),
|
|
18
|
+
json: Flags.boolean({ default: false, description: 'Stream each recorded keyword event as a JSON line.' }),
|
|
19
|
+
'no-enable': Flags.boolean({ default: false, description: 'Do not manage the server recorder toggle.' }),
|
|
20
|
+
output: Flags.string({ char: 'o', description: 'Robot file to append recorded keywords to.' }),
|
|
21
|
+
};
|
|
22
|
+
static hiddenAliases = ['testing:live:recorder'];
|
|
23
|
+
async run() {
|
|
24
|
+
const { args, flags } = await this.parse(TestingBrowserRecorder);
|
|
25
|
+
const controller = new AbortController();
|
|
26
|
+
const stop = () => controller.abort();
|
|
27
|
+
process.once('SIGINT', stop);
|
|
28
|
+
try {
|
|
29
|
+
return await recordTestingLiveSession({
|
|
30
|
+
appendRobot: flags.output,
|
|
31
|
+
force: flags.force,
|
|
32
|
+
jobId: args['job-id'],
|
|
33
|
+
noEnable: flags['no-enable'],
|
|
34
|
+
onError: (error) => this.warn(error.message),
|
|
35
|
+
onFrameSummary: flags.debug
|
|
36
|
+
? ({ bytes, type }) => this.warn(`Recorder event ${type} (${bytes} bytes).`)
|
|
37
|
+
: undefined,
|
|
38
|
+
onKeywordLine: flags.json ? undefined : (line) => this.log(line),
|
|
39
|
+
onReady: flags.json ? undefined : () => this.log('Recording CRT interactions. Press Ctrl-C to stop.'),
|
|
40
|
+
onRecorderEvent: flags.json ? (event) => this.log(JSON.stringify(event)) : undefined,
|
|
41
|
+
onTimeout: (message) => this.warn(`Recorder session timed out: ${message}`),
|
|
42
|
+
projectId: flags.project,
|
|
43
|
+
sessionId: flags['session-id'],
|
|
44
|
+
signal: controller.signal,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
process.removeListener('SIGINT', stop);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=recorder.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingBrowserCommonFlags, testingBrowserOptionalJobArg } from '../../../lib/testing-browser-command.js';
|
|
4
|
+
import { getTestingLiveReports } from '../../../lib/testing-browser-operations.js';
|
|
5
|
+
export default class TestingBrowserReports extends AgentiaCommand {
|
|
6
|
+
static args = testingBrowserOptionalJobArg;
|
|
7
|
+
static deprecateAliases = true;
|
|
8
|
+
static description = 'List or save report artifacts from an active CRT browser session';
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --project <project-id>',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --output-dir ./reports',
|
|
12
|
+
];
|
|
13
|
+
static flags = {
|
|
14
|
+
...testingBrowserCommonFlags,
|
|
15
|
+
'output-dir': Flags.string({ description: 'Directory for log.html, report.html, and output.xml.' }),
|
|
16
|
+
};
|
|
17
|
+
static hiddenAliases = ['testing:live:reports'];
|
|
18
|
+
async run() {
|
|
19
|
+
const { args, flags } = await this.parse(TestingBrowserReports);
|
|
20
|
+
const result = await this.withSpinner('Reading CRT browser reports', () => getTestingLiveReports({
|
|
21
|
+
jobId: args['job-id'],
|
|
22
|
+
outputDir: flags['output-dir'],
|
|
23
|
+
projectId: flags.project,
|
|
24
|
+
sessionId: flags['session-id'],
|
|
25
|
+
}));
|
|
26
|
+
this.display(() => {
|
|
27
|
+
for (const file of result.files)
|
|
28
|
+
this.log(`${file.name}: ${file.bytes} bytes${file.path === undefined ? '' : ` -> ${file.path}`}`);
|
|
29
|
+
});
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=reports.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingBrowserCommonFlags, testingBrowserOptionalJobArg } from '../../../lib/testing-browser-command.js';
|
|
4
|
+
import { saveTestingLiveScreenshot } from '../../../lib/testing-browser-operations.js';
|
|
5
|
+
export default class TestingBrowserScreenshot extends AgentiaCommand {
|
|
6
|
+
static args = testingBrowserOptionalJobArg;
|
|
7
|
+
static deprecateAliases = true;
|
|
8
|
+
static description = 'Save a CRT browser screenshot to a file';
|
|
9
|
+
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id> --output screenshot.png'];
|
|
10
|
+
static flags = {
|
|
11
|
+
...testingBrowserCommonFlags,
|
|
12
|
+
output: Flags.string({ char: 'o', description: 'Screenshot output file path.', required: true }),
|
|
13
|
+
};
|
|
14
|
+
static hiddenAliases = ['testing:live:screenshot'];
|
|
15
|
+
async run() {
|
|
16
|
+
const { args, flags } = await this.parse(TestingBrowserScreenshot);
|
|
17
|
+
const result = await this.withSpinner('Saving CRT browser screenshot', () => saveTestingLiveScreenshot({
|
|
18
|
+
jobId: args['job-id'],
|
|
19
|
+
output: flags.output,
|
|
20
|
+
projectId: flags.project,
|
|
21
|
+
sessionId: flags['session-id'],
|
|
22
|
+
}));
|
|
23
|
+
this.display(() => this.log(`Wrote ${result.bytes} bytes to ${result.path}.`));
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=screenshot.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { testingBrowserCommonFlags, testingBrowserOptionalJobArg, testingBrowserRecorderOptionFlags, } from '../../../lib/testing-browser-command.js';
|
|
3
|
+
import { setTestingLiveOptions } from '../../../lib/testing-browser-operations.js';
|
|
4
|
+
import { normalizeTestingLiveRecorderOptions } from '../../../lib/testing-browser-requests.js';
|
|
5
|
+
export default class TestingBrowserSetOptions extends AgentiaCommand {
|
|
6
|
+
static args = testingBrowserOptionalJobArg;
|
|
7
|
+
static deprecateAliases = true;
|
|
8
|
+
static description = 'Set CRT browser recorder options';
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --enable --scroll-text --table-keywords',
|
|
11
|
+
];
|
|
12
|
+
static flags = { ...testingBrowserCommonFlags, ...testingBrowserRecorderOptionFlags };
|
|
13
|
+
static hiddenAliases = ['testing:live:set-options'];
|
|
14
|
+
async run() {
|
|
15
|
+
const { args, flags } = await this.parse(TestingBrowserSetOptions);
|
|
16
|
+
const recorder = normalizeTestingLiveRecorderOptions({
|
|
17
|
+
enabled: flags.enable,
|
|
18
|
+
enableHealingContext: flags['healing-context'],
|
|
19
|
+
enableHoverText: flags['hover-text'],
|
|
20
|
+
enableScrollText: flags['scroll-text'],
|
|
21
|
+
enableSystemState: flags['system-state'],
|
|
22
|
+
enableVerifyText: flags['verify-text'],
|
|
23
|
+
preferTableKeywords: flags['table-keywords'],
|
|
24
|
+
});
|
|
25
|
+
const result = await setTestingLiveOptions({
|
|
26
|
+
jobId: args['job-id'],
|
|
27
|
+
projectId: flags.project,
|
|
28
|
+
recorder,
|
|
29
|
+
sessionId: flags['session-id'],
|
|
30
|
+
});
|
|
31
|
+
this.display(() => this.log('CRT browser recorder options updated.'));
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=set-options.js.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingBrowserCommonFlags } from '../../../lib/testing-browser-command.js';
|
|
4
|
+
import { startTestingLive } from '../../../lib/testing-browser-operations.js';
|
|
5
|
+
import { normalizeTestingLiveStartScreen } from '../../../lib/testing-browser-requests.js';
|
|
6
|
+
import { TESTING_LIVE_LIBRARIES } from '../../../lib/testing-browser-types.js';
|
|
7
|
+
export default class TestingBrowserStart extends AgentiaCommand {
|
|
8
|
+
static args = {
|
|
9
|
+
'job-id': Args.integer({ description: 'CRT job ID.', required: true }),
|
|
10
|
+
};
|
|
11
|
+
static deprecateAliases = true;
|
|
12
|
+
static description = 'Start and bootstrap a Copado Robotic Testing browser session';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --library QForce --screen 1920x1080x24 --json',
|
|
16
|
+
];
|
|
17
|
+
static flags = {
|
|
18
|
+
...testingBrowserCommonFlags,
|
|
19
|
+
file: Flags.string({ description: 'Robot Framework file used to bootstrap the session.' }),
|
|
20
|
+
'jap-ime': Flags.boolean({ default: false, description: 'Enable Japanese IME in the browser session.' }),
|
|
21
|
+
library: Flags.option({
|
|
22
|
+
default: 'QWeb',
|
|
23
|
+
description: 'Robot Framework library to bootstrap.',
|
|
24
|
+
options: [...TESTING_LIVE_LIBRARIES],
|
|
25
|
+
})(),
|
|
26
|
+
'no-bootstrap': Flags.boolean({ default: false, description: 'Create the host without readiness/bootstrap calls.' }),
|
|
27
|
+
'no-browser': Flags.boolean({ default: false, description: 'Do not open Chrome during QWeb/QForce bootstrap.' }),
|
|
28
|
+
screen: Flags.string({ description: 'Session screen as WIDTHxHEIGHTxDEPTH.' }),
|
|
29
|
+
timeout: Flags.integer({ default: 120, description: 'Readiness timeout in seconds.', min: 1 }),
|
|
30
|
+
viewport: Flags.string({ description: 'Session viewport as WIDTHxHEIGHT (24-bit depth).' }),
|
|
31
|
+
};
|
|
32
|
+
static hiddenAliases = ['testing:live:start'];
|
|
33
|
+
async run() {
|
|
34
|
+
const { args, flags } = await this.parse(TestingBrowserStart);
|
|
35
|
+
const screen = normalizeTestingLiveStartScreen({ screen: flags.screen, viewport: flags.viewport });
|
|
36
|
+
const result = await this.withSpinner('Starting CRT browser session', () => startTestingLive({
|
|
37
|
+
file: flags.file,
|
|
38
|
+
japIme: flags['jap-ime'],
|
|
39
|
+
jobId: args['job-id'],
|
|
40
|
+
library: flags.library,
|
|
41
|
+
noBootstrap: flags['no-bootstrap'],
|
|
42
|
+
noBrowser: flags['no-browser'],
|
|
43
|
+
projectId: flags.project,
|
|
44
|
+
screen,
|
|
45
|
+
timeoutMs: flags.timeout * 1000,
|
|
46
|
+
}));
|
|
47
|
+
this.display(() => this.log(`CRT browser session ${result.sessionId} is ready for job ${result.jobId}.`));
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=start.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { testingBrowserCommonFlags, testingBrowserOptionalJobArg } from '../../../lib/testing-browser-command.js';
|
|
3
|
+
import { getTestingLiveStatus } from '../../../lib/testing-browser-operations.js';
|
|
4
|
+
export default class TestingBrowserStatus extends AgentiaCommand {
|
|
5
|
+
static args = testingBrowserOptionalJobArg;
|
|
6
|
+
static deprecateAliases = true;
|
|
7
|
+
static description = 'Inspect status for the active CRT browser session';
|
|
8
|
+
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id> --json'];
|
|
9
|
+
static flags = testingBrowserCommonFlags;
|
|
10
|
+
static hiddenAliases = ['testing:live:status'];
|
|
11
|
+
async run() {
|
|
12
|
+
const { args, flags } = await this.parse(TestingBrowserStatus);
|
|
13
|
+
const result = await this.withSpinner('Reading CRT browser status', () => getTestingLiveStatus({
|
|
14
|
+
jobId: args['job-id'],
|
|
15
|
+
projectId: flags.project,
|
|
16
|
+
sessionId: flags['session-id'],
|
|
17
|
+
}));
|
|
18
|
+
this.display(() => {
|
|
19
|
+
this.log(`Session: ${result.metadata.sessionId} (${result.metadata.status})`);
|
|
20
|
+
this.log(`Browser started: ${result.status.env.isBrowserStarted}`);
|
|
21
|
+
this.log(`Executor running: ${result.status.session.isRobotExecutorRunning}`);
|
|
22
|
+
});
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingBrowserCommonFlags, testingBrowserOptionalJobArg } from '../../../lib/testing-browser-command.js';
|
|
4
|
+
import { stopTestingLive } from '../../../lib/testing-browser-operations.js';
|
|
5
|
+
import { testingLiveStopConfirmOptions } from '../../../lib/testing-browser-requests.js';
|
|
6
|
+
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
7
|
+
export default class TestingBrowserStop extends AgentiaCommand {
|
|
8
|
+
static args = testingBrowserOptionalJobArg;
|
|
9
|
+
static deprecateAliases = true;
|
|
10
|
+
static description = 'Stop the active Copado Robotic Testing browser session';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> <%= command.id %> --project <project-id>',
|
|
13
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --yes --json',
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
...testingBrowserCommonFlags,
|
|
17
|
+
yes: Flags.boolean({ char: 'y', default: false, description: 'Confirm browser session shutdown.' }),
|
|
18
|
+
};
|
|
19
|
+
static hiddenAliases = ['testing:live:stop'];
|
|
20
|
+
async run() {
|
|
21
|
+
const { args, flags } = await this.parse(TestingBrowserStop);
|
|
22
|
+
const confirmed = await confirmTestingAction(testingLiveStopConfirmOptions({ json: this.jsonEnabled(), yes: flags.yes }));
|
|
23
|
+
if (!confirmed)
|
|
24
|
+
return { stopped: false };
|
|
25
|
+
const result = await this.withSpinner('Stopping CRT browser session', () => stopTestingLive({
|
|
26
|
+
jobId: args['job-id'],
|
|
27
|
+
projectId: flags.project,
|
|
28
|
+
sessionId: flags['session-id'],
|
|
29
|
+
}));
|
|
30
|
+
this.display(() => this.log(`Stopped CRT browser session ${result.sessionId}.`));
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=stop.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { openUrl } from '../../../lib/open-browser.js';
|
|
4
|
+
import { testingBrowserCommonFlags } from '../../../lib/testing-browser-command.js';
|
|
5
|
+
import { testingBrowserViewUrl } from '../../../lib/testing-browser-operations.js';
|
|
6
|
+
export default class TestingBrowserView extends AgentiaCommand {
|
|
7
|
+
static deprecateAliases = true;
|
|
8
|
+
static description = 'Open the CRT browser session page';
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --project <project-id>',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --project <project-id> --no-open --json',
|
|
12
|
+
];
|
|
13
|
+
static flags = {
|
|
14
|
+
...testingBrowserCommonFlags,
|
|
15
|
+
'no-open': Flags.boolean({ default: false, description: 'Return the session URL without opening a browser.' }),
|
|
16
|
+
};
|
|
17
|
+
static hiddenAliases = ['testing:live:view'];
|
|
18
|
+
async run() {
|
|
19
|
+
const { flags } = await this.parse(TestingBrowserView);
|
|
20
|
+
if (this.jsonEnabled() && !flags['no-open']) {
|
|
21
|
+
throw new Error('CRT browser view cannot open a browser with --json. Re-run with --no-open.');
|
|
22
|
+
}
|
|
23
|
+
const url = await testingBrowserViewUrl({
|
|
24
|
+
projectId: flags.project,
|
|
25
|
+
sessionId: flags['session-id'],
|
|
26
|
+
});
|
|
27
|
+
if (!flags['no-open'])
|
|
28
|
+
await openUrl(url);
|
|
29
|
+
this.display(() => {
|
|
30
|
+
this.log(url);
|
|
31
|
+
});
|
|
32
|
+
return { access: 'authenticated-page-only', opened: !flags['no-open'], url };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
3
|
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
4
|
-
import { formatTestingDataTableHuman, parseTestingDataTopics, prepareTestingDataInput, testingDataInputFlags, testingDataJobFlag, } from '../../../lib/testing-data-
|
|
5
|
-
import { createTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
4
|
+
import { createTestingDataTable, formatTestingDataTableHuman, parseTestingDataTopics, prepareTestingDataInput, testingDataInputFlags, testingDataJobFlag, } from '../../../lib/testing-data-table.js';
|
|
6
5
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
7
6
|
export default class TestingDataTableCreate extends AgentiaCommand {
|
|
8
7
|
static description = 'Create a Copado Robotic Testing data table';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
3
|
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
4
|
-
import { testingDataJobFlag } from '../../../lib/testing-data-
|
|
5
|
-
import { deleteTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
4
|
+
import { deleteTestingDataTable, testingDataJobFlag } from '../../../lib/testing-data-table.js';
|
|
6
5
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
7
6
|
export default class TestingDataTableDelete extends AgentiaCommand {
|
|
8
7
|
static args = {
|
|
@@ -2,11 +2,7 @@ import { Args, Flags } from '@oclif/core';
|
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
4
4
|
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
5
|
-
import { testingDataJobFlag, testingDataRevisionFlag } from '../../../lib/testing-data-
|
|
6
|
-
import { parseTestingDatasetSelector, sliceTestingDataTable, unwrapTestingDataHeaders, } from '../../../lib/testing-data-core.js';
|
|
7
|
-
import { normalizeTestingDataPath, writeTestingDataFile } from '../../../lib/testing-data-export.js';
|
|
8
|
-
import { getTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
9
|
-
import { TESTING_DATA_EXPORT_FORMATS } from '../../../lib/testing-data-types.js';
|
|
5
|
+
import { getTestingDataTable, normalizeTestingDataPath, selectTestingDataTableDatasets, TESTING_DATA_EXPORT_FORMATS, testingDataJobFlag, testingDataRevisionFlag, unwrapTestingDataHeaders, writeTestingDataFile, } from '../../../lib/testing-data-table.js';
|
|
10
6
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
11
7
|
export default class TestingDataTableExport extends AgentiaCommand {
|
|
12
8
|
static args = {
|
|
@@ -48,7 +44,7 @@ export default class TestingDataTableExport extends AgentiaCommand {
|
|
|
48
44
|
tableId: args.id,
|
|
49
45
|
version: flags.revision,
|
|
50
46
|
}));
|
|
51
|
-
const selected =
|
|
47
|
+
const selected = selectTestingDataTableDatasets(table, flags.datasets);
|
|
52
48
|
if (selected.data === undefined)
|
|
53
49
|
throw new Error(`Data table ${args.id} has no data to export.`);
|
|
54
50
|
const result = await writeTestingDataFile(output, unwrapTestingDataHeaders(selected.data), flags.format);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { formatTestingDataTableHuman, testingDataJobFlag, testingDataRevisionFlag, } from '../../../lib/testing-data-
|
|
4
|
-
import { parseTestingDatasetSelector, sliceTestingDataTable } from '../../../lib/testing-data-core.js';
|
|
5
|
-
import { getTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
3
|
+
import { formatTestingDataTableHuman, getTestingDataTable, selectTestingDataTableDatasets, testingDataJobFlag, testingDataRevisionFlag, } from '../../../lib/testing-data-table.js';
|
|
6
4
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
7
5
|
export default class TestingDataTableGet extends AgentiaCommand {
|
|
8
6
|
static args = {
|
|
@@ -27,7 +25,7 @@ export default class TestingDataTableGet extends AgentiaCommand {
|
|
|
27
25
|
tableId: args.id,
|
|
28
26
|
version: flags.revision,
|
|
29
27
|
}));
|
|
30
|
-
const selected =
|
|
28
|
+
const selected = selectTestingDataTableDatasets(table, flags.datasets);
|
|
31
29
|
this.display(() => this.log(formatTestingDataTableHuman(selected)));
|
|
32
30
|
return { projectId: flags.project, table: selected };
|
|
33
31
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingDataJobFlag, testingDataRevisionFlag } from '../../../lib/testing-data-
|
|
4
|
-
import { listTestingDataTables } from '../../../lib/testing-data-operations.js';
|
|
3
|
+
import { listTestingDataTables, testingDataJobFlag, testingDataRevisionFlag } from '../../../lib/testing-data-table.js';
|
|
5
4
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
6
5
|
import { formatTestingTable } from '../../../lib/testing-types.js';
|
|
7
6
|
export default class TestingDataTableList extends AgentiaCommand {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
3
|
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
4
|
-
import { formatTestingDataTableHuman, parseTestingDataTopics, prepareTestingDataInput, testingDataInputFlags, testingDataJobFlag, } from '../../../lib/testing-data-
|
|
5
|
-
import { updateTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
4
|
+
import { formatTestingDataTableHuman, parseTestingDataTopics, prepareTestingDataInput, testingDataInputFlags, testingDataJobFlag, updateTestingDataTable, } from '../../../lib/testing-data-table.js';
|
|
6
5
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
7
6
|
export default class TestingDataTableUpdate extends AgentiaCommand {
|
|
8
7
|
static args = {
|
|
@@ -29,7 +28,7 @@ export default class TestingDataTableUpdate extends AgentiaCommand {
|
|
|
29
28
|
const { args, flags } = await this.parse(TestingDataTableUpdate);
|
|
30
29
|
const hasData = flags.file !== undefined || flags['json-data'] !== undefined || flags.stdin;
|
|
31
30
|
const data = hasData ? await prepareTestingDataInput(flags) : undefined;
|
|
32
|
-
const topics = flags.topics === undefined ? undefined : parseTestingDataTopics(flags.topics) ?? [];
|
|
31
|
+
const topics = flags.topics === undefined ? undefined : (parseTestingDataTopics(flags.topics) ?? []);
|
|
33
32
|
const aiGenerated = flags['ai-generated'] === undefined ? undefined : flags['ai-generated'] === 'true';
|
|
34
33
|
if (data === undefined && topics === undefined && flags['default-row'] === undefined && aiGenerated === undefined) {
|
|
35
34
|
this.error('Provide at least one update: --file/--json-data/--stdin, --topics, --default-row, or --ai-generated.', {
|
|
@@ -37,7 +36,7 @@ export default class TestingDataTableUpdate extends AgentiaCommand {
|
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
38
|
if (data !== undefined)
|
|
40
|
-
this.display(() => this.log(`Upload preview\n${formatTestingDataTableHuman({ data })}`));
|
|
39
|
+
this.display(() => this.log(`Upload preview\n${formatTestingDataTableHuman({ data, id: args.id })}`));
|
|
41
40
|
const confirmed = await confirmTestingAction({
|
|
42
41
|
action: 'Data-table update',
|
|
43
42
|
json: this.jsonEnabled(),
|