Modern Apps git

xtool.git

Public
git clone https://git.maproj.org/xtool.git
appstore-distribution ▾

xtool.git / Sources / XToolSupport / DSCommands / DSCommand.swift

DSCommand.swift34 lines · 977 BRaw
1import Foundation
2import XKit
3import ArgumentParser
4import Dependencies
5
6struct DSAnisetteCommand: AsyncParsableCommand {
7 static let configuration = CommandConfiguration(
8 commandName: "anisette",
9 abstract: "Test out Anisette data"
10 )
11
12 func run() async throws {
13 @Dependency(\.anisetteDataProvider) var provider
14 let res = try await provider.fetchAnisetteData()
15 for (key, value) in res.dictionary.sorted(by: { $0.key < $1.key }) {
16 print("\(key): \(value)")
17 }
18 }
19}
20
21struct DSCommand: AsyncParsableCommand {
22 static let configuration = CommandConfiguration(
23 commandName: "ds",
24 abstract: "Interact with Apple Developer Services",
25 subcommands: [
26 DSTeamsCommand.self,
27 DSCertificatesCommand.self,
28 DSIdentifiersCommand.self,
29 DSDevicesCommand.self,
30 DSProfilesCommand.self,
31 DSAnisetteCommand.self,
32 ]
33 )
34}