fix(cli): preserve ordinary scrape and search output - #248
Draft
developersdigest wants to merge 8 commits into
Draft
developersdigest wants to merge 8 commits into
developersdigest wants to merge 8 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve ordinary scrape/search output and diagnostics: honor multi-URL JSON/file output, add shared receipts, save structured failures before nonzero exit, keep empty search output, expose search --pretty, and report available retry/cache metadata. Add validated millisecond scrape --timeout and update CLI guidance.
Deferred from #245 so Alexandria can be reviewed separately. This draft is stacked on #245 for its shared receipt/error helper; merge that first and retarget this PR to main.
Validation
TypeScript build and 140 tests passed across six affected suites, including compiled CLI calls against a local HTTP fixture. Reduced redundant new coverage; retained order/partial-failure/file-output checks and command-level pretty/timeout/error regressions. No paid API calls.
Boundaries
Related: Exchange #548, #556, #547, #567. No API changes; server billing/cache policy is unchanged. All-command normalization beyond search/scrape remains separate.
Explicit multi-URL output is JSON regardless of extension. Failed single calls write JSON to requested files, including non-JSON filenames; successful raw text remains pipeable. Missing charge metadata means unknown. Retry hints are preserved only when supplied by the transport/SDK.
Summary by cubic
Preserves ordinary
scrapeandsearchoutput while making structured output and failures consistent. Multi-URL scrape now honors--jsonand-owith an ordered JSON array, while failed requests write structured errors before the command exits nonzero; raw single-URL output remains pipeable.CLI behavior
search --pretty.scrape --timeout <ms>support and disables automatic resume when it is set.Written for commit 0811001. Summary will update on new commits.