Discord Username / User ID
interferon0
What does this improvement do?
There is no way to persist a default --output, --endpoint-url, or project id; every non-credential setting is flag-or-env only. The path is already half-built: defaultConfigPath() returns ~/.testsprite/config and has a unit test, but loadConfig() never reads it. Wire the config file in as the lowest-precedence layer (flag > env > config-file > built-in default), so "this repo speaks JSON to this endpoint" can be stated once. This mirrors the aws-cli split (credentials in one file, settings in another) that this repo has half-built.
Details / implementation notes
defaultConfigPath() at src/lib/config.ts:20 is defined, but loadConfig() (config.ts:35-46) resolves only flag > env > credentials file. Reuse the existing hardened INI parser parseCredentials() (src/lib/credentials.ts; null-prototype + prototype-pollution guards) to read a [default]/[profile x] section, and insert one layer into loadConfig's cascade below env. Composes with the existing TESTSPRITE_PROJECT_ID. Document the precedence and extend the DOCUMENTATION.md configuration tables. No new dependency. Tests: config-file value used when flag/env absent; flag and env override it. PR to follow once assigned.
Confirmations
Discord Username / User ID
interferon0
What does this improvement do?
There is no way to persist a default --output, --endpoint-url, or project id; every non-credential setting is flag-or-env only. The path is already half-built: defaultConfigPath() returns ~/.testsprite/config and has a unit test, but loadConfig() never reads it. Wire the config file in as the lowest-precedence layer (flag > env > config-file > built-in default), so "this repo speaks JSON to this endpoint" can be stated once. This mirrors the aws-cli split (credentials in one file, settings in another) that this repo has half-built.
Details / implementation notes
defaultConfigPath() at src/lib/config.ts:20 is defined, but loadConfig() (config.ts:35-46) resolves only flag > env > credentials file. Reuse the existing hardened INI parser parseCredentials() (src/lib/credentials.ts; null-prototype + prototype-pollution guards) to read a [default]/[profile x] section, and insert one layer into loadConfig's cascade below env. Composes with the existing TESTSPRITE_PROJECT_ID. Document the precedence and extend the DOCUMENTATION.md configuration tables. No new dependency. Tests: config-file value used when flag/env absent; flag and env override it. PR to follow once assigned.
Confirmations