Skip to content

Add capture command (snapshot live company-file data as JSON)#259

Closed
Benjvandam wants to merge 1 commit into
add-get-results-commandfrom
add-capture-command
Closed

Add capture command (snapshot live company-file data as JSON)#259
Benjvandam wants to merge 1 commit into
add-get-results-commandfrom
add-capture-command

Conversation

@Benjvandam

Copy link
Copy Markdown
Contributor

Stage 2 of the live-bridge initiative. Stacked on #258 (base add-get-results-command); will retarget to main once #258 merges.

What

New capture -u <url> [--full] [-o <file>] snapshots a live company file as JSON.

  • Default (scoped): reuses the create-test gathering to capture the template at the URL and its dependencies.
  • --full: fans out company + every period + every workflow reconciliation (customs + results), serialized per company (the API allows 1 in-flight call per company).

How

  • lib/dataCapture.js (capture/captureScoped/captureFull).
  • Refactored lib/liquidTestGenerator.js to expose buildLiquidTest() (returns the object); testGenerator() now calls it then exportYAML — create-test behaviour unchanged.
  • Thin command in bin/cli.js; JSON to stdout or --output.

Tests

  • tests/lib/dataCapture.test.js (scoped + full); existing liquidTestGenerator test still green after the refactor. Full suite green (565 tests); eslint clean.

Note

Account-level customs are captured in scoped mode but not in --full (no list-accounts endpoint wired in the CLI). Read-only command (no writes).

New capture -u <url> [--full] [-o <file>] snapshots a live company file as JSON.
Default (scoped) reuses the create-test gathering (buildLiquidTest, extracted
from testGenerator); --full fans out company/period/reconciliation customs +
results across all periods (serialized per company). Adds lib/dataCapture.js,
refactors liquidTestGenerator to expose buildLiquidTest, + tests.
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ede7d9db-2727-433b-bb83-aae93fb1b96a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-capture-command

Comment @coderabbitai help to get the list of available commands.

@Benjvandam

Copy link
Copy Markdown
Contributor Author

Consolidated into #260 (one PR for all four live-bridge commands). Closing.

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