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:
7
README.md
Executable file
7
README.md
Executable 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
|
||||
```
|
||||
@@ -264,9 +264,10 @@ class Maint_Migrate extends Command
|
||||
|
||||
$this->info("\nAll tasks completed!");
|
||||
|
||||
// Unlink manifest cache if not in production (triggers fast rebuild)
|
||||
if (app()->environment() !== 'production') {
|
||||
\App\RSpade\Core\Manifest\Manifest::_unlink_cache();
|
||||
// Remind user to commit snapshot in development mode
|
||||
if ($require_snapshot) {
|
||||
$this->newLine();
|
||||
$this->line('Please run <info>php artisan migrate:commit</info> to finish the migration process.');
|
||||
}
|
||||
|
||||
// Disable query logging
|
||||
|
||||
@@ -104,13 +104,16 @@ class Migrate_Commit_Command extends Command
|
||||
$this->line('• The web UI is now accessible');
|
||||
$this->info('');
|
||||
|
||||
// Unlink manifest cache if not in production (triggers fast rebuild)
|
||||
// Run post-migration tasks in development mode
|
||||
if (app()->environment() !== 'production') {
|
||||
\App\RSpade\Core\Manifest\Manifest::_unlink_cache();
|
||||
|
||||
// Regenerate model constants from enum definitions
|
||||
$this->info('Regenerating model constants...');
|
||||
$this->call('rsx:constants:regenerate');
|
||||
|
||||
// Recompile bundles
|
||||
$this->newLine();
|
||||
$this->info('Recompiling bundles...');
|
||||
$this->call('rsx:bundle:compile');
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -19,7 +19,7 @@ class Clean_Command extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'rsx:clean';
|
||||
protected $signature = 'rsx:clean {--silent : Suppress all output except errors}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -35,9 +35,11 @@ class Clean_Command extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$silent = $this->option('silent');
|
||||
|
||||
// Show warning if not in framework developer mode
|
||||
$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->line('');
|
||||
$this->line(' The manifest system automatically detects and rebuilds when files change.');
|
||||
@@ -52,8 +54,10 @@ class Clean_Command extends Command
|
||||
$this->newLine();
|
||||
}
|
||||
|
||||
if (!$silent) {
|
||||
$this->info('🧹 Cleaning RSX caches...');
|
||||
$this->newLine();
|
||||
}
|
||||
|
||||
$cleaned_items = [];
|
||||
|
||||
@@ -83,6 +87,7 @@ class Clean_Command extends Command
|
||||
// Note: We never clear rsx-locks directory as it contains active lock files
|
||||
|
||||
// Display results
|
||||
if (!$silent) {
|
||||
if (empty($cleaned_items)) {
|
||||
$this->info('Nothing to clean - all caches already empty');
|
||||
} else {
|
||||
@@ -92,6 +97,7 @@ class Clean_Command extends Command
|
||||
$this->newLine();
|
||||
$this->info('✅ RSX caches cleaned successfully');
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class Constants_Regenerate_Command extends Command
|
||||
|
||||
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 = [];
|
||||
@@ -72,7 +72,7 @@ class Constants_Regenerate_Command extends Command
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->line('Processing: ' . basename($file_path));
|
||||
// Silently process - only output changes/warnings
|
||||
|
||||
try {
|
||||
$content = File::get($file_path);
|
||||
@@ -371,10 +371,9 @@ class Constants_Regenerate_Command extends Command
|
||||
if ($org_content != $content) {
|
||||
File::put($file_path, $content);
|
||||
$processed_count++;
|
||||
$this->info(" Updated: {$className}");
|
||||
} else {
|
||||
$this->line(" No changes: {$className}");
|
||||
$this->line(" Updated: {$className}");
|
||||
}
|
||||
// Skip "No changes" output - only report updates
|
||||
|
||||
// No method checks needed for this project
|
||||
// The functions from LP_Model like can_view_ajax, filter_for_ajax, etc. are not required here
|
||||
|
||||
@@ -498,7 +498,7 @@ if [ "$NO_REBUILD" = true ]; then
|
||||
echo "⚠️ Cleaning caches only (--no-rebuild specified)"
|
||||
echo ""
|
||||
|
||||
if ! php artisan rsx:clean; then
|
||||
if ! php artisan rsx:clean --silent; then
|
||||
echo "ERROR: Cache clean failed"
|
||||
exit 1
|
||||
fi
|
||||
@@ -518,7 +518,7 @@ else
|
||||
|
||||
# Step 1: Clean 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"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user