Implemented the Outdated subcommand #6

Merged
javier merged 4 commits from command/outdated-dependencies into main 2025-02-18 23:50:55 +00:00
2 changed files with 42 additions and 0 deletions
Showing only changes of commit a52cfb295c - Show all commits

View File

@ -0,0 +1,29 @@
import ArgumentParser
import ColibriLibrary
extension Colibri {
struct Outdated: AsyncParsableCommand {
// MARK: Properties
static let configuration = CommandConfiguration(
commandName: "outdated-dependencies",
abstract: "Check for outdated package dependencies in a Hummingbird app",
helpNames: .shortAndLong,
aliases: ["outdated"]
)
@OptionGroup var options: Options
// MARK: Functions
mutating func run() async throws {
let terminalService = TerminalService()
let outdatedDependencies = OutdatedDependenciesTask(terminalService: terminalService)
try await outdatedDependencies(at: options.locationURL)
}
}
}

View File

@ -0,0 +1,13 @@
import ArgumentParser
import ColibriLibrary
extension Colibri.Outdated {
struct Options: ParsableArguments, Locationable {
// MARK: Properties
@Option(name: .shortAndLong)
var location: String?
}
}