Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e3f62e9
feat(runtime): copy zero-dependency HTTPRuntime from the codegen spike
grdsdev Jul 8, 2026
4fdf7b9
fix(runtime): use per-file public import instead of a target-wide fea…
grdsdev Jul 8, 2026
0df8f9b
publicaly import FoundationNetworking
grdsdev Jul 9, 2026
fc13fba
do not expose HTTPRuntime publically
grdsdev Jul 9, 2026
3fe8072
fix(runtime): repair checkStatus, multipart access levels, and restor…
grdsdev Jul 9, 2026
3657a8a
chore(ci): add HTTPRuntimeTests to the Supabase scheme and dictionary
grdsdev Jul 11, 2026
ad8d0a6
refactor(runtime): typed HTTPTransport errors, drop .multipart body c…
grdsdev Jul 11, 2026
9d26287
refactor(runtime): drop the SSE parser
grdsdev Jul 11, 2026
128ba1d
refactor(runtime): checkStatus takes a catch-all error type, drop unu…
grdsdev Jul 11, 2026
4c7aeb3
fix(runtime): scope TransferProgress to package, fix Linux stream() b…
grdsdev Jul 11, 2026
15335c6
docs(runtime): add HTTPRuntimeTestHelpers design spec
grdsdev Jul 11, 2026
de73a52
docs(runtime): decouple request-shape assertion into assertHTTPRequests
grdsdev Jul 11, 2026
2bf66e7
docs(runtime): make assertHTTPRequests matches: optional for auto-rec…
grdsdev Jul 11, 2026
c7bcd8a
feat(runtime): scaffold HTTPRuntimeTestHelpers, add HTTPStubBody/HTTP…
grdsdev Jul 11, 2026
2b61fce
fix(runtime): use package import instead of @_exported import in HTTP…
grdsdev Jul 11, 2026
38755e6
feat(runtime): add HTTPTransportStub, the consume-once stub queue
grdsdev Jul 11, 2026
173e86c
feat(runtime): add curlCommand(for:) request formatter
grdsdev Jul 11, 2026
7ee29cd
feat(runtime): add HTTPStubTrait and the .http(stubs:) trait
grdsdev Jul 11, 2026
ff61ce5
feat(runtime): add assertHTTPRequests for request-shape assertions
grdsdev Jul 11, 2026
0e464d8
chore(ci): register HTTPRuntimeTestHelpersTests in the Supabase schem…
grdsdev Jul 11, 2026
f6ab7c2
fix(runtime): keep import below file header in HTTPRuntimeTestHelpers
grdsdev Jul 11, 2026
56fa5c7
docs(runtime): add HTTPRuntimeTestHelpers implementation plan
grdsdev Jul 11, 2026
d5138f8
docs(functions): add Functions-to-HTTPRuntime migration design spec
grdsdev Jul 11, 2026
ffbf595
docs(functions): account for LoggerInterceptor behavior in migration …
grdsdev Jul 11, 2026
2a320c4
docs(functions): drop request/response logging from migration scope
grdsdev Jul 11, 2026
7d0ef51
docs(functions): fix HTTPError unwrapping and HTTPURLResponse synthes…
grdsdev Jul 11, 2026
a437ebd
docs(functions): document test-file fixups for the HTTPTypes removal
grdsdev Jul 11, 2026
86759b6
docs(functions): drop streaming request timeout from migration scope
grdsdev Jul 11, 2026
8b4d03a
docs(functions): add Functions-to-HTTPRuntime migration implementatio…
grdsdev Jul 11, 2026
15d5652
refactor(functions): migrate headers and buffered invoke path to HTTP…
grdsdev Jul 11, 2026
4068f14
refactor(functions): migrate streaming path to URLSessionTransport
grdsdev Jul 11, 2026
fc81166
refactor(functions): rework FunctionsClient config around FunctionsCl…
grdsdev Jul 13, 2026
11aa9c6
docs(functions): document FunctionsClientOptions and init(url:options:)
grdsdev Jul 13, 2026
432072f
revert(functions): restore FetchHandlerTransport plain-throws + repor…
grdsdev Jul 13, 2026
a402e8a
fix(functions): restore request idle timeout and stream error unwrapping
grdsdev Jul 13, 2026
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: 1 addition & 19 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 27 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,29 @@ let package = Package(
"Helpers",
]
),
.target(
name: "HTTPRuntime"
),
.testTarget(
name: "HTTPRuntimeTests",
dependencies: [
"HTTPRuntime"
]
),
.target(
name: "HTTPRuntimeTestHelpers",
dependencies: [
"HTTPRuntime",
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
]
),
.testTarget(
name: "HTTPRuntimeTestHelpersTests",
dependencies: [
"HTTPRuntime",
"HTTPRuntimeTestHelpers",
]
),
.target(
name: "Auth",
dependencies: [
Expand Down Expand Up @@ -84,8 +107,8 @@ let package = Package(
name: "Functions",
dependencies: [
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
.product(name: "HTTPTypes", package: "swift-http-types"),
"Helpers",
"HTTPRuntime",
]
),
.testTarget(
Expand Down Expand Up @@ -247,7 +270,9 @@ let package = Package(
// Test targets migrated to Swift Testing get full Swift 6 checking, same as
// production targets. Everything else stays pinned to v5 until its migration
// phase lands (see SDK-435).
let swift6TestTargets: Set<String> = ["SupabaseTests", "HelpersTests"]
let swift6TestTargets: Set<String> = [
"SupabaseTests", "HelpersTests", "HTTPRuntimeTests", "HTTPRuntimeTestHelpersTests",
]

for target in package.targets {
// Test targets never opted into `ExistentialAny` below, so bumping swift-tools-version
Expand Down
67 changes: 67 additions & 0 deletions Sources/Functions/Deprecated.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//
// Deprecated.swift
// Functions
//
// Created by Guilherme Souza on 13/07/26.
//
public import Foundation
public import Helpers

extension FunctionsClient {

/// Creates a new Functions client.
/// - Parameters:
/// - url: The base URL of the Functions endpoint.
/// - headers: Additional headers to include in every request.
/// - region: The region string to invoke functions in.
/// - logger: A logger for request and response diagnostics.
/// - fetch: A custom fetch handler. Defaults to `URLSession.shared`.
/// - decoder: The JSON decoder used to decode response bodies.
@_disfavoredOverload
@available(
*, deprecated, message: "Use init(url:options:) with a FunctionsClientOptions instead."
)
public convenience init(
url: URL,
headers: [String: String] = [:],
region: String? = nil,
logger: (any SupabaseLogger)? = nil,
fetch: @escaping FetchHandler = { try await URLSession.shared.data(for: $0) },
decoder: JSONDecoder = JSONDecoder()
) {
self.init(
url: url,
options: FunctionsClientOptions(
headers: headers, region: region, logger: logger, decoder: decoder, session: .shared),
transport: FetchHandlerTransport(fetch: fetch)
)
}

/// Creates a new Functions client.
/// - Parameters:
/// - url: The base URL of the Functions endpoint.
/// - headers: Additional headers to include in every request.
/// - region: The region to invoke functions in.
/// - logger: A logger for request and response diagnostics.
/// - fetch: A custom fetch handler. Defaults to `URLSession.shared`.
/// - decoder: The JSON decoder used to decode response bodies.
@available(
*, deprecated, message: "Use init(url:options:) with a FunctionsClientOptions instead."
)
public convenience init(
url: URL,
headers: [String: String] = [:],
region: FunctionRegion? = nil,
logger: (any SupabaseLogger)? = nil,
fetch: @escaping FetchHandler = { try await URLSession.shared.data(for: $0) },
decoder: JSONDecoder = JSONDecoder()
) {
self.init(
url: url,
options: FunctionsClientOptions(
headers: headers, region: region?.rawValue, logger: logger, decoder: decoder,
session: .shared),
transport: FetchHandlerTransport(fetch: fetch)
)
}
}
Loading
Loading