diff --git a/Executable/Sources/Commands/OutdatedCommand.swift b/Executable/Sources/Commands/OutdatedCommand.swift new file mode 100644 index 0000000..686da2b --- /dev/null +++ b/Executable/Sources/Commands/OutdatedCommand.swift @@ -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) + } + + } +} diff --git a/Executable/Sources/Options/OutdatedOptions.swift b/Executable/Sources/Options/OutdatedOptions.swift new file mode 100644 index 0000000..ab501b9 --- /dev/null +++ b/Executable/Sources/Options/OutdatedOptions.swift @@ -0,0 +1,13 @@ +import ArgumentParser +import ColibriLibrary + +extension Colibri.Outdated { + struct Options: ParsableArguments, Locationable { + + // MARK: Properties + + @Option(name: .shortAndLong) + var location: String? + + } +}