refactor(cli)!: hard-cut legacy scripts and standardize console runtime
- remove legacy bin/module-*.php and bin/doctor.php entry scripts - move module/doctor execution into class-based runners under lib/Console - add stable JSON output for doctor and module:sync - introduce bin/dev for init/up/down/logs/console/qa workflow - update DI wiring, phpstan scan config, tests, and docs to new CLI contract
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
|
||||
namespace MintyPHP\Console\Commands\Module;
|
||||
|
||||
use MintyPHP\Console\Command;
|
||||
|
||||
final class AssetsSyncCommand extends Command
|
||||
final class AssetsSyncCommand extends AbstractModuleCommand
|
||||
{
|
||||
public function name(): string
|
||||
{
|
||||
@@ -18,9 +16,20 @@ final class AssetsSyncCommand extends Command
|
||||
|
||||
public function execute(array $args, array $options): int
|
||||
{
|
||||
$this->requireBinScript('module-cli-bootstrap.php');
|
||||
$this->requireBinScript('module-assets-sync.php');
|
||||
$result = $this->moduleRunner()->assetsSync();
|
||||
fwrite(STDOUT, sprintf(
|
||||
"module-assets-sync: mode=%s created=%d updated=%d removed=%d unchanged=%d\n",
|
||||
$result['mode'],
|
||||
$result['created'],
|
||||
$result['updated'],
|
||||
$result['removed'],
|
||||
$result['unchanged']
|
||||
));
|
||||
|
||||
return moduleAssetsSyncRun();
|
||||
if ($result['message'] !== 'module-assets-sync: ok') {
|
||||
fwrite(STDOUT, $result['message'] . PHP_EOL);
|
||||
}
|
||||
|
||||
return (int) $result['exit_code'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user