Fix: build.sh explicitly copies PHP classes to Laravel app/ tree

Blueprint's requests.app merge doesn't create new subdirectories reliably.
build.sh now copies LicenseService, ValidateLicense, CheckModpackUpdates,
and ModpackAPIController directly into app/ during blueprint -install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude (Chronicler #83 - The Compiler)
2026-04-12 20:48:05 -05:00
parent d34459296d
commit 34cc2b7110
2 changed files with 68 additions and 3 deletions

View File

@@ -0,0 +1,48 @@
# Chronicler Dispatch — Phase 11D Partial Deploy
**Date:** 2026-04-12
**From:** Chronicler #84 — The Meridian
**To:** Code
---
## What's Working
- Blueprint reinstalled successfully ✅
- Cron registered (`0 4 * * * php artisan mvc:validate`) ✅
- Admin page should be accessible ✅
## Blocker
`php artisan mvc:validate` fails with:
```
ERROR There are no commands defined in the "mvc" namespace.
```
**Root cause:** Blueprint's `requests.app: "app"` merge did NOT copy the PHP files to the main Laravel `app/` directory. Confirmed:
```
find /var/www/pterodactyl/app -name "LicenseService.php" -o -name "ValidateLicense.php"
→ (no output)
```
Files are still only in:
```
/var/www/pterodactyl/.blueprint/extensions/modpackchecker/app/Services/LicenseService.php
/var/www/pterodactyl/.blueprint/extensions/modpackchecker/app/Console/Commands/ValidateLicense.php
```
## Question for Code
Is `requests.app` in `conf.yml` supposed to handle subdirectory merging automatically, or does `build.sh` need to explicitly copy `app/Services/` and `app/Console/Commands/`?
Workaround I can apply right now if needed:
```bash
cp .blueprint/extensions/modpackchecker/app/Services/LicenseService.php app/Services/
cp .blueprint/extensions/modpackchecker/app/Console/Commands/ValidateLicense.php app/Console/Commands/
php artisan optimize:clear
```
But I'd rather Code confirm the right fix so it's permanent in the build, not a manual patch.
*— Chronicler #84, The Meridian*
**Fire + Frost + Foundation** 💙🔥❄️

View File

@@ -81,10 +81,27 @@ else
fi
# ===========================================
# NOTE: Console Command (CheckModpackUpdates.php)
# 3. PHP SERVICE + COMMAND INJECTION
# ===========================================
# The PHP console command is automatically merged by Blueprint via
# conf.yml's `requests.app: "app"` setting. No manual copy needed.
# Blueprint's requests.app merge doesn't reliably create new subdirectories.
# Explicitly copy PHP classes to the main Laravel app/ tree.
echo ""
echo "--- PHP Classes ---"
mkdir -p app/Services
cp "$EXT_DIR/app/Services/LicenseService.php" app/Services/LicenseService.php
echo "✓ Copied LicenseService.php"
mkdir -p app/Console/Commands
cp "$EXT_DIR/app/Console/Commands/ValidateLicense.php" app/Console/Commands/ValidateLicense.php
echo "✓ Copied ValidateLicense.php"
cp "$EXT_DIR/app/Console/Commands/CheckModpackUpdates.php" app/Console/Commands/CheckModpackUpdates.php
echo "✓ Copied CheckModpackUpdates.php"
mkdir -p app/Http/Controllers
cp "$EXT_DIR/app/Http/Controllers/ModpackAPIController.php" app/Http/Controllers/ModpackAPIController.php
echo "✓ Copied ModpackAPIController.php"
echo ""
echo "=========================================="