Skip to content
Open
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
20 changes: 17 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ let package = Package(
.library(
name: "HTTPServer",
targets: ["HTTPServer"]
)
),
.library(
name: "NIOHTTPServer",
targets: ["NIOHTTPServer"]
),
],
traits: [
.trait(name: "SwiftConfiguration"),
Expand Down Expand Up @@ -65,11 +69,20 @@ let package = Package(
.product(name: "Logging", package: "swift-log"),
"HTTPServer",
"Middleware",
"NIOHTTPServer",
],
swiftSettings: extraSettings
),
.target(
name: "HTTPServer",
dependencies: [
"AsyncStreaming",
.product(name: "HTTPTypes", package: "swift-http-types"),
],
swiftSettings: extraSettings
),
.target(
name: "NIOHTTPServer",
dependencies: [
"AsyncStreaming",
.product(name: "DequeModule", package: "swift-collections"),
Expand All @@ -90,6 +103,7 @@ let package = Package(
package: "swift-configuration",
condition: .when(traits: ["SwiftConfiguration"])
),
"HTTPServer",
],
swiftSettings: extraSettings
),
Expand All @@ -109,10 +123,10 @@ let package = Package(
swiftSettings: extraSettings
),
.testTarget(
name: "HTTPServerTests",
name: "NIOHTTPServerTests",
dependencies: [
.product(name: "Logging", package: "swift-log"),
"HTTPServer",
"NIOHTTPServer",
]
),
]
Expand Down
1 change: 1 addition & 0 deletions Sources/Example/Example.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import HTTPTypes
import Instrumentation
import Logging
import Middleware
import NIOHTTPServer
import X509

@main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import HTTPServer
import NIOCore
import NIOEmbedded
import NIOHTTP1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import HTTPServer
import Logging
import NIOCore
import NIOEmbedded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

public import HTTPServer
import HTTPTypes
public import Logging
import NIOCertificateReloading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import NIOHTTPTypes
import NIOPosix
import Testing

@testable import HTTPServer
@testable import NIOHTTPServer

@Suite
struct HTTPRequestConcludingAsyncReaderTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import NIOCore
import NIOHTTPTypes
import Testing

@testable import HTTPServer
@testable import NIOHTTPServer

@Suite
struct HTTPResponseConcludingAsyncWriterTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
//
//===----------------------------------------------------------------------===//

import HTTPServer
import HTTPTypes
import NIOCore
import NIOHTTPTypes
import Testing

@testable import HTTPServer
@testable import NIOHTTPServer

@Suite
struct HTTPResponseSenderTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import HTTPServer
import HTTPTypes
import Logging
import NIOHTTPServer
import Testing

@Suite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
//===----------------------------------------------------------------------===//

import HTTPServer
import HTTPTypes
import NIOCore
import NIOEmbedded
import NIOHTTP1
Expand All @@ -22,7 +24,7 @@ import NIOSSL
import Testing
import X509

@testable import HTTPServer
@testable import NIOHTTPServer

@Suite
struct NIOHTTPServerEndToEndTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SwiftASN1
import Testing
import X509

@testable import HTTPServer
@testable import NIOHTTPServer

@Suite
struct NIOHTTPServerSwiftConfigurationTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import NIOHTTPTypes
import Testing
import X509

@testable import HTTPServer
@testable import NIOHTTPServer

#if canImport(Dispatch)
import Dispatch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import NIOPosix
import NIOSSL
import X509

@testable import HTTPServer
@testable import NIOHTTPServer

@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
func setUpClient(host: String, port: Int) async throws -> NIOAsyncChannel<HTTPResponsePart, HTTPRequestPart> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import NIOHTTPTypesHTTP1
import X509

@testable import HTTPServer
@testable import NIOHTTPServer

@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
struct HTTP1ClientServerProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import NIOSSL
import X509

@testable import HTTPServer
@testable import NIOHTTPServer

@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
struct HTTPSecureUpgradeClientServerProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import NIOEmbedded
import NIOHTTPTypes

@testable import HTTPServer
@testable import NIOHTTPServer

@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
extension NIOHTTPServer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import NIOEmbedded
import NIOHTTPTypes

@testable import HTTPServer
@testable import NIOHTTPServer

@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
extension NIOHTTPServer {
Expand Down
Loading