1
0

register_command.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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\Cron::class));
  35. $application->add(Server::get(Command\Background\WebCron::class));
  36. $application->add(Server::get(Command\Background\Ajax::class));
  37. $application->add(Server::get(Command\Background\Job::class));
  38. $application->add(Server::get(Command\Background\ListCommand::class));
  39. $application->add(Server::get(Command\Background\Delete::class));
  40. $application->add(Server::get(Command\Background\JobWorker::class));
  41. $application->add(Server::get(Command\Broadcast\Test::class));
  42. $application->add(Server::get(Command\Config\App\DeleteConfig::class));
  43. $application->add(Server::get(Command\Config\App\GetConfig::class));
  44. $application->add(Server::get(Command\Config\App\SetConfig::class));
  45. $application->add(Server::get(Command\Config\Import::class));
  46. $application->add(Server::get(Command\Config\ListConfigs::class));
  47. $application->add(Server::get(Command\Config\System\DeleteConfig::class));
  48. $application->add(Server::get(Command\Config\System\GetConfig::class));
  49. $application->add(Server::get(Command\Config\System\SetConfig::class));
  50. $application->add(Server::get(Command\Info\File::class));
  51. $application->add(Server::get(Command\Info\Space::class));
  52. $application->add(Server::get(Command\Db\ConvertType::class));
  53. $application->add(Server::get(Command\Db\ConvertMysqlToMB4::class));
  54. $application->add(Server::get(Command\Db\ConvertFilecacheBigInt::class));
  55. $application->add(Server::get(Command\Db\AddMissingColumns::class));
  56. $application->add(Server::get(Command\Db\AddMissingIndices::class));
  57. $application->add(Server::get(Command\Db\AddMissingPrimaryKeys::class));
  58. if ($config->getSystemValueBool('debug', false)) {
  59. $application->add(Server::get(Command\Db\Migrations\StatusCommand::class));
  60. $application->add(Server::get(Command\Db\Migrations\MigrateCommand::class));
  61. $application->add(Server::get(Command\Db\Migrations\GenerateCommand::class));
  62. $application->add(Server::get(Command\Db\Migrations\ExecuteCommand::class));
  63. }
  64. $application->add(Server::get(Command\Encryption\Disable::class));
  65. $application->add(Server::get(Command\Encryption\Enable::class));
  66. $application->add(Server::get(Command\Encryption\ListModules::class));
  67. $application->add(Server::get(Command\Encryption\SetDefaultModule::class));
  68. $application->add(Server::get(Command\Encryption\Status::class));
  69. $application->add(Server::get(Command\Encryption\EncryptAll::class));
  70. $application->add(Server::get(Command\Encryption\DecryptAll::class));
  71. $application->add(Server::get(Command\Log\Manage::class));
  72. $application->add(Server::get(Command\Log\File::class));
  73. $application->add(Server::get(Command\Encryption\ChangeKeyStorageRoot::class));
  74. $application->add(Server::get(Command\Encryption\ShowKeyStorageRoot::class));
  75. $application->add(Server::get(Command\Encryption\MigrateKeyStorage::class));
  76. $application->add(Server::get(Command\Maintenance\DataFingerprint::class));
  77. $application->add(Server::get(Command\Maintenance\Mimetype\UpdateDB::class));
  78. $application->add(Server::get(Command\Maintenance\Mimetype\UpdateJS::class));
  79. $application->add(Server::get(Command\Maintenance\Mode::class));
  80. $application->add(Server::get(Command\Maintenance\UpdateHtaccess::class));
  81. $application->add(Server::get(Command\Maintenance\UpdateTheme::class));
  82. $application->add(Server::get(Command\Upgrade::class));
  83. $application->add(Server::get(Command\Maintenance\Repair::class));
  84. $application->add(Server::get(Command\Maintenance\RepairShareOwnership::class));
  85. $application->add(Server::get(Command\Preview\Generate::class));
  86. $application->add(Server::get(Command\Preview\Repair::class));
  87. $application->add(Server::get(Command\Preview\ResetRenderedTexts::class));
  88. $application->add(Server::get(Command\User\Add::class));
  89. $application->add(Server::get(Command\User\Delete::class));
  90. $application->add(Server::get(Command\User\Disable::class));
  91. $application->add(Server::get(Command\User\Enable::class));
  92. $application->add(Server::get(Command\User\LastSeen::class));
  93. $application->add(Server::get(Command\User\Report::class));
  94. $application->add(Server::get(Command\User\ResetPassword::class));
  95. $application->add(Server::get(Command\User\Setting::class));
  96. $application->add(Server::get(Command\User\ListCommand::class));
  97. $application->add(Server::get(Command\User\ClearGeneratedAvatarCacheCommand::class));
  98. $application->add(Server::get(Command\User\Info::class));
  99. $application->add(Server::get(Command\User\SyncAccountDataCommand::class));
  100. $application->add(Server::get(Command\User\AuthTokens\Add::class));
  101. $application->add(Server::get(Command\User\AuthTokens\ListCommand::class));
  102. $application->add(Server::get(Command\User\AuthTokens\Delete::class));
  103. $application->add(Server::get(Command\User\Keys\Verify::class));
  104. $application->add(Server::get(Command\Group\Add::class));
  105. $application->add(Server::get(Command\Group\Delete::class));
  106. $application->add(Server::get(Command\Group\ListCommand::class));
  107. $application->add(Server::get(Command\Group\AddUser::class));
  108. $application->add(Server::get(Command\Group\RemoveUser::class));
  109. $application->add(Server::get(Command\Group\Info::class));
  110. $application->add(Server::get(Command\SystemTag\ListCommand::class));
  111. $application->add(Server::get(Command\SystemTag\Delete::class));
  112. $application->add(Server::get(Command\SystemTag\Add::class));
  113. $application->add(Server::get(Command\SystemTag\Edit::class));
  114. $application->add(Server::get(Command\Security\ListCertificates::class));
  115. $application->add(Server::get(Command\Security\ImportCertificate::class));
  116. $application->add(Server::get(Command\Security\RemoveCertificate::class));
  117. $application->add(Server::get(Command\Security\BruteforceAttempts::class));
  118. $application->add(Server::get(Command\Security\BruteforceResetAttempts::class));
  119. $application->add(Server::get(Command\SetupChecks::class));
  120. $application->add(Server::get(Command\FilesMetadata\Get::class));
  121. } else {
  122. $application->add(Server::get(Command\Maintenance\Install::class));
  123. }