Fix VS Code extension storage paths for new directory structure Fix jqhtml compiled files missing from bundle Fix bundle babel transformation and add rsxrealpath() function 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
488 lines
19 KiB
PHP
Executable File
488 lines
19 KiB
PHP
Executable File
<?php
|
|
|
|
/**
|
|
* RSX Framework Configuration
|
|
*
|
|
* Framework defaults and core operational settings. User customizations belong
|
|
* in /rsx/resource/config/rsx.php which is merged with this file.
|
|
*
|
|
* For extended documentation: php artisan rsx:man config_rsx
|
|
*
|
|
* ---
|
|
*
|
|
* MOVED TO USER CONFIG (/rsx/resource/config/rsx.php):
|
|
*
|
|
* The following configuration keys were moved from this file to user config
|
|
* because they represent user preferences rather than framework requirements:
|
|
*
|
|
* - locking
|
|
* - locking.timeout - Performance tuning preference
|
|
* - locking.always_write_lock - Debugging preference
|
|
* - locking.site_always_write - Debugging preference
|
|
* Reason: Developers may need to tune locking behavior for performance
|
|
*
|
|
* - development.auto_rename_files - IDE preference for file auto-renaming
|
|
* Reason: VS Code extension user preference
|
|
*
|
|
* - development.ignore_filename_convention - Disable filename checks globally
|
|
* Reason: Developer choice for convention enforcement
|
|
*
|
|
* - manifest.excluded_dirs - Additional directories to exclude from scanning
|
|
* Reason: Users may want custom exclusions (framework exclusions are hardcoded)
|
|
*
|
|
* - code_quality.generic_suffix_replacements - Required suffix specificity rules
|
|
* Reason: Users define their own naming patterns (Handler, Service, etc.)
|
|
*
|
|
* - console_debug.outputs - Debug output destinations (cli, web, ajax, laravel_log)
|
|
* Reason: User preference for debug visibility
|
|
*
|
|
* - console_debug.filter_mode - Filter mode (all, whitelist, blacklist, specific)
|
|
* Reason: User debugging workflow preference
|
|
*
|
|
* - console_debug.specific_channel - Specific channel to show
|
|
* Reason: User debugging focus
|
|
*
|
|
* - console_debug.whitelist - Channels to show in whitelist mode
|
|
* Reason: Users add custom application debug channels
|
|
*
|
|
* - console_debug.blacklist - Channels to hide in blacklist mode
|
|
* Reason: User preference for hiding noisy channels
|
|
*
|
|
* - console_debug.include_benchmark - Include timing in debug output
|
|
* Reason: User preference for performance analysis
|
|
*
|
|
* - console_debug.include_location - Include file/line in debug output
|
|
* Reason: User debugging preference
|
|
*
|
|
* - console_debug.include_backtrace - Include call stack in debug output
|
|
* Reason: User debugging preference
|
|
*
|
|
* - console_debug.enable_get_trace - Enable ?__trace=1 for plain text output
|
|
* Reason: User debugging preference
|
|
*
|
|
* - log_browser_errors - Log JavaScript errors to Laravel log
|
|
* Reason: User preference for client-side error tracking
|
|
*
|
|
* - response.default_view - Default view when controller doesn't specify
|
|
* Reason: Application-specific default
|
|
*
|
|
* - response.error_views - Custom error view templates (404, 500)
|
|
* Reason: Application-specific error pages
|
|
*
|
|
* - response.cors - CORS settings for API responses
|
|
* Reason: Application-specific API configuration
|
|
*
|
|
* - gatekeeper - Development preview authentication
|
|
* - gatekeeper.enabled - Enable/disable authentication
|
|
* - gatekeeper.password - Shared password
|
|
* - gatekeeper.cookie_name - Cookie name for auth
|
|
* - gatekeeper.cookie_lifetime_hours - Cookie lifetime
|
|
* - gatekeeper.title - Login page title
|
|
* - gatekeeper.subtitle - Login page description
|
|
* - gatekeeper.logo - Custom logo path
|
|
* Reason: Application-specific development site protection
|
|
*
|
|
* REMOVED (DEAD CODE):
|
|
*
|
|
* - middleware - RSX middleware configuration (UNUSED - no code references)
|
|
* - response.asset_cache - Asset caching settings (UNUSED - no code references)
|
|
*/
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Manifest Modules
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| These modules process files during manifest scanning. Each module
|
|
| handles specific file types and extracts metadata. Modules are
|
|
| processed in priority order (lower number = higher priority).
|
|
|
|
|
*/
|
|
|
|
'manifest_modules' => [
|
|
// Core modules (can be copied and modified)
|
|
// PHP extraction is handled directly in Manifest to avoid DRY violations
|
|
// JavaScript is a first-class citizen, handled directly in Manifest.php
|
|
\App\RSpade\Core\Manifest\Modules\Blade_ManifestModule::class,
|
|
\App\RSpade\Integrations\Scss\Scss_ManifestModule::class,
|
|
|
|
// Custom modules
|
|
// \App\RSpade\Modules\Custom\MyCustomModule::class,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Manifest Support Modules
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| These modules run AFTER the primary manifest is built to add
|
|
| supplementary metadata that requires the full manifest to be available.
|
|
| Order matters - modules are processed in the order listed.
|
|
|
|
|
*/
|
|
|
|
'manifest_support' => [
|
|
\App\RSpade\Modules\Model_ManifestSupport::class,
|
|
\App\RSpade\Integrations\Jqhtml\Jqhtml_ManifestSupport::class,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Integrations
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| External integrations that extend the framework's capabilities.
|
|
| Each integration can provide file discovery, processing, and bundling.
|
|
|
|
|
*/
|
|
|
|
'integrations' => [
|
|
// Register integration service providers here
|
|
// These will be loaded automatically if enabled
|
|
'providers' => [
|
|
\App\RSpade\Integrations\Jqhtml\Jqhtml_Service_Provider::class,
|
|
\App\RSpade\Core\Controller\Controller_Service_Provider::class,
|
|
\App\RSpade\Core\Database\Database_Service_Provider::class,
|
|
],
|
|
|
|
// Integration-specific configuration
|
|
'jqhtml' => [
|
|
'compiler' => [
|
|
'cache' => true,
|
|
'cache_ttl' => 3600,
|
|
'source_maps' => true,
|
|
],
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Bundle Processors
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Configure global processors that transform files during bundle compilation.
|
|
| These processors are automatically applied to all bundles based on file
|
|
| extensions. Order matters - processors with lower priority run first.
|
|
|
|
|
*/
|
|
|
|
'bundle_processors' => [
|
|
// SCSS/Sass processor
|
|
\App\RSpade\Integrations\Scss\Scss_BundleProcessor::class,
|
|
|
|
// JQHTML processor
|
|
\App\RSpade\Integrations\Jqhtml\Jqhtml_BundleProcessor::class,
|
|
|
|
// Add custom processors here
|
|
// \App\RSpade\Processors\MyCustomProcessor::class,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Required Bundles
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| These bundles are automatically prepended to every bundle's include list.
|
|
| They provide core functionality that all bundles need.
|
|
|
|
|
*/
|
|
'required_bundles' => [
|
|
'jquery', // jQuery library - foundation for many components
|
|
'lodash', // Lodash utility library - common utilities
|
|
'core', // Core framework JS - Manifest, Rsx, cache, etc.
|
|
'jqhtml', // Jqhtml library - client side templating library
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Bundle Aliases
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Map bundle aliases to their corresponding bundle classes.
|
|
| These aliases can be used in bundle 'include' arrays for convenience.
|
|
|
|
|
*/
|
|
'bundle_aliases' => [
|
|
'core' => \App\RSpade\Core\Bundle\Core_Bundle::class,
|
|
'jquery' => \App\RSpade\Bundles\Jquery_Bundle::class,
|
|
'lodash' => \App\RSpade\Bundles\Lodash_Bundle::class,
|
|
'bootstrap5' => \App\RSpade\Bundles\Bootstrap5_Bundle::class,
|
|
'jqhtml' => \App\RSpade\Integrations\Jqhtml\Jqhtml_Bundle::class,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| RSX Routing Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Configure how RSX handles routing, caching, and request dispatch.
|
|
|
|
|
*/
|
|
'routing' => [
|
|
// Directories to check for static assets
|
|
'asset_dirs' => ['public', 'assets', 'static', 'dist', 'build'],
|
|
|
|
// Handler type priorities (lower number = higher priority)
|
|
'handler_priority' => [
|
|
'controller' => 1,
|
|
'file' => 2,
|
|
'asset' => 3,
|
|
'custom' => 4,
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Public Directory Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Configure security and access control for the /rsx/public/ directory.
|
|
| Files in this directory are served at the root URL of the application.
|
|
|
|
|
*/
|
|
'public' => [
|
|
// Global patterns blocked from HTTP access for security
|
|
// These patterns are always blocked regardless of public_ignore.json
|
|
'ignore_patterns' => [
|
|
'public_ignore.json',
|
|
'.git',
|
|
'.gitignore',
|
|
'.gitattributes',
|
|
'*.php',
|
|
'.env',
|
|
'.env.*',
|
|
'*.sh',
|
|
'*.py',
|
|
'*.rb',
|
|
'*.conf',
|
|
'*.ini',
|
|
'*.sql',
|
|
'*.bak',
|
|
'*.tmp',
|
|
'*~',
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| RSX Manifest Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Configure how RSX discovers and indexes classes, routes, and attributes.
|
|
|
|
|
*/
|
|
'manifest' => [
|
|
// Base directories to scan (relative to base_path())
|
|
// Can be directories (will be scanned recursively) or individual files
|
|
'scan_directories' => [
|
|
'rsx', // Main RSX application directory (symlinked to ../rsx)
|
|
'app/RSpade/Core', // Core framework classes (runtime essentials)
|
|
'app/RSpade/Modules', // Manifest support modules
|
|
'app/RSpade/Integrations', // Integration modules (Jqhtml, Scss, etc.)
|
|
'app/RSpade/Bundles', // Third-party bundles
|
|
'app/RSpade/Core/Providers', // Service providers
|
|
'app/RSpade/CodeQuality', // Code quality rules and checks
|
|
'app/RSpade/Testing', // Testing framework classes
|
|
'app/RSpade/temp', // Framework developer testing directory
|
|
],
|
|
|
|
// Specific filenames to exclude from manifest scanning (anywhere in tree)
|
|
'excluded_files' => [
|
|
'CLAUDE.md', // Documentation for AI assistants
|
|
'.placeholder', // Empty directory markers
|
|
'.DS_Store', // macOS folder metadata
|
|
'Thumbs.db', // Windows thumbnail cache
|
|
'desktop.ini', // Windows folder settings
|
|
'.gitkeep', // Git empty directory markers
|
|
'.gitattributes', // Git attributes config
|
|
'._rsx_helper.php', // IDE helper stubs (auto-generated)
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| RSX Development Settings
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Diagnostic flags for debugging. Override in user config for preferences.
|
|
|
|
|
*/
|
|
'development' => [
|
|
// Show detailed error messages
|
|
'debug' => env('RSX_DEBUG', env('APP_DEBUG', false)),
|
|
|
|
// Log all dispatches for debugging
|
|
'log_dispatches' => env('RSX_LOG_DISPATCHES', false),
|
|
|
|
// Show route matching details in error pages
|
|
'show_route_details' => env('RSX_SHOW_ROUTE_DETAILS', env('APP_DEBUG', false)),
|
|
|
|
// Disable AJAX request batching for easier debugging
|
|
// When true, each Ajax.call() makes an immediate individual request
|
|
// When false (default), requests are batched using setTimeout(0)
|
|
'ajax_disable_batching' => env('AJAX_DISABLE_BATCHING', false),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Code Quality Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Settings for code quality checks and validation rules.
|
|
|
|
|
*/
|
|
'code_quality' => [
|
|
// Framework developer mode - enables additional testing capabilities
|
|
// When true, allows testing rules in app/RSpade/temp directory
|
|
'is_framework_developer' => env('IS_FRAMEWORK_DEVELOPER', false),
|
|
|
|
// Whitelisted PHP/JS files allowed in project root directory
|
|
// These are typically build configuration files and IDE helpers
|
|
'root_whitelist' => [
|
|
'vite.config.js',
|
|
'webpack.config.js',
|
|
'webpack.mix.js',
|
|
'_ide_helper.php', // Laravel IDE Helper
|
|
'._rsx_helper.php', // RSX IDE Helper
|
|
'.phpstorm.meta.php', // PhpStorm metadata
|
|
],
|
|
|
|
// Whitelisted test files allowed in rsx/ directory (not subdirectories)
|
|
// Test files should normally be in proper test directories, not loose in rsx/
|
|
'rsx_test_whitelist' => [
|
|
// Currently no test files should exist directly in rsx/
|
|
],
|
|
|
|
// Classes exempt from suffix inheritance rules
|
|
// Children of these classes can use any naming pattern
|
|
'suffix_exempt_classes' => [
|
|
'Jqhtml_Component', // JQHTML components can have flexible naming
|
|
'Component', // JQHTML v2 components can have flexible naming
|
|
'Rsx_System_Model_Abstract', // System models (e.g., Session) have special naming
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| IDE Integration Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Settings for VS Code extension and IDE bridge communication.
|
|
|
|
|
*/
|
|
'ide_integration' => [
|
|
// Application domain for IDE to connect to
|
|
// Set to 'auto' to auto-discover from first web request
|
|
// Or specify explicitly: 'https://example.com'
|
|
//
|
|
// WARNING: When set to 'auto', email sending will be restricted to test mode
|
|
// with whitelisted receivers only, as email functionality requires a hardcoded
|
|
// domain. Production email sending will be disabled.
|
|
// TODO: Implement email test mode when email functionality is added (~1 month)
|
|
'application_domain' => env('RSX_APPLICATION_DOMAIN', 'auto'),
|
|
|
|
// Path where IDE bridge files are stored (auth tokens, discovered domain)
|
|
'bridge_path' => 'storage/rsx-ide-bridge',
|
|
|
|
// Enable IDE services endpoint (disabled in production by default)
|
|
'enabled' => env('RSX_IDE_SERVICES_ENABLED', env('APP_ENV', 'local') !== 'production'),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| JavaScript Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Settings for JavaScript parsing and transformation.
|
|
|
|
|
*/
|
|
'javascript' => [
|
|
'babel' => [
|
|
// Enable Babel transformation for decorators
|
|
'transform_enabled' => env('BABEL_TRANSFORM', true),
|
|
|
|
// Target environment for transformation (modern, es6, es5)
|
|
'target' => env('BABEL_TARGET', 'modern'),
|
|
|
|
// Cache directory for transformed files
|
|
'cache_dir' => 'storage/rsx-tmp/babel_cache',
|
|
],
|
|
|
|
// Enable decorator support (parsed and optionally transformed)
|
|
'decorators' => true,
|
|
|
|
// Note: Private fields (#private) use native browser support, not transpiled
|
|
],
|
|
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Console Debug Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Core debug system settings. Override outputs and filters in user config.
|
|
|
|
|
*/
|
|
'console_debug' => [
|
|
// Master switch to enable/disable all console debug output
|
|
'enabled' => env('CONSOLE_DEBUG_ENABLED', true),
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Exception Handlers
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Exception handlers are executed in priority order when exceptions occur.
|
|
| Each handler can choose to handle the exception (return a response) or
|
|
| pass it to the next handler (return null). Handlers are sorted by priority
|
|
| with lower numbers running first.
|
|
|
|
|
| Handler Priority Ranges:
|
|
| - 1-50: Critical/environment-specific (CLI, AJAX, Playwright)
|
|
| - 51-100: Standard handlers
|
|
| - 101-500: Low priority handlers
|
|
| - 501+: Fallback* or catch-all handlers (RSX dispatch bootstrapper)
|
|
|
|
|
| Users can add custom handlers or reorder existing ones by modifying this array.
|
|
|
|
|
*/
|
|
'exception_handlers' => [
|
|
\App\RSpade\Core\Exceptions\Cli_Exception_Handler::class, // Priority 10
|
|
\App\RSpade\Core\Exceptions\Ajax_Exception_Handler::class, // Priority 20
|
|
\App\RSpade\Core\Debug\Playwright_Exception_Handler::class, // Priority 30
|
|
\App\RSpade\Core\Providers\Rsx_Dispatch_Bootstrapper_Handler::class, // Priority 1000
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| SSR Full Page Cache (FPC) Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Settings for server-side rendered static page caching. Routes marked with
|
|
| #[Static_Page] attribute are pre-rendered as static HTML via headless
|
|
| Chrome (Playwright) and cached in Redis for optimal SEO and performance.
|
|
|
|
|
| Cache Behavior:
|
|
| - Only served to unauthenticated users (no active session)
|
|
| - Auto-invalidates on deployment (build_key changes)
|
|
| - Supports ETags for 304 Not Modified responses
|
|
| - Cache headers: 0s in dev, 5min in prod
|
|
|
|
|
| Commands:
|
|
| - php artisan rsx:ssr_fpc:create /route # Generate cache for route
|
|
| - php artisan rsx:ssr_fpc:reset # Clear all FPC caches
|
|
|
|
|
*/
|
|
'ssr_fpc' => [
|
|
// Enable SSR Full Page Cache system
|
|
'enabled' => env('SSR_FPC_ENABLED', false),
|
|
|
|
// Playwright generation timeout in milliseconds
|
|
'generation_timeout' => env('SSR_FPC_TIMEOUT', 30000),
|
|
],
|
|
|
|
];
|