Remove OAuthSwift and its dependencies.

This commit is contained in:
Brent Simmons 2023-06-26 09:57:22 -07:00
parent d31c9c1766
commit 7078e6fd55
7 changed files with 16 additions and 116 deletions

View File

@ -1144,7 +1144,7 @@ private extension MainWindowController {
return currentLink != nil
}
if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed {
if currentTimelineViewController?.selectedArticles.first?.webFeed != nil {
toolbarButton.isEnabled = true
}
@ -1171,7 +1171,7 @@ private extension MainWindowController {
return currentLink != nil
}
if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed {
if currentTimelineViewController?.selectedArticles.first?.webFeed != nil {
toolbarButton.isEnabled = true
}

View File

@ -1,51 +1,6 @@
{
"object": {
"pins": [
{
"package": "BrightFutures",
"repositoryURL": "https://github.com/Thomvis/BrightFutures.git",
"state": {
"branch": null,
"revision": "939858b811026f85e87847a808f0bea2f187e5c4",
"version": "8.1.0"
}
},
{
"package": "Erik",
"repositoryURL": "https://github.com/phimage/Erik.git",
"state": {
"branch": null,
"revision": "109a130e9cdb00789a43a7a625293eeb12d22989",
"version": "5.1.0"
}
},
{
"package": "FileKit",
"repositoryURL": "https://github.com/nvzqz/FileKit.git",
"state": {
"branch": null,
"revision": "826d9161b184509f80d85c28cd612d630646de98",
"version": "6.0.0"
}
},
{
"package": "Kanna",
"repositoryURL": "https://github.com/tid-kijyun/Kanna.git",
"state": {
"branch": null,
"revision": "f9e4922223dd0d3dfbf02ca70812cf5531fc0593",
"version": "5.2.7"
}
},
{
"package": "OAuthSwift",
"repositoryURL": "https://github.com/OAuthSwift/OAuthSwift.git",
"state": {
"branch": null,
"revision": "fde77955e6983fbfaabd491709d52b8a82fda4d0",
"version": "2.1.2"
}
},
{
"package": "PLCrashReporter",
"repositoryURL": "https://github.com/microsoft/plcrashreporter.git",
@ -109,15 +64,6 @@
"version": "2.0.1"
}
},
{
"package": "Swifter",
"repositoryURL": "https://github.com/httpswift/swifter.git",
"state": {
"branch": null,
"revision": "9483a5d459b45c3ffd059f7b55f9638e268632fd",
"version": "1.5.0"
}
},
{
"package": "Zip",
"repositoryURL": "https://github.com/marmelroy/Zip.git",

View File

@ -8,16 +8,14 @@ let package = Package(
.library(
name: "Secrets",
type: .dynamic,
targets: ["Secrets"]),
],
dependencies: [
.package(url: "https://github.com/OAuthSwift/OAuthSwift.git", .exact("2.1.2")),
targets: ["Secrets"]
)
],
dependencies: [],
targets: [
.target(
name: "Secrets",
dependencies: [
"OAuthSwift",
]),
dependencies: []
)
]
)

View File

@ -1,17 +0,0 @@
//
// OAuth1SwiftProvider.swift
// Secrets
//
// Created by Maurice Parker on 4/14/20.
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
//
import Foundation
import OAuthSwift
public protocol OAuth1SwiftProvider {
static var oauth1Swift: OAuth1Swift { get }
static var callbackURL: URL { get }
}

View File

@ -1,19 +0,0 @@
//
// OAuth2SwiftProvider.swift
// Secrets
//
// Created by Maurice Parker on 5/2/20.
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
//
import Foundation
import OAuthSwift
public protocol OAuth2SwiftProvider {
static var oauth2Swift: OAuth2Swift { get }
static var callbackURL: URL { get }
static var oauth2Vars: (state: String, scope: String, params: [String: String]) { get }
}

View File

@ -17,7 +17,13 @@ extension URL {
/// Percent encoded `mailto` URL for use with `canOpenUrl`. If the URL doesn't contain the `mailto` scheme, this is `nil`.
var percentEncodedEmailAddress: URL? {
scheme == "mailto" ? self.string.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)?.url : nil
guard scheme == "mailto" else {
return nil
}
guard let urlString = absoluteString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
return nil
}
return URL(string: urlString)
}
/// Reverse chronological list of release notes.

View File

@ -4,25 +4,9 @@ In addition to our own frameworks (RSCore, RSDatabase, RSParser, RSTree, and RSW
Thank you to the authors of these!
## [BrightFutures](https://github.com/Thomvis/BrightFutures)
Required by OAuthSwift (through Erik) as a testing dependency. Not shipped in NNW.
## [Erik](https://github.com/phimage/Erik)
Required by OAuthSwift as a testing dependency. Not shipped in NNW.
## [FileKit](https://github.com/nvzqz/FileKit)
Required by OAuthSwift (through Erik) as a testing dependency. Not shipped in NNW.
## [FMDB](https://github.com/ccgus/fmdb)
RSDatabase uses FMDB for SQLite persistence.
## [Kanna](https://github.com/tid-kijyun/Kanna)
Required by OAuthSwift as a testing dependency. Not shipped in NNW.
## [OAuthSwift](https://github.com/OAuthSwift/OAuthSwift)
Our Reddit integration uses the OAuth framework to authenticate with the services
and then service requests to them.
## [PLCrashReporter](https://github.com/microsoft/plcrashreporter)
Used to collect crash reports and send them to Brent. Mac only.
@ -31,3 +15,5 @@ Used to provide application updates to users. Mac only.
## [Swifter](https://github.com/httpswift/swifter)
Required by OAuthSwift as a testing dependency. Not shipped in NNW.
## [Zip]