Kelsidavis-WoWee/tools/editor/cli_migrate.hpp
Kelsi f0bbc228ef refactor(editor): extract --migrate-* handlers into cli_migrate.cpp
Moves the four schema-migration handlers (--migrate-wom,
--migrate-zone, --migrate-project, --migrate-jsondbc) out of
main.cpp into a new cli_migrate.{hpp,cpp} module. Same
behavior — they're idempotent in-place upgraders for older
WOM revisions and JSON DBC sidecar schemas. main.cpp shrinks
by 282 lines (11,261 → 10,979).
2026-05-09 06:13:41 -07:00

21 lines
722 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the schema-migration handlers — these upgrade older
// on-disk asset versions in-place so newer tooling stops rejecting
// or silently misreading them. All migrators are idempotent:
// already-modern files become no-ops.
// --migrate-wom single WOM v1/v2 → WOM3 (single-batch)
// --migrate-zone every WOM in a zone directory
// --migrate-project every zone in a project directory
// --migrate-jsondbc JSON DBC sidecar schema fixes
//
// Returns true if matched; outRc holds the exit code.
bool handleMigrate(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee