diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-11 00:15:14 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-11 00:15:14 +0900 |
| commit | 8441abd29aea53719c19f34ec6d542a4575a23c9 (patch) | |
| tree | 2d5704acdae268253b69c4bb9a37653635037138 /src/commands/outdated.rs | |
| parent | 9dacb9293f9b995c6c810227f73b4aa5cf019bab (diff) | |
| download | php-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.tar.gz php-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.tar.zst php-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.zip | |
define subcommands and options
Diffstat (limited to 'src/commands/outdated.rs')
| -rw-r--r-- | src/commands/outdated.rs | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/commands/outdated.rs b/src/commands/outdated.rs new file mode 100644 index 0000000..3bbb451 --- /dev/null +++ b/src/commands/outdated.rs @@ -0,0 +1,67 @@ +use clap::Args; + +#[derive(Args)] +pub struct OutdatedArgs { + /// Package to inspect + pub package: Option<String>, + + /// Show only packages that are outdated + #[arg(short, long)] + pub outdated: bool, + + /// Show all installed packages + #[arg(short, long)] + pub all: bool, + + /// Show packages from the lock file + #[arg(long)] + pub locked: bool, + + /// Shows only packages that are directly required by the root package + #[arg(short = 'D', long)] + pub direct: bool, + + /// Return a non-zero exit code when there are outdated packages + #[arg(long)] + pub strict: bool, + + /// Only show packages that have major SemVer-compatible updates + #[arg(short = 'M', long)] + pub major_only: bool, + + /// Only show packages that have minor SemVer-compatible updates + #[arg(short = 'm', long)] + pub minor_only: bool, + + /// Only show packages that have patch SemVer-compatible updates + #[arg(short = 'p', long)] + pub patch_only: bool, + + /// Sort packages by age of the last update + #[arg(short = 'A', long)] + pub sort_by_age: bool, + + /// Output format (text, json) + #[arg(short, long)] + pub format: Option<String>, + + /// Ignore specified package(s) + #[arg(long)] + pub ignore: Vec<String>, + + /// Disables listing of require-dev packages + #[arg(long)] + pub no_dev: bool, + + /// Ignore a specific platform requirement + #[arg(long)] + pub ignore_platform_req: Vec<String>, + + /// Ignore all platform requirements + #[arg(long)] + pub ignore_platform_reqs: bool, +} + +pub fn execute(_args: &OutdatedArgs) { + todo!() +} |
