- Some bugfixes in templates
This commit is contained in:
1 parent
5b68bb191b
commit
3de4b78a0b
9 files changed
+74
-31
No files matched your search
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Lean\Console\Cli;
|
||||
|
||||
use Mcnd\CLI\OptionValueTypeEnum;
|
||||
use Notes\CLI\Attribute\{Option, Command};
|
||||
use Psr\Http\Message\{ServerRequestInterface, ResponseInterface};
|
||||
|
||||
@@ -21,10 +22,10 @@ use Lean\Console\{Lib, };
|
||||
Try #[color:gray, bg: black]'lean console --help'[#] for more information.
|
||||
CLI
|
||||
, command: 'console')]
|
||||
#[Option(toggle: ['-h', '--help'], description: "Display help for the given command. When no command is given display help for the list command")]
|
||||
#[Option(toggle: ['-q', '--quiet'], description: "Do not output any message")]
|
||||
#[Option(toggle: ['-n', '--no-interaction'], description: "Run script without user interaction")]
|
||||
#[Option(toggle: ['-v', '-vv', '-vvv', '--verbose'], description: "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug", argument: Option::ARGUMENT_OPTIONAL)]
|
||||
#[Option(switch: ['-h', '--help'], description: "Display help for the given command. When no command is given display help for the list command")]
|
||||
#[Option(switch: ['-q', '--quiet'], description: "Do not output any message")]
|
||||
#[Option(switch: ['-n', '--no-interaction'], description: "Run script without user interaction")]
|
||||
#[Option(switch: ['-v', '-vv', '-vvv', '--verbose'], description: "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug", value: OptionValueTypeEnum::OptionalValue)]
|
||||
class Console
|
||||
{
|
||||
use Lib\ConsoleControllerTrait;
|
||||
|
||||
+6
-5
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Lean\Console\Cli;
|
||||
|
||||
use Mcnd\CLI\OptionValueTypeEnum;
|
||||
use Notes\CLI\Attribute\{Option, Command};
|
||||
use Psr\Http\Message\{ServerRequestInterface, ResponseInterface};
|
||||
|
||||
@@ -22,16 +23,16 @@ use Lean\Console\{Lib, };
|
||||
Try #[color:gray, bg: black]'lean console storage --help'[#] for more information.
|
||||
CLI
|
||||
, command: 'console storage')]
|
||||
#[Option(toggle: ['-h', '--help'], description: "Display help for the given command. When no command is given display help for the list command")]
|
||||
#[Option(toggle: ['-q', '--quiet'], description: "Do not output any message")]
|
||||
#[Option(toggle: ['-n', '--no-interaction'], description: "Run script without user interaction")]
|
||||
#[Option(toggle: ['-v', '-vv', '-vvv', '--verbose'], description: "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug", argument: Option::ARGUMENT_OPTIONAL)]
|
||||
#[Option(switch: ['-h', '--help'], description: "Display help for the given command. When no command is given display help for the list command")]
|
||||
#[Option(switch: ['-q', '--quiet'], description: "Do not output any message")]
|
||||
#[Option(switch: ['-n', '--no-interaction'], description: "Run script without user interaction")]
|
||||
#[Option(switch: ['-v', '-vv', '-vvv', '--verbose'], description: "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug", value: OptionValueTypeEnum::OptionalValue)]
|
||||
class Storage
|
||||
{
|
||||
use Lib\ConsoleControllerTrait;
|
||||
|
||||
#[Command(description: "Generate entities based on an existing connection", command: "entity:generate")]
|
||||
#[Option(toggle: ['-l', '--list'], description: "")]
|
||||
#[Option(switch: ['-l', '--list'], description: "")]
|
||||
public function generate_entity(ServerRequestInterface $request, array $arguments): ResponseInterface
|
||||
{
|
||||
dump($arguments);
|
||||
|
||||
@@ -27,6 +27,7 @@ class Console {
|
||||
|
||||
$status = iterator_to_array($git->run("/usr/bin/git status -s"));
|
||||
$diff = iterator_to_array($git->run("/usr/bin/git diff"));
|
||||
$lastUpdate = iterator_to_array($git->run("/usr/bin/git show --no-patch --format=%ci"))[0] ?? null;
|
||||
|
||||
return $this->renderView("lean-console/page/update/index", get_defined_vars());
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Lean\Console\Lib;
|
||||
|
||||
use DI\Attribute\Inject;
|
||||
use Notes\Attribute\Ignore;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
@@ -20,6 +21,7 @@ trait ConsoleControllerTrait
|
||||
{
|
||||
use \Lean\ControllerTrait;
|
||||
|
||||
#[Inject]
|
||||
protected ContainerInterface $container;
|
||||
|
||||
#[Ignore]
|
||||
|
||||
Reference in new issue
Block a user