From bcd9a4eca42e5bf0c2142b21176e1925bf353acd Mon Sep 17 00:00:00 2001 From: Zoey Pessanha Date: Wed, 25 Jun 2025 18:56:56 -0300 Subject: [PATCH 1/8] update: deps and dev env --- flake.lock | 79 +++++++++++++++++++++++++++++++++++++++++++++---- flake.nix | 31 ++++++++++--------- lib/supabase.ex | 4 +-- mix.lock | 18 +++++------ 4 files changed, 100 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index 69376d6..52cd224 100644 --- a/flake.lock +++ b/flake.lock @@ -1,24 +1,93 @@ { "nodes": { + "elixir-overlay": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1749482522, + "narHash": "sha256-nLBqNIgCToSgVfodrY82UxSz1zvc6oiYILuJzDuLpGM=", + "owner": "zoedsoupe", + "repo": "elixir-overlay", + "rev": "929539a8d91f7ecd24777f04567c16f29373a50f", + "type": "github" + }, + "original": { + "owner": "zoedsoupe", + "repo": "elixir-overlay", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1735669367, - "narHash": "sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "edf04b75c13c2ac0e54df5ec5c543e300f76f1c9", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.11", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1750784235, + "narHash": "sha256-IYCCkKerO3lMUcMaDRLfwnfyPopQbGWF8iHRd0XcCBc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a5e9291e97f5ba0b4ba7d657ddedd5f86d11acfd", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05-small", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "elixir-overlay": "elixir-overlay", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index b8ba073..f944c31 100644 --- a/flake.nix +++ b/flake.nix @@ -1,33 +1,32 @@ { description = "Supabase SDK for Elixir"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05-small"; + elixir-overlay.url = "github:zoedsoupe/elixir-overlay"; + }; - outputs = {nixpkgs, ...}: let + outputs = { + nixpkgs, + elixir-overlay, + ... + }: let inherit (nixpkgs.lib) genAttrs; inherit (nixpkgs.lib.systems) flakeExposed; forAllSystems = f: - genAttrs flakeExposed (system: f (import nixpkgs {inherit system;})); + genAttrs flakeExposed (system: + f (import nixpkgs { + inherit system; + overlays = [elixir-overlay.overlays.default]; + })); in { devShells = forAllSystems (pkgs: let inherit (pkgs) mkShell; inherit (pkgs.beam.interpreters) erlang_27; - inherit (pkgs.beam) packagesWith; - beam = packagesWith erlang_27; - elixir_1_18 = beam.elixir.override { - version = "1.18.1"; - - src = pkgs.fetchFromGitHub { - owner = "elixir-lang"; - repo = "elixir"; - rev = "v1.18.1"; - sha256 = "sha256-zJNAoyqSj/KdJ1Cqau90QCJihjwHA+HO7nnD1Ugd768="; - }; - }; in { default = mkShell { name = "supabase-ex"; - packages = with pkgs; [elixir_1_18 postgresql]; + packages = with pkgs; [elixir-bin."1.19.0-rc.0" erlang_27 postgresql]; }; }); }; diff --git a/lib/supabase.ex b/lib/supabase.ex index 188f4fb..7d012bc 100644 --- a/lib/supabase.ex +++ b/lib/supabase.ex @@ -95,7 +95,7 @@ defmodule Supabase do {:ok, update_in(client.auth.storage_key, maybe_default)} end - defp maybe_put_storage_key(other), do: other + defp maybe_put_storage_key({:error, _changeset} = err), do: err defp default_storage_key(base_url) when is_binary(base_url) do base_url @@ -110,7 +110,7 @@ defmodule Supabase do {:ok, put_in(client.global.headers, Map.new(headers))} end - defp put_default_headers(other), do: other + defp put_default_headers({:error, _changeset} = err), do: err defp default_headers do %{ diff --git a/mix.lock b/mix.lock index 9dd1d01..1984d3b 100644 --- a/mix.lock +++ b/mix.lock @@ -1,29 +1,29 @@ %{ "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, "castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"}, - "credo": {:hex, :credo, "1.7.11", "d3e805f7ddf6c9c854fd36f089649d7cf6ba74c42bc3795d587814e3c9847102", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "56826b4306843253a66e47ae45e98e7d284ee1f95d53d1612bb483f88a8cf219"}, + "credo": {:hex, :credo, "1.7.12", "9e3c20463de4b5f3f23721527fcaf16722ec815e70ff6c60b86412c695d426c1", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8493d45c656c5427d9c729235b99d498bd133421f3e0a683e5c1b561471291e5"}, "db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"}, "decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"}, "dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"}, - "ecto": {:hex, :ecto, "3.12.5", "4a312960ce612e17337e7cefcf9be45b95a3be6b36b6f94dfb3d8c361d631866", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6eb18e80bef8bb57e17f5a7f068a1719fbda384d40fc37acb8eb8aeca493b6ea"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"}, + "ecto": {:hex, :ecto, "3.13.2", "7d0c0863f3fc8d71d17fc3ad3b9424beae13f02712ad84191a826c7169484f01", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "669d9291370513ff56e7b7e7081b7af3283d02e046cf3d403053c557894a0b3e"}, "ecto_sql": {:hex, :ecto_sql, "3.10.2", "6b98b46534b5c2f8b8b5f03f126e75e2a73c64f3c071149d32987a5378b0fdbd", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "68c018debca57cb9235e3889affdaec7a10616a4e3a80c99fa1d01fdafaa9007"}, "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, - "ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"}, + "ex_doc": {:hex, :ex_doc, "0.38.2", "504d25eef296b4dec3b8e33e810bc8b5344d565998cd83914ffe1b8503737c02", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "732f2d972e42c116a70802f9898c51b54916e542cc50968ac6980512ec90f42b"}, "file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"}, "finch": {:hex, :finch, "0.19.0", "c644641491ea854fc5c1bbaef36bfc764e3f08e7185e1f084e35e0672241b76d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.6.2 or ~> 1.7", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "fc5324ce209125d1e2fa0fcd2634601c52a787aff1cd33ee833664a5af4ea2b6"}, - "hpax": {:hex, :hpax, "1.0.2", "762df951b0c399ff67cc57c3995ec3cf46d696e41f0bba17da0518d94acd4aac", [:mix], [], "hexpm", "2f09b4c1074e0abd846747329eaa26d535be0eb3d189fa69d812bfb8bfefd32f"}, + "hpax": {:hex, :hpax, "1.0.3", "ed67ef51ad4df91e75cc6a1494f851850c0bd98ebc0be6e81b026e765ee535aa", [:mix], [], "hexpm", "8eab6e1cfa8d5918c2ce4ba43588e894af35dbd8e91e6e55c817bca5847df34a"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"}, "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, - "makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"}, - "mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"}, - "mint": {:hex, :mint, "1.6.2", "af6d97a4051eee4f05b5500671d47c3a67dac7386045d87a904126fd4bbcea2e", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1 or ~> 0.2.0 or ~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "5ee441dffc1892f1ae59127f74afe8fd82fda6587794278d924e4d90ea3d63f9"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.2", "03e1804074b3aa64d5fad7aa64601ed0fb395337b982d9bcf04029d68d51b6a7", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "af33ff7ef368d5893e4a267933e7744e46ce3cf1f61e2dccf53a111ed3aa3727"}, + "mime": {:hex, :mime, "2.0.7", "b8d739037be7cd402aee1ba0306edfdef982687ee7e9859bee6198c1e7e2f128", [:mix], [], "hexpm", "6171188e399ee16023ffc5b76ce445eb6d9672e2e241d2df6050f3c771e80ccd"}, + "mint": {:hex, :mint, "1.7.1", "113fdb2b2f3b59e47c7955971854641c61f378549d73e829e1768de90fc1abf1", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1 or ~> 0.2.0 or ~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "fceba0a4d0f24301ddee3024ae116df1c3f4bb7a563a731f45fdfeb9d39a231b"}, "mox": {:hex, :mox, "1.2.0", "a2cd96b4b80a3883e3100a221e8adc1b98e4c3a332a8fc434c39526babafd5b3", [:mix], [{:nimble_ownership, "~> 1.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}], "hexpm", "c7b92b3cc69ee24a7eeeaf944cd7be22013c52fcb580c1f33f50845ec821089a"}, "multipart": {:hex, :multipart, "0.1.1", "952c6aeb41c762d1ea9776c891754cfb61962c9d7b0f84fb63454779910b379d", [:mix], [{:mime, "~> 1.2", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm", "bc349da107810c220ef0366724e445a1a2a39e6be3a361c6a141e0d507eee157"}, "nimble_options": {:hex, :nimble_options, "1.1.1", "e3a492d54d85fc3fd7c5baf411d9d2852922f66e69476317787a7b2bb000a61b", [:mix], [], "hexpm", "821b2470ca9442c4b6984882fe9bb0389371b8ddec4d45a9504f00a66f650b44"}, "nimble_ownership": {:hex, :nimble_ownership, "1.0.1", "f69fae0cdd451b1614364013544e66e4f5d25f36a2056a9698b793305c5aa3a6", [:mix], [], "hexpm", "3825e461025464f519f3f3e4a1f9b68c47dc151369611629ad08b636b73bb22d"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"}, "nimble_pool": {:hex, :nimble_pool, "1.1.0", "bf9c29fbdcba3564a8b800d1eeb5a3c58f36e1e11d7b7fb2e084a643f645f06b", [:mix], [], "hexpm", "af2e4e6b34197db81f7aad230c1118eac993acc0dae6bc83bac0126d4ae0813a"}, "peri": {:hex, :peri, "0.2.9", "1f83c04a2957d354221462468a0435ef0ed581505794be43c8cf39c7e9779158", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:stream_data, "~> 1.1", [hex: :stream_data, repo: "hexpm", optional: true]}], "hexpm", "2929a65cc45d432dc13dc8348f270a6c5dcaec8f361f3236a0208b3976a78bc9"}, "plug": {:hex, :plug, "1.15.2", "94cf1fa375526f30ff8770837cb804798e0045fd97185f0bb9e5fcd858c792a3", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "02731fa0c2dcb03d8d21a1d941bdbbe99c2946c0db098eee31008e04c6283615"}, From 5a31104bba87c3806ed574d2cafafc871dd73fe3 Mon Sep 17 00:00:00 2001 From: Zoey Pessanha Date: Wed, 25 Jun 2025 19:00:20 -0300 Subject: [PATCH 2/8] update: ci version --- .github/workflows/ci.yml | 12 ++++++------ README.md | 26 ++------------------------ 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7152e9..f7db57b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,8 @@ jobs: strategy: matrix: - elixir: [1.18.1] - otp: [27.0] + elixir: [1.19.0-rc.0] + otp: [27.3.2] steps: - name: Checkout code @@ -72,8 +72,8 @@ jobs: strategy: matrix: - elixir: [1.18.1] - otp: [27.0] + elixir: [1.19.0-rc.0] + otp: [27.3.2] steps: - name: Checkout code @@ -144,8 +144,8 @@ jobs: strategy: matrix: - elixir: [1.18.1] - otp: [27.0] + elixir: [1.19.0-rc.0] + otp: [27.3.2] steps: - name: Checkout code diff --git a/README.md b/README.md index b803aba..11548e6 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,4 @@ -# Supabase Potion - -Where the magic starts! - -> [!WARNING] -> This project is still in high development, expect breaking changes and unexpected behaviour. +# Supabase ## Getting Started @@ -37,7 +32,7 @@ To install the base SDK: ```elixir def deps do [ - {:supabase_potion, "~> 0.5"} + {:supabase_potion, "~> 0.6"} ] end ``` @@ -69,23 +64,6 @@ end A `Supabase.Client` holds general information about Supabase, that can be used to intereact with any of the children integrations, for example: `Supabase.Storage` or `Supabase.UI`. -`Supabase.Client` is defined as: - -- `:base_url` - The base url of the Supabase API, it is usually in the form `https://.supabase.io`. -- `:api_key` - The API key used to authenticate requests to the Supabase API. -- `:access_token` - Token with specific permissions to access the Supabase API, it is usually the same as the API key. -- `:db` - default database options - - `:schema` - default schema to use, defaults to `"public"` -- `:global` - global options config - - `:headers` - additional headers to use on each request -- `:auth` - authentication options - - `:auto_refresh_token` - automatically refresh the token when it expires, defaults to `true` - - `:debug` - enable debug mode, defaults to `false` - - `:detect_session_in_url` - detect session in URL, defaults to `true` - - `:flow_type` - authentication flow type, defaults to `"web"` - - `:persist_session` - persist session, defaults to `true` - - `:storage_key` - storage key - ### Usage There are two ways to create a `Supabase.Client`: From 7ad8acfff492c7103df92b10fd1a56c0656bdc55 Mon Sep 17 00:00:00 2001 From: zoey Date: Mon, 30 Jun 2025 07:57:59 -0300 Subject: [PATCH 3/8] Atualizar o ci.yml Co-authored-by: Ziinc --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7db57b..8384e4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - elixir: [1.19.0-rc.0] + elixir: [1.15, 1.16, 1.17, 1.18, 1.19.0-rc.0] otp: [27.3.2] steps: From bc145e2b875751115c18597f1c65795919bffac1 Mon Sep 17 00:00:00 2001 From: Zoey Pessanha Date: Sun, 29 Jun 2025 20:13:28 -0300 Subject: [PATCH 4/8] fix: correctly use supabase migrations on local dev --- supabase/config.toml | 7 +++++- ...01000000_create_films_and_distributors.sql | 18 +++++++++++++++ supabase/seed.sql | 23 +------------------ 3 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 supabase/migrations/20240101000000_create_films_and_distributors.sql diff --git a/supabase/config.toml b/supabase/config.toml index 046f86a..8bffb6b 100644 --- a/supabase/config.toml +++ b/supabase/config.toml @@ -112,7 +112,7 @@ enable_signup = true # Allow/disallow anonymous sign-ins to your project. enable_anonymous_sign_ins = true # Allow/disallow testing manual linking of accounts -enable_manual_linking = false +enable_manual_linking = true # Passwords shorter than this value will be rejected as weak. Minimum 6, recommended 8 or more. minimum_password_length = 6 # Passwords that do not meet the following requirements will be rejected as weak. Supported values @@ -211,6 +211,11 @@ max_frequency = "5s" # Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`, # `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin_oidc`, `notion`, `twitch`, # `twitter`, `slack`, `spotify`, `workos`, `zoom`. +[auth.external.google] +enabled = true +client_id = "client-id-123" +secret = "secret-123456" + [auth.external.apple] enabled = false client_id = "" diff --git a/supabase/migrations/20240101000000_create_films_and_distributors.sql b/supabase/migrations/20240101000000_create_films_and_distributors.sql new file mode 100644 index 0000000..87702d1 --- /dev/null +++ b/supabase/migrations/20240101000000_create_films_and_distributors.sql @@ -0,0 +1,18 @@ +-- Create films table +CREATE TABLE IF NOT EXISTS public.films ( + id serial PRIMARY KEY, + code char(5), + title varchar(40) NOT NULL, + did integer NOT NULL, + date_prod date, + kind varchar(10), + len interval hour to minute +); + +-- Create distributors table +CREATE TABLE IF NOT EXISTS public.distributors ( + did integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, + name varchar(40) NOT NULL CHECK (name <> ''), + film_id integer, + FOREIGN KEY (film_id) REFERENCES films (id) +); \ No newline at end of file diff --git a/supabase/seed.sql b/supabase/seed.sql index 0618c1d..bf7a479 100644 --- a/supabase/seed.sql +++ b/supabase/seed.sql @@ -1,24 +1,3 @@ -CREATE TABLE IF NOT EXISTS public.films ( - id serial PRIMARY KEY, - code char(5), - title varchar(40) NOT NULL, - did integer NOT NULL, - date_prod date, - kind varchar(10), - len interval hour to minute -); --- Commit after creation to ensure table exists before insertion -COMMIT; - -CREATE TABLE IF NOT EXISTS public.distributors ( - did integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - name varchar(40) NOT NULL CHECK (name <> ''), - film_id integer, - FOREIGN KEY (film_id) REFERENCES films (id) -); --- Commit after creation to ensure table exists before insertion -COMMIT; - -- Insert sample data into the films table INSERT INTO public.films (code, title, did, date_prod, kind, len) VALUES @@ -35,4 +14,4 @@ VALUES ('Paramount Pictures', 2), ('Warner Bros.', 3), ('Miramax', 4), - ('Universal Pictures', 5); + ('Universal Pictures', 5); \ No newline at end of file From 5a8d0a27e7a2730458088822604011f00c3e62ad Mon Sep 17 00:00:00 2001 From: Zoey Pessanha Date: Sun, 20 Jul 2025 10:51:40 -0300 Subject: [PATCH 5/8] feat: correctly setup multi version ci --- .github/.release-please-manifest.json | 3 ++ .github/release-please-config.json | 75 +++++++++++++++++++++++++++ .github/workflows/ci.yml | 73 ++++++++++++++++++-------- .github/workflows/publish.yml | 66 +++++++++++++++++++++++ .github/workflows/release-please.yml | 25 +++++++++ flake.lock | 12 ++--- flake.nix | 4 +- mix.lock | 2 +- 8 files changed, 229 insertions(+), 31 deletions(-) create mode 100644 .github/.release-please-manifest.json create mode 100644 .github/release-please-config.json create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/release-please.yml diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json new file mode 100644 index 0000000..e3778b2 --- /dev/null +++ b/.github/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.6.2" +} \ No newline at end of file diff --git a/.github/release-please-config.json b/.github/release-please-config.json new file mode 100644 index 0000000..7f28ceb --- /dev/null +++ b/.github/release-please-config.json @@ -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" +} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8384e4e..1bb5c65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,19 @@ jobs: strategy: matrix: - elixir: [1.15, 1.16, 1.17, 1.18, 1.19.0-rc.0] - otp: [27.3.2] + 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 steps: - name: Checkout code @@ -64,7 +75,7 @@ jobs: - name: Run Credo run: mix credo --strict - static-analisys: + static-analysis: runs-on: ubuntu-latest env: @@ -72,8 +83,19 @@ jobs: strategy: matrix: - elixir: [1.19.0-rc.0] - otp: [27.3.2] + 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 steps: - name: Checkout code @@ -110,29 +132,25 @@ 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') }} + restore-keys: | + plt-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}- # 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 +162,19 @@ jobs: strategy: matrix: - elixir: [1.19.0-rc.0] - otp: [27.3.2] + 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 steps: - name: Checkout code @@ -186,4 +215,4 @@ jobs: run: mix clean - name: Run tests - run: mix test + run: mix test --warnings-as-errors diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d4a983b --- /dev/null +++ b/.github/workflows/publish.yml @@ -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-${{ 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-${{ 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 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..33559e0 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -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.GITHUB_TOKEN }} + config-file: .github/release-please-config.json + manifest-file: .github/.release-please-manifest.json diff --git a/flake.lock b/flake.lock index 52cd224..7a2c785 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1749482522, - "narHash": "sha256-nLBqNIgCToSgVfodrY82UxSz1zvc6oiYILuJzDuLpGM=", + "lastModified": 1752676017, + "narHash": "sha256-F5nmW38F1dW/IOz/Kj8hS5SM5ehhuRH7xvrFM20jA5Q=", "owner": "zoedsoupe", "repo": "elixir-overlay", - "rev": "929539a8d91f7ecd24777f04567c16f29373a50f", + "rev": "19108d02ac1029f9b5abaf20363903eecc894530", "type": "github" }, "original": { @@ -55,11 +55,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1750784235, - "narHash": "sha256-IYCCkKerO3lMUcMaDRLfwnfyPopQbGWF8iHRd0XcCBc=", + "lastModified": 1752946745, + "narHash": "sha256-e6TZD9b7wK1Gl6mMwTDL1qnuhTKs5ziClz30p8M8BOA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a5e9291e97f5ba0b4ba7d657ddedd5f86d11acfd", + "rev": "da77d74e497e9bfeb03951d76892225084f6509f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f944c31..8499860 100644 --- a/flake.nix +++ b/flake.nix @@ -22,11 +22,11 @@ in { devShells = forAllSystems (pkgs: let inherit (pkgs) mkShell; - inherit (pkgs.beam.interpreters) erlang_27; + inherit (pkgs.beam.interpreters) erlang_28; in { default = mkShell { name = "supabase-ex"; - packages = with pkgs; [elixir-bin."1.19.0-rc.0" erlang_27 postgresql]; + packages = with pkgs; [(elixir-with-otp erlang_28)."1.18.4" erlang_28 postgresql]; }; }); }; diff --git a/mix.lock b/mix.lock index 1984d3b..6f9d2ae 100644 --- a/mix.lock +++ b/mix.lock @@ -11,7 +11,7 @@ "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, "ex_doc": {:hex, :ex_doc, "0.38.2", "504d25eef296b4dec3b8e33e810bc8b5344d565998cd83914ffe1b8503737c02", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "732f2d972e42c116a70802f9898c51b54916e542cc50968ac6980512ec90f42b"}, "file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"}, - "finch": {:hex, :finch, "0.19.0", "c644641491ea854fc5c1bbaef36bfc764e3f08e7185e1f084e35e0672241b76d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.6.2 or ~> 1.7", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "fc5324ce209125d1e2fa0fcd2634601c52a787aff1cd33ee833664a5af4ea2b6"}, + "finch": {:hex, :finch, "0.20.0", "5330aefb6b010f424dcbbc4615d914e9e3deae40095e73ab0c1bb0968933cadf", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.6.2 or ~> 1.7", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2658131a74d051aabfcba936093c903b8e89da9a1b63e430bee62045fa9b2ee2"}, "hpax": {:hex, :hpax, "1.0.3", "ed67ef51ad4df91e75cc6a1494f851850c0bd98ebc0be6e81b026e765ee535aa", [:mix], [], "hexpm", "8eab6e1cfa8d5918c2ce4ba43588e894af35dbd8e91e6e55c817bca5847df34a"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"}, From e8da3d72832e75832f4c13bf90175cd47c32c95f Mon Sep 17 00:00:00 2001 From: Zoey Pessanha Date: Sun, 20 Jul 2025 11:00:29 -0300 Subject: [PATCH 6/8] chore: add 1.16 elixir version to ci --- .github/workflows/ci.yml | 12 ++++++++++++ mix.exs | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bb5c65..5df0d53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,10 @@ jobs: otp: 26 - elixir: 1.17 otp: 25 + - elixir: 1.16 + otp: 25 + - elixir: 1.16 + otp: 24 steps: - name: Checkout code @@ -96,6 +100,10 @@ jobs: otp: 26 - elixir: 1.17 otp: 25 + - elixir: 1.16 + otp: 25 + - elixir: 1.16 + otp: 24 steps: - name: Checkout code @@ -175,6 +183,10 @@ jobs: otp: 26 - elixir: 1.17 otp: 25 + - elixir: 1.16 + otp: 25 + - elixir: 1.16 + otp: 24 steps: - name: Checkout code diff --git a/mix.exs b/mix.exs index ea722c7..0dff7f3 100644 --- a/mix.exs +++ b/mix.exs @@ -8,7 +8,7 @@ defmodule Supabase.MixProject do [ app: :supabase_potion, version: @version, - elixir: "~> 1.14", + elixir: "~> 1.16", start_permanent: Mix.env() == :prod, deps: deps(), docs: docs(), From 74f1698f2ad924f02211edf0cb56c78dceaafbde Mon Sep 17 00:00:00 2001 From: Zoey Pessanha Date: Sun, 20 Jul 2025 11:09:43 -0300 Subject: [PATCH 7/8] chore: elixir 1.16 formatted vreaking on ci --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5df0d53..79c71ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,7 @@ jobs: run: mix clean - name: Check code formatting + if: matrix.elixir != '1.16' run: mix format --check-formatted - name: Run Credo From 8b33431f59a6088ae5666604c1c132cf18bd78d8 Mon Sep 17 00:00:00 2001 From: Zoey Pessanha Date: Sun, 20 Jul 2025 11:58:39 -0300 Subject: [PATCH 8/8] chore: correctly setup ci/publish --- .github/workflows/ci.yml | 2 -- .github/workflows/publish.yml | 4 ++-- .github/workflows/release-please.yml | 2 +- mix.exs | 4 ++-- mix.lock | 14 -------------- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79c71ca..86a720a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,8 +152,6 @@ jobs: with: path: priv/plts key: plt-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} - restore-keys: | - plt-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}- # Create PLTs if no cache was found - name: Create PLTs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d4a983b..2bcc599 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,14 +28,14 @@ jobs: id: deps-cache with: path: deps - key: ${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + 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-${{ env.MIX_ENV }}-27-1.18-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + 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' diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 33559e0..8cdf17a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -20,6 +20,6 @@ jobs: - uses: googleapis/release-please-action@v4 id: release with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} config-file: .github/release-please-config.json manifest-file: .github/.release-please-manifest.json diff --git a/mix.exs b/mix.exs index 0dff7f3..6b69273 100644 --- a/mix.exs +++ b/mix.exs @@ -32,11 +32,11 @@ defmodule Supabase.MixProject do defp deps do [ {:mime, "~> 2.0"}, - {:finch, "~> 0.16"}, + {:finch, "~> 0.18"}, {:jason, "~> 1.4"}, {:ecto, "~> 3.10"}, {:mox, "~> 1.2", only: :test}, - {:ex_doc, ">= 0.0.0", only: [:dev], runtime: false}, + {:ex_doc, ">= 0.0.0", only: [:dev, :test], runtime: false}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false} ] diff --git a/mix.lock b/mix.lock index 6f9d2ae..9897d22 100644 --- a/mix.lock +++ b/mix.lock @@ -1,13 +1,10 @@ %{ "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, - "castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"}, "credo": {:hex, :credo, "1.7.12", "9e3c20463de4b5f3f23721527fcaf16722ec815e70ff6c60b86412c695d426c1", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8493d45c656c5427d9c729235b99d498bd133421f3e0a683e5c1b561471291e5"}, - "db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"}, "decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"}, "dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"}, "earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"}, "ecto": {:hex, :ecto, "3.13.2", "7d0c0863f3fc8d71d17fc3ad3b9424beae13f02712ad84191a826c7169484f01", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "669d9291370513ff56e7b7e7081b7af3283d02e046cf3d403053c557894a0b3e"}, - "ecto_sql": {:hex, :ecto_sql, "3.10.2", "6b98b46534b5c2f8b8b5f03f126e75e2a73c64f3c071149d32987a5378b0fdbd", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "68c018debca57cb9235e3889affdaec7a10616a4e3a80c99fa1d01fdafaa9007"}, "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, "ex_doc": {:hex, :ex_doc, "0.38.2", "504d25eef296b4dec3b8e33e810bc8b5344d565998cd83914ffe1b8503737c02", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "732f2d972e42c116a70802f9898c51b54916e542cc50968ac6980512ec90f42b"}, "file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"}, @@ -20,20 +17,9 @@ "mime": {:hex, :mime, "2.0.7", "b8d739037be7cd402aee1ba0306edfdef982687ee7e9859bee6198c1e7e2f128", [:mix], [], "hexpm", "6171188e399ee16023ffc5b76ce445eb6d9672e2e241d2df6050f3c771e80ccd"}, "mint": {:hex, :mint, "1.7.1", "113fdb2b2f3b59e47c7955971854641c61f378549d73e829e1768de90fc1abf1", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1 or ~> 0.2.0 or ~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "fceba0a4d0f24301ddee3024ae116df1c3f4bb7a563a731f45fdfeb9d39a231b"}, "mox": {:hex, :mox, "1.2.0", "a2cd96b4b80a3883e3100a221e8adc1b98e4c3a332a8fc434c39526babafd5b3", [:mix], [{:nimble_ownership, "~> 1.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}], "hexpm", "c7b92b3cc69ee24a7eeeaf944cd7be22013c52fcb580c1f33f50845ec821089a"}, - "multipart": {:hex, :multipart, "0.1.1", "952c6aeb41c762d1ea9776c891754cfb61962c9d7b0f84fb63454779910b379d", [:mix], [{:mime, "~> 1.2", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm", "bc349da107810c220ef0366724e445a1a2a39e6be3a361c6a141e0d507eee157"}, "nimble_options": {:hex, :nimble_options, "1.1.1", "e3a492d54d85fc3fd7c5baf411d9d2852922f66e69476317787a7b2bb000a61b", [:mix], [], "hexpm", "821b2470ca9442c4b6984882fe9bb0389371b8ddec4d45a9504f00a66f650b44"}, "nimble_ownership": {:hex, :nimble_ownership, "1.0.1", "f69fae0cdd451b1614364013544e66e4f5d25f36a2056a9698b793305c5aa3a6", [:mix], [], "hexpm", "3825e461025464f519f3f3e4a1f9b68c47dc151369611629ad08b636b73bb22d"}, "nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"}, "nimble_pool": {:hex, :nimble_pool, "1.1.0", "bf9c29fbdcba3564a8b800d1eeb5a3c58f36e1e11d7b7fb2e084a643f645f06b", [:mix], [], "hexpm", "af2e4e6b34197db81f7aad230c1118eac993acc0dae6bc83bac0126d4ae0813a"}, - "peri": {:hex, :peri, "0.2.9", "1f83c04a2957d354221462468a0435ef0ed581505794be43c8cf39c7e9779158", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:stream_data, "~> 1.1", [hex: :stream_data, repo: "hexpm", optional: true]}], "hexpm", "2929a65cc45d432dc13dc8348f270a6c5dcaec8f361f3236a0208b3976a78bc9"}, - "plug": {:hex, :plug, "1.15.2", "94cf1fa375526f30ff8770837cb804798e0045fd97185f0bb9e5fcd858c792a3", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "02731fa0c2dcb03d8d21a1d941bdbbe99c2946c0db098eee31008e04c6283615"}, - "plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"}, - "postgrex": {:hex, :postgrex, "0.17.3", "c92cda8de2033a7585dae8c61b1d420a1a1322421df84da9a82a6764580c503d", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "946cf46935a4fdca7a81448be76ba3503cff082df42c6ec1ff16a4bdfbfb098d"}, - "req": {:git, "https://github.com/wojtekmach/req.git", "43738340748942762932dcc5a7620d3d5f09bf09", []}, - "supabase_connection": {:hex, :supabase_connection, "0.1.0", "21798a8637d344b8e48471add553a02371814b599f7ce555a00d17583a5ea5a9", [:mix], [{:ecto, "~> 3.10", [hex: :ecto, repo: "hexpm", optional: false]}, {:supabase_types, "~> 0.1", [hex: :supabase_types, repo: "hexpm", optional: false]}], "hexpm", "5435f2892d13c5f00d26b4a61b3fc823683fc6699936d9b7c201ebf73c33e226"}, - "supabase_fetcher": {:hex, :supabase_fetcher, "0.1.0", "c2c42084306655b3cd3f747f60deacbe008395f129d937fc8c7ce13de2a8f85f", [:mix], [{:finch, "~> 0.16", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "33725892d1fb51c4d6aca49a6142fa0ef433fd5f20a17113c469f80e090d5c5f"}, - "supabase_potion": {:hex, :supabase_potion, "0.3.0", "074719bc46a37ded57e55bb6c24c80b5f9479f75cee8b5c6be864702b69a0216", [:mix], [{:ecto, "~> 3.10", [hex: :ecto, repo: "hexpm", optional: false]}, {:finch, "~> 0.16", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e9546a3d0854e4a97b4ed3efba37775f4f9ec266d7d3585d88a6d484b0ef5aa9"}, - "supabase_storage": {:hex, :supabase_storage, "0.1.0", "58b71070de6232724fb5ead406a7e35bdfca97a2f4e3733b0f13d4dd26c2eb40", [:mix], [{:ecto, "~> 3.10", [hex: :ecto, repo: "hexpm", optional: false]}, {:supabase_connection, "~> 0.1", [hex: :supabase_connection, repo: "hexpm", optional: false]}, {:supabase_fetcher, "~> 0.1", [hex: :supabase_fetcher, repo: "hexpm", optional: false]}], "hexpm", "4b8343f8b0c39633bcf8ae7a82b4c92ab22cac66f67bf7bbb2cb948072c192e9"}, - "supabase_types": {:hex, :supabase_types, "0.1.1", "97cb4abaf4ce28cddcd1afb8eb3e0f5e7ba439db3c3288f775d7a1cd8be18b37", [:mix], [{:ecto, "~> 3.10", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "a8cc84753fdd160f4db4ea31a3c92b60c5efea2d6153a11da19e02943433e42f"}, "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"}, }