refactor: reorder commands in help message

Reorders the commands in the help message so they
appear in a more logical order.
This commit is contained in:
daimond113 2025-02-01 01:01:40 +01:00
parent b30f9ecdeb
commit 2154fc0e84
No known key found for this signature in database
GPG key ID: 640DC95EC1190354

View file

@ -38,18 +38,29 @@ pub enum Subcommand {
/// Initializes a manifest file in the current directory
Init(init::InitCommand),
/// Runs a script, an executable package, or a file with Lune
Run(run::RunCommand),
/// Adds a dependency to the project
Add(add::AddCommand),
/// Installs all dependencies for the project
Install(install::InstallCommand),
/// Updates the project's lockfile. Run install to apply changes
Update(update::UpdateCommand),
/// Checks for outdated dependencies
Outdated(outdated::OutdatedCommand),
/// Runs a script, an executable package, or a file with Lune
Run(run::RunCommand),
/// Publishes the project to the registry
Publish(publish::PublishCommand),
/// Installs the pesde binary and scripts
#[cfg(feature = "version-management")]
SelfInstall(self_install::SelfInstallCommand),
/// Yanks a package from the registry
Yank(yank::YankCommand),
/// Deprecates a package from the registry
Deprecate(deprecate::DeprecateCommand),
/// Sets up a patching environment for a package
#[cfg(feature = "patches")]
@ -59,28 +70,17 @@ pub enum Subcommand {
#[cfg(feature = "patches")]
PatchCommit(patch_commit::PatchCommitCommand),
/// Installs the latest version of pesde
#[cfg(feature = "version-management")]
SelfUpgrade(self_upgrade::SelfUpgradeCommand),
/// Adds a dependency to the project
Add(add::AddCommand),
/// Updates the project's lockfile. Run install to apply changes
Update(update::UpdateCommand),
/// Checks for outdated dependencies
Outdated(outdated::OutdatedCommand),
/// Executes a binary package without needing to be run in a project directory
#[clap(name = "x", visible_alias = "execute", visible_alias = "exec")]
Execute(execute::ExecuteCommand),
/// Yanks a package from the registry
Yank(yank::YankCommand),
/// Installs the pesde binary and scripts
#[cfg(feature = "version-management")]
SelfInstall(self_install::SelfInstallCommand),
/// Deprecates a package from the registry
Deprecate(deprecate::DeprecateCommand),
/// Installs the latest version of pesde
#[cfg(feature = "version-management")]
SelfUpgrade(self_upgrade::SelfUpgradeCommand),
}
impl Subcommand {
@ -90,23 +90,23 @@ impl Subcommand {
Subcommand::Config(config) => config.run().await,
Subcommand::Cas(cas) => cas.run(project).await,
Subcommand::Init(init) => init.run(project).await,
Subcommand::Run(run) => run.run(project).await,
Subcommand::Add(add) => add.run(project).await,
Subcommand::Install(install) => install.run(project, reqwest).await,
Subcommand::Update(update) => update.run(project, reqwest).await,
Subcommand::Outdated(outdated) => outdated.run(project).await,
Subcommand::Run(run) => run.run(project).await,
Subcommand::Publish(publish) => publish.run(project, reqwest).await,
#[cfg(feature = "version-management")]
Subcommand::SelfInstall(self_install) => self_install.run().await,
Subcommand::Yank(yank) => yank.run(project, reqwest).await,
Subcommand::Deprecate(deprecate) => deprecate.run(project, reqwest).await,
#[cfg(feature = "patches")]
Subcommand::Patch(patch) => patch.run(project, reqwest).await,
#[cfg(feature = "patches")]
Subcommand::PatchCommit(patch_commit) => patch_commit.run(project).await,
Subcommand::Execute(execute) => execute.run(project, reqwest).await,
#[cfg(feature = "version-management")]
Subcommand::SelfInstall(self_install) => self_install.run().await,
#[cfg(feature = "version-management")]
Subcommand::SelfUpgrade(self_upgrade) => self_upgrade.run(reqwest).await,
Subcommand::Add(add) => add.run(project).await,
Subcommand::Update(update) => update.run(project, reqwest).await,
Subcommand::Outdated(outdated) => outdated.run(project).await,
Subcommand::Execute(execute) => execute.run(project, reqwest).await,
Subcommand::Yank(yank) => yank.run(project, reqwest).await,
Subcommand::Deprecate(deprecate) => deprecate.run(project, reqwest).await,
}
}
}