feat(oven-sh/bun): add run and x command

This commit is contained in:
Kevin Franklin Kim 2025-02-19 12:13:04 +01:00
parent 2f819e3ef3
commit 38d1972761
No known key found for this signature in database

View File

@ -196,6 +196,27 @@ func NewCommand(l log.Logger, cache cache.Cache) *Command {
},
},
},
{
Name: "x",
Description: "Execute a package binary (CLI), installing if needed",
Flags: globalFlags(nil),
Execute: inst.run,
},
{
Name: "run",
Description: "Execute a file with Bun",
Args: tree.Args{
{
Name: "script",
Description: "Run scripts",
Suggest: func(ctx context.Context, t tree.Root, r *readline.Readline) []goprompt.Suggest {
return suggests.List(inst.scripts(ctx, "."))
},
},
},
Flags: globalFlags(nil),
Execute: inst.run,
},
{
Name: "install",
Description: "Install dependencies for a package.json",