From 21dd2c7356e6291be877605f154fd74b57635150 Mon Sep 17 00:00:00 2001 From: sak0a Date: Tue, 5 May 2026 03:04:57 +0200 Subject: [PATCH] Rename CLI lifecycle commands --- AUDIT_BASELINE.md | 2 +- CHANGELOG.md | 6 ++--- CLAUDE.md | 2 +- README.md | 4 ++-- ROADMAP.md | 4 ++-- docker/e2e/install-uninstall.sh | 2 +- docker/e2e/setup-panel.sh | 2 +- installer/install.sh | 4 ++-- resources/views/admin/extensions.blade.php | 2 +- .../{InstallCommand.php => AddCommand.php} | 6 ++--- ...mand.php => FrameworkUninstallCommand.php} | 4 ++-- src/Console/Commands/UpdateCommand.php | 4 ++-- src/Console/UI/Components/StatusDashboard.php | 4 ++-- .../Controllers/ExtensionAdminController.php | 6 ++--- src/NoturServiceProvider.php | 8 +++---- .../Console/CommandCoverageTest.php | 8 +++---- website/docs/admin/guide.md | 24 +++++++++---------- website/docs/admin/registry.md | 4 ++-- website/docs/extensions/api-reference.md | 4 ++-- website/docs/extensions/frontend-sdk.md | 2 +- website/docs/extensions/guide.md | 2 +- website/docs/extensions/registry.md | 4 ++-- website/docs/extensions/signing.md | 2 +- website/docs/reference/changelog.md | 8 +++---- website/docs/reference/roadmap.md | 2 +- 25 files changed, 60 insertions(+), 60 deletions(-) rename src/Console/Commands/{InstallCommand.php => AddCommand.php} (98%) rename src/Console/Commands/{UninstallCommand.php => FrameworkUninstallCommand.php} (99%) diff --git a/AUDIT_BASELINE.md b/AUDIT_BASELINE.md index 723fd5b7..2a1c39c0 100644 --- a/AUDIT_BASELINE.md +++ b/AUDIT_BASELINE.md @@ -26,7 +26,7 @@ Every subsequent phase should keep these gates green unless a phase explicitly u 1. `./vendor/bin/phpunit --display-warnings` must pass. 2. `npm run test:frontend -- --runInBand` must pass. -3. `notur:install` must reject archives with missing/invalid checksums by default. +3. `notur:add` must reject archives with missing/invalid checksums by default. 4. Signature-required installs from registry must fail fast on missing/invalid `.sig`. 5. `notur:new` frontend scaffolds must not hardcode Bun-only commands. 6. CI frontend test step must not ignore failures. diff --git a/CHANGELOG.md b/CHANGELOG.md index 519a5ea9..1c6fe525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ All notable changes to the Notur Extension Library will be documented in this fi - **Installer Git safe.directory handling**: bind-mounted Docker installs no longer emit Composer/Git “dubious ownership” failures for `/app`. - **Installer Yarn recovery**: if Yarn is selected but cannot parse/install the existing lockfile while another supported lockfile manager is also present, the installer can fall back cleanly instead of aborting immediately. - **Admin extension removal feedback**: web-triggered extension removal now respects the `notur:remove` exit code and surfaces failures back to the UI instead of always claiming success. -- Missing reverse patches for `index.tsx` and `admin.blade.php` so `notur:uninstall` now restores the panel to pristine source. +- Missing reverse patches for `index.tsx` and `admin.blade.php` so `notur:framework:uninstall` now restores the panel to pristine source. - Malformed third hunk in `FileManager.tsx.patch` that emitted a "No such line 117" warning during install. ## [1.3.2] - 2026-04-03 @@ -74,8 +74,8 @@ All notable changes to the Notur Extension Library will be documented in this fi - **`ExtensionManager` refactored** — Entrypoint resolution extracted to `EntrypointResolver` (~300 lines moved). Manager reduced from 803 to 567 lines. - **`NewCommand` refactored** — File-writing logic extracted to `ScaffoldGenerator` (~690 lines moved). Command reduced from 1,031 to 326 lines. -- **`InstallCommand` / `RemoveCommand`** — Now extend `ExtensionLifecycleCommand` base class with shared `clearNoturCaches()` and `removeExtensionFiles()`. -- **`UninstallCommand`** — Uses `ManagesFilesystem` trait instead of duplicated `deleteDirectory()`. +- **`AddCommand` / `RemoveCommand`** — Now extend `ExtensionLifecycleCommand` base class with shared `clearNoturCaches()` and `removeExtensionFiles()`. +- **`FrameworkUninstallCommand`** — Uses `ManagesFilesystem` trait instead of duplicated `deleteDirectory()`. - **`ExtensionManifest`** — Throws `ManifestException` instead of `InvalidArgumentException`. - **`DependencyResolver`** — Throws `DependencyResolutionException` instead of `RuntimeException`. - **`ErrorBoundary`** — Uses `recordDiagnosticError()` instead of direct array push. diff --git a/CLAUDE.md b/CLAUDE.md index a2bc89d3..7f9ab188 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -56,7 +56,7 @@ npm run test:frontend # Vitest tests **Database tables:** `notur_extensions`, `notur_migrations`, `notur_settings`, `notur_activity_logs` (migrations in `database/migrations/`). -**Artisan commands** (17 total in `src/Console/Commands/`): `notur:install`, `notur:remove`, `notur:enable`, `notur:disable`, `notur:list`, `notur:update`, `notur:dev`, `notur:dev:pull`, `notur:build`, `notur:export`, `notur:registry:sync`, `notur:uninstall`, `notur:new`, `notur:validate`, `notur:status`, `notur:keygen`, `notur:registry:status`. +**Artisan commands** (17 total in `src/Console/Commands/`): `notur:add`, `notur:remove`, `notur:enable`, `notur:disable`, `notur:list`, `notur:update`, `notur:dev`, `notur:dev:pull`, `notur:build`, `notur:export`, `notur:registry:sync`, `notur:framework:uninstall`, `notur:new`, `notur:validate`, `notur:status`, `notur:keygen`, `notur:registry:status`. ### Frontend Bridge (`bridge/src/`) diff --git a/README.md b/README.md index b76fc585..3eeda244 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ A standalone extension framework for [Pterodactyl Panel](https://pterodactyl.io/ Near-term focus areas: - Frontend test coverage expansion (SlotRenderWhen, CssVariables, ThemeProvider) -- Command integration tests (InstallCommand, BuildCommand) +- Command integration tests (AddCommand, BuildCommand) - Extension dev hot-reload (file-watcher + auto-rebuild) - Pelican Panel compatibility investigation @@ -146,7 +146,7 @@ Panel Response (HTML) ## Extension Lifecycle ```bash -php artisan notur:install acme/server-analytics # Install from registry +php artisan notur:add acme/server-analytics # Install from registry php artisan notur:enable acme/server-analytics # Enable php artisan notur:disable acme/server-analytics # Disable php artisan notur:remove acme/server-analytics # Uninstall + rollback migrations diff --git a/ROADMAP.md b/ROADMAP.md index 78ac76b5..3ee69d96 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ ## Phase 2: CLI + Extension Lifecycle -- [x] **`notur:uninstall` command** — Full framework removal: +- [x] **`notur:framework:uninstall` command** — Full framework removal: - Restore patched React files from `.notur-backup` copies - Roll back all Notur database migrations (4 tables) - Remove Blade injection (`@include('notur::scripts')`) @@ -10,7 +10,7 @@ - Run `composer remove notur/notur` - Trigger frontend rebuild (`bun run build:production`) - [x] **Reverse patches** — Generate and ship reverse `.patch` files for each React patch so uninstall can cleanly revert without relying on backup copies -- [x] **`notur:install` command** — Install extensions from registry or local path +- [x] **`notur:add` command** — Install extensions from registry or local path - [x] **`notur:remove` command** — Remove an installed extension (rollback migrations, delete files, update manifest) - [x] **`notur:enable` / `notur:disable`** — Toggle extensions without removing files - [x] **`notur:update`** — Update an extension to a newer version (run new migrations, swap files) diff --git a/docker/e2e/install-uninstall.sh b/docker/e2e/install-uninstall.sh index 8a84e0a6..a46d954b 100755 --- a/docker/e2e/install-uninstall.sh +++ b/docker/e2e/install-uninstall.sh @@ -53,7 +53,7 @@ if ! mysql_notur_tables | grep -q "notur_extensions"; then fi echo "[E2E] Running non-interactive Notur uninstall..." -COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_DISABLE_AUDIT=1 php artisan notur:uninstall --confirm --no-interaction +COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_DISABLE_AUDIT=1 php artisan notur:framework:uninstall --confirm --no-interaction echo "[E2E] Verifying panel still responds after Notur uninstall..." panel_available diff --git a/docker/e2e/setup-panel.sh b/docker/e2e/setup-panel.sh index ea8bd686..27393c61 100644 --- a/docker/e2e/setup-panel.sh +++ b/docker/e2e/setup-panel.sh @@ -57,7 +57,7 @@ php artisan migrate --path=vendor/notur/notur/database/migrations --force rm -rf /tmp/hello-world-src /tmp/hello-world.notur cp -R /opt/notur/examples/hello-world /tmp/hello-world-src php -r 'require "vendor/autoload.php"; \Notur\Support\NoturArchive::pack("/tmp/hello-world-src", "/tmp/hello-world.notur");' -php artisan notur:install /tmp/hello-world.notur --force +php artisan notur:add /tmp/hello-world.notur --force rm -rf notur/extensions/notur/full-extension mkdir -p notur/extensions/notur diff --git a/installer/install.sh b/installer/install.sh index 5fc40dc3..bd248c9e 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -1409,10 +1409,10 @@ info "Web user: ${WEB_USER}" echo "" info "Next steps:" if is_docker_env; then - info " Install an extension: docker exec -it php artisan notur:install vendor/name" + info " Install an extension: docker exec -it php artisan notur:add vendor/name" info " List extensions: docker exec -it php artisan notur:list" else - info " Install an extension: php artisan notur:install vendor/name" + info " Install an extension: php artisan notur:add vendor/name" info " List extensions: php artisan notur:list" fi info " Manage extensions: Browse to /admin/notur/extensions" diff --git a/resources/views/admin/extensions.blade.php b/resources/views/admin/extensions.blade.php index ba9dd3eb..7a9e8d5d 100644 --- a/resources/views/admin/extensions.blade.php +++ b/resources/views/admin/extensions.blade.php @@ -210,7 +210,7 @@ class="form-control" @if($extensions->isEmpty())

