Add lazy loader pattern for CLI command execution

Extend `BackstageCommand.execute` to accept either a direct function or a
`{ loader }` object for lazy loading command implementations. Convert
several build and migrate commands to use the new pattern. Switch from
`program.parse` to `program.parseAsync` to properly await async actions.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-26 19:27:34 +01:00
parent c472a693b6
commit 0d2d0f2e07
24 changed files with 338 additions and 278 deletions
+1
View File
@@ -81,6 +81,7 @@
"buffer": "^6.0.3",
"chalk": "^4.0.0",
"chokidar": "^3.3.1",
"cleye": "^2.2.1",
"commander": "^14.0.3",
"cross-fetch": "^4.0.0",
"cross-spawn": "^7.0.3",