register_command.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-FileCopyrightText: 2013-2016 ownCloud, Inc.
  6. * SPDX-License-Identifier: AGPL-3.0-only
  7. */
  8. use OC\Core\Command;
  9. use OCP\IConfig;
  10. use OCP\Server;
  11. use Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand;
  12. $application->add(new CompletionCommand());
  13. $application->add(Server::get(Command\Status::class));
  14. $application->add(Server::get(Command\Check::class));
  15. $application->add(Server::get(Command\L10n\CreateJs::class));
  16. $application->add(Server::get(Command\Integrity\SignApp::class));
  17. $application->add(Server::get(Command\Integrity\SignCore::class));
  18. $application->add(Server::get(Command\Integrity\CheckApp::class));
  19. $application->add(Server::get(Command\Integrity\CheckCore::class));
  20. $config = Server::get(IConfig::class);
  21. if ($config->getSystemValueBool('installed', false)) {
  22. $application->add(Server::get(Command\App\Disable::class));
  23. $application->add(Server::get(Command\App\Enable::class));
  24. $application->add(Server::get(Command\App\Install::class));
  25. $application->add(Server::get(Command\App\GetPath::class));
  26. $application->add(Server::get(Command\App\ListApps::class));
  27. $application->add(Server::get(Command\App\Remove::class));
  28. $application->add(Server::get(Command\App\Update::class));
  29. $application->add(Server::get(Command\TwoFactorAuth\Cleanup::class));
  30. $application->add(Server::get(Command\TwoFactorAuth\Enforce::class));
  31. $application->add(Server::get(Command\TwoFactorAuth\Enable::class));
  32. $application->add(Server::get(Command\TwoFactorAuth\Disable::class));
  33. $application->add(Server::get(Command\TwoFactorAuth\State::class));
  34. $application->add(Server::get(Command\Background\Mode::class));
  35. $application->add(Server::get(Command\Background\Job::class));
  36. $application->add(Server::get(Command\Background\ListCommand::class));
  37. $application->add(Server::get(Command\Background\Delete::class));
  38. $application->add(Server::get(Command\Background\JobWorker::class));
  39. $application->add(Server::get(Command\Broadcast\Test::class));
  40. $application->add(Server::get(Command\Config\App\DeleteConfig::class));
  41. $application->add(Server::get(Command\Config\App\GetConfig::class));
  42. $application->add(Server::get(Command\Config\App\SetConfig::class));
  43. $application->add(Server::get(Command\Config\Import::class));
  44. $application->add(Server::get(Command\Config\ListConfigs::class));
  45. $application->add(Server::get(Command\Config\System\DeleteConfig::class));
  46. $application->add(Server::get(Command\Config\System\GetConfig::class));
  47. $application->add(Server::get(Command\Config\System\SetConfig::class));
  48. $application->add(Server::get(Command\Info\File::class));
  49. $application->add(Server::get(Command\Info\Space::class));
  50. $application->add(Server::get(Command\Db\ConvertType::class));
  51. $application->add(Server::get(Command\Db\ConvertMysqlToMB4::class));
  52. $application->add(Server::get(Command\Db\ConvertFilecacheBigInt::class));
  53. $application->add(Server::get(Command\Db\AddMissingColumns::class));
  54. $application->add(Server::get(Command\Db\AddMissingIndices::class));
  55. $application->add(Server::get(Command\Db\AddMissingPrimaryKeys::class));
  56. $application->add(Server::get(Command\Db\ExpectedSchema::class));
  57. $application->add(Server::get(Command\Db\ExportSchema::class));
  58. $application->add(Server::get(Command\Db\Migrations\GenerateMetadataCommand::class));
  59. $application->add(Server::get(Command\Db\Migrations\PreviewCommand::class));
  60. if ($config->getSystemValueBool('debug', false)) {
  61. $application->add(Server::get(Command\Db\Migrations\StatusCommand::class));
  62. $application->add(Server::get(Command\Db\Migrations\MigrateCommand::class));
  63. $application->add(Server::get(Command\Db\Migrations\GenerateCommand::class));
  64. $application->add(Server::get(Command\Db\Migrations\ExecuteCommand::class));
  65. }
  66. $application->add(Server::get(Command\Encryption\Disable::class));
  67. $application->add(Server::get(Command\Encryption\Enable::class));
  68. $application->add(Server::get(Command\Encryption\ListModules::class));
  69. $application->add(Server::get(Command\Encryption\SetDefaultModule::class));
  70. $application->add(Server::get(Command\Encryption\Status::class));
  71. $application->add(Server::get(Command\Encryption\EncryptAll::class));
  72. $application->add(Server::get(Command\Encryption\DecryptAll::class));
  73. $application->add(Server::get(Command\Log\Manage::class));
  74. $application->add(Server::get(Command\Log\File::class));
  75. $application->add(Server::get(Command\Encryption\ChangeKeyStorageRoot::class));
  76. $application->add(Server::get(Command\Encryption\ShowKeyStorageRoot::class));
  77. $application->add(Server::get(Command\Encryption\MigrateKeyStorage::class));
  78. $application->add(Server::get(Command\Maintenance\DataFingerprint::class));
  79. $application->add(Server::get(Command\Maintenance\Mimetype\UpdateDB::class));
  80. $application->add(Server::get(Command\Maintenance\Mimetype\UpdateJS::class));
  81. $application->add(Server::get(Command\Maintenance\Mode::class));
  82. $application->add(Server::get(Command\Maintenance\UpdateHtaccess::class));
  83. $application->add(Server::get(Command\Maintenance\UpdateTheme::class));
  84. $application->add(Server::get(Command\Upgrade::class));
  85. $application->add(Server::get(Command\Maintenance\Repair::class));
  86. $application->add(Server::get(Command\Maintenance\RepairShareOwnership::class));
  87. $application->add(Server::get(Command\Preview\Generate::class));
  88. $application->add(Server::get(Command\Preview\Repair::class));
  89. $application->add(Server::get(Command\Preview\ResetRenderedTexts::class));
  90. $application->add(Server::get(Command\User\Add::class));
  91. $application->add(Server::get(Command\User\Delete::class));
  92. $application->add(Server::get(Command\User\Disable::class));
  93. $application->add(Server::get(Command\User\Enable::class));
  94. $application->add(Server::get(Command\User\LastSeen::class));
  95. $application->add(Server::get(Command\User\Report::class));
  96. $application->add(Server::get(Command\User\ResetPassword::class));
  97. $application->add(Server::get(Command\User\Setting::class));
  98. $application->add(Server::get(Command\User\ListCommand::class));
  99. $application->add(Server::get(Command\User\ClearGeneratedAvatarCacheCommand::class));
  100. $application->add(Server::get(Command\User\Info::class));
  101. $application->add(Server::get(Command\User\SyncAccountDataCommand::class));
  102. $application->add(Server::get(Command\User\AuthTokens\Add::class));
  103. $application->add(Server::get(Command\User\AuthTokens\ListCommand::class));
  104. $application->add(Server::get(Command\User\AuthTokens\Delete::class));
  105. $application->add(Server::get(Command\User\Keys\Verify::class));
  106. $application->add(Server::get(Command\User\Welcome::class));
  107. $application->add(Server::get(Command\Group\Add::class));
  108. $application->add(Server::get(Command\Group\Delete::class));
  109. $application->add(Server::get(Command\Group\ListCommand::class));
  110. $application->add(Server::get(Command\Group\AddUser::class));
  111. $application->add(Server::get(Command\Group\RemoveUser::class));
  112. $application->add(Server::get(Command\Group\Info::class));
  113. $application->add(Server::get(Command\SystemTag\ListCommand::class));
  114. $application->add(Server::get(Command\SystemTag\Delete::class));
  115. $application->add(Server::get(Command\SystemTag\Add::class));
  116. $application->add(Server::get(Command\SystemTag\Edit::class));
  117. $application->add(Server::get(Command\Security\ListCertificates::class));
  118. $application->add(Server::get(Command\Security\ExportCertificates::class));
  119. $application->add(Server::get(Command\Security\ImportCertificate::class));
  120. $application->add(Server::get(Command\Security\RemoveCertificate::class));
  121. $application->add(Server::get(Command\Security\BruteforceAttempts::class));
  122. $application->add(Server::get(Command\Security\BruteforceResetAttempts::class));
  123. $application->add(Server::get(Command\SetupChecks::class));
  124. $application->add(Server::get(Command\FilesMetadata\Get::class));
  125. $application->add(Server::get(Command\TaskProcessing\ListCommand::class));
  126. $application->add(Server::get(Command\TaskProcessing\Statistics::class));
  127. $application->add(Server::get(Command\Memcache\RedisCommand::class));
  128. } else {
  129. $application->add(Server::get(Command\Maintenance\Install::class));
  130. }