Skip to content

Commit

Permalink
Update to match FluentKit's declared version minimums (#761)
Browse files Browse the repository at this point in the history
* Update to match FluentKit's declared version minimums
  • Loading branch information
gwynne authored Mar 20, 2023
1 parent 892bfee commit 8d60150
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 23 deletions.
6 changes: 4 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// swift-tools-version:5.5
// swift-tools-version:5.5.2
import PackageDescription

let package = Package(
name: "fluent",
platforms: [
.macOS(.v10_15),
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6)
],
products: [
.library(name: "Fluent", targets: ["Fluent"]),
Expand Down
7 changes: 2 additions & 5 deletions Sources/Fluent/Concurrency/FluentProvider+Concurrency.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#if compiler(>=5.5) && canImport(_Concurrency)
import NIOCore

import Vapor
import FluentKit

@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
extension Application {
/// Automatically runs forward migrations without confirmation.
/// This can be triggered by passing `--auto-migrate` flag.
Expand All @@ -20,5 +19,3 @@ extension Application {
}.get()
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#if compiler(>=5.5) && canImport(_Concurrency)
import NIOCore
import Vapor
import FluentKit

@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
extension ModelCredentialsAuthenticatable {
public static func asyncCredentialsAuthenticator(
_ database: DatabaseID? = nil
Expand All @@ -12,7 +10,6 @@ extension ModelCredentialsAuthenticatable {
}
}

@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
private struct AsyncModelCredentialsAuthenticator<User>: AsyncCredentialsAuthenticator
where User: ModelCredentialsAuthenticatable
{
Expand All @@ -29,6 +26,3 @@ private struct AsyncModelCredentialsAuthenticator<User>: AsyncCredentialsAuthent
}
}
}

#endif

4 changes: 0 additions & 4 deletions Sources/Fluent/Concurrency/Pagination+Concurrency.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#if compiler(>=5.5) && canImport(_Concurrency)
import NIOCore
import Vapor
import FluentKit

@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
extension QueryBuilder {
public func paginate(
for request: Request
Expand All @@ -12,5 +10,3 @@ extension QueryBuilder {
return try await self.paginate(page)
}
}

#endif
6 changes: 0 additions & 6 deletions Sources/Fluent/Concurrency/Sessions+Concurrency.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#if compiler(>=5.5) && canImport(_Concurrency)
import NIOCore
import Vapor
import FluentKit

@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
extension Model where Self: SessionAuthenticatable, Self.SessionID == Self.IDValue {
public static func asyncSessionAuthenticator(
_ databaseID: DatabaseID? = nil
Expand All @@ -12,7 +10,6 @@ extension Model where Self: SessionAuthenticatable, Self.SessionID == Self.IDVal
}
}

@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
private struct AsyncDatabaseSessionAuthenticator<User>: AsyncSessionAuthenticator
where User: SessionAuthenticatable, User: Model, User.SessionID == User.IDValue
{
Expand All @@ -24,6 +21,3 @@ private struct AsyncDatabaseSessionAuthenticator<User>: AsyncSessionAuthenticato
}
}
}

#endif

2 changes: 2 additions & 0 deletions Sources/Fluent/Fluent+Cache.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import NIOCore
import Foundation
import Vapor
import FluentKit

Expand Down
1 change: 1 addition & 0 deletions Sources/Fluent/Fluent+Paginate.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Vapor
import NIOCore
import FluentKit

extension QueryBuilder {
Expand Down
2 changes: 2 additions & 0 deletions Sources/Fluent/Fluent+Sessions.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Foundation
import NIOCore
import Vapor
import FluentKit

Expand Down
4 changes: 4 additions & 0 deletions Sources/Fluent/FluentProvider.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import ConsoleKit
import NIOCore
import NIOPosix
import Logging
import Vapor
import FluentKit

Expand Down
3 changes: 3 additions & 0 deletions Sources/Fluent/MigrateCommand.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

import ConsoleKit
import FluentKit
import Vapor

public final class MigrateCommand: Command {
Expand Down
1 change: 1 addition & 0 deletions Sources/Fluent/ModelAuthenticatable.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Vapor
import NIOCore
import FluentKit

public protocol ModelAuthenticatable: Model, Authenticatable {
Expand Down
1 change: 1 addition & 0 deletions Sources/Fluent/ModelCredentialsAuthenticatable.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Vapor
import NIOCore
import FluentKit

public protocol ModelCredentialsAuthenticatable: Model, Authenticatable {
Expand Down
1 change: 1 addition & 0 deletions Sources/Fluent/ModelTokenAuthenticatable.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Vapor
import NIOCore
import FluentKit

public protocol ModelTokenAuthenticatable: Model, Authenticatable {
Expand Down

0 comments on commit 8d60150

Please sign in to comment.