Add --json flag to various CLI commands for use in AI translate scripts - #1068
Add --json flag to various CLI commands for use in AI translate scripts#1068ehoogerbeets wants to merge 1 commit into
Conversation
Give automation a stable machine-readable envelope instead of parsing ANSI console text, and let repository-ai-translate report when more strings remain so jobs can loop until a repo is drained. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Summary
Adds a shared CLI
--jsonconvention so automation (especially AI-translate Jenkins jobs) can consume a stable machine-readable result instead of scraping ANSI console output.{ successful, command, data, error? }, with human console progress suppressed when--jsonis set--jsoninto:repo-create,repo-view,drop-export,drop-import,tm-export,tm-import, andrepository-ai-translaterepository-ai-translate, the AI translate service now detects remaining work at selection time (fetchsourceTextMaxCount + 1per locale) and storeshasMore/hasMoreByLocaleon the pollable job output; the CLI surfaces those fields in the--jsonresult so schedulers can loop until a repo is drainedTest plan
mvn spotless:checkJsonOutputTest, AI translate config/auto-fix integrity testsRepoCreateCommandTest(incl.--json),RepoViewCommandTest,DropExportCommandTest,DropImportCommandTest,TMExportCommandTest,TMImportCommandTestrepository-ai-translate --json -r <repo> -l hi-IN bn-INagainst a repo with more than--source-text-max-countstrings and confirmhasMore: true, then re-run untilhasMore: false{ successful: false, error: "..." }with--json