Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# .github/actionlint.yaml
# mas
#
# actionlint 1.7.11
#
---
self-hosted-runner:
labels: [macos-26-intel]
1 change: 1 addition & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- runner: macos-15
- runner: macos-15-intel
- runner: macos-26
- runner: macos-26-intel
runs-on: ${{matrix.runner}}
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .periphery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# .periphery.yaml
# mas
#
# Periphery 3.5.1
# Periphery 3.6.0
#
---
color: always
Expand Down
11 changes: 9 additions & 2 deletions .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# .swiftformat
# mas
#
# SwiftFormat 0.59.1
# SwiftFormat 0.60.1
#

# Disabled rules (enabled by default)
Expand All @@ -12,6 +12,8 @@
# Disabled rules (disabled by default)
#--enable blankLineAfterSwitchCase
#--enable markTypes
#--enable preferExplicitFalse
#--enable testSuiteAccessControl

# Enabled rules (disabled by default)
--enable acronyms
Expand All @@ -27,7 +29,6 @@
--enable propertyTypes
--enable singlePropertyPerLine
--enable sortSwitchCases
--enable testSuiteAccessControl
--enable unusedPrivateDeclarations
--enable urlMacro
--enable validateTestCases
Expand All @@ -50,6 +51,7 @@
--header //\n// {file}\n// mas\n//\n// Copyright © {created.year} mas-cli\. All rights reserved\.\n//
--hex-literal-case lowercase
--ifdef no-indent
--import-grouping alpha
--indent tab
--indent-strings true
--line-after-marks false
Expand All @@ -69,6 +71,11 @@
--timezone utc
--type-attributes prev-line
--type-body-marks remove
--wrap-arguments before-first
--wrap-collections before-first
--wrap-conditions before-first
--wrap-effects never
--wrap-parameters before-first
--wrap-return-type never
--wrap-ternary before-operators
--wrap-type-aliases before-first
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26.2
26.3
8 changes: 4 additions & 4 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
brew "actionlint" # 1.7.11
brew "gh" # 2.86.0
brew "gh" # 2.87.3
brew "git" # 2.53.0
brew "ipsw" # 3.1.651
brew "ipsw" # 3.1.660
brew "markdownlint-cli2" # 0.21.0
brew "periphery" if MacOS.version >= :sequoia && `/usr/bin/arch` == "arm64" # 3.5.1
brew "periphery" if MacOS.version >= :sequoia && `/usr/bin/arch` == "arm64" # 3.6.0
brew "shellcheck" # 0.11.0
brew "swiftformat" # 0.59.1
brew "swiftformat" # 0.60.1
brew "swiftlint" # 0.63.2
brew "xcodes" # 1.6.2
brew "yamllint" # 1.38.0
17 changes: 4 additions & 13 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ _ = Package(
.package(url: "https://github.com/KittyMac/Sextant.git", from: "0.4.38"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.7.0"),
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.4.0"),
.package(url: "https://github.com/attaswift/BigInt.git", from: "5.7.0"),
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.11.2"),
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.13.0"),
],
targets: [
.plugin(name: "MASBuildToolPlugin", capability: .buildTool()),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.651, BuildCommit: Homebrew)
// Generated by https://github.com/blacktop/ipsw (Version: 3.1.660, BuildCommit: Homebrew)
//
// - LC_BUILD_VERSION: Platform: macOS, MinOS: 26.2, SDK: 26.2, Tool: ld (1230.3)
// - LC_SOURCE_VERSION: 716.2.2.0.0
Expand Down
8 changes: 4 additions & 4 deletions Sources/mas/AppStore/AppStoreAction+download.swift
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ private actor DownloadQueueObserver: CKDownloadQueueObserver {

guard
let appFolderURLSubstring = standardErrorString
.matches(of: unsafe appFolderURLRegex)
.matches(of: unsafe appFolderURLRegex) // swiftformat:disable indent
.compactMap(\.1)
.min(by: { $0.count < $1.count })
else {
else { // swiftformat:enable indent
throw MASError.error(
"Failed to find app folder URL in installer output for \(appNameAndVersion)",
error: standardErrorString,
Expand Down Expand Up @@ -413,7 +413,7 @@ private actor DownloadQueueObserver: CKDownloadQueueObserver {
}
}

private struct DownloadSnapshot: Sendable { // swiftlint:disable:this one_declaration_per_file
private struct DownloadSnapshot { // swiftlint:disable:this one_declaration_per_file
let adamID: ADAMID
let version: String?
let name: String?
Expand Down Expand Up @@ -449,7 +449,7 @@ private enum Ignorable: Error { // swiftlint:disable:this one_declaration_per_fi
case installerWorkaround
}

private enum PhaseType: Equatable, Sendable { // swiftlint:disable:this one_declaration_per_file
private enum PhaseType: Equatable { // swiftlint:disable:this one_declaration_per_file
case processing // swiftlint:disable:this sorted_enum_cases
case downloading
case downloaded // swiftlint:disable:this sorted_enum_cases
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/AppStore/AppStoreAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ private import Darwin
private import OrderedCollections
private import StoreFoundation

enum AppStoreAction: Sendable {
enum AppStoreAction {
case get
case install
case update
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Get.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal import ArgumentParser

extension MAS {
/// Gets & installs free apps from the App Store.
struct Get: AsyncParsableCommand, Sendable {
struct Get: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Get & install free apps from the App Store",
discussion: requiresRootPrivilegesMessage(),
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Home.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension MAS {
/// Uses the iTunes Lookup API:
///
/// https://performance-partners.apple.com/search-api
struct Home: AsyncParsableCommand, Sendable {
struct Home: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Open App Store app pages in the default web browser",
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Install.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal import ArgumentParser

extension MAS {
/// Installs previously gotten apps from the App Store.
struct Install: AsyncParsableCommand, Sendable {
struct Install: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Install previously gotten apps from the App Store",
discussion: requiresRootPrivilegesMessage(),
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/List.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ private import Foundation

extension MAS {
/// Lists all apps installed from the App Store.
struct List: AsyncParsableCommand, Sendable {
struct List: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "List apps installed from the App Store",
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Lookup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension MAS {
/// Uses the iTunes Lookup API:
///
/// https://performance-partners.apple.com/search-api
struct Lookup: AsyncParsableCommand, Sendable {
struct Lookup: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Output app information from the App Store",
aliases: ["info"],
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Lucky.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension MAS {
/// Uses the iTunes Search API:
///
/// https://performance-partners.apple.com/search-api
struct Lucky: AsyncParsableCommand, Sendable {
struct Lucky: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Install the first app returned from searching the App Store",
discussion: // swiftformat:disable:next indent
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/MAS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal import ArgumentParser
internal import Foundation

@main
struct MAS: AsyncParsableCommand, Sendable {
struct MAS: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Mac App Store command-line interface",
version: Self.version,
Expand Down Expand Up @@ -87,7 +87,7 @@ extension MAS {
}
}

static func main<Command: AsyncParsableCommand & Sendable>(_ command: Command, _ body: (Command) async throws -> Void)
static func main<Command: AsyncParsableCommand>(_ command: Command, _ body: (Command) async throws -> Void)
async throws { // swiftformat:disable:this indent
do {
try await ProcessInfo.processInfo.runAsSudoEffectiveUserAndSudoEffectiveGroupIfRootEffectiveUser {
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Open.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extension MAS {
/// Uses the iTunes Lookup API:
///
/// https://performance-partners.apple.com/search-api
struct Open: AsyncParsableCommand, Sendable {
struct Open: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Open app page in 'App Store.app'",
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Outdated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ private import Foundation
extension MAS {
/// Outputs a list of installed apps which have updates available to be
/// installed from the App Store.
struct Outdated: AsyncParsableCommand, Sendable {
struct Outdated: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "List pending app updates from the App Store",
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Search.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension MAS {
/// Uses the iTunes Search API:
///
/// https://performance-partners.apple.com/search-api
struct Search: AsyncParsableCommand, Sendable {
struct Search: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Search for apps in the App Store",
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Seller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension MAS {
/// Uses the iTunes Lookup API:
///
/// https://performance-partners.apple.com/search-api
struct Seller: AsyncParsableCommand, Sendable {
struct Seller: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Open apps' seller pages in the default web browser",
aliases: ["vendor"],
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Uninstall.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ private import OrderedCollections

extension MAS {
/// Uninstalls apps installed from the App Store.
struct Uninstall: AsyncParsableCommand, Sendable {
struct Uninstall: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Uninstall apps installed from the App Store",
discussion: requiresRootPrivilegesMessage(),
Expand Down
Loading
Loading