Skip to content

fix: re-export Helpers module #724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2025
Merged
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
1 change: 0 additions & 1 deletion Sources/Auth/AuthAdmin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import Foundation
import HTTPTypes
import Helpers

public struct AuthAdmin: Sendable {
let clientID: AuthClientID
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/AuthClient.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ConcurrencyExtras
import Foundation
import Helpers

#if canImport(AuthenticationServices)
import AuthenticationServices
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/AuthClientConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/AuthError.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/AuthMFA.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

/// Contains the full multi-factor authentication API.
public struct AuthMFA: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Auth/AuthStateChangeListener.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import ConcurrencyExtras
import Foundation
import Helpers


/// A listener that can be removed by calling ``AuthStateChangeListenerRegistration/remove()``.
///
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import ConcurrencyExtras
import Foundation
import Helpers

extension AuthClient.Configuration {
/// The default JSONEncoder instance used by the ``AuthClient``.
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Deprecated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
8 changes: 8 additions & 0 deletions Sources/Auth/Exports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Exports.swift
// Supabase
//
// Created by Guilherme Souza on 30/05/25.
//

@_exported import Helpers
Copy link
Preview

Copilot AI May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] It may be helpful to include usage notes in this file detailing that Consumers should import this file instead of directly importing Helpers.

Copilot uses AI. Check for mistakes.

1 change: 0 additions & 1 deletion Sources/Auth/Internal/APIClient.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Foundation
import HTTPTypes
import Helpers

extension HTTPClient {
init(configuration: AuthClient.Configuration) {
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Internal/CodeVerifierStorage.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ConcurrencyExtras
import Foundation
import Helpers

struct CodeVerifierStorage: Sendable {
var get: @Sendable () -> String?
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Internal/Dependencies.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ConcurrencyExtras
import Foundation
import Helpers

struct Dependencies: Sendable {
var configuration: AuthClient.Configuration
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Internal/EventEmitter.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ConcurrencyExtras
import Foundation
import Helpers

struct AuthStateChangeEventEmitter {
var emitter = EventEmitter<(AuthChangeEvent, Session?)?>(initialEvent: nil, emitsLastEventWhenAttaching: false)
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Internal/Helpers.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

/// Extracts parameters encoded in the URL both in the query and fragment.
func extractParams(from url: URL) -> [String: String] {
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Internal/SessionManager.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

struct SessionManager: Sendable {
var session: @Sendable () async throws -> Session
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Internal/SessionStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

struct SessionStorage {
var get: @Sendable () -> Session?
Expand Down
4 changes: 0 additions & 4 deletions Sources/Auth/Types.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import Foundation
import Helpers

public typealias AnyJSON = Helpers.AnyJSON
public typealias JSONObject = Helpers.JSONObject

public enum AuthChangeEvent: String, Sendable {
case initialSession = "INITIAL_SESSION"
Expand Down
8 changes: 8 additions & 0 deletions Sources/Functions/Exports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Exports.swift
// Supabase
//
// Created by Guilherme Souza on 30/05/25.
//

@_exported import Helpers
Copy link
Preview

Copilot AI May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a brief comment above the re-export line to document how and when to use this module re-export, to ease the transition for developers.

Copilot uses AI. Check for mistakes.

1 change: 0 additions & 1 deletion Sources/Functions/FunctionsClient.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import ConcurrencyExtras
import Foundation
import HTTPTypes
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
1 change: 0 additions & 1 deletion Sources/Functions/Types.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Foundation
import HTTPTypes
import Helpers

/// An error type representing various errors that can occur while invoking functions.
public enum FunctionsError: Error, LocalizedError {
Expand Down
1 change: 0 additions & 1 deletion Sources/PostgREST/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import ConcurrencyExtras
import Foundation
import Helpers

let version = Helpers.version

Expand Down
8 changes: 8 additions & 0 deletions Sources/PostgREST/Exports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Exports.swift
// Supabase
//
// Created by Guilherme Souza on 30/05/25.
//

@_exported import Helpers
1 change: 0 additions & 1 deletion Sources/PostgREST/PostgrestBuilder.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ConcurrencyExtras
import Foundation
import Helpers
import HTTPTypes

#if canImport(FoundationNetworking)
Expand Down
5 changes: 0 additions & 5 deletions Sources/PostgREST/PostgrestClient.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import ConcurrencyExtras
import Foundation
import HTTPTypes
import Helpers

public typealias PostgrestError = Helpers.PostgrestError
public typealias HTTPError = Helpers.HTTPError
public typealias AnyJSON = Helpers.AnyJSON

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
1 change: 0 additions & 1 deletion Sources/PostgREST/PostgrestFilterBuilder.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

public class PostgrestFilterBuilder: PostgrestTransformBuilder, @unchecked Sendable {
public enum Operator: String, CaseIterable, Sendable {
Expand Down
1 change: 0 additions & 1 deletion Sources/PostgREST/PostgrestFilterValue.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

/// A value that can be used to filter Postgrest queries.
public protocol PostgrestFilterValue {
Expand Down
1 change: 0 additions & 1 deletion Sources/PostgREST/PostgrestQueryBuilder.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

public final class PostgrestQueryBuilder: PostgrestBuilder, @unchecked Sendable {
/// Perform a SELECT query on the table or view.
Expand Down
1 change: 0 additions & 1 deletion Sources/PostgREST/PostgrestTransformBuilder.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

public class PostgrestTransformBuilder: PostgrestBuilder, @unchecked Sendable {
/// Perform a SELECT on the query result.
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/CallbackManager.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ConcurrencyExtras
import Foundation
import Helpers

final class CallbackManager: Sendable {
struct MutableState {
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/Deprecated/Deprecated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

@available(*, deprecated, renamed: "RealtimeMessage")
public typealias Message = RealtimeMessage
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/Deprecated/RealtimeChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import ConcurrencyExtras
import Foundation
import Helpers
import Swift
import HTTPTypes

Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/Deprecated/RealtimeClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import ConcurrencyExtras
import Foundation
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/Deprecated/RealtimeMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// THE SOFTWARE.

import Foundation
import Helpers

/// Data that is received from the Server.
public struct RealtimeMessage {
Expand Down
8 changes: 8 additions & 0 deletions Sources/Realtime/Exports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Exports.swift
// Supabase
//
// Created by Guilherme Souza on 30/05/25.
//

@_exported import Helpers
1 change: 0 additions & 1 deletion Sources/Realtime/PostgresAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

public struct Column: Equatable, Codable, Sendable {
public let name: String
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/PostgresActionData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

struct PostgresActionData: Codable {
var type: String
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/PresenceAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

public struct PresenceV2: Hashable, Sendable {
/// The presence reference of the object.
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/PushV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

/// Represents the different status of a push
public enum PushStatus: String, Sendable {
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/RealtimeChannelV2.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import ConcurrencyExtras
import Foundation
import HTTPTypes
import Helpers
import IssueReporting

#if canImport(FoundationNetworking)
Expand Down
3 changes: 0 additions & 3 deletions Sources/Realtime/RealtimeClientV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@

import ConcurrencyExtras
import Foundation
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

public typealias JSONObject = Helpers.JSONObject

/// Factory function for returning a new WebSocket connection.
typealias WebSocketTransport = @Sendable (_ url: URL, _ headers: [String: String]) async throws ->
any WebSocket
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/RealtimeMessageV2.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

public struct RealtimeMessageV2: Hashable, Codable, Sendable {
public let joinRef: String?
Expand Down
1 change: 0 additions & 1 deletion Sources/Realtime/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import Foundation
import HTTPTypes
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
8 changes: 8 additions & 0 deletions Sources/Storage/Exports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Exports.swift
// Supabase
//
// Created by Guilherme Souza on 30/05/25.
//

@_exported import Helpers
1 change: 0 additions & 1 deletion Sources/Storage/Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

#if canImport(MobileCoreServices)
import MobileCoreServices
Expand Down
1 change: 0 additions & 1 deletion Sources/Storage/MultipartFormData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import Foundation
import HTTPTypes
import Helpers

#if canImport(MobileCoreServices)
import MobileCoreServices
Expand Down
1 change: 0 additions & 1 deletion Sources/Storage/StorageApi.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Foundation
import HTTPTypes
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
1 change: 0 additions & 1 deletion Sources/Storage/StorageBucketApi.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
1 change: 0 additions & 1 deletion Sources/Storage/StorageFileApi.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Foundation
import HTTPTypes
import Helpers

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down
4 changes: 0 additions & 4 deletions Sources/Storage/SupabaseStorage.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import Foundation
import Helpers

public typealias SupabaseLogger = Helpers.SupabaseLogger
public typealias SupabaseLogMessage = Helpers.SupabaseLogMessage

public struct StorageClientConfiguration: Sendable {
public let url: URL
Expand All @@ -15,8 +11,8 @@
public init(
url: URL,
headers: [String: String],
encoder: JSONEncoder = .defaultStorageEncoder,

Check warning on line 14 in Sources/Storage/SupabaseStorage.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (16) (test, MACOS, 16.3)

'defaultStorageEncoder' is deprecated: Access to storage encoder is going to be removed.
decoder: JSONDecoder = .defaultStorageDecoder,

Check warning on line 15 in Sources/Storage/SupabaseStorage.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (16) (test, MACOS, 16.3)

'defaultStorageDecoder' is deprecated: Access to storage decoder is going to be removed.
session: StorageHTTPSession = .init(),
logger: (any SupabaseLogger)? = nil
) {
Expand Down
1 change: 0 additions & 1 deletion Sources/Storage/Types.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Helpers

public struct SearchOptions: Encodable, Sendable {
var prefix: String
Expand Down
1 change: 0 additions & 1 deletion Sources/Supabase/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Helpers

let defaultHeaders: [String: String] = {
var headers = [
Expand Down
Loading
Loading