()
| 200 | } |
| 201 | |
| 202 | fn create() -> Command { |
| 203 | Command::new(crate_name!()) |
| 204 | .about(crate_description!()) |
| 205 | .version(crate_version!()) |
| 206 | .subcommand( |
| 207 | Command::new("lint") |
| 208 | .about("Lint all versions and ranges and exit with 0 or 1 based on whether all files match your Syncpack configuration file") |
| 209 | .after_long_help(additional_help()) |
| 210 | .arg(config_option("lint")) |
| 211 | .arg(dependencies_option("lint")) |
| 212 | .arg(dependency_types_option("lint")) |
| 213 | .arg(log_levels_option("lint")) |
| 214 | .arg(no_ansi_option("lint")) |
| 215 | .arg(show_option_versions("lint")) |
| 216 | .arg(sort_option("lint")) |
| 217 | .arg(source_option("lint")) |
| 218 | .arg(source_mode_option("lint")) |
| 219 | .arg(specifier_types_option("lint")), |
| 220 | ) |
| 221 | .subcommand( |
| 222 | Command::new("fix") |
| 223 | .about("Ensure that multiple packages requiring the same dependency use the same version") |
| 224 | .after_long_help(additional_help()) |
| 225 | .arg(config_option("fix")) |
| 226 | .arg(dependencies_option("fix")) |
| 227 | .arg(dependency_types_option("fix")) |
| 228 | .arg(dry_run_option("fix")) |
| 229 | .arg(log_levels_option("fix")) |
| 230 | .arg(no_ansi_option("fix")) |
| 231 | .arg(reporter_option("fix")) |
| 232 | .arg(show_option_versions("fix")) |
| 233 | .arg(sort_option("fix")) |
| 234 | .arg(source_option("fix")) |
| 235 | .arg(source_mode_option("fix")) |
| 236 | .arg(specifier_types_option("fix")), |
| 237 | ) |
| 238 | .subcommand( |
| 239 | Command::new("format") |
| 240 | .about("Sort package.json fields into a predictable order and nested fields alphabetically") |
| 241 | .after_long_help(additional_help()) |
| 242 | .arg( |
| 243 | Arg::new("check") |
| 244 | .long("check") |
| 245 | .long_help(cformat!(r#"Lint formatting instead of fixing it"#)) |
| 246 | .action(clap::ArgAction::SetTrue), |
| 247 | ) |
| 248 | .arg(config_option("format")) |
| 249 | .arg(dry_run_option("format")) |
| 250 | .arg(log_levels_option("format")) |
| 251 | .arg(no_ansi_option("format")) |
| 252 | .arg(reporter_option("format")) |
| 253 | .arg(source_option("format")) |
| 254 | .arg(source_mode_option("format")), |
| 255 | ) |
| 256 | .subcommand( |
| 257 | Command::new("update") |
| 258 | .about("Update to the latest versions on the npm registry") |
| 259 | .after_long_help(additional_help()) |
searching dependent graphs…