No extensions are installed. Use the form above or the command line:

- php artisan notur:install vendor/extension-name + php artisan notur:add vendor/extension-name
@else diff --git a/src/Console/Commands/InstallCommand.php b/src/Console/Commands/AddCommand.php similarity index 98% rename from src/Console/Commands/InstallCommand.php rename to src/Console/Commands/AddCommand.php index 07f88de3..fdb889de 100644 --- a/src/Console/Commands/InstallCommand.php +++ b/src/Console/Commands/AddCommand.php @@ -15,14 +15,14 @@ use Notur\Support\RegistryClient; use Notur\Support\SignatureVerifier; -class InstallCommand extends ExtensionLifecycleCommand +class AddCommand extends ExtensionLifecycleCommand { - protected $signature = 'notur:install + protected $signature = 'notur:add {extension : The extension ID (vendor/name) or path to a .notur file} {--force : Overwrite if already installed} {--no-migrate : Skip running migrations}'; - protected $description = 'Install a Notur extension'; + protected $description = 'Add a Notur extension'; public function handle( ExtensionManager $manager, diff --git a/src/Console/Commands/UninstallCommand.php b/src/Console/Commands/FrameworkUninstallCommand.php similarity index 99% rename from src/Console/Commands/UninstallCommand.php rename to src/Console/Commands/FrameworkUninstallCommand.php index 199f9ed9..829bd259 100644 --- a/src/Console/Commands/UninstallCommand.php +++ b/src/Console/Commands/FrameworkUninstallCommand.php @@ -9,11 +9,11 @@ use Illuminate\Support\Facades\Schema; use Notur\Console\Concerns\ManagesFilesystem; -class UninstallCommand extends Command +class FrameworkUninstallCommand extends Command { use ManagesFilesystem; - protected $signature = 'notur:uninstall + protected $signature = 'notur:framework:uninstall {--confirm : Skip interactive confirmation}'; protected $description = 'Completely remove the Notur extension framework from this Pterodactyl panel'; diff --git a/src/Console/Commands/UpdateCommand.php b/src/Console/Commands/UpdateCommand.php index e5237557..47271077 100644 --- a/src/Console/Commands/UpdateCommand.php +++ b/src/Console/Commands/UpdateCommand.php @@ -56,7 +56,7 @@ private function updateSingle(string $extensionId, RegistryClient $registry): in } // Reinstall with --force to update - return $this->call('notur:install', [ + return $this->call('notur:add', [ 'extension' => $extensionId, '--force' => true, ]); @@ -108,7 +108,7 @@ private function updateAll(RegistryClient $registry): int } foreach ($updates as $update) { - $this->call('notur:install', [ + $this->call('notur:add', [ 'extension' => $update['id'], '--force' => true, ]); diff --git a/src/Console/UI/Components/StatusDashboard.php b/src/Console/UI/Components/StatusDashboard.php index 69f15d9f..7a9d969a 100644 --- a/src/Console/UI/Components/StatusDashboard.php +++ b/src/Console/UI/Components/StatusDashboard.php @@ -170,7 +170,7 @@ public function renderExtensions(): void if ($extensions->isEmpty()) { $this->command->line(' ' . NoturTheme::muted('No extensions installed.')); - $this->command->line(' ' . NoturTheme::muted('Run: php artisan notur:install ')); + $this->command->line(' ' . NoturTheme::muted('Run: php artisan notur:add ')); $this->command->newLine(); return; @@ -234,7 +234,7 @@ public function renderQuickActions(): void $this->renderSectionHeader('Quick Actions'); $actions = [ - ['key' => 'notur:install ', 'desc' => 'Install an extension'], + ['key' => 'notur:add ', 'desc' => 'Install an extension'], ['key' => 'notur:update', 'desc' => 'Update all extensions'], ['key' => 'notur:list', 'desc' => 'List installed extensions'], ['key' => 'notur:new', 'desc' => 'Create a new extension'], diff --git a/src/Http/Controllers/ExtensionAdminController.php b/src/Http/Controllers/ExtensionAdminController.php index 1a7640e1..2a9c97e7 100644 --- a/src/Http/Controllers/ExtensionAdminController.php +++ b/src/Http/Controllers/ExtensionAdminController.php @@ -471,12 +471,12 @@ public function install(Request $request): RedirectResponse $tmpPath = sys_get_temp_dir() . '/notur-upload-' . uniqid('', true) . '.notur'; $uploadedFile->move(dirname($tmpPath), basename($tmpPath)); - $exitCode = Artisan::call('notur:install', [ + $exitCode = Artisan::call('notur:add', [ 'extension' => $tmpPath, '--force' => true, ]); } else { - $exitCode = Artisan::call('notur:install', [ + $exitCode = Artisan::call('notur:add', [ 'extension' => $registryId, '--force' => true, ]); @@ -530,7 +530,7 @@ public function remove(string $extensionId): RedirectResponse } catch (\Throwable $e) { return redirect() ->route('admin.notur.extensions') - ->with('error', 'Removal failed: ' . $e->getMessage()); + ->with('error', 'Installation failed: ' . $e->getMessage()); } } diff --git a/src/NoturServiceProvider.php b/src/NoturServiceProvider.php index 985bd05c..01b6a35d 100644 --- a/src/NoturServiceProvider.php +++ b/src/NoturServiceProvider.php @@ -14,7 +14,7 @@ use Notur\Console\Commands\DisableCommand; use Notur\Console\Commands\EnableCommand; use Notur\Console\Commands\ExportCommand; -use Notur\Console\Commands\InstallCommand; +use Notur\Console\Commands\AddCommand; use Notur\Console\Commands\KeygenCommand; use Notur\Console\Commands\ListCommand; use Notur\Console\Commands\NewCommand; @@ -22,7 +22,7 @@ use Notur\Console\Commands\RegistrySyncCommand; use Notur\Console\Commands\RemoveCommand; use Notur\Console\Commands\StatusCommand; -use Notur\Console\Commands\UninstallCommand; +use Notur\Console\Commands\FrameworkUninstallCommand; use Notur\Console\Commands\UpdateCommand; use Notur\Console\Commands\ValidateCommand; use Notur\Support\ActivityLogger; @@ -90,7 +90,7 @@ public function boot(): void // Register artisan commands (unconditionally so Artisan::call() works from web controllers) $this->commands([ - InstallCommand::class, + AddCommand::class, RemoveCommand::class, EnableCommand::class, DisableCommand::class, @@ -105,7 +105,7 @@ public function boot(): void RegistryStatusCommand::class, NewCommand::class, ValidateCommand::class, - UninstallCommand::class, + FrameworkUninstallCommand::class, StatusCommand::class, ]); diff --git a/tests/Integration/Console/CommandCoverageTest.php b/tests/Integration/Console/CommandCoverageTest.php index faf103e7..2ca6c128 100644 --- a/tests/Integration/Console/CommandCoverageTest.php +++ b/tests/Integration/Console/CommandCoverageTest.php @@ -64,7 +64,7 @@ public function test_export_command_fails_for_missing_path(): void ->assertExitCode(1); } - public function test_install_command_fails_when_registry_entry_missing(): void + public function test_add_command_fails_when_registry_entry_missing(): void { $registry = Mockery::mock(RegistryClient::class); $registry->shouldReceive('getExtension') @@ -73,7 +73,7 @@ public function test_install_command_fails_when_registry_entry_missing(): void ->andReturn(null); $this->app->instance(RegistryClient::class, $registry); - $this->artisan('notur:install', ['extension' => 'acme/missing']) + $this->artisan('notur:add', ['extension' => 'acme/missing']) ->assertExitCode(1); } @@ -180,9 +180,9 @@ public function test_status_command_outputs_json(): void ->assertExitCode(0); } - public function test_uninstall_command_can_be_cancelled_interactively(): void + public function test_framework_uninstall_command_can_be_cancelled_interactively(): void { - $this->artisan('notur:uninstall') + $this->artisan('notur:framework:uninstall') ->expectsConfirmation('Are you sure you want to uninstall Notur?', 'no') ->expectsOutput('Uninstall cancelled.') ->assertExitCode(0); diff --git a/website/docs/admin/guide.md b/website/docs/admin/guide.md index 9bb3ce89..b5ad607f 100644 --- a/website/docs/admin/guide.md +++ b/website/docs/admin/guide.md @@ -72,13 +72,13 @@ When running commands without arguments in an interactive terminal, Notur provid ```bash # Install an extension by ID -php artisan notur:install acme/server-analytics +php artisan notur:add acme/server-analytics # Install from a local .notur file -php artisan notur:install /path/to/extension.notur +php artisan notur:add /path/to/extension.notur # Force reinstall an existing extension -php artisan notur:install acme/server-analytics --force +php artisan notur:add acme/server-analytics --force ``` #### System Status Dashboard @@ -106,10 +106,10 @@ All commands support `--no-interaction` or `-n` flag for CI/CD pipelines: ```bash # Install without prompts -php artisan notur:install acme/analytics -n +php artisan notur:add acme/analytics -n # Works in CI environments automatically -CI=true php artisan notur:install acme/analytics +CI=true php artisan notur:add acme/analytics ``` ### Listing Extensions @@ -133,16 +133,16 @@ Extensions can be installed from the registry or from a local `.notur` archive f ```bash # Install from the Notur registry -php artisan notur:install acme/server-analytics +php artisan notur:add acme/server-analytics # Install from a local .notur file -php artisan notur:install /path/to/acme-server-analytics-1.0.0.notur +php artisan notur:add /path/to/acme-server-analytics-1.0.0.notur # Force reinstall (overwrite existing) -php artisan notur:install acme/server-analytics --force +php artisan notur:add acme/server-analytics --force # Install without running migrations -php artisan notur:install acme/server-analytics --no-migrate +php artisan notur:add acme/server-analytics --no-migrate ``` During installation, Notur will: @@ -505,13 +505,13 @@ cd /var/www/pterodactyl # This will remove all extensions, restore patched files, drop Notur tables, # remove directories, and trigger a frontend rebuild. -php artisan notur:uninstall +php artisan notur:framework:uninstall # Or skip interactive confirmation -php artisan notur:uninstall --confirm +php artisan notur:framework:uninstall --confirm ``` -The uninstall command performs: +The framework uninstall command performs: 1. Restores patched React files from `.notur-backup` copies (or applies reverse patches) 2. Rolls back Notur database migrations (drops `notur_extensions`, `notur_migrations`, `notur_settings`, `notur_activity_logs`) diff --git a/website/docs/admin/registry.md b/website/docs/admin/registry.md index 93d56354..896f7b23 100644 --- a/website/docs/admin/registry.md +++ b/website/docs/admin/registry.md @@ -23,7 +23,7 @@ The registry is a static JSON file (`registry.json`) hosted on a GitHub reposito 1. **Sync**: `php artisan notur:registry:sync` fetches `registry.json` from the configured registry URL and caches it locally at `storage/notur/registry-cache.json`. The cache TTL is configurable. 2. **Search**: `php artisan notur:registry:sync --search "analytics"` searches the cached (or freshly fetched) index by ID, name, description, and tags. -3. **Install**: `php artisan notur:install acme/analytics` looks up the extension in the registry, downloads the `.notur` archive from its GitHub release, and installs it. +3. **Install**: `php artisan notur:add acme/analytics` looks up the extension in the registry, downloads the `.notur` archive from its GitHub release, and installs it. 4. **Update**: `php artisan notur:update` compares installed versions against the registry and offers to update any extensions with newer versions available. 5. **Status**: `php artisan notur:registry:status` shows cache age, TTL, size, and extension count. @@ -325,7 +325,7 @@ Notur supports Ed25519 signatures on `.notur` archives to verify their integrity 1. The publisher signs the archive with their Ed25519 secret key. 2. The signature is stored in a `.sig` file alongside the archive. -3. When `notur.require_signatures` is `true`, the `InstallCommand` verifies the signature using the configured public key before installation. +3. When `notur.require_signatures` is `true`, the `AddCommand` verifies the signature using the configured public key before installation. 4. If verification fails, installation is aborted. ### Configuration diff --git a/website/docs/extensions/api-reference.md b/website/docs/extensions/api-reference.md index dbd16b65..30cfa2a6 100644 --- a/website/docs/extensions/api-reference.md +++ b/website/docs/extensions/api-reference.md @@ -583,7 +583,7 @@ All commands are prefixed with `notur:` in Artisan. | Command | Signature | Description | |---|---|---| -| `notur:install` | `notur:install {extension} [--force] [--no-migrate]` | Install from registry or `.notur` file | +| `notur:add` | `notur:add {extension} [--force] [--no-migrate]` | Install from registry or `.notur` file | | `notur:remove` | `notur:remove {extension} [--keep-data]` | Remove an extension | | `notur:enable` | `notur:enable {extension}` | Enable a disabled extension | | `notur:disable` | `notur:disable {extension}` | Disable an extension without removing files | @@ -598,7 +598,7 @@ All commands are prefixed with `notur:` in Artisan. | `notur:keygen` | `notur:keygen` | Generate an Ed25519 keypair for extension signing | | `notur:registry:sync` | `notur:registry:sync [--search=] [--force]` | Sync or search the extension registry | | `notur:registry:status` | `notur:registry:status [--json]` | Show registry cache status | -| `notur:uninstall` | `notur:uninstall [--confirm]` | Completely remove Notur from the panel | +| `notur:framework:uninstall` | `notur:framework:uninstall [--confirm]` | Completely remove Notur from the panel | ### Preset Definitions diff --git a/website/docs/extensions/frontend-sdk.md b/website/docs/extensions/frontend-sdk.md index 140d220a..7149e6b4 100644 --- a/website/docs/extensions/frontend-sdk.md +++ b/website/docs/extensions/frontend-sdk.md @@ -82,7 +82,7 @@ A `.notur` file is a tar.gz archive containing: Upload the `.notur` file via: 1. **Admin UI** (recommended): Navigate to `/admin/notur/extensions` and use the upload form -2. **CLI**: `php artisan notur:install /path/to/extension.notur` +2. **CLI**: `php artisan notur:add /path/to/extension.notur` --- diff --git a/website/docs/extensions/guide.md b/website/docs/extensions/guide.md index 4aad14d5..1e7dfafe 100644 --- a/website/docs/extensions/guide.md +++ b/website/docs/extensions/guide.md @@ -697,7 +697,7 @@ Navigate to `/admin/notur/extensions` in your Pterodactyl panel and upload the ` **Via CLI:** ```bash -php artisan notur:install /path/to/acme-server-analytics-1.0.0.notur +php artisan notur:add /path/to/acme-server-analytics-1.0.0.notur ``` ## Available Frontend Slots diff --git a/website/docs/extensions/registry.md b/website/docs/extensions/registry.md index 0802725e..be6f62c7 100644 --- a/website/docs/extensions/registry.md +++ b/website/docs/extensions/registry.md @@ -23,7 +23,7 @@ The registry is a static JSON file (`registry.json`) hosted on a GitHub reposito 1. **Sync**: `php artisan notur:registry:sync` fetches `registry.json` from the configured registry URL and caches it locally at `storage/notur/registry-cache.json`. The cache TTL is configurable. 2. **Search**: `php artisan notur:registry:sync --search "analytics"` searches the cached (or freshly fetched) index by ID, name, description, and tags. -3. **Install**: `php artisan notur:install acme/analytics` looks up the extension in the registry, downloads the `.notur` archive from its GitHub release, and installs it. +3. **Install**: `php artisan notur:add acme/analytics` looks up the extension in the registry, downloads the `.notur` archive from its GitHub release, and installs it. 4. **Update**: `php artisan notur:update` compares installed versions against the registry and offers to update any extensions with newer versions available. 5. **Status**: `php artisan notur:registry:status` shows cache age, TTL, size, and extension count. @@ -325,7 +325,7 @@ Notur supports Ed25519 signatures on `.notur` archives to verify their integrity 1. The publisher signs the archive with their Ed25519 secret key. 2. The signature is stored in a `.sig` file alongside the archive. -3. When `notur.require_signatures` is `true`, the `InstallCommand` verifies the signature using the configured public key before installation. +3. When `notur.require_signatures` is `true`, the `AddCommand` verifies the signature using the configured public key before installation. 4. If verification fails, installation is aborted. ### Configuration diff --git a/website/docs/extensions/signing.md b/website/docs/extensions/signing.md index dc6a92a6..0d61a45b 100644 --- a/website/docs/extensions/signing.md +++ b/website/docs/extensions/signing.md @@ -118,7 +118,7 @@ Store `NOTUR_SECRET_KEY` as a repository secret. Never log or echo it. ## How Verification Works -When `notur:install` processes a `.notur` archive and `require_signatures` is enabled, the following happens: +When `notur:add` processes a `.notur` archive and `require_signatures` is enabled, the following happens: 1. The installer looks for a `.sig` file next to the archive (e.g., `my-extension.notur.sig`). 2. If the `.sig` file is missing, installation is rejected with: `Signature file not found and signatures are required.` diff --git a/website/docs/reference/changelog.md b/website/docs/reference/changelog.md index 041ac86b..9dd52fb5 100644 --- a/website/docs/reference/changelog.md +++ b/website/docs/reference/changelog.md @@ -48,8 +48,8 @@ All notable changes to the Notur Extension Library are documented here. ### Changed - **`ExtensionManager` refactored** — Entrypoint resolution extracted to `EntrypointResolver` (~300 lines moved). Manager reduced from 803 to 567 lines. - **`NewCommand` refactored** — File-writing logic extracted to `ScaffoldGenerator` (~690 lines moved). Command reduced from 1,031 to 326 lines. -- **`InstallCommand` / `RemoveCommand`** — Now extend `ExtensionLifecycleCommand` base class with shared `clearNoturCaches()` and `removeExtensionFiles()`. -- **`UninstallCommand`** — Uses `ManagesFilesystem` trait instead of duplicated `deleteDirectory()`. +- **`AddCommand` / `RemoveCommand`** — Now extend `ExtensionLifecycleCommand` base class with shared `clearNoturCaches()` and `removeExtensionFiles()`. +- **`FrameworkUninstallCommand`** — Uses `ManagesFilesystem` trait instead of duplicated `deleteDirectory()`. - **`ExtensionManifest`** — Throws `ManifestException` instead of `InvalidArgumentException`. - **`DependencyResolver`** — Throws `DependencyResolutionException` instead of `RuntimeException`. - **`ErrorBoundary`** — Uses `recordDiagnosticError()` instead of direct array push. @@ -147,9 +147,9 @@ All notable changes to the Notur Extension Library are documented here. ## Phase 2: CLI + Extension Lifecycle ### Added -- **`notur:uninstall` command** -- Complete framework removal: restores patched files, rolls back migrations, removes Blade injection, deletes directories, removes Composer package, triggers frontend rebuild. +- **`notur:framework:uninstall` command** -- Complete framework removal: restores patched files, rolls back migrations, removes Blade injection, deletes directories, removes Composer package, triggers frontend rebuild. - **Reverse patches** -- Shipped reverse `.patch` files for each React patch to enable clean uninstallation without relying on backup copies. -- **`notur:install` command** -- Install extensions from the registry (by ID) or from local `.notur` archive files. Supports `--force` for reinstallation and `--no-migrate` to skip migrations. +- **`notur:add` command** -- Install extensions from the registry (by ID) or from local `.notur` archive files. Supports `--force` for reinstallation and `--no-migrate` to skip migrations. - **`notur:remove` command** -- Remove an installed extension: disables it, rolls back its migrations (unless `--keep-data`), deletes files, and updates the manifest. - **`notur:enable` / `notur:disable` commands** -- Toggle extensions on/off without removing files or data. Dispatches `ExtensionEnabled` / `ExtensionDisabled` events and clears the cache. - **`notur:update` command** -- Check for and install extension updates from the registry. Supports `--check` for dry-run mode and updating individual or all extensions. diff --git a/website/docs/reference/roadmap.md b/website/docs/reference/roadmap.md index a927cf42..42fac8b6 100644 --- a/website/docs/reference/roadmap.md +++ b/website/docs/reference/roadmap.md @@ -12,7 +12,7 @@ ## Near-Term Focus - Frontend test coverage expansion (SlotRenderWhen, CssVariables, ThemeProvider) -- Command integration tests (InstallCommand, BuildCommand) +- Command integration tests (AddCommand, BuildCommand) - Extension dev hot-reload (file-watcher + auto-rebuild) - Pelican Panel compatibility investigation