|
Phase 7: Separate ControlScripts from server core + CLI isolation + manifest
- Moved server/ControlScripts/ → automation/ in repo root.
Updated composer.json autoload classmap (../automation/).
Common.php keeps correct sync-map.json path via __DIR__.
- Removed RequiredControlScriptsScope; 'app:online' handler moved
directly into EventsHandlers.php as core system behaviour.
- Replaced scandir() with scopes-manifest.json in App::control_scripts_init().
New scopes require explicit manifest entry; no auto-discovery.
- Removed /api/v1/scripts/scopes/update route and scope_update() method.
Remote scope editing via API is no longer available.
- Added ControlScripts::run_regular_script(alias) — unified entry point
with state check and try/catch.
- CronController::run_regular_cron_scripts() now runs each script via
CLI process (php console.php run-regular-script <alias>).
Added 'run-regular-script' command to console.php.
- Updated tests:
+ CronControllerTest — verifies CLI dispatch and disabled skip.
+ ControlScriptsRegularTest — tests run_regular_script():
missing alias, disabled state, exception catch, success path.
Server: 141 tests, 339 assertions — all pass.
Client: 167 tests — all pass.
|
|---|
|
|
| automation/Common.php 0 → 100644 |
|---|
| automation/Scopes/LightHubScope.php 0 → 100644 |
|---|
| automation/Scopes/OfficeRoomScope.php 0 → 100644 |
|---|
| automation/Scopes/SpotlightsScope.php 0 → 100644 |
|---|
| automation/Scopes/TestScriptsScope.php 0 → 100644 |
|---|
| automation/scopes-manifest.json 0 → 100644 |
|---|
| automation/sync-map.json 0 → 100644 |
|---|
| server/ControlScripts/Common.php 100644 → 0 |
|---|
| server/ControlScripts/Scopes/LightHubScope.php 100644 → 0 |
|---|
| server/ControlScripts/Scopes/OfficeRoomScope.php 100644 → 0 |
|---|
| server/ControlScripts/Scopes/SpotlightsScope.php 100644 → 0 |
|---|
| server/ControlScripts/Scopes/TestScriptsScope.php 100644 → 0 |
|---|
| server/ControlScripts/sync-map.json 100644 → 0 |
|---|
| server/SHServ/App.php |
|---|
| server/SHServ/Controllers/CronController.php |
|---|
| server/SHServ/Controllers/ScriptsRESTAPIController.php |
|---|
| server/SHServ/EventsHandlers.php |
|---|
| server/SHServ/Middleware/ControlScripts.php |
|---|
| server/SHServ/RequiredControlScriptsScope.php 100644 → 0 |
|---|
| server/SHServ/Routes/ScriptsRESTAPI_v1.php |
|---|
| server/composer.json |
|---|
| server/console.php |
|---|
| server/index.php |
|---|
| server/tests/ControlScriptsRegularTest.php 0 → 100644 |
|---|
| server/tests/CronControllerTest.php |
|---|