You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Toolkit] Update version handling in dependencies to use string format, improve command output messages, improve InstallComponentCommand (interactive ask), remove LintKitCommand
Type::Local->value => fn () => newLocalRegistry($kitFactory, $filesystem, getcwd() ?? thrownew \RuntimeException('The current working directory could not be determined.')),
description: 'Debug a kit, dump the dependencies.',
33
+
description: 'Debug a local Kit.',
33
34
hidden: true,
34
35
)]
35
36
class DebugKitCommand extends Command
36
37
{
37
38
publicfunction__construct(
38
-
privatereadonlyRegistryFactory$registryFactory,
39
+
privatereadonlyKitFactory$kitFactory,
39
40
) {
40
41
parent::__construct();
41
42
}
42
43
43
44
protectedfunctionconfigure(): void
44
45
{
45
46
$this
46
-
->addArgument('kit', InputArgument::REQUIRED, 'The kit name, can be a local kit (e.g.: "shadcn") or a GitHub kit (e.g.: "https://github.com/user/repository@kit-name").')
47
+
->addArgument('kit-path', InputArgument::OPTIONAL, 'The path to the kit to debug', '.')
47
48
->setHelp(<<<'EOF'
48
-
The kit name can be a local kit (e.g.: "shadcn") or a GitHub kit (e.g.: "https://github.com/user/repository@kit-name").
// Get the component name from the argument, or suggest alternatives if it doesn't exist
99
-
if (null === $component = $kit->getComponent($componentName = $input->getArgument('component'))) {
98
+
if (null === $componentName = $input->getArgument('component')) {
99
+
// Ask for the component name if not provided
100
+
$componentName = $io->choice('Which component do you want to install?', array_map(fn (Component$component) => $component->name, $this->getAvailableComponents($kit)));
0 commit comments