diff --git a/app/controller/admin/system/dev/CommandController.php b/app/controller/admin/system/dev/CommandController.php new file mode 100644 index 0000000..1d01d89 --- /dev/null +++ b/app/controller/admin/system/dev/CommandController.php @@ -0,0 +1,53 @@ + $class) { + $names = explode(':', $cmdName); + $group = ''; + if(count($names) > 1){ + $group = $names[0]; + } + if(is_string($class)){ + $classObj = Console::getCommand($cmdName); + $className = $class; + }else{ + $classObj = $class; + $className = get_class($class); + } + $className = ltrim($className, '\\'); + $type = ""; + if(str_starts_with($className, 'think\\')){ + $type = "think"; + } + + $lists[$group][] = [ + 'name' => $cmdName, + 'type' => $type, + 'group' => $group, + 'class' => $className, + 'description'=> $classObj->getDescription(), + 'aliases' => $classObj->getAliases(), + 'arguments' => $classObj->getDefinition()->getArguments(), + 'options' => $classObj->getDefinition()->getOptions() + ]; + } + $results = []; + foreach ($lists as $group => $list) { + foreach ($list as $item) { + $results[] = $item; + } + } + return $this->writeSuccess('ok', $results); + } +} \ No newline at end of file diff --git a/app/controller/admin/system/dev/ComposerController.php b/app/controller/admin/system/dev/ComposerController.php new file mode 100644 index 0000000..8542f25 --- /dev/null +++ b/app/controller/admin/system/dev/ComposerController.php @@ -0,0 +1,16 @@ +app->getRootPath() . 'composer.lock'; + $composerLockData = json_decode(file_get_contents($composerLockFile), true); + return $this->writeSuccess('ok', $composerLockData); + } +} \ No newline at end of file diff --git a/app/controller/admin/system/dev/CrontabController.php b/app/controller/admin/system/dev/CrontabController.php new file mode 100644 index 0000000..0d40941 --- /dev/null +++ b/app/controller/admin/system/dev/CrontabController.php @@ -0,0 +1,17 @@ +paginate(); + + return $this->writeSuccess('ok', $result); + } +} \ No newline at end of file