@desplega.ai/qa-use 2.9.0 → 2.11.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/README.md +29 -10
- package/dist/lib/api/browser-types.d.ts +1 -0
- package/dist/lib/api/browser-types.d.ts.map +1 -1
- package/dist/lib/api/browser.d.ts.map +1 -1
- package/dist/lib/api/browser.js +3 -2
- package/dist/lib/api/browser.js.map +1 -1
- package/dist/lib/api/index.d.ts +1 -0
- package/dist/lib/api/index.d.ts.map +1 -1
- package/dist/lib/api/index.js +1 -0
- package/dist/lib/api/index.js.map +1 -1
- package/dist/lib/env/index.d.ts +5 -2
- package/dist/lib/env/index.d.ts.map +1 -1
- package/dist/lib/env/index.js +27 -5
- package/dist/lib/env/index.js.map +1 -1
- package/dist/lib/tunnel/index.d.ts.map +1 -1
- package/dist/lib/tunnel/index.js +10 -1
- package/dist/lib/tunnel/index.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/src/cli/commands/browser/create.d.ts.map +1 -1
- package/dist/src/cli/commands/browser/create.js +41 -12
- package/dist/src/cli/commands/browser/create.js.map +1 -1
- package/dist/src/cli/commands/info.d.ts.map +1 -1
- package/dist/src/cli/commands/info.js +7 -5
- package/dist/src/cli/commands/info.js.map +1 -1
- package/dist/src/cli/commands/setup.js +2 -2
- package/dist/src/cli/commands/setup.js.map +1 -1
- package/dist/src/cli/generated/docs-content.d.ts +1 -1
- package/dist/src/cli/generated/docs-content.d.ts.map +1 -1
- package/dist/src/cli/generated/docs-content.js +100 -13
- package/dist/src/cli/generated/docs-content.js.map +1 -1
- package/dist/src/cli/index.js +1 -2
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/lib/config.d.ts +12 -6
- package/dist/src/cli/lib/config.d.ts.map +1 -1
- package/dist/src/cli/lib/config.js +44 -26
- package/dist/src/cli/lib/config.js.map +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +14 -4
- package/dist/src/server.js.map +1 -1
- package/lib/api/browser-types.ts +1 -0
- package/lib/api/browser.test.ts +63 -4
- package/lib/api/browser.ts +3 -2
- package/lib/api/index.ts +2 -0
- package/lib/env/index.ts +33 -5
- package/lib/tunnel/index.ts +11 -1
- package/package.json +2 -1
|
@@ -23,6 +23,33 @@ Plugin commands (slash commands like \`/qa-use:verify\`) are **convenience short
|
|
|
23
23
|
- **CLI Workflow**: Step-by-step CLI commands (works for ALL harnesses)
|
|
24
24
|
- **Plugin Shortcut**: Optional slash command (convenience)
|
|
25
25
|
|
|
26
|
+
## Setup & Configuration
|
|
27
|
+
|
|
28
|
+
Before using any qa-use commands, verify configuration is in place:
|
|
29
|
+
|
|
30
|
+
\`\`\`bash
|
|
31
|
+
# Check current configuration (no-op if already configured)
|
|
32
|
+
qa-use setup
|
|
33
|
+
|
|
34
|
+
# Configure with API key (validates against server)
|
|
35
|
+
qa-use setup --api-key <key>
|
|
36
|
+
|
|
37
|
+
# View full configuration details
|
|
38
|
+
qa-use info
|
|
39
|
+
\`\`\`
|
|
40
|
+
|
|
41
|
+
**Environment Variables (alternative to config file):**
|
|
42
|
+
|
|
43
|
+
| Variable | Description |
|
|
44
|
+
|----------|-------------|
|
|
45
|
+
| \`QA_USE_API_KEY\` | API key for authentication |
|
|
46
|
+
| \`QA_USE_REGION\` | Region: \`us\` (default) or \`auto\` |
|
|
47
|
+
| \`QA_USE_API_URL\` | Override API base URL |
|
|
48
|
+
|
|
49
|
+
**Config file:** \`.qa-use.json\` in the project directory or \`~/.qa-use.json\` in the home directory. Precedence: env vars > project \`.qa-use.json\` > \`~/.qa-use.json\`.
|
|
50
|
+
|
|
51
|
+
**If you encounter "API key not configured", 401, or auth errors:** Run \`qa-use setup\` to check config state. NEVER fabricate or guess API keys.
|
|
52
|
+
|
|
26
53
|
## Core Workflow
|
|
27
54
|
|
|
28
55
|
### 1. Browser Control & Session Lifecycle
|
|
@@ -173,6 +200,7 @@ qa-use test diff login.yaml
|
|
|
173
200
|
| Command | Description |
|
|
174
201
|
|---------|-------------|
|
|
175
202
|
| \`qa-use browser create\` | Create remote browser session |
|
|
203
|
+
| \`qa-use browser create <url>\` | Create session and navigate to URL |
|
|
176
204
|
| \`qa-use browser create --tunnel\` | Create local browser with API tunnel |
|
|
177
205
|
| \`qa-use browser create --no-headless\` | Show browser window (tunnel mode only) |
|
|
178
206
|
| \`qa-use browser create --viewport <size>\` | Set viewport: \`desktop\`, \`tablet\`, \`mobile\` |
|
|
@@ -575,13 +603,17 @@ qa-use browser goto https://example.com --ws-url ws://localhost:12345/browser/ab
|
|
|
575
603
|
|
|
576
604
|
## Deep-Dive References
|
|
577
605
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
|
581
|
-
|
|
582
|
-
| [
|
|
583
|
-
| [
|
|
584
|
-
| [
|
|
606
|
+
Access any reference at runtime via the CLI: \`qa-use docs <topic>\`
|
|
607
|
+
|
|
608
|
+
| Topic | CLI Command | Description |
|
|
609
|
+
|-------|-------------|-------------|
|
|
610
|
+
| [browser-commands.md](references/browser-commands.md) | \`qa-use docs browser-commands\` | Complete browser CLI reference with all flags |
|
|
611
|
+
| [test-format.md](references/test-format.md) | \`qa-use docs test-format\` | Full test YAML specification |
|
|
612
|
+
| [localhost-testing.md](references/localhost-testing.md) | \`qa-use docs localhost-testing\` | Tunnel setup for local development |
|
|
613
|
+
| [failure-debugging.md](references/failure-debugging.md) | \`qa-use docs failure-debugging\` | Failure classification and diagnostics |
|
|
614
|
+
| [ci.md](references/ci.md) | \`qa-use docs ci\` | CI/CD integration patterns and examples |
|
|
615
|
+
|
|
616
|
+
Use \`qa-use docs --list\` to discover all available topics and templates.
|
|
585
617
|
|
|
586
618
|
## Templates
|
|
587
619
|
|
|
@@ -631,6 +663,38 @@ See [references/test-format.md](references/test-format.md) for complete specific
|
|
|
631
663
|
| \`test sync --pull\` | \`test sync pull\` (subcommand, not flag) |
|
|
632
664
|
| \`test sync --push\` | \`test sync push\` (subcommand, not flag) |
|
|
633
665
|
|
|
666
|
+
## Troubleshooting
|
|
667
|
+
|
|
668
|
+
When stuck or encountering unexpected errors, use the built-in documentation:
|
|
669
|
+
|
|
670
|
+
\`\`\`bash
|
|
671
|
+
# Check configuration state
|
|
672
|
+
qa-use setup
|
|
673
|
+
|
|
674
|
+
# Browse main documentation
|
|
675
|
+
qa-use docs
|
|
676
|
+
|
|
677
|
+
# List all available topics
|
|
678
|
+
qa-use docs --list
|
|
679
|
+
|
|
680
|
+
# Access specific topic
|
|
681
|
+
qa-use docs <topic>
|
|
682
|
+
\`\`\`
|
|
683
|
+
|
|
684
|
+
| Situation | Command |
|
|
685
|
+
|-----------|---------|
|
|
686
|
+
| Auth / API key errors | \`qa-use setup\` then \`qa-use docs\` |
|
|
687
|
+
| Unknown browser command | \`qa-use docs browser-commands\` |
|
|
688
|
+
| Test failures | \`qa-use docs failure-debugging\` |
|
|
689
|
+
| Localhost / tunnel issues | \`qa-use docs localhost-testing\` |
|
|
690
|
+
| Test YAML syntax | \`qa-use docs test-format\` |
|
|
691
|
+
| CI/CD setup | \`qa-use docs ci\` |
|
|
692
|
+
|
|
693
|
+
**Key rules:**
|
|
694
|
+
- ALWAYS consult \`qa-use docs\` before improvising workarounds
|
|
695
|
+
- NEVER fabricate API keys, tokens, URLs, or credentials
|
|
696
|
+
- If \`qa-use setup\` shows no config, report it — don't guess
|
|
697
|
+
|
|
634
698
|
## npx Alternative
|
|
635
699
|
|
|
636
700
|
All commands use \`qa-use\` assuming global install. For one-off use:
|
|
@@ -652,11 +716,12 @@ Complete reference for \`qa-use browser\` CLI commands.
|
|
|
652
716
|
Create a new browser session.
|
|
653
717
|
|
|
654
718
|
\`\`\`bash
|
|
655
|
-
qa-use browser create [options]
|
|
719
|
+
qa-use browser create [url] [options]
|
|
656
720
|
\`\`\`
|
|
657
721
|
|
|
658
|
-
| Flag | Description |
|
|
722
|
+
| Argument / Flag | Description |
|
|
659
723
|
|------|-------------|
|
|
724
|
+
| \`[url]\` | URL to navigate to after session is ready |
|
|
660
725
|
| \`--viewport <size>\` | Viewport size: \`desktop\` (1280x720), \`tablet\` (768x1024), \`mobile\` (375x667) |
|
|
661
726
|
| \`--tunnel\` | Run local browser with API tunnel (for localhost testing) |
|
|
662
727
|
| \`--headless\` | Run in headless mode (default with \`--tunnel\`) |
|
|
@@ -667,11 +732,13 @@ qa-use browser create [options]
|
|
|
667
732
|
**Examples:**
|
|
668
733
|
\`\`\`bash
|
|
669
734
|
qa-use browser create # Remote browser, default viewport
|
|
735
|
+
qa-use browser create https://example.com # Remote browser, navigate to URL
|
|
670
736
|
qa-use browser create --viewport mobile # Remote browser, mobile viewport
|
|
671
737
|
qa-use browser create --tunnel # Local headless browser with tunnel
|
|
672
738
|
qa-use browser create --tunnel --no-headless # Local visible browser for debugging
|
|
673
739
|
qa-use browser create --ws-url wss://... # Connect to existing browser
|
|
674
740
|
qa-use browser create --after-test-id <uuid> # Start session after running a test
|
|
741
|
+
qa-use browser create --after-test-id <uuid> https://example.com/dashboard # After login, go to dashboard
|
|
675
742
|
\`\`\`
|
|
676
743
|
|
|
677
744
|
**Starting after login (--after-test-id):**
|
|
@@ -1135,6 +1202,10 @@ qa-use browser click e3
|
|
|
1135
1202
|
|
|
1136
1203
|
# Watch the browser respond in real-time
|
|
1137
1204
|
\`\`\`
|
|
1205
|
+
|
|
1206
|
+
---
|
|
1207
|
+
|
|
1208
|
+
> **Runtime access:** \`qa-use docs browser-commands\` | All topics: \`qa-use docs --list\`
|
|
1138
1209
|
`,
|
|
1139
1210
|
},
|
|
1140
1211
|
ci: {
|
|
@@ -1479,6 +1550,10 @@ After verification, session artifacts are available:
|
|
|
1479
1550
|
| "No login test found" | Either upload a login test or the command will proceed without auth |
|
|
1480
1551
|
| "Session creation failed" | Check if \`QA_USE_API_KEY\` is valid and not expired |
|
|
1481
1552
|
| "gh: command not found" | \`gh\` should be pre-installed; ensure checkout step runs first |
|
|
1553
|
+
|
|
1554
|
+
---
|
|
1555
|
+
|
|
1556
|
+
> **Runtime access:** \`qa-use docs ci\` | All topics: \`qa-use docs --list\`
|
|
1482
1557
|
`,
|
|
1483
1558
|
},
|
|
1484
1559
|
'failure-debugging': {
|
|
@@ -1627,7 +1702,7 @@ curl https://your-app.com/health
|
|
|
1627
1702
|
qa-use browser logs network -s <session-id>
|
|
1628
1703
|
|
|
1629
1704
|
# 3. Verify credentials haven't expired
|
|
1630
|
-
# Check .qa-use
|
|
1705
|
+
# Check .qa-use.json or environment variables
|
|
1631
1706
|
\`\`\`
|
|
1632
1707
|
|
|
1633
1708
|
### Suggested Actions
|
|
@@ -1717,6 +1792,10 @@ git diff qa-tests/my-test.yaml
|
|
|
1717
1792
|
- Major workflow changes
|
|
1718
1793
|
- Missing features
|
|
1719
1794
|
- Authentication issues
|
|
1795
|
+
|
|
1796
|
+
---
|
|
1797
|
+
|
|
1798
|
+
> **Runtime access:** \`qa-use docs failure-debugging\` | All topics: \`qa-use docs --list\`
|
|
1720
1799
|
`,
|
|
1721
1800
|
},
|
|
1722
1801
|
'localhost-testing': {
|
|
@@ -1909,6 +1988,10 @@ qa-use browser goto http://localhost:3000
|
|
|
1909
1988
|
4. **Save WebSocket URL** - Copy it from tunnel output for reuse in \`--ws-url\`
|
|
1910
1989
|
|
|
1911
1990
|
5. **Clean up sessions** - Run \`qa-use browser close\` when done to free resources
|
|
1991
|
+
|
|
1992
|
+
---
|
|
1993
|
+
|
|
1994
|
+
> **Runtime access:** \`qa-use docs localhost-testing\` | All topics: \`qa-use docs --list\`
|
|
1912
1995
|
`,
|
|
1913
1996
|
},
|
|
1914
1997
|
'test-format': {
|
|
@@ -1939,7 +2022,7 @@ steps:
|
|
|
1939
2022
|
| Field | Description |
|
|
1940
2023
|
|-------|-------------|
|
|
1941
2024
|
| \`name\` | Human-readable test name |
|
|
1942
|
-
| \`app_config\` | App configuration ID from desplega.ai (or use default from \`.qa-use
|
|
2025
|
+
| \`app_config\` | App configuration ID from desplega.ai (or use default from \`.qa-use.json\`) |
|
|
1943
2026
|
| \`steps\` | Array of test steps |
|
|
1944
2027
|
|
|
1945
2028
|
## Optional Fields
|
|
@@ -2277,13 +2360,17 @@ qa-tests/
|
|
|
2277
2360
|
└── seed-data.yaml
|
|
2278
2361
|
\`\`\`
|
|
2279
2362
|
|
|
2280
|
-
Configure the test directory in \`.qa-use
|
|
2363
|
+
Configure the test directory in \`.qa-use.json\`:
|
|
2281
2364
|
|
|
2282
2365
|
\`\`\`json
|
|
2283
2366
|
{
|
|
2284
2367
|
"test_directory": "./qa-tests"
|
|
2285
2368
|
}
|
|
2286
2369
|
\`\`\`
|
|
2370
|
+
|
|
2371
|
+
---
|
|
2372
|
+
|
|
2373
|
+
> **Runtime access:** \`qa-use docs test-format\` | All topics: \`qa-use docs --list\`
|
|
2287
2374
|
`,
|
|
2288
2375
|
},
|
|
2289
2376
|
};
|
|
@@ -2345,7 +2432,7 @@ name: Basic Test
|
|
|
2345
2432
|
description: Navigate to a page and verify an element is visible
|
|
2346
2433
|
|
|
2347
2434
|
# Replace with your app config ID from desplega.ai
|
|
2348
|
-
# Or set default_app_config_id in .qa-use
|
|
2435
|
+
# Or set default_app_config_id in .qa-use.json
|
|
2349
2436
|
app_config: $APP_CONFIG_ID
|
|
2350
2437
|
|
|
2351
2438
|
steps:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-content.js","sourceRoot":"","sources":["../../../../src/cli/generated/docs-content.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"docs-content.js","sourceRoot":"","sources":["../../../../src/cli/generated/docs-content.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgMZ;KACE;IACD,aAAa,EAAE;QACb,KAAK,EAAE,uBAAuB;QAC9B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuXZ;KACE;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAuD;IAC3E,WAAW,EAAE;QACX,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CZ;KACE;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;CAuBZ;KACE;IACD,WAAW,EAAE;QACX,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDZ;KACE;CACF,CAAC"}
|
package/dist/src/cli/index.js
CHANGED
|
@@ -59,8 +59,7 @@ Command Groups:
|
|
|
59
59
|
|
|
60
60
|
Common Workflows:
|
|
61
61
|
# Verify a feature in the browser
|
|
62
|
-
qa-use browser create --no-headless
|
|
63
|
-
qa-use browser goto https://your-app.com
|
|
62
|
+
qa-use browser create --no-headless https://your-app.com
|
|
64
63
|
qa-use browser snapshot
|
|
65
64
|
qa-use browser click <ref>
|
|
66
65
|
qa-use browser close
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/index.ts"],"names":[],"mappings":";AAEA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAE/B,gCAAgC;AAChC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,uDAAuD,CAAC;KACpE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,oBAAoB;AACpB,OAAO,CAAC,UAA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AED,iDAAiD;AACjD,OAAO,CAAC,WAAW,CACjB,QAAQ,EACR;;;;;;;CAOD,CACA,CAAC;AAEF,iEAAiE;AACjE,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE;IAChC,MAAM,UAAU,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACjD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BP,UAAU,EAAE,CAAC;AACf,CAAC,CAAC,CAAC;AAEH,+BAA+B;AAC/B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Configuration file management for .qa-use
|
|
2
|
+
* Configuration file management for .qa-use.json
|
|
3
3
|
*/
|
|
4
4
|
export interface CliConfig {
|
|
5
5
|
env?: Record<string, string>;
|
|
@@ -15,16 +15,22 @@ export interface CliConfig {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Search for config file in current directory and home directory.
|
|
19
|
+
* Checks .qa-use.json first, falls back to .qa-use-tests.json (deprecated).
|
|
20
|
+
*/
|
|
21
|
+
export declare function findConfigFile(): Promise<string | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Load CLI configuration from .qa-use.json
|
|
19
24
|
*
|
|
20
25
|
* Priority order (highest to lowest):
|
|
21
|
-
* 1.
|
|
22
|
-
* 2.
|
|
23
|
-
* 3.
|
|
26
|
+
* 1. Environment variables (QA_USE_API_KEY, QA_USE_API_URL, etc.)
|
|
27
|
+
* 2. Project config file (.qa-use.json in cwd)
|
|
28
|
+
* 3. User config file (~/.qa-use.json in home)
|
|
29
|
+
* 4. Built-in defaults
|
|
24
30
|
*/
|
|
25
31
|
export declare function loadConfig(): Promise<CliConfig>;
|
|
26
32
|
/**
|
|
27
|
-
* Save configuration to .qa-use
|
|
33
|
+
* Save configuration to .qa-use.json in current directory
|
|
28
34
|
*/
|
|
29
35
|
export declare function saveConfig(config: CliConfig): Promise<void>;
|
|
30
36
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;CACH;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;CACH;AAqCD;;;GAGG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAU7D;AAED;;;;;;;;GAQG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,CA+CrD;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjE;AAED;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAErD"}
|
|
@@ -1,42 +1,61 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Configuration file management for .qa-use
|
|
2
|
+
* Configuration file management for .qa-use.json
|
|
3
3
|
*/
|
|
4
4
|
import * as fs from 'node:fs/promises';
|
|
5
5
|
import { homedir } from 'node:os';
|
|
6
6
|
import * as path from 'node:path';
|
|
7
|
-
const CONFIG_FILENAME = '.qa-use
|
|
7
|
+
const CONFIG_FILENAME = '.qa-use.json';
|
|
8
|
+
const LEGACY_CONFIG_FILENAME = '.qa-use-tests.json';
|
|
9
|
+
const legacyWarningShown = new Set();
|
|
8
10
|
/**
|
|
9
|
-
*
|
|
11
|
+
* Try to access a config file, checking the primary name first then the legacy name.
|
|
12
|
+
* Returns the resolved path or null. Logs a deprecation warning (once per dir) for legacy files.
|
|
10
13
|
*/
|
|
11
|
-
async function
|
|
12
|
-
|
|
13
|
-
const cwd = process.cwd();
|
|
14
|
-
const localConfig = path.join(cwd, CONFIG_FILENAME);
|
|
14
|
+
async function resolveConfigInDir(dir) {
|
|
15
|
+
const primary = path.join(dir, CONFIG_FILENAME);
|
|
15
16
|
try {
|
|
16
|
-
await fs.access(
|
|
17
|
-
return
|
|
17
|
+
await fs.access(primary);
|
|
18
|
+
return primary;
|
|
18
19
|
}
|
|
19
20
|
catch {
|
|
20
|
-
//
|
|
21
|
+
// Primary not found, try legacy
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
const homeConfig = path.join(homedir(), CONFIG_FILENAME);
|
|
23
|
+
const legacy = path.join(dir, LEGACY_CONFIG_FILENAME);
|
|
24
24
|
try {
|
|
25
|
-
await fs.access(
|
|
26
|
-
|
|
25
|
+
await fs.access(legacy);
|
|
26
|
+
if (!legacyWarningShown.has(dir)) {
|
|
27
|
+
legacyWarningShown.add(dir);
|
|
28
|
+
console.error(`Warning: ${legacy} is deprecated. Rename to ${CONFIG_FILENAME} — legacy support will be removed in a future version.`);
|
|
29
|
+
}
|
|
30
|
+
return legacy;
|
|
27
31
|
}
|
|
28
32
|
catch {
|
|
29
|
-
//
|
|
33
|
+
// Neither found
|
|
30
34
|
}
|
|
31
35
|
return null;
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
|
-
*
|
|
38
|
+
* Search for config file in current directory and home directory.
|
|
39
|
+
* Checks .qa-use.json first, falls back to .qa-use-tests.json (deprecated).
|
|
40
|
+
*/
|
|
41
|
+
export async function findConfigFile() {
|
|
42
|
+
const cwd = process.cwd();
|
|
43
|
+
const localConfig = await resolveConfigInDir(cwd);
|
|
44
|
+
if (localConfig)
|
|
45
|
+
return localConfig;
|
|
46
|
+
const homeConfig = await resolveConfigInDir(homedir());
|
|
47
|
+
if (homeConfig)
|
|
48
|
+
return homeConfig;
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Load CLI configuration from .qa-use.json
|
|
35
53
|
*
|
|
36
54
|
* Priority order (highest to lowest):
|
|
37
|
-
* 1.
|
|
38
|
-
* 2.
|
|
39
|
-
* 3.
|
|
55
|
+
* 1. Environment variables (QA_USE_API_KEY, QA_USE_API_URL, etc.)
|
|
56
|
+
* 2. Project config file (.qa-use.json in cwd)
|
|
57
|
+
* 3. User config file (~/.qa-use.json in home)
|
|
58
|
+
* 4. Built-in defaults
|
|
40
59
|
*/
|
|
41
60
|
export async function loadConfig() {
|
|
42
61
|
const configPath = await findConfigFile();
|
|
@@ -60,29 +79,28 @@ export async function loadConfig() {
|
|
|
60
79
|
console.error(error);
|
|
61
80
|
}
|
|
62
81
|
}
|
|
63
|
-
// Apply env block from config (
|
|
82
|
+
// Apply env block from config (only if shell env doesn't already set them)
|
|
64
83
|
if (config.env) {
|
|
65
84
|
for (const [key, value] of Object.entries(config.env)) {
|
|
66
85
|
if (!process.env[key]) {
|
|
67
|
-
// Don't override existing shell env vars
|
|
68
86
|
process.env[key] = value;
|
|
69
87
|
}
|
|
70
88
|
}
|
|
71
89
|
}
|
|
72
|
-
// Environment variables
|
|
73
|
-
if (
|
|
90
|
+
// Environment variables take precedence over config file values
|
|
91
|
+
if (process.env.QA_USE_API_KEY) {
|
|
74
92
|
config.api_key = process.env.QA_USE_API_KEY;
|
|
75
93
|
}
|
|
76
|
-
if (
|
|
94
|
+
if (process.env.QA_USE_API_URL) {
|
|
77
95
|
config.api_url = process.env.QA_USE_API_URL;
|
|
78
96
|
}
|
|
79
|
-
if (
|
|
97
|
+
if (process.env.QA_USE_DEFAULT_APP_CONFIG_ID) {
|
|
80
98
|
config.default_app_config_id = process.env.QA_USE_DEFAULT_APP_CONFIG_ID;
|
|
81
99
|
}
|
|
82
100
|
return config;
|
|
83
101
|
}
|
|
84
102
|
/**
|
|
85
|
-
* Save configuration to .qa-use
|
|
103
|
+
* Save configuration to .qa-use.json in current directory
|
|
86
104
|
*/
|
|
87
105
|
export async function saveConfig(config) {
|
|
88
106
|
const configPath = path.join(process.cwd(), CONFIG_FILENAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/cli/lib/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAgBlC,MAAM,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/cli/lib/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,IAA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ED,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;QAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC9C,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,CAAC;QAC7C,MAAM,CAAC,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;IAC1E,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAiB;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAChD,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,OAAO,CAAC,MAAM,cAAc,EAAE,CAAC,KAAK,IAAI,CAAC;AAC3C,CAAC"}
|
package/dist/src/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAiLnE,cAAM,cAAc;IAClB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,eAAe,CAAY;IAEnC,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkB;IAGjD,OAAO,CAAC,aAAa,CAA+B;IACpD,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,kBAAkB,CAAa;IAEvC,OAAO,CAAC,eAAe,CAA+B;;IAyBtD,OAAO,CAAC,oBAAoB;IA4B5B,OAAO,CAAC,iBAAiB;IA0BzB,OAAO,CAAC,qBAAqB;IAuH7B,OAAO,CAAC,gBAAgB;YAMV,sBAAsB;IA6BpC,OAAO,CAAC,iBAAiB;IAIzB;;OAEG;YACW,sBAAsB;IAmBpC;;;OAGG;YACW,wBAAwB;IAwJtC,OAAO,CAAC,iBAAiB;YAqBX,uBAAuB;IAwBrC,OAAO,CAAC,UAAU;YA+XJ,qBAAqB;YAmFrB,kBAAkB;YAuClB,iBAAiB;YA6CjB,oBAAoB;YAoEpB,2BAA2B;YAkF3B,qBAAqB;YA8ErB,oBAAoB;YAmGpB,4BAA4B;YAwI5B,yBAAyB;YAgGzB,0BAA0B;YA8F1B,uBAAuB;YA6GvB,6BAA6B;YAyE7B,yBAAyB;YAmFzB,sBAAsB;YAiDtB,0BAA0B;IA0BxC,OAAO,CAAC,cAAc;IAuEtB,OAAO,CAAC,YAAY;IA8DpB,OAAO,CAAC,qBAAqB;IA0C7B,OAAO,CAAC,sBAAsB;IAqF9B,OAAO,CAAC,iBAAiB;IAiGzB,OAAO,CAAC,aAAa;IAyHrB,SAAS,IAAI,MAAM;IAInB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAiBd,OAAO;CAUtB;AAGD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/src/server.js
CHANGED
|
@@ -524,6 +524,10 @@ ${status === 'idle' ? '⏸️ **Paused**: Session is idle, may need intervention
|
|
|
524
524
|
type: 'boolean',
|
|
525
525
|
description: 'Run browser in headless mode (default: false for better visibility)',
|
|
526
526
|
},
|
|
527
|
+
startUrl: {
|
|
528
|
+
type: 'string',
|
|
529
|
+
description: 'URL to navigate to after session is ready (overrides default page)',
|
|
530
|
+
},
|
|
527
531
|
},
|
|
528
532
|
required: ['task'],
|
|
529
533
|
},
|
|
@@ -546,6 +550,10 @@ ${status === 'idle' ? '⏸️ **Paused**: Session is idle, may need intervention
|
|
|
546
550
|
type: 'boolean',
|
|
547
551
|
description: 'Run browser in headless mode (default: false for development visibility)',
|
|
548
552
|
},
|
|
553
|
+
startUrl: {
|
|
554
|
+
type: 'string',
|
|
555
|
+
description: 'URL to navigate to after session is ready',
|
|
556
|
+
},
|
|
549
557
|
},
|
|
550
558
|
required: ['task'],
|
|
551
559
|
},
|
|
@@ -998,7 +1006,7 @@ ${status === 'idle' ? '⏸️ **Paused**: Session is idle, may need intervention
|
|
|
998
1006
|
}
|
|
999
1007
|
async handleStartAutomatedSession(params) {
|
|
1000
1008
|
try {
|
|
1001
|
-
const { url, task, dependencyId, headless = false } = params;
|
|
1009
|
+
const { url, task, dependencyId, headless = false, startUrl } = params;
|
|
1002
1010
|
// Ensure API key is set
|
|
1003
1011
|
const initResult = await this.ensureInitialized();
|
|
1004
1012
|
if (initResult.isError) {
|
|
@@ -1015,6 +1023,7 @@ ${status === 'idle' ? '⏸️ **Paused**: Session is idle, may need intervention
|
|
|
1015
1023
|
task,
|
|
1016
1024
|
wsUrl,
|
|
1017
1025
|
dependencyId,
|
|
1026
|
+
startUrl,
|
|
1018
1027
|
devMode: false, // Automated session
|
|
1019
1028
|
});
|
|
1020
1029
|
// Wrap browser and tunnel in a BrowserSession
|
|
@@ -1063,7 +1072,7 @@ ${status === 'idle' ? '⏸️ **Paused**: Session is idle, may need intervention
|
|
|
1063
1072
|
}
|
|
1064
1073
|
async handleStartDevSession(params) {
|
|
1065
1074
|
try {
|
|
1066
|
-
const { url, task, headless = false } = params;
|
|
1075
|
+
const { url, task, headless = false, startUrl } = params;
|
|
1067
1076
|
// Ensure API key is set
|
|
1068
1077
|
const initResult = await this.ensureInitialized();
|
|
1069
1078
|
if (initResult.isError) {
|
|
@@ -1079,6 +1088,7 @@ ${status === 'idle' ? '⏸️ **Paused**: Session is idle, may need intervention
|
|
|
1079
1088
|
url,
|
|
1080
1089
|
task,
|
|
1081
1090
|
wsUrl,
|
|
1091
|
+
startUrl,
|
|
1082
1092
|
devMode: true, // Development session
|
|
1083
1093
|
});
|
|
1084
1094
|
// Wrap browser and tunnel in a BrowserSession
|
|
@@ -2189,12 +2199,12 @@ Search and list all sessions (automated tests and development sessions) with pag
|
|
|
2189
2199
|
|
|
2190
2200
|
### start_automated_session
|
|
2191
2201
|
Start an automated E2E test session for QA flows. Returns sessionId for monitoring.
|
|
2192
|
-
- **Parameters**: task (required), url, dependencyId, headless (optional)
|
|
2202
|
+
- **Parameters**: task (required), url, dependencyId, headless, startUrl (optional)
|
|
2193
2203
|
- **Usage**: Run automated tests that execute without user interaction
|
|
2194
2204
|
|
|
2195
2205
|
### start_dev_session
|
|
2196
2206
|
Start an interactive development session for debugging and exploration.
|
|
2197
|
-
- **Parameters**: task (required), url, headless (optional)
|
|
2207
|
+
- **Parameters**: task (required), url, headless, startUrl (optional)
|
|
2198
2208
|
- **Usage**: Manual testing and debugging with browser control
|
|
2199
2209
|
|
|
2200
2210
|
### monitor_session
|