Skip to content

fix: CLI bug fixes from chaos monkey testing#18

Merged
zcaceres merged 1 commit intomainfrom
fix/cli-bug-fixes
Mar 19, 2026
Merged

fix: CLI bug fixes from chaos monkey testing#18
zcaceres merged 1 commit intomainfrom
fix/cli-bug-fixes

Conversation

@zcaceres
Copy link
Copy Markdown
Owner

Summary

  • Fix domain/domainLive schema drift — add Followers, Employees, ProductCount fields to AttributesSchema
  • Detect BuiltWith API errors returned as HTTP 200 (e.g. bad API key) — throw clear messages instead of confusing Zod errors
  • Enable strict flag parsing to reject typos like --onlyLiveTechnologes
  • Only check --version at argv[0] so it doesn't hijack commands
  • Reject single-dash args (e.g. -x) as primary values
  • Handle empty object arrays in formatTable output
  • Show --api-key and --table in per-command --help
  • Update docs for new error handling behavior

Test plan

  • bun run test — 151 tests pass (15 new covering all behavior changes)
  • bun run lint — clean
  • Live smoke test: builtwith domain stripe.com returns data (not schema error)
  • builtwith free x.com --api-key badkey says "API Key is incorrect" (not Zod error)

…d docs

Fix 8 bugs found via chaos monkey testing:
- Add Followers, Employees, ProductCount to domain schema (Bug 1)
- Detect API errors returned as HTTP 200 with Errors array (Bug 2)
- Enable strict flag parsing to reject typos (Bug 3)
- Only check --version at argv[0] position (Bug 4)
- Reject single-dash args as primary values (Bug 6)
- Handle empty object arrays in formatTable (Bug 7)
- Show global flags in per-command help (Bug 8)

Update docs for new error handling behavior.
@zcaceres zcaceres merged commit f8ecf78 into main Mar 19, 2026
1 check passed
@zcaceres zcaceres deleted the fix/cli-bug-fixes branch March 19, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant