Skip to content

Commit c1e289b

Browse files
committed
update some for scli version info
1 parent 2dc1789 commit c1e289b

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

app/Command/AssetCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function publish(Input $input): int
7676
$assetDir = alias($assetDir);
7777
$targetDir = alias($targetDir);
7878

79-
$force = \input()->sameOpt(['f', 'force'], false);
79+
$force = $input->sameOpt(['f', 'force'], false);
8080

8181
if ($force && is_dir($targetDir)) {
8282
output()->writeln("Will delete the old assets: $targetDir");
@@ -91,7 +91,7 @@ public function publish(Input $input): int
9191
}
9292
}
9393

94-
$yes = \input()->sameOpt(['y', 'yes'], false);
94+
$yes = $input->sameOpt(['y', 'yes'], false);
9595
$command = "cp -Rf $assetDir $targetDir";
9696

9797
output()->writeln("Will run shell command:\n $command");

app/Command/ServeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Swoft\Cli\Command;
44

55
use Swoft;
6-
use Swoft\Cli\Bean\ModifyWatcher;
6+
use Swoft\Cli\Common\ModifyWatcher;
77
use Swoft\Cli\Helper\CliHelper;
88
use Swoft\Console\Annotation\Mapping\Command;
99
use Swoft\Console\Annotation\Mapping\CommandArgument;

app/Bean/ModifyWatcher.php renamed to app/Common/ModifyWatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
namespace Swoft\Cli\Bean;
3+
namespace Swoft\Cli\Common;
44

55
use RuntimeException;
66
use Swoft\Stdlib\Helper\Sys;

app/Helper/CliHelper.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,25 @@ class CliHelper
1313
{
1414
public const PREFIX = ' <cyan>[SWOFTCLI]</cyan>';
1515

16+
/**
17+
* @param string $msg
18+
*/
1619
public static function info(string $msg): void
1720
{
1821
Show::writeln(date('Y/m/d-H:i:s') . self::PREFIX . " <info>$msg</info>");
1922
}
2023

24+
/**
25+
* @param string $msg
26+
*/
2127
public static function warn(string $msg): void
2228
{
2329
Show::writeln(date('Y/m/d-H:i:s') . self::PREFIX . " <warning>$msg</warning>");
2430
}
2531

32+
/**
33+
* @param string $msg
34+
*/
2635
public static function error(string $msg): void
2736
{
2837
Show::writeln(date('Y/m/d-H:i:s') . self::PREFIX . " <error>$msg</error>");

app/SwoftCLI.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function afterInit(): void
3131
public function getCLoggerConfig(): array
3232
{
3333
$config = parent::getCLoggerConfig();
34-
// disable print console start log
34+
// disable print console log
3535
$config['enable'] = false;
3636

3737
return $config;

app/bean.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
// use Swoft\Server\Swoole\SwooleEvent;
55

66
return [
7+
'cliApp' => [
8+
'name' => 'Swoft-cli',
9+
'version' => '0.1.2',
10+
'description' => 'CLI tool application for quick use swoft framework',
11+
],
712
'cliRouter' => [
813
'idAliases' => [
914
// 'run' => 'serve:run'

0 commit comments

Comments
 (0)