Skip to content

Commit

Permalink
Merge pull request #4 from neothXT/rc/2.0.6
Browse files Browse the repository at this point in the history
rc 2.0.6
  • Loading branch information
neothXT authored Jan 21, 2024
2 parents b8df9c8 + 805b6bf commit 24560fd
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 8 deletions.
14 changes: 8 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "SwiftNet",
targets: ["SwiftNet", "SwiftNetMacros"])
targets: ["SwiftNet", "SNUtilities", "SwiftNetMacros"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
Expand All @@ -29,18 +29,20 @@ let package = Package(
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
"SwiftNet"
"SNUtilities"
]
),
.target(
name: "SwiftNet",
exclude: ["../../SwiftNet.podspec"]),
dependencies: ["SNUtilities", "SwiftNetMacros"],
exclude: ["../../SwiftNet-macroless.podspec"]),
.target(name: "SNUtilities"),
.target(
name: "SwiftNetMacros",
dependencies: ["SNMacros", "SNUtilities"]),
.testTarget(
name: "SwiftNetTests",
dependencies: ["SwiftNet", "SwiftNetMacros", "SNMacros"]),
.target(
name: "SwiftNetMacros",
dependencies: ["SNMacros", "SwiftNet"]),
.testTarget(
name: "SwiftNetMacrosTests",
dependencies: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public enum AccessTokenStrategy {
case global, custom(String)

var storingLabel: String {
public var storingLabel: String {
switch self {
case .global:
return "accessToken_SwiftNet"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Sources/SwiftNet/Config/SNConfig + extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Foundation


extension SNConfig {
//MARK: set access token methods

Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftNet/Data/AccessTokenStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Foundation


extension SNConfig {
fileprivate static var accessTokens: [String: SNAccessToken] = [:]
}
Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftNet/EndpointBuilder/EndpointBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
import Combine


public protocol EndpointBuilderAbstract {
associatedtype T: Codable & Equatable

Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftNet/EndpointBuilder/EndpointModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
import Combine


public protocol EndpointModel {
var identifier: String { get }
static var defaultAccessTokenStrategy: AccessTokenStrategy { get }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
import Combine


extension AnyPublisher {
/// Converts publisher to return object responding to AccessTokenConvertible in case of success
public func asAccessTokenConvertible() throws -> AnyPublisher<AccessTokenConvertible, Error> {
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftNet/Request/SNProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import Foundation
@_exported import Combine
@_exported import SNUtilities
@_exported import SwiftNetMacros

fileprivate func runOnMain(_ completion: @escaping () -> Void) {
DispatchQueue.main.async {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftNetMacros/SwiftNetMacros.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The Swift Programming Language
// https://docs.swift.org/swift-book

import SwiftNet
import SNUtilities

@attached(member, names: named(url), named(identifier), named(staticIdentifier))
public macro Endpoint(url: String) = #externalMacro(module: "SNMacros", type: "EndpointMacro")
Expand Down

0 comments on commit 24560fd

Please sign in to comment.