Releases: supabase-community/supabase-ex
v0.5.0
Supabase Potion 0.5.0 Release Notes
This release introduces several significant changes and improvements to the Supabase Potion library, making it easier to manage and interact with Supabase services from Elixir.
Important Changes:
-
New Client Initialization Methods:
Supabase.init_client/3
:- Added support for initializing a client directly with
base_url
andapi_key
as separate parameters. - This change simplifies the initialization process, making it more intuitive for users to create clients with different configurations.
- Added support for initializing a client directly with
Supabase.init_client!/3
:- Introduced a bang version of the
init_client/3
function, which raises an error if the client cannot be created. - Useful for scenarios where you need immediate feedback on client creation failures.
- Introduced a bang version of the
-
Self-Managed Client Support:
- The library now supports creating self-managed clients using
Supabase.Client
within your own modules. - This allows for the use of
Agent
processes to manage client state independently, ideal for long-running applications. - Example:
defmodule MyApp.Supabase.Client do use Supabase.Client end
- This approach facilitates better separation of concerns and modularization of client state management.
- The library now supports creating self-managed clients using
-
Updated Configuration Options:
- Enhanced configuration support for self-managed clients:
- Now you can specify
base_url
,api_key
, and other options directly in yourconfig.exs
file, which will be used by the client automatically. - This allows for a more flexible and centralized configuration of Supabase clients across your application.
- Now you can specify
- Example configuration:
config :supabase_potion, MyApp.Supabase.Client, base_url: "https://<app-name>.supabase.co", api_key: "<supabase-api-key>", conn: %{access_token: "<supabase-access-token>"}, db: %{schema: "another"}, auth: %{debug: true}
- Enhanced configuration support for self-managed clients:
-
Improved Client Retrieval:
- Added
Supabase.Client.get_client/1
to retrieve the client instance from the Agent process. - This function returns either the client or an error if the client process is not found, providing a reliable way to access client configurations.
- Added
-
Better Error Handling for Missing Configurations:
- Enhanced error messages for missing configuration keys like
base_url
andapi_key
. - Detailed error messages now guide users on how to configure these values using environment variables or directly in their configuration files.
- Enhanced error messages for missing configuration keys like
-
Updated Documentation:
- The README has been updated with more detailed instructions on how to create and use both one-off and self-managed clients.
- Added links to relevant documentation and resources to help users understand how to configure and interact with the library more effectively.
Migration Notes:
-
Dependency Update:
- The version requirement for
supabase_potion
in themix.exs
file has been updated from~> 0.4
to~> 0.5
. Make sure to update yourmix.exs
file accordingly:def deps do [ {:supabase_potion, "~> 0.5"} ] end
- The version requirement for
-
Configuration Changes:
- If you are using self-managed clients, ensure that you update your
config.exs
file with the new configuration structure.
- If you are using self-managed clients, ensure that you update your
This release aims to provide more flexibility and clarity in managing Supabase client configurations and initialization, catering to both simple and complex use cases. We hope you enjoy these enhancements!
v0.4.1
Full Changelog: https://github.com/zoedsoupe/supabase-ex/commits/v0.4.1
v0.3.0
What's Changed
- Implements the Supabase Fetcher by @zoedsoupe in #1
- Implements basic Supabase Storage integration by @zoedsoupe in #2
- Split Supabase into packages and implement high level functionality by @zoedsoupe in #8
- GoTrue basic integration by @zoedsoupe in #21
- Extract User API to handler structure by @zoedsoupe in #37
Full Changelog: https://github.com/zoedsoupe/supabase-ex/commits/v0.3.0
v0.2.0
What's Changed
- Implements the Supabase Fetcher by @zoedsoupe in #1
- Implements basic Supabase Storage integration by @zoedsoupe in #2
- Split Supabase into packages and implement high level functionality by @zoedsoupe in #8
- Refactor/project restructure by @zoedsoupe in #11
New Contributors
- @zoedsoupe made their first contribution in #1
Full Changelog: https://github.com/zoedsoupe/supabase/commits/v0.2.0