Skip to content

Commit

Permalink
Monorepo (#118)
Browse files Browse the repository at this point in the history
* Move functions-swift to repo

* Move postgrest to repo

* Move gotrue to repo

* Add realtime to repo

* Add storage to repo

* Update dependencies on release

* Add Test Plan to run all tests
  • Loading branch information
grdsdev authored Oct 17, 2023
1 parent b1863a9 commit 796afda
Show file tree
Hide file tree
Showing 106 changed files with 8,814 additions and 178 deletions.
71 changes: 71 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/Supabase-Package.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Supabase"
BuildableName = "Supabase"
BlueprintName = "Supabase"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:Supabase.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Supabase"
BuildableName = "Supabase"
BlueprintName = "Supabase"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/Supabase.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
26 changes: 16 additions & 10 deletions Examples/Examples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
793895D22954AC000044F2B8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 793895D12954AC000044F2B8 /* Preview Assets.xcassets */; };
794EF1222955F26A008C9526 /* AddTodoListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794EF1212955F26A008C9526 /* AddTodoListView.swift */; };
794EF1242955F3DE008C9526 /* TodoListRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794EF1232955F3DE008C9526 /* TodoListRow.swift */; };
7956405C2954AC3E0088A06F /* Supabase in Frameworks */ = {isa = PBXBuildFile; productRef = 7956405B2954AC3E0088A06F /* Supabase */; };
7956405E2954ADE00088A06F /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7956405D2954ADE00088A06F /* Secrets.swift */; };
795640602954AE140088A06F /* AuthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7956405F2954AE140088A06F /* AuthView.swift */; };
795640622955AD2B0088A06F /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 795640612955AD2B0088A06F /* HomeView.swift */; };
Expand All @@ -22,6 +21,7 @@
7956406A2955AFBD0088A06F /* ErrorText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 795640692955AFBD0088A06F /* ErrorText.swift */; };
7956406D2955B3500088A06F /* SwiftUINavigation in Frameworks */ = {isa = PBXBuildFile; productRef = 7956406C2955B3500088A06F /* SwiftUINavigation */; };
795640702955B5190088A06F /* IdentifiedCollections in Frameworks */ = {isa = PBXBuildFile; productRef = 7956406F2955B5190088A06F /* IdentifiedCollections */; };
79719ECE2ADF26C400737804 /* Supabase in Frameworks */ = {isa = PBXBuildFile; productRef = 79719ECD2ADF26C400737804 /* Supabase */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -48,7 +48,7 @@
files = (
795640702955B5190088A06F /* IdentifiedCollections in Frameworks */,
7956406D2955B3500088A06F /* SwiftUINavigation in Frameworks */,
7956405C2954AC3E0088A06F /* Supabase in Frameworks */,
79719ECE2ADF26C400737804 /* Supabase in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -124,9 +124,9 @@
);
name = Examples;
packageProductDependencies = (
7956405B2954AC3E0088A06F /* Supabase */,
7956406C2955B3500088A06F /* SwiftUINavigation */,
7956406F2955B5190088A06F /* IdentifiedCollections */,
79719ECD2ADF26C400737804 /* Supabase */,
);
productName = Examples;
productReference = 793895C62954ABFF0044F2B8 /* Examples.app */;
Expand All @@ -140,7 +140,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1410;
LastUpgradeCheck = 1410;
LastUpgradeCheck = 1500;
TargetAttributes = {
793895C52954ABFF0044F2B8 = {
CreatedOnToolsVersion = 14.1;
Expand Down Expand Up @@ -235,9 +235,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -293,9 +295,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -319,6 +323,7 @@
CODE_SIGN_ENTITLEMENTS = Examples/Examples.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Examples/Preview Content\"";
DEVELOPMENT_TEAM = ELTTE7K8TT;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -357,6 +362,7 @@
CODE_SIGN_ENTITLEMENTS = Examples/Examples.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Examples/Preview Content\"";
DEVELOPMENT_TEAM = ELTTE7K8TT;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -416,24 +422,20 @@
repositoryURL = "https://github.com/pointfreeco/swiftui-navigation.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.4.5;
minimumVersion = 1.0.0;
};
};
7956406E2955B5190088A06F /* XCRemoteSwiftPackageReference "swift-identified-collections" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/pointfreeco/swift-identified-collections.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.5.0;
minimumVersion = 1.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
7956405B2954AC3E0088A06F /* Supabase */ = {
isa = XCSwiftPackageProductDependency;
productName = Supabase;
};
7956406C2955B3500088A06F /* SwiftUINavigation */ = {
isa = XCSwiftPackageProductDependency;
package = 7956406B2955B3500088A06F /* XCRemoteSwiftPackageReference "swiftui-navigation" */;
Expand All @@ -444,6 +446,10 @@
package = 7956406E2955B5190088A06F /* XCRemoteSwiftPackageReference "swift-identified-collections" */;
productName = IdentifiedCollections;
};
79719ECD2ADF26C400737804 /* Supabase */ = {
isa = XCSwiftPackageProductDependency;
productName = Supabase;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 793895BE2954ABFF0044F2B8 /* Project object */;
Expand Down
14 changes: 0 additions & 14 deletions Examples/Examples/ExamplesApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,12 @@ import SwiftUI

@main
struct ExamplesApp: App {
@State var supabaseInitialized = false
@StateObject var auth = AuthController()

var body: some Scene {
WindowGroup {
main
}
}

@ViewBuilder
var main: some View {
if supabaseInitialized {
RootView()
.environmentObject(auth)
} else {
ProgressView()
.task {
await supabase.auth.initialize()
supabaseInitialized = true
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/Examples/RootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct RootView: View {
}
}
.task {
for await event in supabase.auth.authEventChange {
for await event in supabase.auth.authEventChange.values {
withAnimation {
authEvent = event
}
Expand Down
13 changes: 13 additions & 0 deletions Examples/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import Foundation
import PackageDescription

var package = Package(
name: "Examples",
platforms: [],
products: [],
dependencies: [],
targets: []
)
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PLATFORM_IOS = iOS Simulator,name=iPhone 14 Pro Max
PLATFORM_IOS = iOS Simulator,name=iPhone 15 Pro Max

test-library:
xcodebuild test \
-workspace supabase-swift.xcworkspace \
-scheme Supabase \
-scheme Supabase-Package \
-destination platform="$(PLATFORM_IOS)" || exit 1;

build-example:
Expand Down
42 changes: 12 additions & 30 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
{
"pins" : [
{
"identity" : "functions-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/supabase-community/functions-swift",
"state" : {
"branch" : "dependency-free",
"revision" : "5e12b7c4a206a29910dd64f6f23faed437955089"
}
},
{
"identity" : "gotrue-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/supabase-community/gotrue-swift",
"state" : {
"branch" : "dependency-free",
"revision" : "4eece4fe9d8a6596ec5dedd2ffc14a9594cd2134"
}
},
{
"identity" : "keychainaccess",
"kind" : "remoteSourceControl",
Expand All @@ -28,30 +10,30 @@
}
},
{
"identity" : "postgrest-swift",
"identity" : "mocker",
"kind" : "remoteSourceControl",
"location" : "https://github.com/supabase-community/postgrest-swift",
"location" : "https://github.com/WeTransfer/Mocker",
"state" : {
"branch" : "dependency-free",
"revision" : "ef3faa36a6987d34c8d32bab1cf545d40bf1a182"
"revision" : "4384e015cae4916a6828252467a4437173c7ae17",
"version" : "3.0.1"
}
},
{
"identity" : "realtime-swift",
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/supabase-community/realtime-swift.git",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"state" : {
"revision" : "0b985c687fe963f6bd818ff77a35c27247b98bb4",
"version" : "0.0.2"
"revision" : "bb0ea08db8e73324fe6c3727f755ca41a23ff2f4",
"version" : "1.14.2"
}
},
{
"identity" : "storage-swift",
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/supabase-community/storage-swift.git",
"location" : "https://github.com/apple/swift-syntax.git",
"state" : {
"branch" : "dependency-free",
"revision" : "62bf80cc46e22088ca390e506b1a712f4774a018"
"revision" : "74203046135342e4a4a627476dd6caf8b28fe11b",
"version" : "509.0.0"
}
}
],
Expand Down
Loading

0 comments on commit 796afda

Please sign in to comment.