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
b0d0f4aacd
appIDValue
to encapsulate uint64Value
.
...
Resolve #574
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-15 08:06:14 -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
a44655ac31
Refactor StoreSearch.lookup(…)
& StoreSearch.search(…)
to share implementation, which allows lookup
to accept an Entity
argument instead of being hardcoded to desktopSoftware
.
...
Resolve #561
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 16:46:13 -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
6489daa0e3
Update iTunes Search API documentation URL.
...
Partial #561
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 16:12: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
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
0efd73a5ee
Simplify Outdated.run(…)
.
...
Resolve #542
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 03:44:12 -04:00
Ross Goldberg
cd42176859
Rename apps property of Upgrade as appIds.
...
Resolve #542
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-14 03:44:12 -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
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
Ross Goldberg
fe7b688f3b
Merge pull request #549 from rgoldberg/538-fix-typos
...
Fix typos in comments & in documentation.
2024-10-13 22:18:28 -04:00
Ross Goldberg
7c81b4803c
Merge pull request #551 from rgoldberg/540-outdated-multi-platform-minimum-macos
...
`outdated` checks if new app version requires newer macOS for all kinds of apps, not just mac-software
2024-10-13 22:17:14 -04:00
Ross Goldberg
fe749fc2eb
Handle CKPurchaseController.shared().perform(…)
callback within SSPurchase.perform(adamId:purchase:)
to encapsulate CKPurchaseController
& its callback.
...
Chain `Promise`s instead of calling `Promise.wait()`.
Improve comments.
Resolve #562
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-11 02:15:07 -04:00
Ross Goldberg
a45308f2f2
Configure SSPurchase
in `perform(…)
instead of in a convenience init
.
...
Partial #562
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-11 02:01:26 -04:00
Ross Goldberg
c01f7c541e
Migrate ISStoreAccount
from Grand Central Dispatch to PromiseKit.
...
Partial #562
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-11 02:01:25 -04:00
Ross Goldberg
aceb4c3ddb
Remove unnecessary output when nothing downloaded by download(…)
.
...
Partial #562
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-11 01:59:18 -04:00
Ross Goldberg
943638fef4
Improve ISStoreAccount.signIn(…)
.
...
Output error for non-`nil` `ISStoreAccount.primaryAccount` only if `ISStoreAccount.primaryAccount.isSignedIn` is `true`.
Output error when no password provided to password prompt for `mas signin`.
Remove unnecessary blank lines in `MASError.swift`.
Partial #562
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-11 01:59:18 -04:00
Ross Goldberg
a5c8957fc9
Refactor Downloader
& SSPurchase
to no longer need StoreAccount
.
...
Move towards better purchase encapsulation: all purchase logic will eventually be in the `perform(…)` function, not in convenience constructor, to ensure the correct values are used when `perform(…)` is called, instead of values that were correct sometime before the call.
Partial #562
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-11 01:59:14 -04:00
Ross Goldberg
d2f2d3edff
ISStoreAccount
static functions return ISStoreAccount
instead of StoreAccount
.
...
Add `var dsID` to `StoreAccount` so functions can use `StoreAccount` without casting to `ISStoreAccount`.
Simplify code.
Partial #562
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-11 01:57:45 -04:00
Ross Goldberg
8e671f2624
Improve Account
, SignIn
, SignOut
& ISStoreAccount
extension & associated code.
...
Prevent `ISAccountService.signIn(with:)` deprecation warning.
Improve macOS version handling encapsulation.
Output error if `StoreAccount.signin(…)` provides a `nil` `ISStoreAccount`.
Improve `signin` `"Already Signed In" error output.
Remove unnecessary output.
Simplify code.
Partial #562
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-11 01:56:50 -04:00
Ross Goldberg
5676dcb797
Re-enable purchase
.
...
`purchase` seems to work on macOS 12+.
Resolve #289
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-06 03:13:10 -04:00
Ross Goldberg
b400422f4a
outdated
checks if new app version requires newer macOS for all kinds of apps, not just mac-software.
...
Resolve #540
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-05 20:28:49 -04:00
Ross Goldberg
7e9e3ba168
Output to stderr responses from Apple endpoints that are unparsable as JSON
...
Resolves #536
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-05 19:50:52 -04:00
Ross Goldberg
d9780b8768
Fix incorrect function comment
...
Resolves #538
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-05 19:43:15 -04:00
Ross Goldberg
47f4b5c0da
Fix typos in comments
...
Resolves #538
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-05 19:43:15 -04:00
Ross Goldberg
fa7bdea029
Fix breaking lint issue in MasStoreSearch.swift.
...
Resolve #546
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-10-05 18:52:06 -04:00
Ben Chatelain
521df64b51
♻️ Refactor lookupURL, searchURL
...
Resolves unused protocol method lint warnings by moving updated implementations back to StoreSearch. Added `country` to MasStoreSearch, set to fixed fvalue for tests.
2024-02-17 23:47:02 -07:00
Ben Chatelain
5aafd4c0aa
🎨 Format swift
2024-02-17 22:58:11 -07:00
Ben Chatelain
86b25590c7
🩹 Fix merge mistakes
2024-02-17 14:04:01 -07:00
Chris Araman
a7f8dfea22
👀 Scrape the app page only for lookup, not search
2024-02-17 14:04:01 -07:00
Chris Araman
ad8d6fe1dd
🔍 Search for compatible iPad and iPhone apps
2024-02-17 14:04:01 -07:00
Chris Araman
c9378046a6
🦾 Check for Apple Silicon
2024-02-17 14:04:01 -07:00
Chris Araman
844131ff2e
⛔ ️ Remove impossible error case
2024-02-17 14:04:01 -07:00
Ben Chatelain
f7dd98811f
♻️ Move URL builders to MasStoreSearch
2024-02-17 14:04:01 -07:00
Ben Chatelain
41a20f11d4
Merge branch 'main' into main
2024-02-17 10:33:11 -07:00
Ross Goldberg
e6e2ccab0d
Updated swift source by running:
...
swiftformat Sources Tests
2024-02-05 16:03:51 -05:00
Edward
9116ec1798
🔧 Check for mac update only
...
Idea from https://github.com/mangerlahn/Latest . Thank you!
2023-11-07 20:09:35 +08:00
Ben Chatelain
036dc05981
🚨 Remove extra linefeed
2022-10-08 14:49:42 -06:00
Ben Chatelain
610257f292
🔇 Add --verbose flag to outdated command
2022-10-08 14:46:12 -06:00
Ben Chatelain
f54b1883c3
💡 Document print utility functions
2022-10-08 14:22:42 -06:00
Ben Chatelain
892ad7e199
🔇 Remove redundant error statements
2022-10-03 19:46:06 -06:00
Ben Chatelain
62a09bdbb7
🔊 Log errors using printError
2022-10-03 18:40:47 -06:00
Ben Chatelain
94e4927545
🚨 Wrap long line
2022-09-22 20:08:02 -06:00
Ben Chatelain
a6c6cef4b9
🚨 Change loadData from open to public
...
Non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
2022-09-21 19:23:48 -06:00
Ross Goldberg
160efd4177
Improved mas upgrade
output
...
Resolves #393
2022-09-14 20:44:23 -04:00
Ben Chatelain
6cc248b83e
🚨 FIx lint warning with new #unavailable
2022-07-04 17:29:51 -06:00
Daniel Kraus
f3371d61bc
🐛 Fix link to known issues
...
The corresponding section header starts with "⚠️ ", which needs to be
encoded in the link. Otherwise, the anchor doesn't work.
2022-01-16 14:35:21 +01:00
Chris Araman
560c89af2c
🌍 Localize queries
2021-12-20 15:41:54 -08:00
Chris Araman
fb2218d951
🧹 Lint
2021-12-10 15:23:47 -08:00
Chris Araman
7f38f3537c
♻️ Simplify pointer dance
2021-12-10 15:23:47 -08:00
Chris Araman
73f2ca58d8
⚠️ Remove warning
2021-11-03 16:03:54 -07:00
Chris Araman
a499822dd8
🐛 Allow redownloads on macOS 12
2021-11-03 14:11:13 -07:00
Chris Araman
c7a104a250
🐛 Disable account
command on macOS 12
...
Documents #417 .
2021-11-03 14:11:12 -07:00
Chris Araman
4660b4505b
🐛 Disable purchase
command on macOS 10.15
...
Documents #289 .
2021-11-03 14:11:12 -07:00
Chris Araman
bfed0a7605
📄 Direct all disabled command warnings to #known-issues
2021-11-03 14:11:12 -07:00
Chris Araman
02ceea49cd
⚠️ Add a temporary warning about macOS Monterey
2021-11-02 20:16:17 -07:00
Chris Araman
9305160b2e
🧹 Lint
2021-11-02 20:16:17 -07:00
Chris Araman
3dc5789cdf
🐛 Print warnings and errors to stderr
...
Fixed #351 .
2021-11-02 20:16:17 -07:00
Ben Chatelain
7a74278657
🚨 Remove TODO (leaving comment)
2021-10-19 07:19:31 -07:00
Ben Chatelain
8ef416cf35
👌🏻 Address review comments
2021-10-12 19:54:08 -06:00
Ben Chatelain
1fe4b5b3e2
🍏 Ignore min OS for iOS apps
2021-10-12 19:54:08 -06:00
Ben Chatelain
75d6d39bd3
📋 Add kind property to SearchResult
2021-10-12 19:54:08 -06:00
Ben Chatelain
073ff08b87
🚨 Fix lint issue
2021-10-12 19:54:08 -06:00
Ben Chatelain
84461fa5c6
🐛 Don't consider an app outdated if the update can't be installed on the current OS
...
Fixes #420
2021-10-12 19:54:08 -06:00
Chris Araman
085bd002db
⬆️ Periphery (2.7.0)
2021-07-12 20:54:28 -07:00
Matthew Toohey
26fe7f1e30
🩹 Display decimal progress percentage ( #399 )
2021-06-27 11:06:30 -07:00
Chris Araman
2e498380ce
♻️ Simplify max length calculation
2021-06-04 15:58:30 -07:00
Chris Araman
0f0c5b1b93
🧹 Remove unused StderrOutputStream
2021-05-28 11:41:12 -07:00
Chris Araman
9904707152
🧹 Lint
2021-05-12 11:19:12 -07:00
Chris Araman
d39058c7be
🏡 Ignore applications moved outside the system Applications folder
...
Fixes #309 .
2021-05-12 11:05:45 -07:00
Chris Araman
4dee61d467
♻️ Retry downloads upon network failure up to three times
2021-05-08 21:16:55 -07:00
Chris Araman
c3ef7b40b7
♻️ Remove loadDataSync
2021-05-08 21:16:54 -07:00
Chris Araman
25045fa0dd
🔥 Attempt all downloads, reject with first error
2021-05-08 21:14:17 -07:00
Chris Araman
9f340bdce9
🤞🏼 Rephrase Downloader as Promises
2021-05-08 21:14:17 -07:00
Chris Araman
9494dea403
🤞🏼 Rephrase StoreSearch as Promises
2021-05-08 21:14:16 -07:00
Chris Araman
a9b018854d
🤞🏼 Rephrase MasStoreSearch as Promises
2021-05-08 21:14:16 -07:00
Chris Araman
2ad8695295
🔥 Initialize PromiseKit
2021-05-08 21:10:03 -07:00
Chris Araman
0b8acab235
🧹 Lint with periphery
2021-05-08 20:14:18 -07:00
Chris Araman
4848f422d6
🧹 Match swift-format to compiler version
...
Fixes #364 .
2021-05-08 20:14:18 -07:00
Chris Araman
585699d99b
♻️ Build URLs using URLComponents
2021-05-05 22:06:57 -07:00
Chris Araman
d046417936
🖨 Pass items directly to Swift.print
2021-05-03 12:05:28 -07:00
Chris Araman
e79260b1f4
🖨 Override print only in debug builds
2021-05-03 10:46:54 -07:00
Chris Araman
3059bf3e42
🖨 Fix print override
2021-05-02 14:42:27 -07:00
Chris Araman
5a2d7717c9
♻️ Remove generated source file
2021-04-28 22:56:34 -07:00
Chris Araman
d0738e50b6
♻️ Append terminator
2021-04-28 21:10:50 -07:00
Chris Araman
64e1cb467c
♻️ Simplify OutputListener
2021-04-28 19:48:19 -07:00
Chris Araman
923fb18526
🛠 Remove remnants of Xcode project
2021-04-28 19:14:19 -07:00
Chris Araman
5df17f7823
📦 Embed version string as Swift code
2021-04-28 12:22:08 -07:00
Chris Araman
65b3763882
🧹 Prefer isEmpty to equality check
2021-04-27 15:36:13 -07:00
Chris Araman
2cf5ce3013
⌨️ Fix typo
2021-04-27 15:33:49 -07:00
Chris Araman
0a506b1ebe
♻️ Simplify max identifier length calculation
2021-04-27 15:31:35 -07:00
Chris Araman
f0bf27a821
♻️ Remove redundant declarations
2021-04-27 15:30:28 -07:00