Commit graph

93 commits

Author SHA1 Message Date
Ben Chatelain
750930e01a
Merge branch 'main' into releases/release-1.8.7
# Conflicts:
#	.swiftlint.yml
#	script/bottle
2024-11-02 12:08:50 -06:00
Ross Goldberg
5209ccd16b
Improve downloading output.
Update linting for access control on extensions.

Resolve #307

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-30 03:48:00 -04:00
Ross Goldberg
31dfe81174
Improve lucky & search error message.
Partial #533

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-29 04:08:56 -04:00
Ross Goldberg
64ab55718a
Improve upgrade unknown app ID/name error output.
Don't output a warning if nothing requires an upgrade.

Partial #533

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-29 03:38:12 -04:00
Ross Goldberg
e639341d11
Refactor to allow install & purchase to report unknown app IDs via console instead of cryptically via a dialog.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-28 20:18:49 -04:00
Ross Goldberg
e4bc69cf5d
Remove unnecessary tests.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-28 15:23:20 -04:00
Ross Goldberg
9ebb01805d
Replace clunky ExternalCommand code that starts new processes with Apple library calls.
Resolve #620

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-28 12:19:56 -04:00
Ross Goldberg
c0fffeddf3
Open the Mac App Store without any spurious error dialogs.
Use PromiseKit properly.

Don't use `OpenCommand`.

Resolve #217

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-28 10:17:33 -04:00
Ross Goldberg
2a496b1f98
Refactor AppStoreSearcher code.
Move code from `AppStoreSearcher` to `ITunesSearchAppStoreSearcher`.

Improve DocC.

Improve Quick test names.

Resolve #607

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-27 15:07:29 -04:00
Ross Goldberg
f83412bba1
Increase minimum macOS version to 10.13, since Swift 5.7 is already used, which requires Xcode 14+ to compile, which only supports macOS deployment targets 10.13+.
Use Swift 5.7.1, which is the newest version of Swift 5.7.

Resolve #578

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-27 14:01:45 -04:00
Ross Goldberg
e9fcf2b254
Merge branch 'main' into upstream/releases/release-1.8.7
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>

# Manual Merge Cleanup:
#	.actrc
#	.github/workflows/pr-checks.yml
#	.github/workflows/release.yml
#	Brewfile
#	script/test
#	script/version_bump

# Conflicts:
#	.github/workflows/build-test.yml
#	.gitignore
#	.swiftlint.yml
#	Brewfile.lock.json
#	Package.resolved
#	Sources/mas/Package.swift
#	Tests/masTests/.swiftlint.yml
#	script/bootstrap
#	script/build
#	script/format
#	script/lint
#	script/uninstall
#	script/version
2024-10-27 01:25:38 -04:00
Ross Goldberg
fd051eac1f
Require fileSizeBytes & price for SearchResult.
Resolve #597

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-26 02:17:08 -04:00
Ross Goldberg
1b4c97f652
Use formattedPrice instead of price.
Improve price output.

Partial #597

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-26 02:17:07 -04:00
Ross Goldberg
880843d8e6
Rename *Mock as Mock*.
Resolve #585

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 23:39:52 -04:00
Ross Goldberg
cc219fe644
Rename MasAppLibrary as SoftwareMapAppLibrary.
Rename `AppLibraryMock` as `MockAppLibrary`.

Partial #585

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:52:20 -04:00
Ross Goldberg
d7072fc66d
Rename *StoreSearch as *AppStoreSearcher.
Rename `MasStoreSearch` as `ITunesSearchAppStoreSearcher`.

Rename `StoreSearchMock` as `MockAppStoreSearcher`.

Rename variables/parameters of the above types as `searcher`.

Fix 'App Store.app' mention in help.

Partial #585

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:52:20 -04:00
Ross Goldberg
ab22e22ace
Rename Mas as MAS.
Partial #585

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:52:20 -04:00
Ross Goldberg
6bf5696093
Chop down multiline guard clauses.
Partial #585

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:52:19 -04:00
Ross Goldberg
0b11f3737c
Rename some uses of appName as searchTerm.
Partial #585

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:51:07 -04:00
Ross Goldberg
0e49da7bf1
Rename *bundleId as *bundleID.
Partial #585

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:51:07 -04:00
Ross Goldberg
3a5593c12d
Rename *accountId & username as *appleID.
Partial #585

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:51:07 -04:00
Ross Goldberg
98c85ac6d6
Delete apps via Scripting Bridge to Finder.
Resolve #313

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:39:03 -04:00
Ross Goldberg
53c64b1758
Improve errors.
Partial #313

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:39:03 -04:00
Ross Goldberg
06ee9608be
Improve output.
Improve errors.

