Commit Graph

6 Commits

Author SHA1 Message Date
s1mba 731cc340d8 [packages/cli] Add comprehensive CLI test suite (#128)
* [packages/cli]test: add comprehensive CLI test suite with E2E browser tests

- Add unit tests for wrapper (actionbook.js), postinstall, config, profile,
  search, get, and sources commands
- Add Tier 1 browser tests (arg validation, help output, defaults)
- Add Tier 2 browser E2E tests (navigation, interaction, screenshots,
  cookies, tabs, error handling, JSON output)
- Fix E2E test reliability: add --wait for element readiness after navigation,
  use eval-based form submit for login flow, match actual CLI exit codes
- Suppress macOS Keychain dialogs in tests via --use-mock-keychain config
- Set testTimeout to 60s for browser E2E operations
- Export modules from actionbook.js and postinstall.js for testability

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [packages/cli]fix: resolve Windows .exe suffix when locating test CLI binary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [packages/cli]fix: skip shell-script mock tests on Windows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:36:15 +08:00
Adcent 125d703407 Remove legacy actionbook-rs npm packaging assets 2026-02-06 21:20:17 +08:00
Adcent 86170e3132 Address PR feedback on package resolution and workflow paths 2026-02-06 21:11:11 +08:00
Adcent f5ae0ea7ed Split CLI distribution into platform-specific npm packages 2026-02-06 21:05:30 +08:00
4bmis 3a719a3666 [packages/cli]refactor: simplify postinstall to only fix permissions
Remove GitHub Releases download fallback from postinstall script.
The binary is always bundled in the npm package, so download logic is unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 13:45:43 +08:00
4bmis 4715896e2e [packages/cli]refactor: replace TypeScript CLI with Rust binary wrapper
Replace the TypeScript CLI implementation with a thin JS wrapper that
executes the native Rust binary. The npm package now ships all platform
binaries directly, with a postinstall fallback to download from GitHub
Releases if needed.

- Add bin/actionbook.js: platform detection + binary execution
- Add scripts/postinstall.js: fallback download from GitHub Releases
- Remove all TypeScript source, build config, and dependencies
- Update CI workflow to build, package, and publish with binaries
- Update README with full Rust CLI command documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 12:44:19 +08:00