@test-lab-ai/cli 0.2.0 → 0.2.1
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 +4 -6
- package/bin/testlab.mjs +1 -2
- package/lib/config.mjs +1 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,10 +108,8 @@ convert each into the plan/fixture JSON above (explicit URL in the prompt,
|
|
|
108
108
|
secrets as `{{credentials.X}}`, generated data as `{{data.X.Y}}`) →
|
|
109
109
|
`testlab import`.
|
|
110
110
|
|
|
111
|
-
##
|
|
111
|
+
## Under the hood
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
[Import API](https://test-lab.ai/docs/api/test-plans); an agent can call that
|
|
117
|
-
directly instead of shelling out to the CLI.
|
|
113
|
+
Every command is a thin wrapper over the public
|
|
114
|
+
[Import API](https://test-lab.ai/docs/api/test-plans); an agent can call that
|
|
115
|
+
directly instead of shelling out to the CLI.
|
package/bin/testlab.mjs
CHANGED
|
@@ -50,9 +50,8 @@ Options:
|
|
|
50
50
|
--stdin Read the value (key/credential) from stdin
|
|
51
51
|
--force (login) re-authenticate even if a stored key still works
|
|
52
52
|
--dry-run (import) validate + print plan order without writing
|
|
53
|
-
--api-url <url> Target a non-prod instance (default https://www.test-lab.ai)
|
|
54
53
|
|
|
55
|
-
Get a key at
|
|
54
|
+
Get a key at https://test-lab.ai/admin/settings/api-keys · run \`testlab examples\` for JSON shapes`
|
|
56
55
|
|
|
57
56
|
function parse() {
|
|
58
57
|
return parseArgs({
|
package/lib/config.mjs
CHANGED
|
@@ -36,9 +36,6 @@ export function saveConfig(cfg) {
|
|
|
36
36
|
export function resolveAuth(flags) {
|
|
37
37
|
const cfg = loadConfig()
|
|
38
38
|
const apiKey = flags.key || process.env.TESTLAB_API_KEY || cfg.apiKey || null
|
|
39
|
-
const apiUrl = (flags["api-url"] ||
|
|
40
|
-
/\/+$/,
|
|
41
|
-
""
|
|
42
|
-
)
|
|
39
|
+
const apiUrl = (flags["api-url"] || cfg.apiUrl || DEFAULT_API_URL).replace(/\/+$/, "")
|
|
43
40
|
return { apiKey, apiUrl }
|
|
44
41
|
}
|