feat: add --engine flag for UE version selection - #1
StarksLabs merged 1 commit into
Conversation
Engine version was hardcoded to UE_5.7. Now configurable via --engine flag on download and sync commands, with smart resolution: - Exact match: proceeds silently - Fallback to lower: informs user, proceeds with highest compatible - Only higher available: shows versions, prompts user to pick or abort - Invalid format (e.g. UE_58): rejects early with clear error Also fixes pre-existing bug where fallback to higher versions failed (bestScore initialized to -1 instead of -Infinity). Refactors getAsset() into resolveAsset() + fetchAssetDetail() so CLI can inspect engine match before committing to manifest fetch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Merged — thank you, and I'm sorry this sat for two months. That delay was entirely on me. I'm in school full time and this repo went quiet Everything in here landed:
One thing worth flagging since it touched your code: #2 independently rewrote the Thanks again for the patience. |
Summary
--engine <version>CLI flag fordownloadandsynccommands (default:UE_5.7)UE_58) with clear error messagebestScore = -1prevented fallback to higher versions from workingChanges
src/api.tspickArtifactId→pickArtifactreturningEngineResolutionwith match type. SplitgetAsset()intoresolveAsset()+fetchAssetDetail(). ExportENGINE_VERSION_REandparseEngineVersion.src/cli.ts--engineflag parsing, format validation,handleEngineResolution()with fallback messages and interactive prompt for higher-only case.Test plan
epic-fab download <id> --engine UE_58→ rejects with format errorepic-fab download <id> --engine UE5.7→ rejects with format errorepic-fab download <id>→ defaults to UE_5.7 (no behavior change)epic-fab download <id> --engine UE_6.0→ falls back to highest available ≤ 6.0 with stderr messageepic-fab download <id> --engine UE_5.0(only higher available) → shows versions, prompts userepic-fab --help→ shows--enginein Options sectionbun run typecheck→ passes🤖 Generated with Claude Code