Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: supabase-community/supabase-ex
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.6.0
Choose a base ref
...
head repository: supabase-community/supabase-ex
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 12 commits
  • 95 files changed
  • 4 contributors

Commits on Feb 4, 2025

  1. chore: solve on_response unatural return (#60)

    ## Problem
    
    N/A
    
    ## Solution
    
    fixes #59 
    
    ## Rationale
    
    N/A
    zoedsoupe authored Feb 4, 2025
    Copy the full SHA
    2454654 View commit details

Commits on Feb 7, 2025

  1. Copy the full SHA
    16b1501 View commit details

Commits on May 2, 2025

  1. docs: update readme for version compatibility (#64)

    ## Problem
    
    The `~> 0.5` of the supabase-potion package caused version `0.6` to be
    pulled in. But `0.6` requires a major version upgrade of the postgrest
    package.
    
    ## Solution
    
    Update the docs to avoid version mismatches.
    barbinbrad authored May 2, 2025
    Copy the full SHA
    614fc39 View commit details

Commits on May 31, 2025

  1. fix: ex_doc linkings (#58)

    zoedsoupe authored May 31, 2025
    Copy the full SHA
    494e6c5 View commit details
  2. Copy the full SHA
    cd8138a View commit details

Commits on Jun 26, 2025

  1. Copy the full SHA
    523a225 View commit details

Commits on Jun 30, 2025

  1. docs: Simplify readme (#69)

    Ziinc authored Jun 30, 2025
    Copy the full SHA
    c9d02fe View commit details

Commits on Jul 20, 2025

  1. Copy the full SHA
    e290e05 View commit details
  2. enable OTP email, add debug logs and enable realtime locally (#62)

    ## Problem
    The current version of `supabase-ex` lacks comprehensive logging
    capabilities, making it difficult for developers to debug issues when
    interacting with Supabase services. Additionally, the local development
    configuration needs updates to enable essential services like Realtime
    and Inbucket for testing. Documentation also requires updates to reflect
    new dependency versions and available integrations.
    
    ## Solution
    This PR implements several focused improvements:
    
    1. Added proper logging throughout the Fetcher module using the standard
    Logger functionality
    2. Updated the local Supabase configuration (`config.toml`) to enable
    Realtime, Inbucket, and appropriate authentication settings
    3. Added email templates for various authentication flows
    4. Updated dependency versions in documentation from `0.5` to `0.6`
    5. Added references to Edge Functions and Realtime integrations in the
    README
    6. Added a new section on debugging and logging configuration
    
    The changes ensure that error handling in the HTTP client provides
    appropriate log messages at debug and error levels, respecting the
    application's configured log level.
    
    ## Rationale
    These improvements address several practical needs:
    
    1. **Enhanced Logging**: The strategic placement of log statements in
    error handling paths provides better visibility into request failures
    without being overly verbose. Using the standard Logger module ensures
    compatibility with existing logging backends and configuration.
    
    2. **Development Configuration**: Enabling Realtime, Inbucket and
    authentication services in the local development environment makes it
    easier for contributors to test their changes comprehensively.
    
    3. **Documentation Updates**: The README changes ensure users are aware
    of all available integrations and use the correct dependency versions.
    
    The implementation maintains backward compatibility while improving
    developer experience. The logging approach follows established Elixir
    conventions by using appropriate log levels (debug for general issues,
    error for exceptions) and provides context-rich messages that will help
    diagnose issues during development and in production.
    zoedsoupe authored Jul 20, 2025
    Copy the full SHA
    9c4af52 View commit details
  3. Copy the full SHA
    a91232b View commit details
  4. chore: release 0.7.0 (#71)

    zoedsoupe authored Jul 20, 2025
    Copy the full SHA
    f2397f7 View commit details

Commits on Jul 21, 2025

  1. Copy the full SHA
    af9eec9 View commit details
Showing with 3,953 additions and 287 deletions.
  1. +4 −0 .envrc
  2. +3 −0 .github/.release-please-manifest.json
  3. +75 −0 .github/release-please-config.json
  4. +68 −28 .github/workflows/ci.yml
  5. +66 −0 .github/workflows/publish.yml
  6. +25 −0 .github/workflows/release-please.yml
  7. +1 −0 .wakatime-project
  8. +43 −0 CHANGELOG.md
  9. +16 −141 README.md
  10. +6 −0 examples/user_management/.formatter.exs
  11. +36 −0 examples/user_management/.gitignore
  12. +93 −0 examples/user_management/README.md
  13. +421 −0 examples/user_management/assets/css/app.css
  14. +45 −0 examples/user_management/assets/js/app.js
  15. +165 −0 examples/user_management/assets/vendor/topbar.js
  16. +45 −0 examples/user_management/config/config.exs
  17. +81 −0 examples/user_management/config/dev.exs
  18. +15 −0 examples/user_management/config/prod.exs
  19. +105 −0 examples/user_management/config/runtime.exs
  20. +31 −0 examples/user_management/config/test.exs
  21. +9 −0 examples/user_management/lib/user_management.ex
  22. +35 −0 examples/user_management/lib/user_management/application.ex
  23. +79 −0 examples/user_management/lib/user_management/profiles.ex
  24. +36 −0 examples/user_management/lib/user_management/profiles/profile.ex
  25. +28 −0 examples/user_management/lib/user_management/release.ex
  26. +5 −0 examples/user_management/lib/user_management/repo.ex
  27. +3 −0 examples/user_management/lib/user_management/supabase.ex
  28. +111 −0 examples/user_management/lib/user_management_web.ex
  29. +294 −0 examples/user_management/lib/user_management_web/components/core_components.ex
  30. +14 −0 examples/user_management/lib/user_management_web/components/layouts.ex
  31. +4 −0 examples/user_management/lib/user_management_web/components/layouts/app.html.heex
  32. +17 −0 examples/user_management/lib/user_management_web/components/layouts/root.html.heex
  33. +24 −0 examples/user_management/lib/user_management_web/controllers/error_html.ex
  34. +21 −0 examples/user_management/lib/user_management_web/controllers/error_json.ex
  35. +41 −0 examples/user_management/lib/user_management_web/controllers/session_controller.ex
  36. +49 −0 examples/user_management/lib/user_management_web/endpoint.ex
  37. +99 −0 examples/user_management/lib/user_management_web/live/login_live.ex
  38. +203 −0 examples/user_management/lib/user_management_web/live/profile_live.ex
  39. +41 −0 examples/user_management/lib/user_management_web/router.ex
  40. +93 −0 examples/user_management/lib/user_management_web/telemetry.ex
  41. +263 −0 examples/user_management/lib/user_management_web/user_auth.ex
  42. +76 −0 examples/user_management/mix.exs
  43. +42 −0 examples/user_management/mix.lock
  44. +4 −0 examples/user_management/priv/repo/migrations/.formatter.exs
  45. +11 −0 examples/user_management/priv/repo/seeds.exs
  46. BIN examples/user_management/priv/static/favicon.ico
  47. +6 −0 examples/user_management/priv/static/images/logo.svg
  48. +1 −0 examples/user_management/priv/static/images/placeholder-avatar.png
  49. +5 −0 examples/user_management/priv/static/robots.txt
  50. +5 −0 examples/user_management/rel/overlays/bin/migrate
  51. +1 −0 examples/user_management/rel/overlays/bin/migrate.bat
  52. +5 −0 examples/user_management/rel/overlays/bin/server
  53. +2 −0 examples/user_management/rel/overlays/bin/server.bat
  54. +1 −0 examples/user_management/supabase/.branches/_current_branch
  55. +1 −0 examples/user_management/supabase/.temp/cli-latest
  56. +49 −0 examples/user_management/supabase/config.toml
  57. +53 −0 examples/user_management/supabase/seed.sql
  58. +21 −0 examples/user_management/supabase/templates/confirmation.html
  59. +21 −0 examples/user_management/supabase/templates/invite.html
  60. +21 −0 examples/user_management/supabase/templates/magic_link.html
  61. +21 −0 examples/user_management/supabase/templates/recovery.html
  62. +113 −0 examples/user_management/test/support/conn_case.ex
  63. +58 −0 examples/user_management/test/support/data_case.ex
  64. +2 −0 examples/user_management/test/test_helper.exs
  65. +15 −0 examples/user_management/test/user_management_web/controllers/error_html_test.exs
  66. +14 −0 examples/user_management/test/user_management_web/controllers/error_json_test.exs
  67. +8 −0 examples/user_management/test/user_management_web/controllers/page_controller_test.exs
  68. +74 −5 flake.lock
  69. +16 −17 flake.nix
  70. +87 −0 guides/quickstarts/phoenix_liveview.md
  71. +7 −2 lib/supabase.ex
  72. +1 −1 lib/supabase/error.ex
  73. +24 −8 lib/supabase/fetcher.ex
  74. +6 −1 lib/supabase/fetcher/adapter/finch.ex
  75. +11 −3 lib/supabase/fetcher/behaviour.ex
  76. +1 −1 lib/supabase/fetcher/body_decoder.ex
  77. +5 −3 lib/supabase/fetcher/request.ex
  78. +1 −1 lib/supabase/fetcher/request/behaviour.ex
  79. +5 −5 mix.exs
  80. +10 −24 mix.lock
  81. +1 −0 priv/local/client.ex
  82. +61 −15 supabase/config.toml
  83. +9 −0 supabase/functions/binary-data/index.ts
  84. +30 −0 supabase/functions/error-cases/index.ts
  85. +14 −0 supabase/functions/headers-demo/index.ts
  86. +6 −0 supabase/functions/json-echo/index.ts
  87. +5 −0 supabase/functions/simple-text/index.ts
  88. +25 −0 supabase/functions/stream-data/index.ts
  89. +18 −0 supabase/migrations/20240101000000_create_films_and_distributors.sql
  90. +3 −20 supabase/seed.sql
  91. +22 −0 supabase/templates/confirm_signup.html
  92. +20 −0 supabase/templates/invite_user.html
  93. +23 −0 supabase/templates/magic_link_otp.html
  94. +22 −0 supabase/templates/reset_password.html
  95. +77 −12 test/supabase/fetcher/adapter/finch_test.exs
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -8,4 +8,8 @@ export ERL_AFLAGS="-kernel shell_history enabled"

export LANG=en_US.UTF-8

if [ -f .env.dev ]; then
source .env.dev
fi

use flake
3 changes: 3 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.7.0"
}
75 changes: 75 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"bootstrap-sha": "f471986",
"pull-request-header": ":rocket: Want to release this?",
"pull-request-title-pattern": "chore: release ${version}",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "feature",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "style",
"section": "Styles",
"hidden": false
},
{
"type": "chore",
"section": "Miscellaneous Chores",
"hidden": false
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "build",
"section": "Build System",
"hidden": false
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": false
}
],
"extra-files": [
{
"type": "generic",
"path": "README.md",
"glob": false
}
],
"packages": {
".": {
"release-type": "elixir"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
96 changes: 68 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -17,8 +17,23 @@ jobs:

strategy:
matrix:
elixir: [1.18.1]
otp: [27.0]
include:
- elixir: 1.18
otp: 28
- elixir: 1.18
otp: 27
- elixir: 1.18
otp: 26
- elixir: 1.17
otp: 27
- elixir: 1.17
otp: 26
- elixir: 1.17
otp: 25
- elixir: 1.16
otp: 25
- elixir: 1.16
otp: 24

steps:
- name: Checkout code
@@ -31,14 +46,14 @@ jobs:
otp-version: ${{ matrix.otp }}

- name: Cache Elixir deps
uses: actions/cache@v1
uses: actions/cache@v4
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Cache Elixir _build
uses: actions/cache@v1
uses: actions/cache@v4
id: build-cache
with:
path: _build
@@ -59,21 +74,37 @@ jobs:
run: mix clean

- name: Check code formatting
if: matrix.elixir != '1.16'
run: mix format --check-formatted

- name: Run Credo
run: mix credo --strict

static-analisys:
static-analysis:
runs-on: ubuntu-latest

env:
MIX_ENV: test

strategy:
matrix:
elixir: [1.18.1]
otp: [27.0]
include:
- elixir: 1.18
otp: 28
- elixir: 1.18
otp: 27
- elixir: 1.18
otp: 26
- elixir: 1.17
otp: 27
- elixir: 1.17
otp: 26
- elixir: 1.17
otp: 25
- elixir: 1.16
otp: 25
- elixir: 1.16
otp: 24

steps:
- name: Checkout code
@@ -86,14 +117,14 @@ jobs:
otp-version: ${{ matrix.otp }}

- name: Cache Elixir deps
uses: actions/cache@v1
uses: actions/cache@v4
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Cache Elixir _build
uses: actions/cache@v1
uses: actions/cache@v4
id: build-cache
with:
path: _build
@@ -110,29 +141,23 @@ jobs:
if: steps.build-cache.outputs.cache-hit != 'true'
run: mix deps.compile --warnings-as-errors

# Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
# Cache key based on Elixir & Erlang version (also useful when running in matrix)
- name: Restore PLT cache
uses: actions/cache/restore@v3
# Ensure PLTs directory exists
- name: Create PLTs directory
run: mkdir -p priv/plts

# Cache PLTs based on Elixir & Erlang version + mix.lock hash
- name: Restore/Save PLT cache
uses: actions/cache@v4
id: plt_cache
with:
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plt
restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plt
path: priv/plts
key: plt-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

# Create PLTs if no cache was found
- name: Create PLTs
if: steps.plt_cache.outputs.cache-hit != 'true'
run: mix dialyzer --plt

- name: Save PLT cache
uses: actions/cache/save@v3
if: steps.plt_cache.outputs.cache-hit != 'true'
id: plt_cache_save
with:
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plt
path: priv/plts

- name: Run dialyzer
run: mix dialyzer --format github

@@ -144,8 +169,23 @@ jobs:

strategy:
matrix:
elixir: [1.18.1]
otp: [27.0]
include:
- elixir: 1.18
otp: 28
- elixir: 1.18
otp: 27
- elixir: 1.18
otp: 26
- elixir: 1.17
otp: 27
- elixir: 1.17
otp: 26
- elixir: 1.17
otp: 25
- elixir: 1.16
otp: 25
- elixir: 1.16
otp: 24

steps:
- name: Checkout code
@@ -158,14 +198,14 @@ jobs:
otp-version: ${{ matrix.otp }}

- name: Cache Elixir deps
uses: actions/cache@v1
uses: actions/cache@v4
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Cache Elixir _build
uses: actions/cache@v1
uses: actions/cache@v4
id: build-cache
with:
path: _build
@@ -186,4 +226,4 @@ jobs:
run: mix clean

- name: Run tests
run: mix test
run: mix test --warnings-as-errors
66 changes: 66 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish to Hex

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest

env:
MIX_ENV: test

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: 1.18
otp-version: 28

- name: Cache Elixir deps
uses: actions/cache@v4
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-mix-hex-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Cache Elixir _build
uses: actions/cache@v4
id: build-cache
with:
path: _build
key: ${{ runner.os }}-build-hex-${{ env.MIX_ENV }}-27-1.18-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Install deps
if: steps.deps-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Compile deps
if: steps.build-cache.outputs.cache-hit != 'true'
run: mix deps.compile

- name: Compile
run: mix compile --warnings-as-errors

- name: Run tests
run: mix test --warnings-as-errors

- name: Check formatting
run: mix format --check-formatted

- name: Run Credo
run: mix credo --strict

- name: Publish to Hex
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
run: mix hex.publish --yes
25 changes: 25 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
workflow_dispatch:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: Release Please

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json
1 change: 1 addition & 0 deletions .wakatime-project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
supabase-ex
Loading