Simplify code.

Partial #313

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:39:03 -04:00
Ross Goldberg
b0d2f23465
Add appID parameter to MASError.notInstalled().
Partial #313

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-25 22:39:03 -04:00
Ross Goldberg
c36a797ac2
SwiftLint
opt_in_rules:
- all

Resolve #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:18:34 -04:00
Ross Goldberg
4d4dd02cd3
Improve lint configurations.
Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:18:34 -04:00
Ross Goldberg
586de07389
Improve access control.
Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:18:33 -04:00
Ross Goldberg
490ee2d338
Fix class names.
Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:18:33 -04:00
Ross Goldberg
06a347c450
Use isEmpty / beEmpty().
Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:18:33 -04:00
Ross Goldberg
71fbe2e444
Improve spacing.
Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:18:28 -04:00
Ross Goldberg
3eaffa5c3e
Improve DocC.
Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:17:43 -04:00
Ross Goldberg
3d9ea972f9
Cleanup code.
Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:01:42 -04:00
Ross Goldberg
c2892626d7
Fix search & uninstall tests.
Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-23 06:01:40 -04:00
Ross Goldberg
7cd8c1436b
Downgrade Nimble & Quick to fix testing on newer Xcode versions.
Resolve #583

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-18 10:28:44 -04:00
Ross Goldberg
20c08eb855
Update README.md.
Resolve #559

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-15 07:49:15 -04:00
Ross Goldberg
280b38dfe8
Add media=software query item to lookup URL to improve results.
Reorder query items for both lookup URLs & search URLs.

Partial #561

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 16:29:47 -04:00
Ross Goldberg
6c5a277ad9
Add & use Entity.desktopSoftware instead of macSoftware.
`desktopSoftware` returns info (including version & description) that aligns with what is displayed earlier in the App Store, while `macSoftware` is at least sometimes out of alignment.

Partial #561

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 16:24:39 -04:00
Ross Goldberg
265326dede
Add captureStream(…) to observe stdout & stderr in tests.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 05:05:45 -04:00
Ross Goldberg
dccac33abb
Improve tests.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 04:40:01 -04:00
Ross Goldberg
f8d7a36a4c
Upgrade test dependencies.
Quick upgrade necessary if we ever switch from PromiseKit to Swift concurrency.

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 04:39:51 -04:00
Ross Goldberg
006273bb81
Standardize names of variables & parameters relating to AppIDs.
Resolve #478

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 04:10:39 -04:00
Ross Goldberg
39f77c01a9
Create typealias AppID = UInt64.
Use `AppID` everywhere appropriate.

Associated appID cleanup.

Partial #478

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 04:10:38 -04:00
Ross Goldberg
388d963cd1
Do not return Result (or anything else) from command run(…) functions.
Throw when failure. Normal Void return when success.

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 03:44:12 -04:00
Ross Goldberg
3b86deb63e
Rename 2 test files that weren't renamed in previous commit to preserve history.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 03:44:11 -04:00
Ross Goldberg
2535e3da42
Use Swift Argument Parser instead of Commandant.
Command structs are nested types of Mas.

Renamed structs.

Limit code visibility as much as possible.

Standardize variable names.

Standardize spacing.

Fix a few tests.

Disable a useless test.

Remove unnecessary test stdout output.

Get swift-format from Brewfile instead of from Package.swift
since swift-format depends on an old version of swift-argument-parser.

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 03:44:11 -04:00
Ross Goldberg
6793a91e03
Remove unnecessary explicit inits.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 03:44:10 -04:00
Ross Goldberg
d413d8cfa1
Move MasKit module to mas.
Move MasKitTests module to masTests.

Rename MasKit enum as Mas.

Upgrade swift-tools-version from 5.3 to 5.6.1.

swift-tools-version 5.5+ is necessary to allow test code to import executable target code,
to allow MasKit library code to be moved into the mas executable.

Upgrade to swift-tools-version to 5.6.1 instead of to 5.5 because they support all the same macOS versions.

Standardize comments.

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 03:44:03 -04:00
Ross Goldberg
a24bcdd1e9
Merge branch 'main' into 562-apple-id 2024-10-13 22:23:37 -04:00
Ross Goldberg
1bebde9e4a
Merge pull request #550 from rgoldberg/536-output-responses-unparsable-as-json
Output to stderr responses from Apple endpoints that are unparsable as JSON
2024-10-13 22:20:51 -04:00