Standardize settings file naming and relocate documentation files Fix code quality violations from rsx:check Reorganize user_management directory into logical subdirectories Move Quill Bundle to core and align with Tom Select pattern Simplify Site Settings page to focus on core site information Complete Phase 5: Multi-tenant authentication with login flow and site selection Add route query parameter rule and synchronize filename validation logic Fix critical bug in UpdateNpmCommand causing missing JavaScript stubs Implement filename convention rule and resolve VS Code auto-rename conflict Implement js-sanitizer RPC server to eliminate 900+ Node.js process spawns Implement RPC server architecture for JavaScript parsing WIP: Add RPC server infrastructure for JS parsing (partial implementation) Update jqhtml terminology from destroy to stop, fix datagrid DOM preservation Add JQHTML-CLASS-01 rule and fix redundant class names Improve code quality rules and resolve violations Remove legacy fatal error format in favor of unified 'fatal' error type Filter internal keys from window.rsxapp output Update button styling and comprehensive form/modal documentation Add conditional fly-in animation for modals Fix non-deterministic bundle compilation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
81 lines
1.9 KiB
PHP
Executable File
81 lines
1.9 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Console\Commands\Rsx\Dev;
|
|
|
|
use App\Console\Commands\FrameworkDeveloperCommand;
|
|
use Symfony\Component\Process\Process;
|
|
|
|
class UpdateNpmCommand extends FrameworkDeveloperCommand
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'rsx:dev:update_npm';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Update all npm packages and rebuild framework bundles';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return int
|
|
*/
|
|
public function handle()
|
|
{
|
|
$system_dir = base_path();
|
|
|
|
// Step 1: Run npm update
|
|
$this->info('Running npm update...');
|
|
$this->newLine();
|
|
|
|
$npm_process = new Process(['npm', 'update'], $system_dir, null, null, 300);
|
|
$npm_process->run(function ($type, $buffer) {
|
|
echo $buffer;
|
|
});
|
|
|
|
if (!$npm_process->isSuccessful()) {
|
|
$this->error('npm update failed');
|
|
return self::FAILURE;
|
|
}
|
|
|
|
$this->newLine();
|
|
$this->info('npm update completed successfully');
|
|
$this->newLine();
|
|
|
|
// Step 2: Run rsx:clean
|
|
$this->info('Running rsx:clean...');
|
|
$this->newLine();
|
|
|
|
passthru('php artisan rsx:clean', $clean_exit);
|
|
|
|
if ($clean_exit !== 0) {
|
|
$this->error('rsx:clean failed');
|
|
return self::FAILURE;
|
|
}
|
|
|
|
$this->newLine();
|
|
|
|
// Step 3: Run rsx:bundle:compile
|
|
$this->info('Running rsx:bundle:compile...');
|
|
$this->newLine();
|
|
|
|
passthru('php artisan rsx:bundle:compile', $compile_exit);
|
|
|
|
if ($compile_exit !== 0) {
|
|
$this->error('rsx:bundle:compile failed');
|
|
return self::FAILURE;
|
|
}
|
|
|
|
$this->newLine();
|
|
$this->info('All operations completed successfully!');
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|