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
2 changes: 0 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ number_separator:
minimum_length: 6
opening_brace:
ignore_multiline_statement_conditions: true
sorted_imports:
grouping: attributes
type_contents_order:
order:
- case
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// swift-tools-version:5.9

import PackageDescription
internal import PackageDescription

let package = Package(
name: "mas",
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/AppStore/Downloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import CommerceKit
private import CommerceKit

/// Sequentially downloads apps, printing progress to the console.
///
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/AppStore/ISORegion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2024 mas-cli. All rights reserved.
//

import IsoCountryCodes
import StoreKit
private import IsoCountryCodes
private import StoreKit

// periphery:ignore
protocol ISORegion {
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/AppStore/ISStoreAccount.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import CommerceKit
internal import CommerceKit

extension ISStoreAccount: @unchecked Sendable {
@MainActor // swiftlint:disable:next attributes
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/AppStore/PurchaseDownloadObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import CommerceKit
internal import CommerceKit

private let downloadingPhaseType = 0 as Int64
private let installingPhaseType = 1 as Int64
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/AppStore/SSPurchase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import CommerceKit
private import CommerceKit

extension SSPurchase {
convenience init(appID: AppID, purchasing: Bool) async {
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Account.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import ArgumentParser
import StoreFoundation
internal import ArgumentParser
private import StoreFoundation

extension MAS {
struct Account: AsyncParsableCommand {
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2025 mas-cli. All rights reserved.
//

import ArgumentParser
import Foundation
internal import ArgumentParser
private import Foundation

private let unknown = "unknown"

Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Home.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2018 mas-cli. All rights reserved.
//

import ArgumentParser
import Foundation
internal import ArgumentParser
private import Foundation

extension MAS {
/// Opens app page on MAS Preview. Uses the iTunes Lookup API:
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Info.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 mas-cli. All rights reserved.
//

import ArgumentParser
internal import ArgumentParser

extension MAS {
/// Displays app details. Uses the iTunes Lookup API:
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Install.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import ArgumentParser
import Foundation
internal import ArgumentParser
private import Foundation

extension MAS {
/// Installs previously purchased apps from the Mac App Store.
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 @@ -6,7 +6,7 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import ArgumentParser
internal import ArgumentParser

extension MAS {
/// Command which lists all installed apps.
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Lucky.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2017 mas-cli. All rights reserved.
//

import ArgumentParser
import Foundation
internal import ArgumentParser
private import Foundation

extension MAS {
/// Command which installs the first search result.
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Open.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2018 mas-cli. All rights reserved.
//

import AppKit
import ArgumentParser
private import AppKit
internal import ArgumentParser

private let masScheme = "macappstore"

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 @@ -6,7 +6,7 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import ArgumentParser
internal import ArgumentParser

extension MAS {
/// Command which displays a list of installed apps which have available updates
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Purchase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2017 Jakob Rieck. All rights reserved.
//

import ArgumentParser
import Foundation
internal import ArgumentParser
private import Foundation

extension MAS {
struct Purchase: AsyncParsableCommand {
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Region.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2024 mas-cli. All rights reserved.
//

import ArgumentParser
internal import ArgumentParser

extension MAS {
/// Command which interacts with the current region for the Mac App Store.
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Reset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2016 Andrew Naylor. All rights reserved.
//

import ArgumentParser
import CommerceKit
internal import ArgumentParser
private import CommerceKit

extension MAS {
/// Kills several macOS processes as a means to reset 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 @@ -6,7 +6,7 @@
// Copyright © 2016 mas-cli. All rights reserved.
//

import ArgumentParser
internal import ArgumentParser

extension MAS {
/// Search the Mac App Store. Uses the iTunes Search API:
Expand Down
3 changes: 1 addition & 2 deletions Sources/mas/Commands/SignIn.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Andrew Naylor. All rights reserved.
//

import ArgumentParser
internal import ArgumentParser

extension MAS {
struct SignIn: ParsableCommand {
Expand All @@ -17,7 +17,6 @@ extension MAS {

@Flag(help: "Provide password via graphical dialog")
var dialog = false
// periphery:ignore
@Argument(help: "Apple Account")
var appleAccount: String
@Argument(help: "Password")
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/SignOut.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2016 Andrew Naylor. All rights reserved.
//

import ArgumentParser
import CommerceKit
internal import ArgumentParser
private import CommerceKit

extension MAS {
struct SignOut: ParsableCommand {
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Uninstall.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2018 mas-cli. All rights reserved.
//

import ArgumentParser
import ScriptingBridge
internal import ArgumentParser
private import ScriptingBridge

extension MAS {
/// Command which uninstalls apps managed by the Mac App Store.
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Upgrade.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import ArgumentParser
import Foundation
internal import ArgumentParser
private import Foundation

extension MAS {
/// Command which upgrades apps with new versions available in the Mac App Store.
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/Commands/Vendor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2018 mas-cli. All rights reserved.
//

import ArgumentParser
import Foundation
internal import ArgumentParser
private import Foundation

extension MAS {
/// Opens vendor's app page in a browser. Uses the iTunes Lookup API:
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Commands/Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import ArgumentParser
internal import ArgumentParser

extension MAS {
/// Command which displays the version of the mas tool.
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Controllers/ITunesSearchAppStoreSearcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2018 mas-cli. All rights reserved.
//

import Foundation
private import Foundation

/// Manages searching the MAS catalog. Uses the iTunes Search and Lookup APIs:
/// https://performance-partners.apple.com/search-api
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Controllers/SpotlightInstalledApps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2025 mas-cli. All rights reserved.
//

import Foundation
private import Foundation

@MainActor // swiftlint:disable:next attributes
var installedApps: [InstalledApp] {
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Errors/MASError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Andrew Naylor. All rights reserved.
//

import Foundation
internal import Foundation

enum MASError: Error, Equatable {
case notSupported
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Formatters/AppInfoFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2019 mas-cli. All rights reserved.
//

import Foundation
private import Foundation

/// Formats text output for the info command.
enum AppInfoFormatter {
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Formatters/Printing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Andrew Naylor. All rights reserved.
//

import Foundation
internal import Foundation

// A collection of output formatting helpers

Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/MAS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2021 mas-cli. All rights reserved.
//

import ArgumentParser
internal import ArgumentParser

@main
struct MAS: AsyncParsableCommand {
Expand Down
5 changes: 2 additions & 3 deletions Sources/mas/Models/InstalledApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
// Copyright © 2018 mas-cli. All rights reserved.
//

import Foundation
import Version
private import Foundation
private import Version

struct InstalledApp: Sendable {
let id: AppID
let name: String
// periphery:ignore
let bundleID: String
let path: String
let version: String
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Network/NetworkSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2019 mas-cli. All rights reserved.
//

import Foundation
internal import Foundation

protocol NetworkSession {
func data(from url: URL) async throws -> (Data, URLResponse)
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Network/URL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2024 mas-cli. All rights reserved.
//

import AppKit
private import AppKit

extension URL {
func open() async throws {
Expand Down
2 changes: 1 addition & 1 deletion Sources/mas/Network/URLSession+NetworkSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
// Copyright © 2019 mas-cli. All rights reserved.
//

import Foundation
private import Foundation

extension URLSession: NetworkSession {}
Loading