Improve migration and command output verbosity

Add migrate:commit reminder after successful migrations in dev mode
Add --silent flag to rsx:clean and use in framework updates
Add minimal README.md with clone instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-22 01:13:35 +00:00
parent 0ac0bcf1af
commit de4e0438f0
6 changed files with 41 additions and 25 deletions

7
README.md Executable file
View File

@@ -0,0 +1,7 @@
# RSpade Framework
To start a new RSpade project:
```bash
git clone --recurse-submodules ssh://git@privategit.hanson.xyz:3322/brianhansonxyz/rspade_project.git your-project-name
```

View File

@@ -264,9 +264,10 @@ class Maint_Migrate extends Command
$this->info("\nAll tasks completed!"); $this->info("\nAll tasks completed!");
// Unlink manifest cache if not in production (triggers fast rebuild) // Remind user to commit snapshot in development mode
if (app()->environment() !== 'production') { if ($require_snapshot) {
\App\RSpade\Core\Manifest\Manifest::_unlink_cache(); $this->newLine();
$this->line('Please run <info>php artisan migrate:commit</info> to finish the migration process.');
} }
// Disable query logging // Disable query logging

View File

@@ -104,13 +104,16 @@ class Migrate_Commit_Command extends Command
$this->line('• The web UI is now accessible'); $this->line('• The web UI is now accessible');
$this->info(''); $this->info('');
// Unlink manifest cache if not in production (triggers fast rebuild) // Run post-migration tasks in development mode
if (app()->environment() !== 'production') { if (app()->environment() !== 'production') {
\App\RSpade\Core\Manifest\Manifest::_unlink_cache();
// Regenerate model constants from enum definitions // Regenerate model constants from enum definitions
$this->info('Regenerating model constants...'); $this->info('Regenerating model constants...');
$this->call('rsx:constants:regenerate'); $this->call('rsx:constants:regenerate');
// Recompile bundles
$this->newLine();
$this->info('Recompiling bundles...');
$this->call('rsx:bundle:compile');
} }
return 0; return 0;

View File

@@ -19,7 +19,7 @@ class Clean_Command extends Command
* *
* @var string * @var string
*/ */
protected $signature = 'rsx:clean'; protected $signature = 'rsx:clean {--silent : Suppress all output except errors}';
/** /**
* The console command description. * The console command description.
@@ -35,9 +35,11 @@ class Clean_Command extends Command
*/ */
public function handle() public function handle()
{ {
$silent = $this->option('silent');
// Show warning if not in framework developer mode // Show warning if not in framework developer mode
$is_framework_dev = config('rsx.code_quality.is_framework_developer', false); $is_framework_dev = config('rsx.code_quality.is_framework_developer', false);
if (!$is_framework_dev) { if (!$is_framework_dev && !$silent) {
$this->warn('⚠️ Running rsx:clean is rarely necessary'); $this->warn('⚠️ Running rsx:clean is rarely necessary');
$this->line(''); $this->line('');
$this->line(' The manifest system automatically detects and rebuilds when files change.'); $this->line(' The manifest system automatically detects and rebuilds when files change.');
@@ -52,8 +54,10 @@ class Clean_Command extends Command
$this->newLine(); $this->newLine();
} }
$this->info('🧹 Cleaning RSX caches...'); if (!$silent) {
$this->newLine(); $this->info('🧹 Cleaning RSX caches...');
$this->newLine();
}
$cleaned_items = []; $cleaned_items = [];
@@ -83,14 +87,16 @@ class Clean_Command extends Command
// Note: We never clear rsx-locks directory as it contains active lock files // Note: We never clear rsx-locks directory as it contains active lock files
// Display results // Display results
if (empty($cleaned_items)) { if (!$silent) {
$this->info('Nothing to clean - all caches already empty'); if (empty($cleaned_items)) {
} else { $this->info('Nothing to clean - all caches already empty');
foreach ($cleaned_items as $item) { } else {
$this->line(" $item"); foreach ($cleaned_items as $item) {
$this->line(" $item");
}
$this->newLine();
$this->info('✅ RSX caches cleaned successfully');
} }
$this->newLine();
$this->info('✅ RSX caches cleaned successfully');
} }
return 0; return 0;

View File

@@ -37,7 +37,7 @@ class Constants_Regenerate_Command extends Command
public function handle() public function handle()
{ {
$this->info('Regenerating model constants from enum definitions...'); $this->info('Regenerating model constants...');
// Warnings encountered during processing to show at the end of execution // Warnings encountered during processing to show at the end of execution
$warnings = []; $warnings = [];
@@ -72,7 +72,7 @@ class Constants_Regenerate_Command extends Command
continue; continue;
} }
$this->line('Processing: ' . basename($file_path)); // Silently process - only output changes/warnings
try { try {
$content = File::get($file_path); $content = File::get($file_path);
@@ -371,10 +371,9 @@ class Constants_Regenerate_Command extends Command
if ($org_content != $content) { if ($org_content != $content) {
File::put($file_path, $content); File::put($file_path, $content);
$processed_count++; $processed_count++;
$this->info(" Updated: {$className}"); $this->line(" Updated: {$className}");
} else {
$this->line(" No changes: {$className}");
} }
// Skip "No changes" output - only report updates
// No method checks needed for this project // No method checks needed for this project
// The functions from LP_Model like can_view_ajax, filter_for_ajax, etc. are not required here // The functions from LP_Model like can_view_ajax, filter_for_ajax, etc. are not required here

View File

@@ -498,7 +498,7 @@ if [ "$NO_REBUILD" = true ]; then
echo "⚠️ Cleaning caches only (--no-rebuild specified)" echo "⚠️ Cleaning caches only (--no-rebuild specified)"
echo "" echo ""
if ! php artisan rsx:clean; then if ! php artisan rsx:clean --silent; then
echo "ERROR: Cache clean failed" echo "ERROR: Cache clean failed"
exit 1 exit 1
fi fi
@@ -518,7 +518,7 @@ else
# Step 1: Clean caches # Step 1: Clean caches
echo "Step 1/4: Cleaning caches..." echo "Step 1/4: Cleaning caches..."
if ! php artisan rsx:clean; then if ! php artisan rsx:clean --silent; then
echo "ERROR: Cache clean failed" echo "ERROR: Cache clean failed"
exit 1 exit 1
fi fi