Update npm packages to latest versions

Fix JavaScript sourcemap paths to show full file locations
Implement --build-debug flag and complete Build UI streaming
Add xterm.js terminal UI and fix asset path routing
Add RSpade Build UI service with WebSocket support

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-31 08:12:33 +00:00
parent 393479280f
commit d7d341f752
15084 changed files with 980818 additions and 138 deletions

View File

@@ -502,12 +502,36 @@ class Debugger
}
}
// Check for environment variable overrides (use getenv for runtime putenv support)
if (getenv('CONSOLE_DEBUG_CLI') !== false) {
$config['outputs']['cli'] = filter_var(getenv('CONSOLE_DEBUG_CLI'), FILTER_VALIDATE_BOOLEAN);
}
if (getenv('CONSOLE_DEBUG_WEB') !== false) {
$config['outputs']['web'] = filter_var(getenv('CONSOLE_DEBUG_WEB'), FILTER_VALIDATE_BOOLEAN);
}
if (getenv('CONSOLE_DEBUG_AJAX') !== false) {
$config['outputs']['ajax'] = filter_var(getenv('CONSOLE_DEBUG_AJAX'), FILTER_VALIDATE_BOOLEAN);
}
static::$console_config = $config;
}
return static::$console_config;
}
/**
* Reset cached console debug configuration
*
* Call this after modifying environment variables like CONSOLE_DEBUG_FILTER
* or CONSOLE_DEBUG_CLI to force reconfiguration on next console_debug() call.
*
* @return void
*/
public static function reset_console_config(): void
{
static::$console_config = null;
}
/**
* Configure console debug based on HTTP headers from rsx:debug
*
@@ -671,9 +695,9 @@ class Debugger
*/
protected static function __should_output_channel(string $channel, array $config): bool
{
// Check environment override
$env_filter = env('CONSOLE_DEBUG_FILTER');
if ($env_filter !== null) {
// Check environment override (use getenv for runtime putenv support)
$env_filter = getenv('CONSOLE_DEBUG_FILTER');
if ($env_filter !== false) {
// Split comma-separated values and normalize
$channels = array_map('trim', explode(',', $env_filter));
$channels = array_map('strtoupper', $channels);
@@ -730,20 +754,37 @@ class Debugger
return;
}
// Get configuration
$config = static::__get_console_config();
// Handle BUILD_DEBUG_MODE (check both constant and command-line flag)
$build_debug_mode = (defined('BUILD_DEBUG_MODE') && BUILD_DEBUG_MODE) ||
in_array('--build-debug', $_SERVER['argv'] ?? []);
// Check if completely disabled
if (!$config['enabled']) {
return;
}
if ($build_debug_mode) {
// Force enable CLI output and filter to BUILD channel only
$channel = static::__normalize_channel($channel);
if ($channel !== 'BUILD') {
return;
}
// Override config for this call
$force_cli_output = true;
$config = static::__get_console_config(); // Still need config for benchmark
} else {
$force_cli_output = false;
// Normalize channel name
$channel = static::__normalize_channel($channel);
// Get configuration
$config = static::__get_console_config();
// Check if this channel should be output
if (!static::__should_output_channel($channel, $config)) {
return;
// Check if completely disabled
if (!$config['enabled']) {
return;
}
// Normalize channel name
$channel = static::__normalize_channel($channel);
// Check if this channel should be output
if (!static::__should_output_channel($channel, $config)) {
return;
}
}
// Get caller information using debug_backtrace
@@ -776,7 +817,7 @@ class Debugger
// Handle based on context
if (app()->runningInConsole()) {
// CLI mode - check if CLI output is enabled
if (!$config['outputs']['cli']) {
if (!$force_cli_output && !$config['outputs']['cli']) {
return;
}

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const babel = require('@babel/core');
@@ -214,8 +215,12 @@ const prefixGeneratedVariables = function() {
try {
// Configure Babel transformation
// Use relative path for sourcemap to match SCSS behavior
const relativeFilePath = path.relative(process.cwd(), filePath);
const result = babel.transformSync(content, {
filename: filePath,
filename: relativeFilePath,
sourceFileName: relativeFilePath, // Explicitly set source filename for sourcemap
sourceMaps: 'inline',
presets: [
['@babel/preset-env', targetPresets[target] || targetPresets.modern]

View File

@@ -2743,6 +2743,7 @@ class Manifest
break;
case 'js':
console_debug('BUILD', "Parsing JS file: {$file_path}");
$js_metadata = \App\RSpade\Core\JavaScript\Js_Parser::extract_metadata($absolute_path);
$data = array_merge($data, $js_metadata);
break;