index.jsis the CLI entry point and wirescommanderto the dispatcher.src/altd.jscontains the core AccessLogTailDispatcher implementation.test/*.test.jsholds Vitest suites (e.g.,test/altd.test.js).scripts/build.jsproduces thedist/build output used by npm.
npm run buildgeneratesdist/index.jsanddist/altd.jsfor publishing.npm testruns Vitest in CI mode with coverage.npm run test:watchruns Vitest in watch mode for local iteration.
- JavaScript is ESM (
"type": "module") and targets Node.js 18+. - Use 2-space indentation and semicolons; follow the quote style of the file you are editing.
- Keep function and variable names descriptive and camelCase (
buildRegistry,maxPartLength). - No linting/formatting tools are configured; keep diffs focused and readable.
- Tests are written with Vitest and live under
test/with*.test.jsnames. - Add or update tests for behavior changes; use
npm testbefore PRs. - Coverage is collected via
@vitest/coverage-v8; aim to keep new code covered.
- Commit messages in this repo are short, imperative, and sentence case (e.g.,
Fix util.isArray deprecation warning). - PRs should include a clear description, relevant issue links, and test results.
- If behavior changes affect CLI usage, update
README.mdexamples.
- Commands are executed exactly as whitelisted; there is no PATH resolution or argument validation.
- Treat access logs as trusted input, and keep whitelists explicit (e.g.,
-w /bin/ls,/usr/bin/hostname).