From 2c44a0d6fb78342181a395934f635a704cbe4d2e Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Wed, 10 Jan 2024 15:10:41 +0100 Subject: [PATCH] chore: rename `package-manager` to `extension-manager` --- ...l => flarum-extension-manager-backend.yml} | 4 +- composer.json | 6 +- .../.gitattributes | 0 .../.gitignore | 0 .../LICENSE.md | 2 +- .../README.md | 8 +- .../assets/flarum.svg | 0 .../composer.json | 14 +-- .../extend.php | 34 +++--- .../js/.gitignore | 0 .../js/admin.ts | 0 .../components/AuthMethodModal.d.ts | 0 .../components/ConfigureAuth.d.ts | 0 .../components/ConfigureComposer.d.ts | 0 .../components/ConfigureJson.d.ts | 0 .../components/ControlSection.d.ts | 0 .../components/ExtensionItem.d.ts | 0 .../js/dist-typings/components/Installer.d.ts | 0 .../js/dist-typings/components/Label.d.ts | 0 .../dist-typings/components/MajorUpdater.d.ts | 0 .../dist-typings/components/Pagination.d.ts | 0 .../dist-typings/components/QueueSection.d.ts | 0 .../components/RepositoryModal.d.ts | 0 .../dist-typings/components/SettingsPage.d.ts | 0 .../components/TaskOutputModal.d.ts | 0 .../js/dist-typings/components/Updater.d.ts | 0 .../dist-typings/components/WhyNotModal.d.ts | 0 .../js/dist-typings/index.d.ts | 0 .../js/dist-typings/models/Task.d.ts | 0 .../states/ControlSectionState.d.ts | 0 .../states/PackageManagerState.d.ts | 0 .../js/dist-typings/states/QueueState.d.ts | 0 .../js/dist-typings/utils/errorHandler.d.ts | 0 .../js/dist-typings/utils/humanDuration.d.ts | 0 .../js/dist-typings/utils/jumpToQueue.d.ts | 0 .../js/dist/admin.js | 0 .../js/dist/admin.js.map | 0 .../js/package.json | 2 +- .../src/admin/components/AuthMethodModal.tsx | 22 ++-- .../js/src/admin/components/ConfigureAuth.tsx | 14 +-- .../admin/components/ConfigureComposer.tsx | 28 ++--- .../js/src/admin/components/ConfigureJson.tsx | 2 +- .../src/admin/components/ControlSection.tsx | 8 +- .../js/src/admin/components/ExtensionItem.tsx | 34 +++--- .../js/src/admin/components/Installer.tsx | 14 +-- .../js/src/admin/components/Label.tsx | 0 .../js/src/admin/components/MajorUpdater.tsx | 45 ++++---- .../js/src/admin/components/Pagination.tsx | 4 +- .../js/src/admin/components/QueueSection.tsx | 60 +++++----- .../src/admin/components/RepositoryModal.tsx | 16 +-- .../js/src/admin/components/SettingsPage.tsx | 12 +- .../src/admin/components/TaskOutputModal.tsx | 12 +- .../js/src/admin/components/Updater.tsx | 50 ++++----- .../js/src/admin/components/WhyNotModal.tsx | 4 +- .../js/src/admin/index.tsx | 38 +++---- .../js/src/admin/models/Task.ts | 0 .../js/src/admin/shims.d.ts | 4 +- .../src/admin/states/ControlSectionState.ts | 40 ++++--- .../admin/states/ExtensionManagerState.ts} | 2 +- .../js/src/admin/states/QueueState.ts | 12 +- .../js/src/admin/utils/errorHandler.ts | 10 +- .../js/src/admin/utils/humanDuration.ts | 0 .../js/src/admin/utils/jumpToQueue.ts | 16 +++ .../js/tsconfig.json | 0 .../js/webpack.config.js | 0 extensions/extension-manager/less/admin.less | 104 ++++++++++++++++++ .../less/admin/ControlSection.less | 18 +-- .../less/admin/Label.less | 0 .../less/admin/QueueSection.less | 4 +- .../less/admin/TaskOutputModal.less | 0 .../locale/en.yml | 8 +- ...000_create_package_manager_tasks_table.php | 2 +- ..._column_to_package_manager_tasks_table.php | 28 +++++ ..._10_000000_rename_to_extension_manager.php | 16 +++ .../Controller/CheckForUpdatesController.php | 6 +- .../ConfigureComposerController.php | 8 +- .../Api/Controller/GlobalUpdateController.php | 6 +- .../Api/Controller/ListTasksController.php | 8 +- .../Api/Controller/MajorUpdateController.php | 6 +- .../Api/Controller/MinorUpdateController.php | 6 +- .../Controller/RemoveExtensionController.php | 6 +- .../Controller/RequireExtensionController.php | 6 +- .../Controller/UpdateExtensionController.php | 6 +- .../src/Api/Controller/WhyNotController.php | 6 +- .../src/Api/Serializer/TaskSerializer.php | 6 +- .../src/Command/AbstractActionCommand.php | 4 +- .../src/Command/CheckForUpdates.php | 4 +- .../src/Command/CheckForUpdatesHandler.php | 14 +-- .../src/Command/GlobalUpdate.php | 4 +- .../src/Command/GlobalUpdateHandler.php | 8 +- .../src/Command/MajorUpdate.php | 4 +- .../src/Command/MajorUpdateHandler.php | 16 +-- .../src/Command/MinorUpdate.php | 4 +- .../src/Command/MinorUpdateHandler.php | 14 +-- .../src/Command/RemoveExtension.php | 4 +- .../src/Command/RemoveExtensionHandler.php | 14 +-- .../src/Command/RequireExtension.php | 4 +- .../src/Command/RequireExtensionHandler.php | 14 +-- .../src/Command/UpdateExtension.php | 4 +- .../src/Command/UpdateExtensionHandler.php | 14 +-- .../src/Command/WhyNot.php | 4 +- .../src/Command/WhyNotHandler.php | 8 +- .../src/Composer/ComposerAdapter.php | 8 +- .../src/Composer/ComposerJson.php | 4 +- .../src/Composer/ComposerOutput.php | 2 +- .../src/ConfigureComposerValidator.php | 2 +- .../src/Event/FlarumUpdated.php | 2 +- .../ComposerCommandFailedException.php | 2 +- .../ComposerRequireFailedException.php | 2 +- .../ComposerUpdateFailedException.php | 2 +- .../src/Exception/ExceptionHandler.php | 2 +- .../ExtensionAlreadyInstalledException.php | 2 +- .../ExtensionNotInstalledException.php | 2 +- ...sionDependencyCannotBeRemovedException.php | 2 +- .../Exception/MajorUpdateFailedException.php | 6 +- .../Exception/NoNewMajorVersionException.php | 2 +- .../src/Extension/Event/Installed.php | 2 +- .../src/Extension/Event/Removed.php | 2 +- .../src/Extension/Event/Updated.php | 2 +- .../src/ExtensionManagerServiceProvider.php} | 14 +-- .../src/Job/ComposerCommandJob.php | 8 +- .../src/Job/Dispatcher.php | 10 +- .../src/Job/DispatcherResponse.php | 2 +- .../src/Listener/ClearCacheAfterUpdate.php | 4 +- .../src/Listener/ReCheckForUpdates.php | 12 +- .../src/OutputLogger.php | 2 +- .../src/RequirePackageValidator.php | 2 +- .../src/Settings/JsonSetting.php | 2 +- .../src/Settings/LastUpdateCheck.php | 4 +- .../src/Settings/LastUpdateRun.php | 6 +- .../src/Support/Util.php | 2 +- .../src/Task/Task.php | 4 +- .../src/Task/TaskRepository.php | 2 +- .../src/UpdateExtensionValidator.php | 2 +- .../src/WhyNotValidator.php | 2 +- .../tests/fixtures/.gitkeep | 0 .../integration/ChangeComposerConfig.php | 2 +- .../tests/integration/DummyExtensions.php | 2 +- .../integration/RefreshComposerSetup.php | 4 +- .../tests/integration/SetupComposer.php | 2 +- .../tests/integration/TestCase.php | 10 +- .../integration/api/CheckForUpdatesTest.php | 10 +- .../integration/api/GlobalUpdateTest.php | 8 +- .../tests/integration/api/MajorUpdateTest.php | 20 ++-- .../tests/integration/api/MinorUpdateTest.php | 20 ++-- .../api/extensions/RemoveExtensionTest.php | 10 +- .../api/extensions/RequireExtensionTest.php | 16 +-- .../api/extensions/UpdateExtensionTest.php | 10 +- .../tests/integration/setup.php | 2 +- .../tests/phpunit.integration.xml | 0 .../tests/phpunit.unit.xml | 0 .../tests/unit/.gitkeep | 0 .../js/src/admin/utils/jumpToQueue.ts | 16 --- extensions/package-manager/less/admin.less | 58 ---------- ..._column_to_package_manager_tasks_table.php | 14 --- flarum-monorepo.json | 4 +- phpstan.neon | 4 +- 157 files changed, 666 insertions(+), 575 deletions(-) rename .github/workflows/{flarum-package-manager-backend.yml => flarum-extension-manager-backend.yml} (65%) rename extensions/{package-manager => extension-manager}/.gitattributes (100%) rename extensions/{package-manager => extension-manager}/.gitignore (100%) rename extensions/{package-manager => extension-manager}/LICENSE.md (94%) rename extensions/{package-manager => extension-manager}/README.md (50%) rename extensions/{package-manager => extension-manager}/assets/flarum.svg (100%) rename extensions/{package-manager => extension-manager}/composer.json (85%) rename extensions/{package-manager => extension-manager}/extend.php (50%) rename extensions/{package-manager => extension-manager}/js/.gitignore (100%) rename extensions/{package-manager => extension-manager}/js/admin.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/AuthMethodModal.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/ConfigureAuth.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/ConfigureComposer.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/ConfigureJson.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/ControlSection.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/ExtensionItem.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/Installer.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/Label.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/MajorUpdater.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/Pagination.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/QueueSection.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/RepositoryModal.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/SettingsPage.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/TaskOutputModal.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/Updater.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/components/WhyNotModal.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/index.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/models/Task.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/states/ControlSectionState.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/states/PackageManagerState.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/states/QueueState.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/utils/errorHandler.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/utils/humanDuration.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist-typings/utils/jumpToQueue.d.ts (100%) rename extensions/{package-manager => extension-manager}/js/dist/admin.js (100%) rename extensions/{package-manager => extension-manager}/js/dist/admin.js.map (100%) rename extensions/{package-manager => extension-manager}/js/package.json (96%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/AuthMethodModal.tsx (65%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/ConfigureAuth.tsx (86%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/ConfigureComposer.tsx (69%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/ConfigureJson.tsx (97%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/ControlSection.tsx (76%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/ExtensionItem.tsx (65%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/Installer.tsx (72%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/Label.tsx (100%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/MajorUpdater.tsx (55%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/Pagination.tsx (87%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/QueueSection.tsx (63%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/RepositoryModal.tsx (70%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/SettingsPage.tsx (77%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/TaskOutputModal.tsx (63%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/Updater.tsx (59%) rename extensions/{package-manager => extension-manager}/js/src/admin/components/WhyNotModal.tsx (89%) rename extensions/{package-manager => extension-manager}/js/src/admin/index.tsx (59%) rename extensions/{package-manager => extension-manager}/js/src/admin/models/Task.ts (100%) rename extensions/{package-manager => extension-manager}/js/src/admin/shims.d.ts (64%) rename extensions/{package-manager => extension-manager}/js/src/admin/states/ControlSectionState.ts (82%) rename extensions/{package-manager/js/src/admin/states/PackageManagerState.ts => extension-manager/js/src/admin/states/ExtensionManagerState.ts} (82%) rename extensions/{package-manager => extension-manager}/js/src/admin/states/QueueState.ts (81%) rename extensions/{package-manager => extension-manager}/js/src/admin/utils/errorHandler.ts (70%) rename extensions/{package-manager => extension-manager}/js/src/admin/utils/humanDuration.ts (100%) create mode 100644 extensions/extension-manager/js/src/admin/utils/jumpToQueue.ts rename extensions/{package-manager => extension-manager}/js/tsconfig.json (100%) rename extensions/{package-manager => extension-manager}/js/webpack.config.js (100%) create mode 100755 extensions/extension-manager/less/admin.less rename extensions/{package-manager => extension-manager}/less/admin/ControlSection.less (88%) rename extensions/{package-manager => extension-manager}/less/admin/Label.less (100%) rename extensions/{package-manager => extension-manager}/less/admin/QueueSection.less (91%) rename extensions/{package-manager => extension-manager}/less/admin/TaskOutputModal.less (100%) rename extensions/{package-manager => extension-manager}/locale/en.yml (92%) rename extensions/{package-manager => extension-manager}/migrations/2022_02_22_000000_create_package_manager_tasks_table.php (95%) create mode 100644 extensions/extension-manager/migrations/2023_12_09_000000_add_guessed_cause_column_to_package_manager_tasks_table.php create mode 100644 extensions/extension-manager/migrations/2024_01_10_000000_rename_to_extension_manager.php rename extensions/{package-manager => extension-manager}/src/Api/Controller/CheckForUpdatesController.php (88%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/ConfigureComposerController.php (95%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/GlobalUpdateController.php (88%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/ListTasksController.php (85%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/MajorUpdateController.php (88%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/MinorUpdateController.php (88%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/RemoveExtensionController.php (88%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/RequireExtensionController.php (88%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/UpdateExtensionController.php (89%) rename extensions/{package-manager => extension-manager}/src/Api/Controller/WhyNotController.php (88%) rename extensions/{package-manager => extension-manager}/src/Api/Serializer/TaskSerializer.php (89%) rename extensions/{package-manager => extension-manager}/src/Command/AbstractActionCommand.php (85%) rename extensions/{package-manager => extension-manager}/src/Command/CheckForUpdates.php (86%) rename extensions/{package-manager => extension-manager}/src/Command/CheckForUpdatesHandler.php (93%) rename extensions/{package-manager => extension-manager}/src/Command/GlobalUpdate.php (86%) rename extensions/{package-manager => extension-manager}/src/Command/GlobalUpdateHandler.php (89%) rename extensions/{package-manager => extension-manager}/src/Command/MajorUpdate.php (88%) rename extensions/{package-manager => extension-manager}/src/Command/MajorUpdateHandler.php (89%) rename extensions/{package-manager => extension-manager}/src/Command/MinorUpdate.php (85%) rename extensions/{package-manager => extension-manager}/src/Command/MinorUpdateHandler.php (81%) rename extensions/{package-manager => extension-manager}/src/Command/RemoveExtension.php (87%) rename extensions/{package-manager => extension-manager}/src/Command/RemoveExtensionHandler.php (83%) rename extensions/{package-manager => extension-manager}/src/Command/RequireExtension.php (88%) rename extensions/{package-manager => extension-manager}/src/Command/RequireExtensionHandler.php (84%) rename extensions/{package-manager => extension-manager}/src/Command/UpdateExtension.php (89%) rename extensions/{package-manager => extension-manager}/src/Command/UpdateExtensionHandler.php (87%) rename extensions/{package-manager => extension-manager}/src/Command/WhyNot.php (89%) rename extensions/{package-manager => extension-manager}/src/Command/WhyNotHandler.php (87%) rename extensions/{package-manager => extension-manager}/src/Composer/ComposerAdapter.php (91%) rename extensions/{package-manager => extension-manager}/src/Composer/ComposerJson.php (96%) rename extensions/{package-manager => extension-manager}/src/Composer/ComposerOutput.php (93%) rename extensions/{package-manager => extension-manager}/src/ConfigureComposerValidator.php (96%) rename extensions/{package-manager => extension-manager}/src/Event/FlarumUpdated.php (93%) rename extensions/{package-manager => extension-manager}/src/Exception/ComposerCommandFailedException.php (94%) rename extensions/{package-manager => extension-manager}/src/Exception/ComposerRequireFailedException.php (97%) rename extensions/{package-manager => extension-manager}/src/Exception/ComposerUpdateFailedException.php (85%) rename extensions/{package-manager => extension-manager}/src/Exception/ExceptionHandler.php (95%) rename extensions/{package-manager => extension-manager}/src/Exception/ExtensionAlreadyInstalledException.php (92%) rename extensions/{package-manager => extension-manager}/src/Exception/ExtensionNotInstalledException.php (92%) rename extensions/{package-manager => extension-manager}/src/Exception/IndirectExtensionDependencyCannotBeRemovedException.php (93%) rename extensions/{package-manager => extension-manager}/src/Exception/MajorUpdateFailedException.php (91%) rename extensions/{package-manager => extension-manager}/src/Exception/NoNewMajorVersionException.php (92%) rename extensions/{package-manager => extension-manager}/src/Extension/Event/Installed.php (87%) rename extensions/{package-manager => extension-manager}/src/Extension/Event/Removed.php (88%) rename extensions/{package-manager => extension-manager}/src/Extension/Event/Updated.php (90%) rename extensions/{package-manager/src/PackageManagerServiceProvider.php => extension-manager/src/ExtensionManagerServiceProvider.php} (90%) rename extensions/{package-manager => extension-manager}/src/Job/ComposerCommandJob.php (88%) rename extensions/{package-manager => extension-manager}/src/Job/Dispatcher.php (89%) rename extensions/{package-manager => extension-manager}/src/Job/DispatcherResponse.php (90%) rename extensions/{package-manager => extension-manager}/src/Listener/ClearCacheAfterUpdate.php (93%) rename extensions/{package-manager => extension-manager}/src/Listener/ReCheckForUpdates.php (83%) rename extensions/{package-manager => extension-manager}/src/OutputLogger.php (95%) rename extensions/{package-manager => extension-manager}/src/RequirePackageValidator.php (93%) rename extensions/{package-manager => extension-manager}/src/Settings/JsonSetting.php (90%) rename extensions/{package-manager => extension-manager}/src/Settings/LastUpdateCheck.php (93%) rename extensions/{package-manager => extension-manager}/src/Settings/LastUpdateRun.php (93%) rename extensions/{package-manager => extension-manager}/src/Support/Util.php (97%) rename extensions/{package-manager => extension-manager}/src/Task/Task.php (96%) rename extensions/{package-manager => extension-manager}/src/Task/TaskRepository.php (93%) rename extensions/{package-manager => extension-manager}/src/UpdateExtensionValidator.php (92%) rename extensions/{package-manager => extension-manager}/src/WhyNotValidator.php (93%) rename extensions/{package-manager => extension-manager}/tests/fixtures/.gitkeep (100%) rename extensions/{package-manager => extension-manager}/tests/integration/ChangeComposerConfig.php (88%) rename extensions/{package-manager => extension-manager}/tests/integration/DummyExtensions.php (93%) rename extensions/{package-manager => extension-manager}/tests/integration/RefreshComposerSetup.php (92%) rename extensions/{package-manager => extension-manager}/tests/integration/SetupComposer.php (96%) rename extensions/{package-manager => extension-manager}/tests/integration/TestCase.php (91%) rename extensions/{package-manager => extension-manager}/tests/integration/api/CheckForUpdatesTest.php (72%) rename extensions/{package-manager => extension-manager}/tests/integration/api/GlobalUpdateTest.php (65%) rename extensions/{package-manager => extension-manager}/tests/integration/api/MajorUpdateTest.php (84%) rename extensions/{package-manager => extension-manager}/tests/integration/api/MinorUpdateTest.php (80%) rename extensions/{package-manager => extension-manager}/tests/integration/api/extensions/RemoveExtensionTest.php (72%) rename extensions/{package-manager => extension-manager}/tests/integration/api/extensions/RequireExtensionTest.php (84%) rename extensions/{package-manager => extension-manager}/tests/integration/api/extensions/UpdateExtensionTest.php (72%) rename extensions/{package-manager => extension-manager}/tests/integration/setup.php (86%) rename extensions/{package-manager => extension-manager}/tests/phpunit.integration.xml (100%) rename extensions/{package-manager => extension-manager}/tests/phpunit.unit.xml (100%) rename extensions/{package-manager => extension-manager}/tests/unit/.gitkeep (100%) delete mode 100644 extensions/package-manager/js/src/admin/utils/jumpToQueue.ts delete mode 100755 extensions/package-manager/less/admin.less delete mode 100644 extensions/package-manager/migrations/2023_12_09_000000_add_guessed_cause_column_to_package_manager_tasks_table.php diff --git a/.github/workflows/flarum-package-manager-backend.yml b/.github/workflows/flarum-extension-manager-backend.yml similarity index 65% rename from .github/workflows/flarum-package-manager-backend.yml rename to .github/workflows/flarum-extension-manager-backend.yml index 77a12e945cb..426064cf66c 100644 --- a/.github/workflows/flarum-package-manager-backend.yml +++ b/.github/workflows/flarum-extension-manager-backend.yml @@ -1,4 +1,4 @@ -name: Package Manager PHP +name: Extension Manager PHP on: [workflow_dispatch, push, pull_request] @@ -8,4 +8,4 @@ jobs: with: enable_backend_testing: false - backend_directory: ./extensions/package-manager + backend_directory: ./extensions/extension-manager diff --git a/composer.json b/composer.json index 59644ffbdca..b1bf553115e 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "Flarum\\Lock\\": "extensions/lock/src", "Flarum\\Mentions\\": "extensions/mentions/src", "Flarum\\Nicknames\\": "extensions/nicknames/src", - "Flarum\\PackageManager\\": "extensions/package-manager/src", + "Flarum\\ExtensionManager\\": "extensions/extension-manager/src", "Flarum\\Pusher\\": "extensions/pusher/src", "Flarum\\Statistics\\": "extensions/statistics/src", "Flarum\\Sticky\\": "extensions/sticky/src", @@ -74,7 +74,7 @@ "flarum/markdown": "self.version", "flarum/mentions": "self.version", "flarum/nicknames": "self.version", - "flarum/package-manager": "self.version", + "flarum/extension-manager": "self.version", "flarum/pusher": "self.version", "flarum/statistics": "self.version", "flarum/sticky": "self.version", @@ -165,7 +165,7 @@ "extensions/markdown", "extensions/mentions", "extensions/nicknames", - "extensions/package-manager", + "extensions/extension-manager", "extensions/pusher", "extensions/statistics", "extensions/sticky", diff --git a/extensions/package-manager/.gitattributes b/extensions/extension-manager/.gitattributes similarity index 100% rename from extensions/package-manager/.gitattributes rename to extensions/extension-manager/.gitattributes diff --git a/extensions/package-manager/.gitignore b/extensions/extension-manager/.gitignore similarity index 100% rename from extensions/package-manager/.gitignore rename to extensions/extension-manager/.gitignore diff --git a/extensions/package-manager/LICENSE.md b/extensions/extension-manager/LICENSE.md similarity index 94% rename from extensions/package-manager/LICENSE.md rename to extensions/extension-manager/LICENSE.md index 71a61da5737..73986f18a2c 100755 --- a/extensions/package-manager/LICENSE.md +++ b/extensions/extension-manager/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) Sami Mazouz +Copyright (c) 2024 Stichting Flarum (Flarum Foundation) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/extensions/package-manager/README.md b/extensions/extension-manager/README.md similarity index 50% rename from extensions/package-manager/README.md rename to extensions/extension-manager/README.md index 9716bc0821a..46f1bd0200c 100755 --- a/extensions/package-manager/README.md +++ b/extensions/extension-manager/README.md @@ -1,6 +1,6 @@ -# Package Manager +# Extension Manager -The package manager is a tool that allows you to easily install and manage extensions. It runs [composer](https://getcomposer.org/) under the hood. +The extension manager is a tool that allows you to easily install and manage extensions. It runs [composer](https://getcomposer.org/) under the hood. ## Security @@ -10,9 +10,9 @@ This extension is optional and can be removed for those who prefer to manually m ## Troubleshooting -If you have many extensions installed, you may run into memory issues when using the package manager. If this happens, you can use an asynchronous queue that will run the package manager in the background. +If you have many extensions installed, you may run into memory issues when using the extension manager. If this happens, you can use an asynchronous queue that will run the extension manager in the background. * Simple database queue guide: https://discuss.flarum.org/d/28151-database-queue-the-simplest-queue-even-for-shared-hosting * (Advanced) Redis queue: https://discuss.flarum.org/d/21873-redis-sessions-cache-queues -You can find detailed logs on the package manager operations in the `storage/logs/composer` directory. Please include the latest log file when reporting issues in the [Flarum support forum](https://discuss.flarum.org/t/support). +You can find detailed logs on the extension manager operations in the `storage/logs/composer` directory. Please include the latest log file when reporting issues in the [Flarum support forum](https://discuss.flarum.org/t/support). diff --git a/extensions/package-manager/assets/flarum.svg b/extensions/extension-manager/assets/flarum.svg similarity index 100% rename from extensions/package-manager/assets/flarum.svg rename to extensions/extension-manager/assets/flarum.svg diff --git a/extensions/package-manager/composer.json b/extensions/extension-manager/composer.json similarity index 85% rename from extensions/package-manager/composer.json rename to extensions/extension-manager/composer.json index b8e390a3bbc..4abb1a5c5b9 100755 --- a/extensions/package-manager/composer.json +++ b/extensions/extension-manager/composer.json @@ -1,6 +1,6 @@ { - "name": "flarum/package-manager", - "description": "A Flarum Package Manager.", + "name": "flarum/extension-manager", + "description": "An extension manager to install, update and remove extension packages from the interface (Wrapper around composer).", "keywords": [ "extensions", "composer", @@ -18,8 +18,8 @@ } ], "support": { - "issues": "https://github.com/flarum/package-manager/issues", - "source": "https://github.com/flarum/package-manager" + "issues": "https://github.com/flarum/framework/issues", + "source": "https://github.com/flarum/extension-manager" }, "require": { "flarum/core": "^1.8", @@ -31,7 +31,7 @@ }, "extra": { "flarum-extension": { - "title": "Package Manager", + "title": "Extension Manager", "icon": { "name": "fas fa-box-open", "backgroundColor": "#117187", @@ -69,12 +69,12 @@ }, "autoload": { "psr-4": { - "Flarum\\PackageManager\\": "src/" + "Flarum\\ExtensionManager\\": "src/" } }, "autoload-dev": { "psr-4": { - "Flarum\\PackageManager\\Tests\\": "tests/" + "Flarum\\ExtensionManager\\Tests\\": "tests/" } }, "scripts": { diff --git a/extensions/package-manager/extend.php b/extensions/extension-manager/extend.php similarity index 50% rename from extensions/package-manager/extend.php rename to extensions/extension-manager/extend.php index e702889df7b..85a491f66a7 100755 --- a/extensions/package-manager/extend.php +++ b/extensions/extension-manager/extend.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\PackageManager; +namespace Flarum\ExtensionManager; use Flarum\Extend; use Flarum\Foundation\Paths; @@ -17,16 +17,16 @@ return [ (new Extend\Routes('api')) - ->post('/package-manager/extensions', 'package-manager.extensions.require', Api\Controller\RequireExtensionController::class) - ->patch('/package-manager/extensions/{id}', 'package-manager.extensions.update', Api\Controller\UpdateExtensionController::class) - ->delete('/package-manager/extensions/{id}', 'package-manager.extensions.remove', Api\Controller\RemoveExtensionController::class) - ->post('/package-manager/check-for-updates', 'package-manager.check-for-updates', Api\Controller\CheckForUpdatesController::class) - ->post('/package-manager/why-not', 'package-manager.why-not', Api\Controller\WhyNotController::class) - ->post('/package-manager/minor-update', 'package-manager.minor-update', Api\Controller\MinorUpdateController::class) - ->post('/package-manager/major-update', 'package-manager.major-update', Api\Controller\MajorUpdateController::class) - ->post('/package-manager/global-update', 'package-manager.global-update', Api\Controller\GlobalUpdateController::class) - ->get('/package-manager-tasks', 'package-manager.tasks.index', Api\Controller\ListTasksController::class) - ->post('/package-manager/composer', 'package-manager.composer', Api\Controller\ConfigureComposerController::class), + ->post('/extension-manager/extensions', 'extension-manager.extensions.require', Api\Controller\RequireExtensionController::class) + ->patch('/extension-manager/extensions/{id}', 'extension-manager.extensions.update', Api\Controller\UpdateExtensionController::class) + ->delete('/extension-manager/extensions/{id}', 'extension-manager.extensions.remove', Api\Controller\RemoveExtensionController::class) + ->post('/extension-manager/check-for-updates', 'extension-manager.check-for-updates', Api\Controller\CheckForUpdatesController::class) + ->post('/extension-manager/why-not', 'extension-manager.why-not', Api\Controller\WhyNotController::class) + ->post('/extension-manager/minor-update', 'extension-manager.minor-update', Api\Controller\MinorUpdateController::class) + ->post('/extension-manager/major-update', 'extension-manager.major-update', Api\Controller\MajorUpdateController::class) + ->post('/extension-manager/global-update', 'extension-manager.global-update', Api\Controller\GlobalUpdateController::class) + ->get('/extension-manager-tasks', 'extension-manager.tasks.index', Api\Controller\ListTasksController::class) + ->post('/extension-manager/composer', 'extension-manager.composer', Api\Controller\ConfigureComposerController::class), (new Extend\Frontend('admin')) ->css(__DIR__.'/less/admin.less') @@ -34,13 +34,13 @@ ->content(function (Document $document) { $paths = resolve(Paths::class); - $document->payload['flarum-package-manager.writable_dirs'] = is_writable($paths->vendor) + $document->payload['flarum-extension-manager.writable_dirs'] = is_writable($paths->vendor) && is_writable($paths->storage) && (! file_exists($paths->storage.'/.composer') || is_writable($paths->storage.'/.composer')) && is_writable($paths->base.'/composer.json') && is_writable($paths->base.'/composer.lock'); - $document->payload['flarum-package-manager.using_sync_queue'] = resolve(Queue::class) instanceof SyncQueue; + $document->payload['flarum-extension-manager.using_sync_queue'] = resolve(Queue::class) instanceof SyncQueue; }), new Extend\Locales(__DIR__.'/locale'), @@ -48,12 +48,12 @@ (new Extend\Settings()) ->default(Settings\LastUpdateCheck::key(), json_encode(Settings\LastUpdateCheck::default())) ->default(Settings\LastUpdateRun::key(), json_encode(Settings\LastUpdateRun::default())) - ->default('flarum-package-manager.queue_jobs', false) - ->default('flarum-package-manager.minimum_stability', 'stable') - ->default('flarum-package-manager.task_retention_days', 7), + ->default('flarum-extension-manager.queue_jobs', '0') + ->default('flarum-extension-manager.minimum_stability', 'stable') + ->default('flarum-extension-manager.task_retention_days', 7), (new Extend\ServiceProvider) - ->register(PackageManagerServiceProvider::class), + ->register(ExtensionManagerServiceProvider::class), (new Extend\ErrorHandling) ->handler(Exception\ComposerCommandFailedException::class, Exception\ExceptionHandler::class) diff --git a/extensions/package-manager/js/.gitignore b/extensions/extension-manager/js/.gitignore similarity index 100% rename from extensions/package-manager/js/.gitignore rename to extensions/extension-manager/js/.gitignore diff --git a/extensions/package-manager/js/admin.ts b/extensions/extension-manager/js/admin.ts similarity index 100% rename from extensions/package-manager/js/admin.ts rename to extensions/extension-manager/js/admin.ts diff --git a/extensions/package-manager/js/dist-typings/components/AuthMethodModal.d.ts b/extensions/extension-manager/js/dist-typings/components/AuthMethodModal.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/AuthMethodModal.d.ts rename to extensions/extension-manager/js/dist-typings/components/AuthMethodModal.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/ConfigureAuth.d.ts b/extensions/extension-manager/js/dist-typings/components/ConfigureAuth.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/ConfigureAuth.d.ts rename to extensions/extension-manager/js/dist-typings/components/ConfigureAuth.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/ConfigureComposer.d.ts b/extensions/extension-manager/js/dist-typings/components/ConfigureComposer.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/ConfigureComposer.d.ts rename to extensions/extension-manager/js/dist-typings/components/ConfigureComposer.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/ConfigureJson.d.ts b/extensions/extension-manager/js/dist-typings/components/ConfigureJson.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/ConfigureJson.d.ts rename to extensions/extension-manager/js/dist-typings/components/ConfigureJson.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/ControlSection.d.ts b/extensions/extension-manager/js/dist-typings/components/ControlSection.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/ControlSection.d.ts rename to extensions/extension-manager/js/dist-typings/components/ControlSection.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/ExtensionItem.d.ts b/extensions/extension-manager/js/dist-typings/components/ExtensionItem.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/ExtensionItem.d.ts rename to extensions/extension-manager/js/dist-typings/components/ExtensionItem.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/Installer.d.ts b/extensions/extension-manager/js/dist-typings/components/Installer.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/Installer.d.ts rename to extensions/extension-manager/js/dist-typings/components/Installer.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/Label.d.ts b/extensions/extension-manager/js/dist-typings/components/Label.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/Label.d.ts rename to extensions/extension-manager/js/dist-typings/components/Label.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/MajorUpdater.d.ts b/extensions/extension-manager/js/dist-typings/components/MajorUpdater.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/MajorUpdater.d.ts rename to extensions/extension-manager/js/dist-typings/components/MajorUpdater.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/Pagination.d.ts b/extensions/extension-manager/js/dist-typings/components/Pagination.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/Pagination.d.ts rename to extensions/extension-manager/js/dist-typings/components/Pagination.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/QueueSection.d.ts b/extensions/extension-manager/js/dist-typings/components/QueueSection.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/QueueSection.d.ts rename to extensions/extension-manager/js/dist-typings/components/QueueSection.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/RepositoryModal.d.ts b/extensions/extension-manager/js/dist-typings/components/RepositoryModal.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/RepositoryModal.d.ts rename to extensions/extension-manager/js/dist-typings/components/RepositoryModal.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/SettingsPage.d.ts b/extensions/extension-manager/js/dist-typings/components/SettingsPage.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/SettingsPage.d.ts rename to extensions/extension-manager/js/dist-typings/components/SettingsPage.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/TaskOutputModal.d.ts b/extensions/extension-manager/js/dist-typings/components/TaskOutputModal.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/TaskOutputModal.d.ts rename to extensions/extension-manager/js/dist-typings/components/TaskOutputModal.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/Updater.d.ts b/extensions/extension-manager/js/dist-typings/components/Updater.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/Updater.d.ts rename to extensions/extension-manager/js/dist-typings/components/Updater.d.ts diff --git a/extensions/package-manager/js/dist-typings/components/WhyNotModal.d.ts b/extensions/extension-manager/js/dist-typings/components/WhyNotModal.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/components/WhyNotModal.d.ts rename to extensions/extension-manager/js/dist-typings/components/WhyNotModal.d.ts diff --git a/extensions/package-manager/js/dist-typings/index.d.ts b/extensions/extension-manager/js/dist-typings/index.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/index.d.ts rename to extensions/extension-manager/js/dist-typings/index.d.ts diff --git a/extensions/package-manager/js/dist-typings/models/Task.d.ts b/extensions/extension-manager/js/dist-typings/models/Task.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/models/Task.d.ts rename to extensions/extension-manager/js/dist-typings/models/Task.d.ts diff --git a/extensions/package-manager/js/dist-typings/states/ControlSectionState.d.ts b/extensions/extension-manager/js/dist-typings/states/ControlSectionState.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/states/ControlSectionState.d.ts rename to extensions/extension-manager/js/dist-typings/states/ControlSectionState.d.ts diff --git a/extensions/package-manager/js/dist-typings/states/PackageManagerState.d.ts b/extensions/extension-manager/js/dist-typings/states/PackageManagerState.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/states/PackageManagerState.d.ts rename to extensions/extension-manager/js/dist-typings/states/PackageManagerState.d.ts diff --git a/extensions/package-manager/js/dist-typings/states/QueueState.d.ts b/extensions/extension-manager/js/dist-typings/states/QueueState.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/states/QueueState.d.ts rename to extensions/extension-manager/js/dist-typings/states/QueueState.d.ts diff --git a/extensions/package-manager/js/dist-typings/utils/errorHandler.d.ts b/extensions/extension-manager/js/dist-typings/utils/errorHandler.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/utils/errorHandler.d.ts rename to extensions/extension-manager/js/dist-typings/utils/errorHandler.d.ts diff --git a/extensions/package-manager/js/dist-typings/utils/humanDuration.d.ts b/extensions/extension-manager/js/dist-typings/utils/humanDuration.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/utils/humanDuration.d.ts rename to extensions/extension-manager/js/dist-typings/utils/humanDuration.d.ts diff --git a/extensions/package-manager/js/dist-typings/utils/jumpToQueue.d.ts b/extensions/extension-manager/js/dist-typings/utils/jumpToQueue.d.ts similarity index 100% rename from extensions/package-manager/js/dist-typings/utils/jumpToQueue.d.ts rename to extensions/extension-manager/js/dist-typings/utils/jumpToQueue.d.ts diff --git a/extensions/package-manager/js/dist/admin.js b/extensions/extension-manager/js/dist/admin.js similarity index 100% rename from extensions/package-manager/js/dist/admin.js rename to extensions/extension-manager/js/dist/admin.js diff --git a/extensions/package-manager/js/dist/admin.js.map b/extensions/extension-manager/js/dist/admin.js.map similarity index 100% rename from extensions/package-manager/js/dist/admin.js.map rename to extensions/extension-manager/js/dist/admin.js.map diff --git a/extensions/package-manager/js/package.json b/extensions/extension-manager/js/package.json similarity index 96% rename from extensions/package-manager/js/package.json rename to extensions/extension-manager/js/package.json index 84ea77b01b8..ad9661a8b37 100644 --- a/extensions/package-manager/js/package.json +++ b/extensions/extension-manager/js/package.json @@ -1,5 +1,5 @@ { - "name": "@flarum/package-manager", + "name": "@flarum/extension-manager", "version": "0.0.0", "private": true, "prettier": "@flarum/prettier-config", diff --git a/extensions/package-manager/js/src/admin/components/AuthMethodModal.tsx b/extensions/extension-manager/js/src/admin/components/AuthMethodModal.tsx similarity index 65% rename from extensions/package-manager/js/src/admin/components/AuthMethodModal.tsx rename to extensions/extension-manager/js/src/admin/components/AuthMethodModal.tsx index 55d1c99fefe..c228002ac55 100644 --- a/extensions/package-manager/js/src/admin/components/AuthMethodModal.tsx +++ b/extensions/extension-manager/js/src/admin/components/AuthMethodModal.tsx @@ -32,40 +32,40 @@ export default class AuthMethodModal
- +
- +