Modern Apps git

xtool.git

Public
git clone https://git.maproj.org/xtool.git
main ▾

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

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