diff --git a/Supersign/Package.resolved b/Supersign/Package.resolved index 646bc059..0f4d630d 100644 --- a/Supersign/Package.resolved +++ b/Supersign/Package.resolved @@ -6,8 +6,98 @@ "repositoryURL": "https://github.com/swift-server/async-http-client.git", "state": { "branch": null, - "revision": "0dda95cffcdf3d96ca551e5701efd1661cf31374", - "version": "1.2.5" + "revision": "0a9b72369b9d87ab155ef585ef50700a34abf070", + "version": "1.23.1" + } + }, + { + "package": "BigInt", + "repositoryURL": "https://github.com/attaswift/BigInt", + "state": { + "branch": null, + "revision": "a7ee11486233ba45f5ceee0b8cb3d6629ed450ef", + "version": "5.5.0" + } + }, + { + "package": "SuperchargeCore", + "repositoryURL": "https://github.com/kabiroberai/SuperchargeCore", + "state": { + "branch": null, + "revision": "06ac67f9d78f8760fd1be0a77790fe8c54b29bc9", + "version": "1.1.0" + } + }, + { + "package": "swift-algorithms", + "repositoryURL": "https://github.com/apple/swift-algorithms.git", + "state": { + "branch": null, + "revision": "f6919dfc309e7f1b56224378b11e28bab5bccc42", + "version": "1.2.0" + } + }, + { + "package": "swift-argument-parser", + "repositoryURL": "https://github.com/apple/swift-argument-parser", + "state": { + "branch": null, + "revision": "41982a3656a71c768319979febd796c6fd111d5c", + "version": "1.5.0" + } + }, + { + "package": "swift-asn1", + "repositoryURL": "https://github.com/apple/swift-asn1.git", + "state": { + "branch": null, + "revision": "7faebca1ea4f9aaf0cda1cef7c43aecd2311ddf6", + "version": "1.3.0" + } + }, + { + "package": "swift-atomics", + "repositoryURL": "https://github.com/apple/swift-atomics.git", + "state": { + "branch": null, + "revision": "cd142fd2f64be2100422d658e7411e39489da985", + "version": "1.2.0" + } + }, + { + "package": "swift-certificates", + "repositoryURL": "https://github.com/apple/swift-certificates", + "state": { + "branch": null, + "revision": "1fbb6ef21f1525ed5faf4c95207b9c11bea27e94", + "version": "1.6.1" + } + }, + { + "package": "swift-collections", + "repositoryURL": "https://github.com/apple/swift-collections.git", + "state": { + "branch": null, + "revision": "671108c96644956dddcd89dd59c203dcdb36cec7", + "version": "1.1.4" + } + }, + { + "package": "swift-crypto", + "repositoryURL": "https://github.com/apple/swift-crypto", + "state": { + "branch": null, + "revision": "06dc63c6d8da54ee11ceb268cde1fa68161afc96", + "version": "3.9.1" + } + }, + { + "package": "swift-http-types", + "repositoryURL": "https://github.com/apple/swift-http-types", + "state": { + "branch": null, + "revision": "ef18d829e8b92d731ad27bb81583edd2094d1ce3", + "version": "1.3.1" } }, { @@ -15,8 +105,8 @@ "repositoryURL": "https://github.com/apple/swift-log.git", "state": { "branch": null, - "revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7", - "version": "1.4.2" + "revision": "9cb486020ebf03bfa5b5df985387a14a98744537", + "version": "1.6.1" } }, { @@ -24,8 +114,8 @@ "repositoryURL": "https://github.com/apple/swift-nio.git", "state": { "branch": null, - "revision": "21782f3bdc9581148d38d0ccaab6ec952ccda56b", - "version": "2.28.0" + "revision": "914081701062b11e3bb9e21accc379822621995e", + "version": "2.76.1" } }, { @@ -33,8 +123,17 @@ "repositoryURL": "https://github.com/apple/swift-nio-extras.git", "state": { "branch": null, - "revision": "de1c80ad1fdff1ba772bcef6b392c3ef735f39a6", - "version": "1.8.0" + "revision": "2e9746cfc57554f70b650b021b6ae4738abef3e6", + "version": "1.24.1" + } + }, + { + "package": "swift-nio-http2", + "repositoryURL": "https://github.com/apple/swift-nio-http2.git", + "state": { + "branch": null, + "revision": "eaa71bb6ae082eee5a07407b1ad0cbd8f48f9dca", + "version": "1.34.1" } }, { @@ -42,8 +141,8 @@ "repositoryURL": "https://github.com/apple/swift-nio-ssl.git", "state": { "branch": null, - "revision": "3d576964a1ace80d2a3f8bab96cab03e5ee074dc", - "version": "2.12.0" + "revision": "c7e95421334b1068490b5d41314a50e70bab23d1", + "version": "2.29.0" } }, { @@ -51,8 +150,44 @@ "repositoryURL": "https://github.com/apple/swift-nio-transport-services.git", "state": { "branch": null, - "revision": "657537c2cf1845f8d5201ecc4e48f21f21841128", - "version": "1.10.0" + "revision": "bbd5e63cf949b7db0c9edaf7a21e141c52afe214", + "version": "1.23.0" + } + }, + { + "package": "swift-numerics", + "repositoryURL": "https://github.com/apple/swift-numerics.git", + "state": { + "branch": null, + "revision": "0a5bc04095a675662cf24757cc0640aa2204253b", + "version": "1.0.2" + } + }, + { + "package": "swift-system", + "repositoryURL": "https://github.com/apple/swift-system.git", + "state": { + "branch": null, + "revision": "c8a44d836fe7913603e246acab7c528c2e780168", + "version": "1.4.0" + } + }, + { + "package": "SwiftyMobileDevice", + "repositoryURL": "https://github.com/kabiroberai/SwiftyMobileDevice", + "state": { + "branch": null, + "revision": "66be197bbb4d7a6993229f2775244954ff7f846c", + "version": "1.0.0" + } + }, + { + "package": "websocket-kit", + "repositoryURL": "https://github.com/vapor/websocket-kit.git", + "state": { + "branch": null, + "revision": "4232d34efa49f633ba61afde365d3896fc7f8740", + "version": "2.15.0" } } ] diff --git a/Supersign/Package.swift b/Supersign/Package.swift index 7cd4f660..12a09acd 100644 --- a/Supersign/Package.swift +++ b/Supersign/Package.swift @@ -6,16 +6,6 @@ let cSettings: [CSetting] = [ .define("_GNU_SOURCE", .when(platforms: [.linux])), ] -extension Product.Library.LibraryType { - static var smart: Self { - #if os(Linux) - return .static - #else - return .dynamic - #endif - } -} - let package = Package( name: "Supersign", platforms: [ @@ -25,18 +15,27 @@ let package = Package( products: [ .library( name: "Supersign", - type: .smart, targets: ["Supersign"] ), + .library( + name: "SupersignCLISupport", + targets: ["SupersignCLISupport"] + ), + .executable( + name: "SupersignCLI", + targets: ["SupersignCLI"] + ), ], dependencies: [ .package(url: "https://github.com/kabiroberai/SuperchargeCore", .upToNextMinor(from: "1.1.0")), .package(url: "https://github.com/kabiroberai/SwiftyMobileDevice", .upToNextMinor(from: "1.0.0")), .package(path: "../USBMuxSim"), + .package(path: "../zsign-supersign"), .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.23.0"), .package(url: "https://github.com/vapor/websocket-kit.git", from: "2.15.0"), .package(url: "https://github.com/apple/swift-certificates", from: "1.0.0"), .package(url: "https://github.com/apple/swift-crypto", from: "3.9.1"), + .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), .package(url: "https://github.com/attaswift/BigInt", from: "5.5.0"), ], targets: [ @@ -88,5 +87,27 @@ let package = Package( .copy("config/test.app"), ] ), + .target( + name: "SupersignCLISupport", + dependencies: [ + "SwiftyMobileDevice", + "Supersign", + .product(name: "ArgumentParser", package: "swift-argument-parser") + ], + cSettings: cSettings + ), + .target( + name: "SupersignCLI", + dependencies: [ + "SwiftyMobileDevice", + "Supersign", + "SupersignCLISupport", + .product(name: "Zupersign", package: "zsign-supersign"), + ], + resources: [ + .copy("Supercharge.ipa") + ], + cSettings: cSettings + ), ] ) diff --git a/SupersignCLISupport/Sources/SupersignCLI/main.swift b/Supersign/Sources/SupersignCLI/main.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLI/main.swift rename to Supersign/Sources/SupersignCLI/main.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/AuthToken.swift b/Supersign/Sources/SupersignCLISupport/AuthToken.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/AuthToken.swift rename to Supersign/Sources/SupersignCLISupport/AuthToken.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/ConnectionDelegate.swift b/Supersign/Sources/SupersignCLISupport/ConnectionDelegate.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/ConnectionDelegate.swift rename to Supersign/Sources/SupersignCLISupport/ConnectionDelegate.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/Console.swift b/Supersign/Sources/SupersignCLISupport/Console.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/Console.swift rename to Supersign/Sources/SupersignCLISupport/Console.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/DSCommand.swift b/Supersign/Sources/SupersignCLISupport/DSCommand.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/DSCommand.swift rename to Supersign/Sources/SupersignCLISupport/DSCommand.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/DevicesCommand.swift b/Supersign/Sources/SupersignCLISupport/DevicesCommand.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/DevicesCommand.swift rename to Supersign/Sources/SupersignCLISupport/DevicesCommand.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/ExpressibleByArguments.swift b/Supersign/Sources/SupersignCLISupport/ExpressibleByArguments.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/ExpressibleByArguments.swift rename to Supersign/Sources/SupersignCLISupport/ExpressibleByArguments.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/InstallCommand.swift b/Supersign/Sources/SupersignCLISupport/InstallCommand.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/InstallCommand.swift rename to Supersign/Sources/SupersignCLISupport/InstallCommand.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/RunCommand.swift b/Supersign/Sources/SupersignCLISupport/RunCommand.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/RunCommand.swift rename to Supersign/Sources/SupersignCLISupport/RunCommand.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/SuperchargeCommand.swift b/Supersign/Sources/SupersignCLISupport/SuperchargeCommand.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/SuperchargeCommand.swift rename to Supersign/Sources/SupersignCLISupport/SuperchargeCommand.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/SupersignCLIDelegate.swift b/Supersign/Sources/SupersignCLISupport/SupersignCLIDelegate.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/SupersignCLIDelegate.swift rename to Supersign/Sources/SupersignCLISupport/SupersignCLIDelegate.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/SupersignCommand.swift b/Supersign/Sources/SupersignCLISupport/SupersignCommand.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/SupersignCommand.swift rename to Supersign/Sources/SupersignCLISupport/SupersignCommand.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/UninstallCommand.swift b/Supersign/Sources/SupersignCLISupport/UninstallCommand.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/UninstallCommand.swift rename to Supersign/Sources/SupersignCLISupport/UninstallCommand.swift diff --git a/SupersignCLISupport/Sources/SupersignCLISupport/Utilities.swift b/Supersign/Sources/SupersignCLISupport/Utilities.swift similarity index 100% rename from SupersignCLISupport/Sources/SupersignCLISupport/Utilities.swift rename to Supersign/Sources/SupersignCLISupport/Utilities.swift