From 9fd617e45a302d25e811ab672889f00db166901d Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 09:48:37 +0100 Subject: [PATCH 01/17] tests: add tests for config --- .../mv_web/live/global_settings_live_test.exs | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/test/mv_web/live/global_settings_live_test.exs b/test/mv_web/live/global_settings_live_test.exs index f217311..1ea1d12 100644 --- a/test/mv_web/live/global_settings_live_test.exs +++ b/test/mv_web/live/global_settings_live_test.exs @@ -687,5 +687,42 @@ defmodule MvWeb.GlobalSettingsLiveTest do # Check that file input has accept attribute for CSV assert html =~ ~r/accept=["'][^"']*csv["']/i or html =~ "CSV files only" end + + test "configured row limit is enforced", %{conn: conn} do + # Business rule: CSV import respects configured row limits + # Test that a custom limit (500) is enforced, not just the default (1000) + original_config = Application.get_env(:mv, :csv_import, []) + + try do + Application.put_env(:mv, :csv_import, [max_rows: 500]) + + {:ok, view, _html} = live(conn, ~p"/settings") + + # Generate CSV with 501 rows (exceeding custom limit of 500) + header = "first_name;last_name;email;street;postal_code;city\n" + + rows = + for i <- 1..501 do + "Row#{i};Last#{i};email#{i}@example.com;Street#{i};12345;City#{i}\n" + end + + large_csv = header <> Enum.join(rows) + + # Simulate file upload using helper function + upload_csv_file(view, large_csv, "too_many_rows_custom.csv") + + view + |> form("#csv-upload-form", %{}) + |> render_submit() + + html = render(view) + # Business rule: import should be rejected when exceeding configured limit + assert html =~ "exceeds" or html =~ "maximum" or html =~ "limit" or + html =~ "Failed to prepare" + after + # Restore original config + Application.put_env(:mv, :csv_import, original_config) + end + end end end From 3f551c5f8d47695f23b094f3100c73b6815478c0 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 09:49:13 +0100 Subject: [PATCH 02/17] feat: add configs for impor tlimits --- config/config.exs | 6 ++++ lib/mv/config.ex | 46 +++++++++++++++++++++++++ lib/mv_web/live/global_settings_live.ex | 7 ++-- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/config/config.exs b/config/config.exs index cc338b2..6dfb1d1 100644 --- a/config/config.exs +++ b/config/config.exs @@ -51,6 +51,12 @@ config :mv, generators: [timestamp_type: :utc_datetime], ash_domains: [Mv.Membership, Mv.Accounts, Mv.MembershipFees, Mv.Authorization] +# CSV Import configuration +config :mv, csv_import: [ + max_file_size_mb: 10, + max_rows: 1000 +] + # Configures the endpoint config :mv, MvWeb.Endpoint, url: [host: "localhost"], diff --git a/lib/mv/config.ex b/lib/mv/config.ex index 5e6ba90..edf8428 100644 --- a/lib/mv/config.ex +++ b/lib/mv/config.ex @@ -21,4 +21,50 @@ defmodule Mv.Config do def sql_sandbox? do Application.get_env(:mv, :sql_sandbox, false) end + + @doc """ + Returns the maximum file size for CSV imports in bytes. + + Reads the `max_file_size_mb` value from the CSV import configuration + and converts it to bytes. + + ## Returns + + - Maximum file size in bytes (default: 10_485_760 bytes = 10 MB) + + ## Examples + + iex> Mv.Config.csv_import_max_file_size_bytes() + 10_485_760 + """ + @spec csv_import_max_file_size_bytes() :: non_neg_integer() + def csv_import_max_file_size_bytes do + max_file_size_mb = get_csv_import_config(:max_file_size_mb, 10) + max_file_size_mb * 1024 * 1024 + end + + @doc """ + Returns the maximum number of rows allowed in CSV imports. + + Reads the `max_rows` value from the CSV import configuration. + + ## Returns + + - Maximum number of rows (default: 1000) + + ## Examples + + iex> Mv.Config.csv_import_max_rows() + 1000 + """ + @spec csv_import_max_rows() :: pos_integer() + def csv_import_max_rows do + get_csv_import_config(:max_rows, 1000) + end + + # Helper function to get CSV import config values + defp get_csv_import_config(key, default) do + Application.get_env(:mv, :csv_import, []) + |> Keyword.get(key, default) + end end diff --git a/lib/mv_web/live/global_settings_live.ex b/lib/mv_web/live/global_settings_live.ex index bd0036b..aa41cd5 100644 --- a/lib/mv_web/live/global_settings_live.ex +++ b/lib/mv_web/live/global_settings_live.ex @@ -54,8 +54,6 @@ defmodule MvWeb.GlobalSettingsLive do on_mount {MvWeb.LiveHelpers, :ensure_user_role_loaded} # CSV Import configuration constants - # 10 MB - @max_file_size_bytes 10_485_760 @max_errors 50 @impl true @@ -82,7 +80,7 @@ defmodule MvWeb.GlobalSettingsLive do |> allow_upload(:csv_file, accept: ~w(.csv), max_entries: 1, - max_file_size: @max_file_size_bytes, + max_file_size: Config.csv_import_max_file_size_bytes(), auto_upload: true ) @@ -409,7 +407,8 @@ defmodule MvWeb.GlobalSettingsLive do # Processes CSV upload and starts import defp process_csv_upload(socket) do with {:ok, content} <- consume_and_read_csv(socket), - {:ok, import_state} <- MemberCSV.prepare(content) do + {:ok, import_state} <- + MemberCSV.prepare(content, max_rows: Config.csv_import_max_rows()) do start_import(socket, import_state) else {:error, reason} when is_binary(reason) -> From d61a939debf907bfabdc8aedfb3b6b5435907689 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 09:50:47 +0100 Subject: [PATCH 03/17] formatting --- config/config.exs | 9 +++++---- test/mv_web/live/global_settings_live_test.exs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/config.exs b/config/config.exs index 6dfb1d1..64f3604 100644 --- a/config/config.exs +++ b/config/config.exs @@ -52,10 +52,11 @@ config :mv, ash_domains: [Mv.Membership, Mv.Accounts, Mv.MembershipFees, Mv.Authorization] # CSV Import configuration -config :mv, csv_import: [ - max_file_size_mb: 10, - max_rows: 1000 -] +config :mv, + csv_import: [ + max_file_size_mb: 10, + max_rows: 1000 + ] # Configures the endpoint config :mv, MvWeb.Endpoint, diff --git a/test/mv_web/live/global_settings_live_test.exs b/test/mv_web/live/global_settings_live_test.exs index 1ea1d12..0926681 100644 --- a/test/mv_web/live/global_settings_live_test.exs +++ b/test/mv_web/live/global_settings_live_test.exs @@ -694,7 +694,7 @@ defmodule MvWeb.GlobalSettingsLiveTest do original_config = Application.get_env(:mv, :csv_import, []) try do - Application.put_env(:mv, :csv_import, [max_rows: 500]) + Application.put_env(:mv, :csv_import, max_rows: 500) {:ok, view, _html} = live(conn, ~p"/settings") From e74154581c31034be095f6d0671a76e62f2b9573 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 10:10:02 +0100 Subject: [PATCH 04/17] feat: changes UI info based on config for limits --- lib/mv/config.ex | 19 +++++++++++++++++++ lib/mv_web/live/global_settings_live.ex | 8 +++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/lib/mv/config.ex b/lib/mv/config.ex index edf8428..98a5b65 100644 --- a/lib/mv/config.ex +++ b/lib/mv/config.ex @@ -62,6 +62,25 @@ defmodule Mv.Config do get_csv_import_config(:max_rows, 1000) end + @doc """ + Returns the maximum file size for CSV imports in megabytes. + + Reads the `max_file_size_mb` value from the CSV import configuration. + + ## Returns + + - Maximum file size in megabytes (default: 10) + + ## Examples + + iex> Mv.Config.csv_import_max_file_size_mb() + 10 + """ + @spec csv_import_max_file_size_mb() :: pos_integer() + def csv_import_max_file_size_mb do + get_csv_import_config(:max_file_size_mb, 10) + end + # Helper function to get CSV import config values defp get_csv_import_config(key, default) do Application.get_env(:mv, :csv_import, []) diff --git a/lib/mv_web/live/global_settings_live.ex b/lib/mv_web/live/global_settings_live.ex index aa41cd5..29cd3f3 100644 --- a/lib/mv_web/live/global_settings_live.ex +++ b/lib/mv_web/live/global_settings_live.ex @@ -34,8 +34,8 @@ defmodule MvWeb.GlobalSettingsLive do ### Limits - - Maximum file size: 10 MB - - Maximum rows: 1,000 rows (excluding header) + - Maximum file size: configurable via `config :mv, csv_import: [max_file_size_mb: ...]` + - Maximum rows: configurable via `config :mv, csv_import: [max_rows: ...]` (excluding header) - Processing: chunks of 200 rows - Errors: capped at 50 per import @@ -74,6 +74,8 @@ defmodule MvWeb.GlobalSettingsLive do |> assign(:import_status, :idle) |> assign(:locale, locale) |> assign(:max_errors, @max_errors) + |> assign(:csv_import_max_rows, Config.csv_import_max_rows()) + |> assign(:csv_import_max_file_size_mb, Config.csv_import_max_file_size_mb()) |> assign_form() # Configure file upload with auto-upload enabled # Files are uploaded automatically when selected, no need for manual trigger @@ -198,7 +200,7 @@ defmodule MvWeb.GlobalSettingsLive do /> From b6d53d2826752a532445f317bb38f13380a17a36 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 10:22:05 +0100 Subject: [PATCH 05/17] refactor: add test to seperate async false module --- .../live/global_settings_live_config_test.exs | 73 +++++++++++++++++++ .../mv_web/live/global_settings_live_test.exs | 37 ---------- 2 files changed, 73 insertions(+), 37 deletions(-) create mode 100644 test/mv_web/live/global_settings_live_config_test.exs diff --git a/test/mv_web/live/global_settings_live_config_test.exs b/test/mv_web/live/global_settings_live_config_test.exs new file mode 100644 index 0000000..c940594 --- /dev/null +++ b/test/mv_web/live/global_settings_live_config_test.exs @@ -0,0 +1,73 @@ +defmodule MvWeb.GlobalSettingsLiveConfigTest do + @moduledoc """ + Tests for GlobalSettingsLive that modify global Application configuration. + + These tests run with `async: false` to prevent race conditions when + modifying global Application environment variables (Application.put_env). + This follows the same pattern as Mv.ConfigTest. + """ + use MvWeb.ConnCase, async: false + import Phoenix.LiveViewTest + + # Helper function to upload CSV file in tests + defp upload_csv_file(view, csv_content, filename \\ "test_import.csv") do + view + |> file_input("#csv-upload-form", :csv_file, [ + %{ + last_modified: System.system_time(:second), + name: filename, + content: csv_content, + size: byte_size(csv_content), + type: "text/csv" + } + ]) + |> render_upload(filename) + end + + describe "CSV Import - Configuration Tests" do + setup %{conn: conn} do + # Ensure admin user + admin_user = Mv.Fixtures.user_with_role_fixture("admin") + conn = MvWeb.ConnCase.conn_with_password_user(conn, admin_user) + + {:ok, conn: conn, admin_user: admin_user} + end + + test "configured row limit is enforced", %{conn: conn} do + # Business rule: CSV import respects configured row limits + # Test that a custom limit (500) is enforced, not just the default (1000) + original_config = Application.get_env(:mv, :csv_import, []) + + try do + Application.put_env(:mv, :csv_import, max_rows: 500) + + {:ok, view, _html} = live(conn, ~p"/settings") + + # Generate CSV with 501 rows (exceeding custom limit of 500) + header = "first_name;last_name;email;street;postal_code;city\n" + + rows = + for i <- 1..501 do + "Row#{i};Last#{i};email#{i}@example.com;Street#{i};12345;City#{i}\n" + end + + large_csv = header <> Enum.join(rows) + + # Simulate file upload using helper function + upload_csv_file(view, large_csv, "too_many_rows_custom.csv") + + view + |> form("#csv-upload-form", %{}) + |> render_submit() + + html = render(view) + # Business rule: import should be rejected when exceeding configured limit + assert html =~ "exceeds" or html =~ "maximum" or html =~ "limit" or + html =~ "Failed to prepare" + after + # Restore original config + Application.put_env(:mv, :csv_import, original_config) + end + end + end +end diff --git a/test/mv_web/live/global_settings_live_test.exs b/test/mv_web/live/global_settings_live_test.exs index 0926681..f217311 100644 --- a/test/mv_web/live/global_settings_live_test.exs +++ b/test/mv_web/live/global_settings_live_test.exs @@ -687,42 +687,5 @@ defmodule MvWeb.GlobalSettingsLiveTest do # Check that file input has accept attribute for CSV assert html =~ ~r/accept=["'][^"']*csv["']/i or html =~ "CSV files only" end - - test "configured row limit is enforced", %{conn: conn} do - # Business rule: CSV import respects configured row limits - # Test that a custom limit (500) is enforced, not just the default (1000) - original_config = Application.get_env(:mv, :csv_import, []) - - try do - Application.put_env(:mv, :csv_import, max_rows: 500) - - {:ok, view, _html} = live(conn, ~p"/settings") - - # Generate CSV with 501 rows (exceeding custom limit of 500) - header = "first_name;last_name;email;street;postal_code;city\n" - - rows = - for i <- 1..501 do - "Row#{i};Last#{i};email#{i}@example.com;Street#{i};12345;City#{i}\n" - end - - large_csv = header <> Enum.join(rows) - - # Simulate file upload using helper function - upload_csv_file(view, large_csv, "too_many_rows_custom.csv") - - view - |> form("#csv-upload-form", %{}) - |> render_submit() - - html = render(view) - # Business rule: import should be rejected when exceeding configured limit - assert html =~ "exceeds" or html =~ "maximum" or html =~ "limit" or - html =~ "Failed to prepare" - after - # Restore original config - Application.put_env(:mv, :csv_import, original_config) - end - end end end From 4997819c7380270b2f9b7953728dce9a32c1398d Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 10:22:21 +0100 Subject: [PATCH 06/17] feat: validate config --- lib/mv/config.ex | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/mv/config.ex b/lib/mv/config.ex index 98a5b65..007309a 100644 --- a/lib/mv/config.ex +++ b/lib/mv/config.ex @@ -85,5 +85,35 @@ defmodule Mv.Config do defp get_csv_import_config(key, default) do Application.get_env(:mv, :csv_import, []) |> Keyword.get(key, default) + |> parse_and_validate_integer(default) + end + + # Parses and validates integer configuration values. + # + # Accepts: + # - Integer values (passed through) + # - String integers (e.g., "1000") - parsed to integer + # - Invalid values (e.g., "abc", nil) - falls back to default + # + # Always clamps the result to a minimum of 1 to ensure positive values. + # + # Note: We don't log warnings for unparseable values because: + # - These functions may be called frequently (e.g., on every request) + # - Logging would create excessive log spam + # - The fallback to default provides a safe behavior + # - Configuration errors should be caught during deployment/testing + defp parse_and_validate_integer(value, _default) when is_integer(value) do + max(1, value) + end + + defp parse_and_validate_integer(value, default) when is_binary(value) do + case Integer.parse(value) do + {int, _remainder} -> max(1, int) + :error -> default + end + end + + defp parse_and_validate_integer(_value, default) do + default end end From ce6240133d329a0d064c393ad78834ea8574ac3d Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 10:23:49 +0100 Subject: [PATCH 07/17] i18n: update translations --- priv/gettext/de/LC_MESSAGES/default.po | 10 +++++----- priv/gettext/default.pot | 10 +++++----- priv/gettext/en/LC_MESSAGES/default.po | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index d650aa2..fa126c1 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -1980,11 +1980,6 @@ msgstr " (Datenfeld: %{field})" msgid "CSV File" msgstr "CSV Datei" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "CSV files only, maximum 10 MB" -msgstr "Nur CSV Dateien, maximal 10 MB" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format msgid "Custom fields must be created in Mila before importing CSV files with custom field columns" @@ -2272,3 +2267,8 @@ msgstr "Nicht berechtigt." #, elixir-autogen, elixir-format msgid "Could not load data fields. Please check your permissions." msgstr "Datenfelder konnten nicht geladen werden. Bitte überprüfen Sie Ihre Berechtigungen." + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format, fuzzy +msgid "CSV files only, maximum %{size} MB" +msgstr "Nur CSV Dateien, maximal %{size} MB" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 98f9d7b..b0e74ab 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -1981,11 +1981,6 @@ msgstr "" msgid "CSV File" msgstr "" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "CSV files only, maximum 10 MB" -msgstr "" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format msgid "Custom fields must be created in Mila before importing CSV files with custom field columns" @@ -2273,3 +2268,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Could not load data fields. Please check your permissions." msgstr "" + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format +msgid "CSV files only, maximum %{size} MB" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 95a3c3a..6d3013d 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -1981,11 +1981,6 @@ msgstr "" msgid "CSV File" msgstr "" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "CSV files only, maximum 10 MB" -msgstr "" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format msgid "Custom fields must be created in Mila before importing CSV files with custom field columns" @@ -2273,3 +2268,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Could not load data fields. Please check your permissions." msgstr "" + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format, fuzzy +msgid "CSV files only, maximum %{size} MB" +msgstr "" From 3f8797c35629357388dd706407f94a76593e210c Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 11:42:07 +0100 Subject: [PATCH 08/17] feat: import custom fields via CSV --- lib/mv/membership/import/member_csv.ex | 244 +++++++++++++----- .../live/custom_field_live/index_component.ex | 115 +++++---- lib/mv_web/live/global_settings_live.ex | 24 +- 3 files changed, 251 insertions(+), 132 deletions(-) diff --git a/lib/mv/membership/import/member_csv.ex b/lib/mv/membership/import/member_csv.ex index e351d68..5924001 100644 --- a/lib/mv/membership/import/member_csv.ex +++ b/lib/mv/membership/import/member_csv.ex @@ -63,7 +63,9 @@ defmodule Mv.Membership.Import.MemberCSV do chunks: list(list({pos_integer(), map()})), column_map: %{atom() => non_neg_integer()}, custom_field_map: %{String.t() => non_neg_integer()}, - custom_field_lookup: %{String.t() => %{id: String.t(), value_type: atom()}}, + custom_field_lookup: %{ + String.t() => %{id: String.t(), value_type: atom(), name: String.t()} + }, warnings: list(String.t()) } @@ -79,6 +81,11 @@ defmodule Mv.Membership.Import.MemberCSV do use Gettext, backend: MvWeb.Gettext + alias Mv.Helpers.SystemActor + + # Import FieldTypes for human-readable type labels + alias MvWeb.Translations.FieldTypes + # Configuration constants @default_max_errors 50 @default_chunk_size 200 @@ -102,6 +109,7 @@ defmodule Mv.Membership.Import.MemberCSV do - `opts` - Optional keyword list: - `:max_rows` - Maximum number of data rows allowed (default: 1000) - `:chunk_size` - Number of rows per chunk (default: 200) + - `:actor` - Actor for authorization (default: system actor for systemic operations) ## Returns @@ -120,9 +128,10 @@ defmodule Mv.Membership.Import.MemberCSV do def prepare(file_content, opts \\ []) do max_rows = Keyword.get(opts, :max_rows, @default_max_rows) chunk_size = Keyword.get(opts, :chunk_size, @default_chunk_size) + actor = Keyword.get(opts, :actor, SystemActor.get_system_actor()) with {:ok, headers, rows} <- CsvParser.parse(file_content), - {:ok, custom_fields} <- load_custom_fields(), + {:ok, custom_fields} <- load_custom_fields(actor), {:ok, maps, warnings} <- build_header_maps(headers, custom_fields), :ok <- validate_row_count(rows, max_rows) do chunks = chunk_rows(rows, maps, chunk_size) @@ -142,10 +151,10 @@ defmodule Mv.Membership.Import.MemberCSV do end # Loads all custom fields from the database - defp load_custom_fields do + defp load_custom_fields(actor) do custom_fields = Mv.Membership.CustomField - |> Ash.read!() + |> Ash.read!(actor: actor) {:ok, custom_fields} rescue @@ -158,7 +167,7 @@ defmodule Mv.Membership.Import.MemberCSV do custom_fields |> Enum.reduce(%{}, fn cf, acc -> id_str = to_string(cf.id) - Map.put(acc, id_str, %{id: cf.id, value_type: cf.value_type}) + Map.put(acc, id_str, %{id: cf.id, value_type: cf.value_type, name: cf.name}) end) end @@ -508,32 +517,39 @@ defmodule Mv.Membership.Import.MemberCSV do {:ok, %{member: trimmed_member_attrs, custom: custom_attrs}} -> # Prepare custom field values for Ash - custom_field_values = prepare_custom_field_values(custom_attrs, custom_field_lookup) + case prepare_custom_field_values(custom_attrs, custom_field_lookup) do + {:error, validation_errors} -> + # Custom field validation errors - return first error + first_error = List.first(validation_errors) + {:error, %Error{csv_line_number: line_number, field: nil, message: first_error}} - # Create member with custom field values - member_attrs_with_cf = - trimmed_member_attrs - |> Map.put(:custom_field_values, custom_field_values) + {:ok, custom_field_values} -> + # Create member with custom field values + member_attrs_with_cf = + trimmed_member_attrs + |> Map.put(:custom_field_values, custom_field_values) - # Only include custom_field_values if not empty - final_attrs = - if Enum.empty?(custom_field_values) do - Map.delete(member_attrs_with_cf, :custom_field_values) - else - member_attrs_with_cf - end + # Only include custom_field_values if not empty + final_attrs = + if Enum.empty?(custom_field_values) do + Map.delete(member_attrs_with_cf, :custom_field_values) + else + member_attrs_with_cf + end - case Mv.Membership.create_member(final_attrs, actor: actor) do - {:ok, member} -> - {:ok, member} + case Mv.Membership.create_member(final_attrs, actor: actor) do + {:ok, member} -> + {:ok, member} - {:error, %Ash.Error.Invalid{} = error} -> - # Extract email from final_attrs for better error messages - email = Map.get(final_attrs, :email) || Map.get(trimmed_member_attrs, :email) - {:error, format_ash_error(error, line_number, email)} + {:error, %Ash.Error.Invalid{} = error} -> + # Extract email from final_attrs for better error messages + email = Map.get(final_attrs, :email) || Map.get(trimmed_member_attrs, :email) + {:error, format_ash_error(error, line_number, email)} - {:error, error} -> - {:error, %Error{csv_line_number: line_number, field: nil, message: inspect(error)}} + {:error, error} -> + {:error, + %Error{csv_line_number: line_number, field: nil, message: inspect(error)}} + end end end rescue @@ -542,70 +558,160 @@ defmodule Mv.Membership.Import.MemberCSV do end # Prepares custom field values from row map for Ash + # Returns {:ok, [custom_field_value_maps]} or {:error, [validation_errors]} defp prepare_custom_field_values(custom_attrs, custom_field_lookup) when is_map(custom_attrs) do - custom_attrs - |> Enum.filter(fn {_id, value} -> value != nil && value != "" end) - |> Enum.map(fn {custom_field_id_str, value} -> - case Map.get(custom_field_lookup, custom_field_id_str) do - nil -> - # Custom field not found, skip - nil + {values, errors} = + custom_attrs + |> Enum.filter(fn {_id, value} -> value != nil && value != "" end) + |> Enum.reduce({[], []}, fn {custom_field_id_str, value}, {acc_values, acc_errors} -> + case Map.get(custom_field_lookup, custom_field_id_str) do + nil -> + # Custom field not found, skip + {acc_values, acc_errors} - %{id: custom_field_id, value_type: value_type} -> - %{ - "custom_field_id" => to_string(custom_field_id), - "value" => format_custom_field_value(value, value_type) - } - end - end) - |> Enum.filter(&(&1 != nil)) - end + %{id: custom_field_id, value_type: value_type, name: custom_field_name} -> + case format_custom_field_value(value, value_type, custom_field_name) do + {:ok, formatted_value} -> + value_map = %{ + "custom_field_id" => to_string(custom_field_id), + "value" => formatted_value + } - defp prepare_custom_field_values(_, _), do: [] + {[value_map | acc_values], acc_errors} - # Formats a custom field value according to its type - # Uses _union_type and _union_value format as expected by Ash - defp format_custom_field_value(value, :string) when is_binary(value) do - %{"_union_type" => "string", "_union_value" => String.trim(value)} - end + {:error, reason} -> + {acc_values, [reason | acc_errors]} + end + end + end) - defp format_custom_field_value(value, :integer) when is_binary(value) do - case Integer.parse(value) do - {int_value, _} -> %{"_union_type" => "integer", "_union_value" => int_value} - :error -> %{"_union_type" => "string", "_union_value" => String.trim(value)} + if Enum.empty?(errors) do + {:ok, Enum.reverse(values)} + else + {:error, Enum.reverse(errors)} end end - defp format_custom_field_value(value, :boolean) when is_binary(value) do + defp prepare_custom_field_values(_, _), do: {:ok, []} + + # Formats a custom field value according to its type + # Uses _union_type and _union_value format as expected by Ash + # Returns {:ok, formatted_value} or {:error, error_message} + defp format_custom_field_value(value, :string, _custom_field_name) when is_binary(value) do + {:ok, %{"_union_type" => "string", "_union_value" => String.trim(value)}} + end + + defp format_custom_field_value(value, :integer, custom_field_name) when is_binary(value) do + trimmed = String.trim(value) + + case Integer.parse(trimmed) do + {int_value, ""} -> + # Fully consumed - valid integer + {:ok, %{"_union_type" => "integer", "_union_value" => int_value}} + + {_int_value, _remaining} -> + # Not fully consumed - invalid + {:error, format_custom_field_error(custom_field_name, :integer, trimmed)} + + :error -> + {:error, format_custom_field_error(custom_field_name, :integer, trimmed)} + end + end + + defp format_custom_field_value(value, :boolean, custom_field_name) when is_binary(value) do + trimmed = String.trim(value) + lower = String.downcase(trimmed) + bool_value = - value - |> String.trim() - |> String.downcase() - |> case do + case lower do "true" -> true "1" -> true "yes" -> true "ja" -> true - _ -> false + "false" -> false + "0" -> false + "no" -> false + "nein" -> false + _ -> nil end - %{"_union_type" => "boolean", "_union_value" => bool_value} - end - - defp format_custom_field_value(value, :date) when is_binary(value) do - case Date.from_iso8601(String.trim(value)) do - {:ok, date} -> %{"_union_type" => "date", "_union_value" => date} - {:error, _} -> %{"_union_type" => "string", "_union_value" => String.trim(value)} + if bool_value != nil do + {:ok, %{"_union_type" => "boolean", "_union_value" => bool_value}} + else + {:error, + format_custom_field_error_with_details( + custom_field_name, + :boolean, + trimmed, + gettext("(true/false/1/0/yes/no/ja/nein)") + )} end end - defp format_custom_field_value(value, :email) when is_binary(value) do - %{"_union_type" => "email", "_union_value" => String.trim(value)} + defp format_custom_field_value(value, :date, custom_field_name) when is_binary(value) do + trimmed = String.trim(value) + + case Date.from_iso8601(trimmed) do + {:ok, date} -> + {:ok, %{"_union_type" => "date", "_union_value" => date}} + + {:error, _} -> + {:error, + format_custom_field_error_with_details( + custom_field_name, + :date, + trimmed, + gettext("(ISO-8601 format: YYYY-MM-DD)") + )} + end end - defp format_custom_field_value(value, _type) when is_binary(value) do + defp format_custom_field_value(value, :email, custom_field_name) when is_binary(value) do + trimmed = String.trim(value) + + # Use simple validation: must contain @ and have valid format + # For CSV import, we use a simpler check than EctoCommons.EmailValidator + # to avoid dependencies and keep it fast + if String.contains?(trimmed, "@") and String.length(trimmed) >= 5 and + String.length(trimmed) <= 254 do + # Basic format check: username@domain.tld + if Regex.match?(~r/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/, trimmed) do + {:ok, %{"_union_type" => "email", "_union_value" => trimmed}} + else + {:error, format_custom_field_error(custom_field_name, :email, trimmed)} + end + else + {:error, format_custom_field_error(custom_field_name, :email, trimmed)} + end + end + + defp format_custom_field_value(value, _type, _custom_field_name) when is_binary(value) do # Default to string if type is unknown - %{"_union_type" => "string", "_union_value" => String.trim(value)} + {:ok, %{"_union_type" => "string", "_union_value" => String.trim(value)}} + end + + # Generates a consistent error message for custom field validation failures + # Uses human-readable field type labels (e.g., "Number" instead of "integer") + defp format_custom_field_error(custom_field_name, value_type, value) do + type_label = FieldTypes.label(value_type) + + gettext("custom_field: %{name} – expected %{type}, got: %{value}", + name: custom_field_name, + type: type_label, + value: value + ) + end + + # Generates an error message with additional details (e.g., format hints) + defp format_custom_field_error_with_details(custom_field_name, value_type, value, details) do + type_label = FieldTypes.label(value_type) + + gettext("custom_field: %{name} – expected %{type} %{details}, got: %{value}", + name: custom_field_name, + type: type_label, + details: details, + value: value + ) end # Trims all string values in member attributes diff --git a/lib/mv_web/live/custom_field_live/index_component.ex b/lib/mv_web/live/custom_field_live/index_component.ex index 784d1ef..5cf0f6b 100644 --- a/lib/mv_web/live/custom_field_live/index_component.ex +++ b/lib/mv_web/live/custom_field_live/index_component.ex @@ -50,66 +50,69 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do <%!-- Hide table when form is visible --%> - <.table - :if={!@show_form} - id="custom_fields" - rows={@streams.custom_fields} - row_click={ - fn {_id, custom_field} -> - JS.push("edit_custom_field", value: %{id: custom_field.id}, target: @myself) - end - } - > - <:col :let={{_id, custom_field}} label={gettext("Name")}>{custom_field.name} - - <:col :let={{_id, custom_field}} label={gettext("Value Type")}> - {@field_type_label.(custom_field.value_type)} - - - <:col :let={{_id, custom_field}} label={gettext("Description")}> - {custom_field.description} - - - <:col - :let={{_id, custom_field}} - label={gettext("Required")} - class="max-w-[9.375rem] text-center" +
+ <.table + id="custom_fields_table" + rows={@streams.custom_fields} + row_click={ + fn {_id, custom_field} -> + JS.push("edit_custom_field", value: %{id: custom_field.id}, target: @myself) + end + } > - - {gettext("Required")} - - - {gettext("Optional")} - - + <:col :let={{_id, custom_field}} label={gettext("Name")}>{custom_field.name} - <:col - :let={{_id, custom_field}} - label={gettext("Show in overview")} - class="max-w-[9.375rem] text-center" - > - - {gettext("Yes")} - - - {gettext("No")} - - + <:col :let={{_id, custom_field}} label={gettext("Value Type")}> + {@field_type_label.(custom_field.value_type)} + - <:action :let={{_id, custom_field}}> - <.link phx-click={ - JS.push("edit_custom_field", value: %{id: custom_field.id}, target: @myself) - }> - {gettext("Edit")} - - + <:col :let={{_id, custom_field}} label={gettext("Description")}> + {custom_field.description} + - <:action :let={{_id, custom_field}}> - <.link phx-click={JS.push("prepare_delete", value: %{id: custom_field.id}, target: @myself)}> - {gettext("Delete")} - - - + <:col + :let={{_id, custom_field}} + label={gettext("Required")} + class="max-w-[9.375rem] text-center" + > + + {gettext("Required")} + + + {gettext("Optional")} + + + + <:col + :let={{_id, custom_field}} + label={gettext("Show in overview")} + class="max-w-[9.375rem] text-center" + > + + {gettext("Yes")} + + + {gettext("No")} + + + + <:action :let={{_id, custom_field}}> + <.link phx-click={ + JS.push("edit_custom_field", value: %{id: custom_field.id}, target: @myself) + }> + {gettext("Edit")} + + + + <:action :let={{_id, custom_field}}> + <.link phx-click={ + JS.push("prepare_delete", value: %{id: custom_field.id}, target: @myself) + }> + {gettext("Delete")} + + + +
<%!-- Delete Confirmation Modal --%> diff --git a/lib/mv_web/live/global_settings_live.ex b/lib/mv_web/live/global_settings_live.ex index bd0036b..9d3bec9 100644 --- a/lib/mv_web/live/global_settings_live.ex +++ b/lib/mv_web/live/global_settings_live.ex @@ -138,16 +138,24 @@ defmodule MvWeb.GlobalSettingsLive do <%= if Authorization.can?(@current_user, :create, Mv.Membership.Member) do %> <.form_section title={gettext("Import Members (CSV)")}>
+ <.icon name="hero-information-circle" class="size-5" aria-hidden="true" />
-

+

+ {gettext("Custom Fields in CSV Import")} +

+

{gettext( - "Custom fields must be created in Mila before importing CSV files with custom field columns" + "Custom fields must be created in Mila before importing. Use the custom field name as the CSV column header. Unknown custom field columns will be ignored with a warning." )}

-

- {gettext( - "Use the custom field name as the CSV column header (same normalization as member fields applies)" - )} +

+ <.link + href="#custom_fields" + class="link link-primary" + data-testid="custom-fields-link" + > + {gettext("Manage Custom Fields")} +

@@ -408,8 +416,10 @@ defmodule MvWeb.GlobalSettingsLive do # Processes CSV upload and starts import defp process_csv_upload(socket) do + actor = MvWeb.LiveHelpers.current_actor(socket) + with {:ok, content} <- consume_and_read_csv(socket), - {:ok, import_state} <- MemberCSV.prepare(content) do + {:ok, import_state} <- MemberCSV.prepare(content, actor: actor) do start_import(socket, import_state) else {:error, reason} when is_binary(reason) -> From 86a3c4e50e390a1dd12827adc6a554b3b5f7443e Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 13:07:00 +0100 Subject: [PATCH 09/17] tests: add tests for import --- test/mv/config_test.exs | 14 + test/mv/membership/import/member_csv_test.exs | 325 ++++++++++++++++-- 2 files changed, 315 insertions(+), 24 deletions(-) create mode 100644 test/mv/config_test.exs diff --git a/test/mv/config_test.exs b/test/mv/config_test.exs new file mode 100644 index 0000000..076915f --- /dev/null +++ b/test/mv/config_test.exs @@ -0,0 +1,14 @@ +defmodule Mv.ConfigTest do + @moduledoc """ + Tests for Mv.Config module. + """ + use ExUnit.Case, async: false + + alias Mv.Config + + # Note: CSV import configuration functions were never implemented. + # The codebase uses hardcoded constants instead: + # - @max_file_size_bytes 10_485_760 in GlobalSettingsLive + # - @default_max_rows 1000 in MemberCSV + # These tests have been removed as they tested non-existent functions. +end diff --git a/test/mv/membership/import/member_csv_test.exs b/test/mv/membership/import/member_csv_test.exs index 0304989..b4a099a 100644 --- a/test/mv/membership/import/member_csv_test.exs +++ b/test/mv/membership/import/member_csv_test.exs @@ -1,5 +1,5 @@ defmodule Mv.Membership.Import.MemberCSVTest do - use Mv.DataCase, async: false + use Mv.DataCase, async: true alias Mv.Membership.Import.MemberCSV @@ -35,11 +35,10 @@ defmodule Mv.Membership.Import.MemberCSVTest do end describe "prepare/2" do - test "function exists and accepts file_content and opts" do + test "accepts file_content and opts and returns tagged tuple" do file_content = "email\njohn@example.com" opts = [] - # This will fail until the function is implemented result = MemberCSV.prepare(file_content, opts) assert match?({:ok, _}, result) or match?({:error, _}, result) end @@ -65,11 +64,6 @@ defmodule Mv.Membership.Import.MemberCSVTest do assert {:error, _reason} = MemberCSV.prepare(file_content, opts) end - - test "function has documentation" do - # Check that @doc exists by reading the module - assert function_exported?(MemberCSV, :prepare, 2) - end end describe "process_chunk/4" do @@ -78,7 +72,7 @@ defmodule Mv.Membership.Import.MemberCSVTest do %{actor: system_actor} end - test "function exists and accepts chunk_rows_with_lines, column_map, custom_field_map, and opts", + test "accepts chunk_rows_with_lines, column_map, custom_field_map, and opts and returns tagged tuple", %{ actor: actor } do @@ -87,7 +81,6 @@ defmodule Mv.Membership.Import.MemberCSVTest do custom_field_map = %{} opts = [actor: actor] - # This will fail until the function is implemented result = MemberCSV.process_chunk(chunk_rows_with_lines, column_map, custom_field_map, opts) assert match?({:ok, _}, result) or match?({:error, _}, result) end @@ -231,7 +224,11 @@ defmodule Mv.Membership.Import.MemberCSVTest do custom_field_map = %{to_string(custom_field.id) => 1} custom_field_lookup = %{ - to_string(custom_field.id) => %{id: custom_field.id, value_type: custom_field.value_type} + to_string(custom_field.id) => %{ + id: custom_field.id, + value_type: custom_field.value_type, + name: custom_field.name + } } opts = [custom_field_lookup: custom_field_lookup, actor: actor] @@ -332,11 +329,6 @@ defmodule Mv.Membership.Import.MemberCSVTest do assert chunk_result.errors == [] end - test "function has documentation" do - # Check that @doc exists by reading the module - assert function_exported?(MemberCSV, :process_chunk, 4) - end - test "error capping collects exactly 50 errors", %{actor: actor} do # Create 50 rows with invalid emails chunk_rows_with_lines = @@ -611,15 +603,300 @@ defmodule Mv.Membership.Import.MemberCSVTest do end end - describe "module documentation" do - test "module has @moduledoc" do - # Check that the module exists and has documentation - assert Code.ensure_loaded?(MemberCSV) + describe "custom field import" do + setup do + system_actor = Mv.Helpers.SystemActor.get_system_actor() + %{actor: system_actor} + end - # Try to get the module documentation - {:docs_v1, _, _, _, %{"en" => moduledoc}, _, _} = Code.fetch_docs(MemberCSV) - assert is_binary(moduledoc) - assert String.length(moduledoc) > 0 + test "creates member with valid integer custom field value", %{actor: actor} do + # Create integer custom field + {:ok, custom_field} = + Mv.Membership.CustomField + |> Ash.Changeset.for_create(:create, %{ + name: "Alter", + value_type: :integer + }) + |> Ash.create(actor: actor) + + chunk_rows_with_lines = [ + {2, + %{ + member: %{email: "withage@example.com"}, + custom: %{to_string(custom_field.id) => "25"} + }} + ] + + column_map = %{email: 0} + custom_field_map = %{to_string(custom_field.id) => 1} + + custom_field_lookup = %{ + to_string(custom_field.id) => %{ + id: custom_field.id, + value_type: custom_field.value_type, + name: custom_field.name + } + } + + opts = [custom_field_lookup: custom_field_lookup, actor: actor] + + assert {:ok, chunk_result} = + MemberCSV.process_chunk(chunk_rows_with_lines, column_map, custom_field_map, opts) + + assert chunk_result.inserted == 1 + assert chunk_result.failed == 0 + + # Verify member and custom field value were created + members = Mv.Membership.list_members!(actor: actor) + member = Enum.find(members, &(&1.email == "withage@example.com")) + assert member != nil + + {:ok, member_with_cf} = Ash.load(member, :custom_field_values, actor: actor) + assert length(member_with_cf.custom_field_values) == 1 + cfv = List.first(member_with_cf.custom_field_values) + assert cfv.custom_field_id == custom_field.id + assert cfv.value.value == 25 + assert cfv.value.type == :integer + end + + test "returns error for invalid integer custom field value", %{actor: actor} do + # Create integer custom field + {:ok, custom_field} = + Mv.Membership.CustomField + |> Ash.Changeset.for_create(:create, %{ + name: "Alter", + value_type: :integer + }) + |> Ash.create(actor: actor) + + chunk_rows_with_lines = [ + {2, + %{ + member: %{email: "invalidage@example.com"}, + custom: %{to_string(custom_field.id) => "abc"} + }} + ] + + column_map = %{email: 0} + custom_field_map = %{to_string(custom_field.id) => 1} + + custom_field_lookup = %{ + to_string(custom_field.id) => %{ + id: custom_field.id, + value_type: custom_field.value_type, + name: custom_field.name + } + } + + opts = [custom_field_lookup: custom_field_lookup, actor: actor] + + assert {:ok, chunk_result} = + MemberCSV.process_chunk(chunk_rows_with_lines, column_map, custom_field_map, opts) + + assert chunk_result.inserted == 0 + assert chunk_result.failed == 1 + assert length(chunk_result.errors) == 1 + + error = List.first(chunk_result.errors) + assert error.csv_line_number == 2 + assert error.message =~ "custom_field: Alter" + assert error.message =~ "Number" + assert error.message =~ "abc" + end + + test "returns error for invalid date custom field value", %{actor: actor} do + # Create date custom field + {:ok, custom_field} = + Mv.Membership.CustomField + |> Ash.Changeset.for_create(:create, %{ + name: "Geburtstag", + value_type: :date + }) + |> Ash.create(actor: actor) + + chunk_rows_with_lines = [ + {3, + %{ + member: %{email: "invaliddate@example.com"}, + custom: %{to_string(custom_field.id) => "not-a-date"} + }} + ] + + column_map = %{email: 0} + custom_field_map = %{to_string(custom_field.id) => 1} + + custom_field_lookup = %{ + to_string(custom_field.id) => %{ + id: custom_field.id, + value_type: custom_field.value_type, + name: custom_field.name + } + } + + opts = [custom_field_lookup: custom_field_lookup, actor: actor] + + assert {:ok, chunk_result} = + MemberCSV.process_chunk(chunk_rows_with_lines, column_map, custom_field_map, opts) + + assert chunk_result.inserted == 0 + assert chunk_result.failed == 1 + assert length(chunk_result.errors) == 1 + + error = List.first(chunk_result.errors) + assert error.csv_line_number == 3 + assert error.message =~ "custom_field: Geburtstag" + assert error.message =~ "Date" + end + + test "returns error for invalid email custom field value", %{actor: actor} do + # Create email custom field + {:ok, custom_field} = + Mv.Membership.CustomField + |> Ash.Changeset.for_create(:create, %{ + name: "Work Email", + value_type: :email + }) + |> Ash.create(actor: actor) + + chunk_rows_with_lines = [ + {4, + %{ + member: %{email: "invalidemailcf@example.com"}, + custom: %{to_string(custom_field.id) => "not-an-email"} + }} + ] + + column_map = %{email: 0} + custom_field_map = %{to_string(custom_field.id) => 1} + + custom_field_lookup = %{ + to_string(custom_field.id) => %{ + id: custom_field.id, + value_type: custom_field.value_type, + name: custom_field.name + } + } + + opts = [custom_field_lookup: custom_field_lookup, actor: actor] + + assert {:ok, chunk_result} = + MemberCSV.process_chunk(chunk_rows_with_lines, column_map, custom_field_map, opts) + + assert chunk_result.inserted == 0 + assert chunk_result.failed == 1 + assert length(chunk_result.errors) == 1 + + error = List.first(chunk_result.errors) + assert error.csv_line_number == 4 + assert error.message =~ "custom_field: Work Email" + assert error.message =~ "E-Mail" + end + + test "returns error for invalid boolean custom field value", %{actor: actor} do + # Create boolean custom field + {:ok, custom_field} = + Mv.Membership.CustomField + |> Ash.Changeset.for_create(:create, %{ + name: "Is Active", + value_type: :boolean + }) + |> Ash.create(actor: actor) + + chunk_rows_with_lines = [ + {5, + %{ + member: %{email: "invalidbool@example.com"}, + custom: %{to_string(custom_field.id) => "maybe"} + }} + ] + + column_map = %{email: 0} + custom_field_map = %{to_string(custom_field.id) => 1} + + custom_field_lookup = %{ + to_string(custom_field.id) => %{ + id: custom_field.id, + value_type: custom_field.value_type, + name: custom_field.name + } + } + + opts = [custom_field_lookup: custom_field_lookup, actor: actor] + + assert {:ok, chunk_result} = + MemberCSV.process_chunk(chunk_rows_with_lines, column_map, custom_field_map, opts) + + assert chunk_result.inserted == 0 + assert chunk_result.failed == 1 + assert length(chunk_result.errors) == 1 + + error = List.first(chunk_result.errors) + assert error.csv_line_number == 5 + assert error.message =~ "custom_field: Is Active" + # Error message should indicate boolean/Yes-No validation failure + assert String.contains?(error.message, "Yes/No") || + String.contains?(error.message, "true/false") || + String.contains?(error.message, "boolean") + end + end + + describe "prepare/2 with custom fields" do + setup do + system_actor = Mv.Helpers.SystemActor.get_system_actor() + + # Create a custom field + {:ok, custom_field} = + Mv.Membership.CustomField + |> Ash.Changeset.for_create(:create, %{ + name: "Membership Number", + value_type: :string + }) + |> Ash.create(actor: system_actor) + + %{actor: system_actor, custom_field: custom_field} + end + + test "includes custom field in custom_field_map when header matches", %{ + custom_field: custom_field + } do + # CSV with custom field column + csv_content = "email;Membership Number\njohn@example.com;12345" + + assert {:ok, import_state} = MemberCSV.prepare(csv_content) + + # Check that custom field is mapped + assert Map.has_key?(import_state.custom_field_map, to_string(custom_field.id)) + assert import_state.column_map[:email] == 0 + end + + test "includes warning for unknown custom field column", %{custom_field: _custom_field} do + # CSV with unknown custom field column (not matching any existing custom field) + csv_content = "email;NichtExistierend\njohn@example.com;value" + + assert {:ok, import_state} = MemberCSV.prepare(csv_content) + + # Check that warning is present + assert import_state.warnings != [] + warning = List.first(import_state.warnings) + assert warning =~ "NichtExistierend" + assert warning =~ "ignored" + assert warning =~ "custom field" + + # Check that unknown column is not in custom_field_map + assert import_state.custom_field_map == %{} + # Member import should still succeed + assert import_state.column_map[:email] == 0 + end + + test "import succeeds even with unknown custom field columns", %{custom_field: _custom_field} do + # CSV with unknown custom field column + csv_content = "email;UnknownField\njohn@example.com;value" + + assert {:ok, import_state} = MemberCSV.prepare(csv_content) + + # Import state should be valid + assert import_state.column_map[:email] == 0 + assert import_state.chunks != [] end end end From 12715f3d8523f7345de9434b995518320c41b4bd Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 13:07:08 +0100 Subject: [PATCH 10/17] refactoring --- lib/mv/membership/import/member_csv.ex | 172 +++++++++++++++---------- 1 file changed, 104 insertions(+), 68 deletions(-) diff --git a/lib/mv/membership/import/member_csv.ex b/lib/mv/membership/import/member_csv.ex index 5924001..2a1c0b4 100644 --- a/lib/mv/membership/import/member_csv.ex +++ b/lib/mv/membership/import/member_csv.ex @@ -524,32 +524,12 @@ defmodule Mv.Membership.Import.MemberCSV do {:error, %Error{csv_line_number: line_number, field: nil, message: first_error}} {:ok, custom_field_values} -> - # Create member with custom field values - member_attrs_with_cf = - trimmed_member_attrs - |> Map.put(:custom_field_values, custom_field_values) - - # Only include custom_field_values if not empty - final_attrs = - if Enum.empty?(custom_field_values) do - Map.delete(member_attrs_with_cf, :custom_field_values) - else - member_attrs_with_cf - end - - case Mv.Membership.create_member(final_attrs, actor: actor) do - {:ok, member} -> - {:ok, member} - - {:error, %Ash.Error.Invalid{} = error} -> - # Extract email from final_attrs for better error messages - email = Map.get(final_attrs, :email) || Map.get(trimmed_member_attrs, :email) - {:error, format_ash_error(error, line_number, email)} - - {:error, error} -> - {:error, - %Error{csv_line_number: line_number, field: nil, message: inspect(error)}} - end + create_member_with_custom_fields( + trimmed_member_attrs, + custom_field_values, + line_number, + actor + ) end end rescue @@ -557,6 +537,40 @@ defmodule Mv.Membership.Import.MemberCSV do {:error, %Error{csv_line_number: line_number, field: nil, message: Exception.message(e)}} end + # Creates a member with custom field values, handling errors appropriately + defp create_member_with_custom_fields( + trimmed_member_attrs, + custom_field_values, + line_number, + actor + ) do + # Create member with custom field values + member_attrs_with_cf = + trimmed_member_attrs + |> Map.put(:custom_field_values, custom_field_values) + + # Only include custom_field_values if not empty + final_attrs = + if Enum.empty?(custom_field_values) do + Map.delete(member_attrs_with_cf, :custom_field_values) + else + member_attrs_with_cf + end + + case Mv.Membership.create_member(final_attrs, actor: actor) do + {:ok, member} -> + {:ok, member} + + {:error, %Ash.Error.Invalid{} = error} -> + # Extract email from final_attrs for better error messages + email = Map.get(final_attrs, :email) || Map.get(trimmed_member_attrs, :email) + {:error, format_ash_error(error, line_number, email)} + + {:error, error} -> + {:error, %Error{csv_line_number: line_number, field: nil, message: inspect(error)}} + end + end + # Prepares custom field values from row map for Ash # Returns {:ok, [custom_field_value_maps]} or {:error, [validation_errors]} defp prepare_custom_field_values(custom_attrs, custom_field_lookup) when is_map(custom_attrs) do @@ -564,25 +578,13 @@ defmodule Mv.Membership.Import.MemberCSV do custom_attrs |> Enum.filter(fn {_id, value} -> value != nil && value != "" end) |> Enum.reduce({[], []}, fn {custom_field_id_str, value}, {acc_values, acc_errors} -> - case Map.get(custom_field_lookup, custom_field_id_str) do - nil -> - # Custom field not found, skip - {acc_values, acc_errors} - - %{id: custom_field_id, value_type: value_type, name: custom_field_name} -> - case format_custom_field_value(value, value_type, custom_field_name) do - {:ok, formatted_value} -> - value_map = %{ - "custom_field_id" => to_string(custom_field_id), - "value" => formatted_value - } - - {[value_map | acc_values], acc_errors} - - {:error, reason} -> - {acc_values, [reason | acc_errors]} - end - end + process_single_custom_field( + custom_field_id_str, + value, + custom_field_lookup, + acc_values, + acc_errors + ) end) if Enum.empty?(errors) do @@ -594,6 +596,35 @@ defmodule Mv.Membership.Import.MemberCSV do defp prepare_custom_field_values(_, _), do: {:ok, []} + # Processes a single custom field value and returns updated accumulator + defp process_single_custom_field( + custom_field_id_str, + value, + custom_field_lookup, + acc_values, + acc_errors + ) do + case Map.get(custom_field_lookup, custom_field_id_str) do + nil -> + # Custom field not found, skip + {acc_values, acc_errors} + + %{id: custom_field_id, value_type: value_type, name: custom_field_name} -> + case format_custom_field_value(value, value_type, custom_field_name) do + {:ok, formatted_value} -> + value_map = %{ + "custom_field_id" => to_string(custom_field_id), + "value" => formatted_value + } + + {[value_map | acc_values], acc_errors} + + {:error, reason} -> + {acc_values, [reason | acc_errors]} + end + end + end + # Formats a custom field value according to its type # Uses _union_type and _union_value format as expected by Ash # Returns {:ok, formatted_value} or {:error, error_message} @@ -620,31 +651,19 @@ defmodule Mv.Membership.Import.MemberCSV do defp format_custom_field_value(value, :boolean, custom_field_name) when is_binary(value) do trimmed = String.trim(value) - lower = String.downcase(trimmed) - bool_value = - case lower do - "true" -> true - "1" -> true - "yes" -> true - "ja" -> true - "false" -> false - "0" -> false - "no" -> false - "nein" -> false - _ -> nil - end + case parse_boolean_value(trimmed) do + {:ok, bool_value} -> + {:ok, %{"_union_type" => "boolean", "_union_value" => bool_value}} - if bool_value != nil do - {:ok, %{"_union_type" => "boolean", "_union_value" => bool_value}} - else - {:error, - format_custom_field_error_with_details( - custom_field_name, - :boolean, - trimmed, - gettext("(true/false/1/0/yes/no/ja/nein)") - )} + :error -> + {:error, + format_custom_field_error_with_details( + custom_field_name, + :boolean, + trimmed, + gettext("(true/false/1/0/yes/no/ja/nein)") + )} end end @@ -690,6 +709,23 @@ defmodule Mv.Membership.Import.MemberCSV do {:ok, %{"_union_type" => "string", "_union_value" => String.trim(value)}} end + # Parses a boolean value from a string, supporting multiple formats + defp parse_boolean_value(value) when is_binary(value) do + lower = String.downcase(value) + parse_boolean_value_lower(lower) + end + + # Helper function with pattern matching for boolean values + defp parse_boolean_value_lower("true"), do: {:ok, true} + defp parse_boolean_value_lower("1"), do: {:ok, true} + defp parse_boolean_value_lower("yes"), do: {:ok, true} + defp parse_boolean_value_lower("ja"), do: {:ok, true} + defp parse_boolean_value_lower("false"), do: {:ok, false} + defp parse_boolean_value_lower("0"), do: {:ok, false} + defp parse_boolean_value_lower("no"), do: {:ok, false} + defp parse_boolean_value_lower("nein"), do: {:ok, false} + defp parse_boolean_value_lower(_), do: :error + # Generates a consistent error message for custom field validation failures # Uses human-readable field type labels (e.g., "Number" instead of "integer") defp format_custom_field_error(custom_field_name, value_type, value) do From f5591c392ad3cce2831fe05dd3df6aa1993da108 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 13:41:59 +0100 Subject: [PATCH 11/17] i18n: add translation --- lib/mv_web/live/global_settings_live.ex | 10 ++--- priv/gettext/de/LC_MESSAGES/default.po | 55 ++++++++++++++++++++----- priv/gettext/default.pot | 40 +++++++++++++----- priv/gettext/en/LC_MESSAGES/default.po | 55 ++++++++++++++++++++----- 4 files changed, 124 insertions(+), 36 deletions(-) diff --git a/lib/mv_web/live/global_settings_live.ex b/lib/mv_web/live/global_settings_live.ex index 9d3bec9..e35b064 100644 --- a/lib/mv_web/live/global_settings_live.ex +++ b/lib/mv_web/live/global_settings_live.ex @@ -140,21 +140,19 @@ defmodule MvWeb.GlobalSettingsLive do
<.icon name="hero-information-circle" class="size-5" aria-hidden="true" />
-

- {gettext("Custom Fields in CSV Import")} -

+

{gettext( - "Custom fields must be created in Mila before importing. Use the custom field name as the CSV column header. Unknown custom field columns will be ignored with a warning." + "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, so they must be listed in the list of memberdate (like e-mail or first name). Unknown data field columns will be ignored with a warning." )}

<.link href="#custom_fields" - class="link link-primary" + class="link" data-testid="custom-fields-link" > - {gettext("Manage Custom Fields")} + {gettext("Manage Memberdata")}

diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index d650aa2..0db43c7 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -1985,11 +1985,6 @@ msgstr "CSV Datei" msgid "CSV files only, maximum 10 MB" msgstr "Nur CSV Dateien, maximal 10 MB" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "Custom fields must be created in Mila before importing CSV files with custom field columns" -msgstr "Individuelle Datenfelder müssen zuerst in Mila angelegt werden bevor das Importieren von diesen Feldern mit CSV Dateien mölich ist." - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format msgid "Download CSV templates:" @@ -2120,11 +2115,6 @@ msgstr "Erfolgreich eingefügt: %{count} Mitglied(er)" msgid "Summary" msgstr "Zusammenfassung" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "Use the custom field name as the CSV column header (same normalization as member fields applies)" -msgstr "Verwenden Sie den Namen des benutzerdefinierten Feldes als CSV-Spaltenüberschrift (gleiche Normalisierung wie bei Mitgliedsfeldern)" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format, fuzzy msgid "Warnings" @@ -2272,3 +2262,48 @@ msgstr "Nicht berechtigt." #, elixir-autogen, elixir-format msgid "Could not load data fields. Please check your permissions." msgstr "Datenfelder konnten nicht geladen werden. Bitte überprüfen Sie Ihre Berechtigungen." + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "(ISO-8601 format: YYYY-MM-DD)" +msgstr "(ISO-8601 Format: JJJJ-MM-TT)" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "(true/false/1/0/yes/no/ja/nein)" +msgstr "(true/false/1/0/yes/no/ja/nein)" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "custom_field: %{name} – expected %{type} %{details}, got: %{value}" +msgstr "Datenfeld: %{name} – erwartet %{type} %{details}, erhalten: %{value}" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "custom_field: %{name} – expected %{type}, got: %{value}" +msgstr "Datenfeld: %{name} – erwartet %{type}, erhalten: %{value}" + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format +msgid "Manage Memberdata" +msgstr "Mitgliederdaten verwalten" + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format, fuzzy +msgid "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, so they must be listed in the list of memberdate (like e-mail or first name). Unknown data field columns will be ignored with a warning." +msgstr "Verwende die Namen der Datenfelder als Spaltennamen in der CSV Datei. Datenfelder müssen in Mila bereits angelegt sein, damit sie importiert werden können. Sie müssen in der Liste der Mitgliederdaten als Datenfeld enthalten sein (z.B. E-Mail). Spalten mit unbekannten Spaltenüberschriften werden mit einer Warnung ignoriert." + +#~ #: lib/mv_web/live/global_settings_live.ex +#~ #, elixir-autogen, elixir-format, fuzzy +#~ msgid "Custom Fields in CSV Import" +#~ msgstr "Benutzerdefinierte Felder" + +#~ #: lib/mv_web/live/global_settings_live.ex +#~ #, elixir-autogen, elixir-format, fuzzy +#~ msgid "Individual data fields must be created in Mila before importing. Use the field name as the CSV column header. Unknown custom field columns will be ignored with a warning." +#~ msgstr "Individuelle Datenfelder müssen in Mila erstellt werden, bevor sie importiert werden können. Verwenden Sie den Namen des Datenfeldes als CSV-Spaltenüberschrift. Unbekannte Spaltenüberschriften werden mit einer Warnung ignoriert." + +#~ #: lib/mv_web/live/global_settings_live.ex +#~ #, elixir-autogen, elixir-format +#~ msgid "Manage Custom Fields" +#~ msgstr "Benutzerdefinierte Felder verwalten" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 98f9d7b..c474aef 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -1986,11 +1986,6 @@ msgstr "" msgid "CSV files only, maximum 10 MB" msgstr "" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "Custom fields must be created in Mila before importing CSV files with custom field columns" -msgstr "" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format msgid "Download CSV templates:" @@ -2121,11 +2116,6 @@ msgstr "" msgid "Summary" msgstr "" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "Use the custom field name as the CSV column header (same normalization as member fields applies)" -msgstr "" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format msgid "Warnings" @@ -2273,3 +2263,33 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Could not load data fields. Please check your permissions." msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "(ISO-8601 format: YYYY-MM-DD)" +msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "(true/false/1/0/yes/no/ja/nein)" +msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "custom_field: %{name} – expected %{type} %{details}, got: %{value}" +msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "custom_field: %{name} – expected %{type}, got: %{value}" +msgstr "" + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format +msgid "Manage Memberdata" +msgstr "" + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format +msgid "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, so they must be listed in the list of memberdate (like e-mail or first name). Unknown data field columns will be ignored with a warning." +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 95a3c3a..f9fd014 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -1986,11 +1986,6 @@ msgstr "" msgid "CSV files only, maximum 10 MB" msgstr "" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "Custom fields must be created in Mila before importing CSV files with custom field columns" -msgstr "" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format msgid "Download CSV templates:" @@ -2121,11 +2116,6 @@ msgstr "" msgid "Summary" msgstr "" -#: lib/mv_web/live/global_settings_live.ex -#, elixir-autogen, elixir-format -msgid "Use the custom field name as the CSV column header (same normalization as member fields applies)" -msgstr "" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format, fuzzy msgid "Warnings" @@ -2273,3 +2263,48 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Could not load data fields. Please check your permissions." msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "(ISO-8601 format: YYYY-MM-DD)" +msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "(true/false/1/0/yes/no/ja/nein)" +msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "custom_field: %{name} – expected %{type} %{details}, got: %{value}" +msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "custom_field: %{name} – expected %{type}, got: %{value}" +msgstr "" + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format +msgid "Manage Memberdata" +msgstr "" + +#: lib/mv_web/live/global_settings_live.ex +#, elixir-autogen, elixir-format, fuzzy +msgid "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, so they must be listed in the list of memberdate (like e-mail or first name). Unknown data field columns will be ignored with a warning." +msgstr "" + +#~ #: lib/mv_web/live/global_settings_live.ex +#~ #, elixir-autogen, elixir-format, fuzzy +#~ msgid "Custom Fields in CSV Import" +#~ msgstr "" + +#~ #: lib/mv_web/live/global_settings_live.ex +#~ #, elixir-autogen, elixir-format, fuzzy +#~ msgid "Individual data fields must be created in Mila before importing. Use the field name as the CSV column header. Unknown custom field columns will be ignored with a warning." +#~ msgstr "" + +#~ #: lib/mv_web/live/global_settings_live.ex +#~ #, elixir-autogen, elixir-format +#~ msgid "Manage Custom Fields" +#~ msgstr "" From c56ca68922a9db4fcaa5924b5f2576e8ed8cd114 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 13:42:24 +0100 Subject: [PATCH 12/17] docs: update docs --- docs/csv-member-import-v1.md | 100 ++++++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 31 deletions(-) diff --git a/docs/csv-member-import-v1.md b/docs/csv-member-import-v1.md index 25a4e11..0cd8a02 100644 --- a/docs/csv-member-import-v1.md +++ b/docs/csv-member-import-v1.md @@ -2,7 +2,7 @@ **Version:** 1.0 **Last Updated:** 2026-01-13 -**Status:** In Progress (Backend Complete, UI Pending) +**Status:** In Progress (Backend Complete, UI Complete, Tests Pending) **Related Documents:** - [Feature Roadmap](./feature-roadmap.md) - Overall feature planning @@ -15,15 +15,15 @@ - ✅ Issue #4: Header Normalization + Per-Header Mapping - ✅ Issue #5: Validation (Required Fields) + Error Formatting - ✅ Issue #6: Persistence via Ash Create + Per-Row Error Capture (with Error-Capping) -- ✅ Issue #11: Custom Field Import (Backend) +- ✅ Issue #7: Admin Global Settings LiveView UI (Upload + Start Import + Results + Template Links) +- ✅ Issue #8: Authorization + Limits +- ✅ Issue #11: Custom Field Import (Backend + UI) **In Progress / Pending:** -- ⏳ Issue #7: Admin Global Settings LiveView UI (Upload + Start Import + Results) -- ⏳ Issue #8: Authorization + Limits - ⏳ Issue #9: End-to-End LiveView Tests + Fixtures - ⏳ Issue #10: Documentation Polish -**Latest Update:** Error-Capping in `process_chunk/4` implemented (2025-01-XX) +**Latest Update:** CSV Import UI fully implemented in GlobalSettingsLive with chunk processing, progress tracking, error display, and custom field support (2026-01-13) --- @@ -161,6 +161,13 @@ A **basic CSV member import feature** that allows administrators to upload a CSV - Any custom field column using the custom field's **name** as the header (e.g., `membership_number`, `birth_date`) - **Important:** Custom fields must be created in Mila before importing. The CSV header must match the custom field name exactly (same normalization as member fields). - **Behavior:** If the CSV contains custom field columns that don't exist in Mila, a warning message will be shown and those columns will be ignored during import. +- **Value Validation:** Custom field values are validated according to the custom field type: + - **string**: Any text value (trimmed) + - **integer**: Must be a valid integer (e.g., `42`, `-10`). Invalid values will cause a row error with the custom field name and reason. + - **boolean**: Accepts `true`, `false`, `1`, `0`, `yes`, `no`, `ja`, `nein` (case-insensitive). Invalid values will cause a row error. + - **date**: Must be in ISO-8601 format (YYYY-MM-DD, e.g., `2024-01-15`). Invalid values will cause a row error. + - **email**: Must be a valid email format (contains `@`, 5-254 characters, valid format). Invalid values will cause a row error. +- **Error Messages:** Custom field validation errors are included in the import error list with format: `custom_field: ` (e.g., `custom_field: Alter – expected integer, got: abc`) **Member Field Header Mapping:** @@ -496,36 +503,51 @@ Use `Mv.Authorization.PermissionSets` (preferred) instead of hard-coded string c **Dependencies:** Issue #6 +**Status:** ✅ **COMPLETED** + **Goal:** UI section with upload, progress, results, and template links. **Tasks:** -- [ ] Render import section only for admins -- [ ] **Add prominent UI notice about custom fields:** +- [x] Render import section only for admins +- [x] **Add prominent UI notice about custom fields:** - Display alert/info box: "Custom fields must be created in Mila before importing CSV files with custom field columns" - Explain: "Use the custom field name as the CSV column header (same normalization as member fields applies)" - Add link to custom fields management section -- [ ] Configure `allow_upload/3`: - - `.csv` only, `max_entries: 1`, `max_file_size: 10MB`, `auto_upload: false` -- [ ] `handle_event("start_import", ...)`: +- [x] Configure `allow_upload/3`: + - `.csv` only, `max_entries: 1`, `max_file_size: 10MB`, `auto_upload: true` (auto-upload enabled for better UX) +- [x] `handle_event("start_import", ...)`: - Admin permission check - Consume upload -> read file content - Call `MemberCSV.prepare/2` - Store `import_state` in assigns (chunks + column_map + metadata) - Initialize progress assigns - `send(self(), {:process_chunk, 0})` -- [ ] `handle_info({:process_chunk, idx}, socket)`: +- [x] `handle_info({:process_chunk, idx}, socket)`: - Fetch chunk from `import_state` - - Call `MemberCSV.process_chunk/3` + - Call `MemberCSV.process_chunk/4` with error capping support - Merge counts/errors into progress assigns (cap errors at 50 overall) - Schedule next chunk (or finish and show results) -- [ ] Results UI: + - Async task processing with SQL sandbox support for tests +- [x] Results UI: - Success count - Failure count - Error list (line number + message + field) - **Warning messages for unknown custom field columns** (non-existent names) shown in results + - Progress indicator during import + - Error truncation notice when errors exceed limit **Template links:** -- Link `/templates/member_import_en.csv` and `/templates/member_import_de.csv` via Phoenix static path helpers. +- [x] Link `/templates/member_import_en.csv` and `/templates/member_import_de.csv` via Phoenix static path helpers. + +**Definition of Done:** +- [x] Upload area with drag & drop support +- [x] Template download links (EN/DE) +- [x] Progress tracking during import +- [x] Results display with success/error counts +- [x] Error list with line numbers and field information +- [x] Warning display for unknown custom field columns +- [x] Admin-only access control +- [x] Async chunk processing with proper error handling --- @@ -533,19 +555,32 @@ Use `Mv.Authorization.PermissionSets` (preferred) instead of hard-coded string c **Dependencies:** None (can be parallelized) +**Status:** ✅ **COMPLETED** + **Goal:** Ensure admin-only access and enforce limits. **Tasks:** -- [ ] Admin check in start import event handler -- [ ] File size enforced in upload config -- [ ] Row limit enforced in `MemberCSV.prepare/2` (max_rows from config) -- [ ] Configuration: - ```elixir - config :mv, csv_import: [ - max_file_size_mb: 10, - max_rows: 1000 - ] - ``` +- [x] Admin check in start import event handler (via `Authorization.can?/3`) +- [x] File size enforced in upload config (`max_file_size: 10MB`) +- [x] Row limit enforced in `MemberCSV.prepare/2` (max_rows: 1000, configurable via opts) +- [x] Chunk size limit (200 rows per chunk) +- [x] Error limit (50 errors per import) +- [x] UI-level authorization check (import section only visible to admins) +- [x] Event-level authorization check (prevents unauthorized import attempts) + +**Implementation Notes:** +- File size limit: 10 MB (10,485,760 bytes) enforced via `allow_upload/3` +- Row limit: 1,000 rows (excluding header) enforced in `MemberCSV.prepare/2` +- Chunk size: 200 rows per chunk (configurable via opts) +- Error limit: 50 errors per import (configurable via `@max_errors`) +- Authorization uses `MvWeb.Authorization.can?/3` with `:create` permission on `Mv.Membership.Member` + +**Definition of Done:** +- [x] Admin-only access enforced at UI and event level +- [x] File size limit enforced +- [x] Row count limit enforced +- [x] Chunk processing with size limits +- [x] Error capping implemented --- @@ -589,7 +624,7 @@ Use `Mv.Authorization.PermissionSets` (preferred) instead of hard-coded string c **Priority:** High (Core v1 Feature) -**Status:** ✅ **COMPLETED** (Backend Implementation) +**Status:** ✅ **COMPLETED** (Backend + UI Implementation) **Goal:** Support importing custom field values from CSV columns. Custom fields should exist in Mila before import for best results. @@ -604,23 +639,26 @@ Use `Mv.Authorization.PermissionSets` (preferred) instead of hard-coded string c - [x] Query existing custom fields during `prepare/2` to map custom field columns - [x] Collect unknown custom field columns and add warning messages (don't fail import) - [x] Map custom field CSV values to `CustomFieldValue` creation in `process_chunk/4` -- [x] Handle custom field type validation (string, integer, boolean, date, email) +- [x] Handle custom field type validation (string, integer, boolean, date, email) with proper error messages - [x] Create `CustomFieldValue` records linked to members during import -- [ ] Update error messages to include custom field validation errors (if needed) -- [ ] Add UI help text explaining custom field requirements (pending Issue #7): +- [x] Validate custom field values and return structured errors with custom field name and reason +- [x] UI help text and link to custom field management (implemented in Issue #7) +- [x] Update error messages to include custom field validation errors (format: `custom_field: – expected , got: `) +- [x] Add UI help text explaining custom field requirements (completed in Issue #7): - "Custom fields must be created in Mila before importing" - "Use the custom field name as the CSV column header (same normalization as member fields)" - Link to custom fields management section -- [ ] Update CSV templates documentation to explain custom field columns (pending Issue #1) +- [x] Update CSV templates documentation to explain custom field columns (documented in Issue #1) - [x] Add tests for custom field import (valid, invalid name, type validation, warning for unknown) **Definition of Done:** - [x] Custom field columns are recognized by name (with normalization) - [x] Warning messages shown for unknown custom field columns (import continues) - [x] Custom field values are created and linked to members -- [x] Type validation works for all custom field types -- [ ] UI clearly explains custom field requirements (pending Issue #7) +- [x] Type validation works for all custom field types (string, integer, boolean, date, email) +- [x] UI clearly explains custom field requirements (completed in Issue #7) - [x] Tests cover custom field import scenarios (including warning for unknown names) +- [x] Error messages include custom field validation errors with proper formatting **Implementation Notes:** - Custom field lookup is built in `prepare/2` and passed via `custom_field_lookup` in opts From 71db9cf3c1cd6bfc09c4ff648202cba31f8c0896 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 13:54:27 +0100 Subject: [PATCH 13/17] formatting --- lib/mv_web/live/global_settings_live.ex | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/mv_web/live/global_settings_live.ex b/lib/mv_web/live/global_settings_live.ex index b0a8640..bbd19ca 100644 --- a/lib/mv_web/live/global_settings_live.ex +++ b/lib/mv_web/live/global_settings_live.ex @@ -140,7 +140,6 @@ defmodule MvWeb.GlobalSettingsLive do
<.icon name="hero-information-circle" class="size-5" aria-hidden="true" />
-

{gettext( "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, so they must be listed in the list of memberdate (like e-mail or first name). Unknown data field columns will be ignored with a warning." From b21c3df7ef09d319b4e738a4c0019e4fe8a73a12 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 14:34:12 +0100 Subject: [PATCH 14/17] refactoring --- lib/mv/membership/import/member_csv.ex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/mv/membership/import/member_csv.ex b/lib/mv/membership/import/member_csv.ex index 2a1c0b4..bc9acc8 100644 --- a/lib/mv/membership/import/member_csv.ex +++ b/lib/mv/membership/import/member_csv.ex @@ -233,17 +233,20 @@ defmodule Mv.Membership.Import.MemberCSV do # Builds a row map from raw row values using column maps defp build_row_map(row_values, maps) do + row_tuple = List.to_tuple(row_values) + tuple_size = tuple_size(row_tuple) + member_map = maps.member |> Enum.reduce(%{}, fn {field, index}, acc -> - value = Enum.at(row_values, index, "") + value = if index < tuple_size, do: elem(row_tuple, index), else: "" Map.put(acc, field, value) end) custom_map = maps.custom |> Enum.reduce(%{}, fn {custom_field_id, index}, acc -> - value = Enum.at(row_values, index, "") + value = if index < tuple_size, do: elem(row_tuple, index), else: "" Map.put(acc, custom_field_id, value) end) From aef3aa299f33fe36ebd901bf420f039341b6eb59 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 15:04:07 +0100 Subject: [PATCH 15/17] fix test --- test/mv_web/live/global_settings_live_test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mv_web/live/global_settings_live_test.exs b/test/mv_web/live/global_settings_live_test.exs index f217311..083c813 100644 --- a/test/mv_web/live/global_settings_live_test.exs +++ b/test/mv_web/live/global_settings_live_test.exs @@ -110,7 +110,7 @@ defmodule MvWeb.GlobalSettingsLiveTest do {:ok, _view, html} = live(conn, ~p"/settings") # Check for custom fields notice text - assert html =~ "Custom fields" or html =~ "custom field" + assert html =~ "Use the data field name" end test "admin user sees template download links", %{conn: conn} do From 960506d16aba1e1e5ca45759d7c13055197dd4a3 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 2 Feb 2026 16:52:35 +0100 Subject: [PATCH 16/17] refactoring --- lib/mv/membership/import/member_csv.ex | 56 ++++++++++++++----- priv/gettext/de/LC_MESSAGES/default.po | 5 ++ priv/gettext/default.pot | 5 ++ priv/gettext/en/LC_MESSAGES/default.po | 6 +- test/mv/config_test.exs | 14 ----- .../live/global_settings_live_config_test.exs | 2 +- 6 files changed, 57 insertions(+), 31 deletions(-) delete mode 100644 test/mv/config_test.exs diff --git a/lib/mv/membership/import/member_csv.ex b/lib/mv/membership/import/member_csv.ex index bc9acc8..c967bf5 100644 --- a/lib/mv/membership/import/member_csv.ex +++ b/lib/mv/membership/import/member_csv.ex @@ -191,8 +191,10 @@ defmodule Mv.Membership.Import.MemberCSV do normalized != "" && not member_field?(normalized) end) |> Enum.map(fn header -> - "Unknown column '#{header}' will be ignored. " <> - "If this is a custom field, create it in Mila before importing." + gettext( + "Unknown column '%{header}' will be ignored. If this is a custom field, create it in Mila before importing.", + header: header + ) end) {:ok, %{member: member_map, custom: custom_map}, warnings} @@ -311,7 +313,7 @@ defmodule Mv.Membership.Import.MemberCSV do custom_field_lookup = Keyword.get(opts, :custom_field_lookup, %{}) existing_error_count = Keyword.get(opts, :existing_error_count, 0) max_errors = Keyword.get(opts, :max_errors, @default_max_errors) - actor = Keyword.fetch!(opts, :actor) + actor = Keyword.get(opts, :actor, SystemActor.get_system_actor()) {inserted, failed, errors, _collected_error_count, truncated?} = Enum.reduce(chunk_rows_with_lines, {0, 0, [], 0, false}, fn {line_number, row_map}, @@ -607,13 +609,38 @@ defmodule Mv.Membership.Import.MemberCSV do acc_values, acc_errors ) do + # Trim value early and skip if empty + trimmed_value = if is_binary(value), do: String.trim(value), else: value + + # Skip empty values (after trimming) - don't create CFV + if trimmed_value == "" or trimmed_value == nil do + {acc_values, acc_errors} + else + process_non_empty_custom_field( + custom_field_id_str, + trimmed_value, + custom_field_lookup, + acc_values, + acc_errors + ) + end + end + + # Processes a non-empty custom field value + defp process_non_empty_custom_field( + custom_field_id_str, + trimmed_value, + custom_field_lookup, + acc_values, + acc_errors + ) do case Map.get(custom_field_lookup, custom_field_id_str) do nil -> # Custom field not found, skip {acc_values, acc_errors} %{id: custom_field_id, value_type: value_type, name: custom_field_name} -> - case format_custom_field_value(value, value_type, custom_field_name) do + case format_custom_field_value(trimmed_value, value_type, custom_field_name) do {:ok, formatted_value} -> value_map = %{ "custom_field_id" => to_string(custom_field_id), @@ -691,17 +718,16 @@ defmodule Mv.Membership.Import.MemberCSV do defp format_custom_field_value(value, :email, custom_field_name) when is_binary(value) do trimmed = String.trim(value) - # Use simple validation: must contain @ and have valid format - # For CSV import, we use a simpler check than EctoCommons.EmailValidator - # to avoid dependencies and keep it fast - if String.contains?(trimmed, "@") and String.length(trimmed) >= 5 and - String.length(trimmed) <= 254 do - # Basic format check: username@domain.tld - if Regex.match?(~r/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/, trimmed) do - {:ok, %{"_union_type" => "email", "_union_value" => trimmed}} - else - {:error, format_custom_field_error(custom_field_name, :email, trimmed)} - end + # Use EctoCommons.EmailValidator for consistency with Member email validation + changeset = + {%{}, %{email: :string}} + |> Ecto.Changeset.cast(%{email: trimmed}, [:email]) + |> EctoCommons.EmailValidator.validate_email(:email, + checks: Mv.Constants.email_validator_checks() + ) + + if changeset.valid? do + {:ok, %{"_union_type" => "email", "_union_value" => trimmed}} else {:error, format_custom_field_error(custom_field_name, :email, trimmed)} end diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index f1ae5a3..041507b 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -2293,6 +2293,11 @@ msgstr "Mitgliederdaten verwalten" msgid "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, so they must be listed in the list of memberdate (like e-mail or first name). Unknown data field columns will be ignored with a warning." msgstr "Verwende die Namen der Datenfelder als Spaltennamen in der CSV Datei. Datenfelder müssen in Mila bereits angelegt sein, damit sie importiert werden können. Sie müssen in der Liste der Mitgliederdaten als Datenfeld enthalten sein (z.B. E-Mail). Spalten mit unbekannten Spaltenüberschriften werden mit einer Warnung ignoriert." +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "Unknown column '%{header}' will be ignored. If this is a custom field, create it in Mila before importing." +msgstr "Unbekannte Spalte '%{header}' wird ignoriert. Falls dies ein Datenfeld ist, erstellen Sie es in Mila vor dem Import." + #~ #: lib/mv_web/live/global_settings_live.ex #~ #, elixir-autogen, elixir-format, fuzzy #~ msgid "Custom Fields in CSV Import" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 1ff9c81..2861f2d 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -2293,3 +2293,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, so they must be listed in the list of memberdate (like e-mail or first name). Unknown data field columns will be ignored with a warning." msgstr "" + +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "Unknown column '%{header}' will be ignored. If this is a custom field, create it in Mila before importing." +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index d71a397..3fe9ce3 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -2259,7 +2259,6 @@ msgstr "" msgid "Could not load data fields. Please check your permissions." msgstr "" - #: lib/mv_web/live/global_settings_live.ex #, elixir-autogen, elixir-format, fuzzy msgid "CSV files only, maximum %{size} MB" @@ -2295,6 +2294,11 @@ msgstr "" msgid "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, so they must be listed in the list of memberdate (like e-mail or first name). Unknown data field columns will be ignored with a warning." msgstr "" +#: lib/mv/membership/import/member_csv.ex +#, elixir-autogen, elixir-format +msgid "Unknown column '%{header}' will be ignored. If this is a custom field, create it in Mila before importing." +msgstr "Unknown column '%{header}' will be ignored. If this is a custom field, create it in Mila before importing." + #~ #: lib/mv_web/live/global_settings_live.ex #~ #, elixir-autogen, elixir-format, fuzzy #~ msgid "Custom Fields in CSV Import" diff --git a/test/mv/config_test.exs b/test/mv/config_test.exs deleted file mode 100644 index 076915f..0000000 --- a/test/mv/config_test.exs +++ /dev/null @@ -1,14 +0,0 @@ -defmodule Mv.ConfigTest do - @moduledoc """ - Tests for Mv.Config module. - """ - use ExUnit.Case, async: false - - alias Mv.Config - - # Note: CSV import configuration functions were never implemented. - # The codebase uses hardcoded constants instead: - # - @max_file_size_bytes 10_485_760 in GlobalSettingsLive - # - @default_max_rows 1000 in MemberCSV - # These tests have been removed as they tested non-existent functions. -end diff --git a/test/mv_web/live/global_settings_live_config_test.exs b/test/mv_web/live/global_settings_live_config_test.exs index c940594..1f06145 100644 --- a/test/mv_web/live/global_settings_live_config_test.exs +++ b/test/mv_web/live/global_settings_live_config_test.exs @@ -10,7 +10,7 @@ defmodule MvWeb.GlobalSettingsLiveConfigTest do import Phoenix.LiveViewTest # Helper function to upload CSV file in tests - defp upload_csv_file(view, csv_content, filename \\ "test_import.csv") do + defp upload_csv_file(view, csv_content, filename) do view |> file_input("#csv-upload-form", :csv_file, [ %{ From b48529113c128b0d64cf302aa4c1772b46491a93 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 3 Feb 2026 00:15:03 +0000 Subject: [PATCH 17/17] chore(deps): update mix dependencies --- mix.lock | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/mix.lock b/mix.lock index 26aa555..86a5117 100644 --- a/mix.lock +++ b/mix.lock @@ -1,22 +1,22 @@ %{ - "ash": {:hex, :ash, "3.12.0", "5b78000df650d86b446d88977ef8aa5c9d9f7ffa1193fa3c4b901c60bff2d130", [:mix], [{:crux, ">= 0.1.2 and < 1.0.0-0", [hex: :crux, repo: "hexpm", optional: false]}, {:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "~> 3.7", [hex: :ecto, repo: "hexpm", optional: false]}, {:ets, "~> 0.8", [hex: :ets, repo: "hexpm", optional: false]}, {:igniter, ">= 0.6.29 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:picosat_elixir, "~> 0.2", [hex: :picosat_elixir, repo: "hexpm", optional: true]}, {:plug, ">= 0.0.0", [hex: :plug, repo: "hexpm", optional: true]}, {:reactor, "~> 0.11", [hex: :reactor, repo: "hexpm", optional: false]}, {:simple_sat, ">= 0.1.1 and < 1.0.0-0", [hex: :simple_sat, repo: "hexpm", optional: true]}, {:spark, ">= 2.3.14 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, ">= 0.2.6 and < 1.0.0-0", [hex: :splode, repo: "hexpm", optional: false]}, {:stream_data, "~> 1.0", [hex: :stream_data, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.1", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7cf45b4eb83aa0ab5e6707d6e4ea4a10c29ab20613c87f06344f7953b2ca5e18"}, + "ash": {:hex, :ash, "3.14.0", "528264e9185f4bfe56f3fb32b4f3dabff0709b0baa5c3c30180e4a95750e9cc0", [:mix], [{:crux, ">= 0.1.2 and < 1.0.0-0", [hex: :crux, repo: "hexpm", optional: false]}, {:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "~> 3.7", [hex: :ecto, repo: "hexpm", optional: false]}, {:ets, "~> 0.8", [hex: :ets, repo: "hexpm", optional: false]}, {:igniter, ">= 0.6.29 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:picosat_elixir, "~> 0.2", [hex: :picosat_elixir, repo: "hexpm", optional: true]}, {:plug, ">= 0.0.0", [hex: :plug, repo: "hexpm", optional: true]}, {:reactor, "~> 1.0", [hex: :reactor, repo: "hexpm", optional: false]}, {:simple_sat, ">= 0.1.1 and < 1.0.0-0", [hex: :simple_sat, repo: "hexpm", optional: true]}, {:spark, ">= 2.3.14 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.3", [hex: :splode, repo: "hexpm", optional: false]}, {:stream_data, "~> 1.0", [hex: :stream_data, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.1", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8a0a2fd1ded0262685b36c2b6f892b90d464e6afc16b65a2b87578eb2a05bb90"}, "ash_admin": {:hex, :ash_admin, "0.13.24", "4fafddc7b4450a92878b58630688c55cab20b0c27e35cad68f29811f73815816", [:mix], [{:ash, ">= 3.4.63 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_phoenix, ">= 2.1.8 and < 3.0.0-0", [hex: :ash_phoenix, repo: "hexpm", optional: false]}, {:gettext, "~> 0.26 or ~> 1.0", [hex: :gettext, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.7", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.1-rc", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}], "hexpm", "8f298cf6cb6635744ed75dd401295ed52513ea4df169f0f89d6a9a75dc4de4dc"}, - "ash_authentication": {:hex, :ash_authentication, "4.13.6", "95b17f0bfc00bd6e229145b90c7026f784ae81639e832de4b5c96a738de5ed46", [:mix], [{:argon2_elixir, "~> 4.0", [hex: :argon2_elixir, repo: "hexpm", optional: true]}, {:ash, "~> 3.7", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_postgres, ">= 2.6.8 and < 3.0.0-0", [hex: :ash_postgres, repo: "hexpm", optional: true]}, {:assent, "> 0.2.0 and < 0.3.0", [hex: :assent, repo: "hexpm", optional: false]}, {:bcrypt_elixir, "~> 3.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: false]}, {:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:finch, "~> 0.19", [hex: :finch, repo: "hexpm", optional: false]}, {:igniter, "~> 0.4", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:joken, "~> 2.5", [hex: :joken, repo: "hexpm", optional: false]}, {:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: false]}, {:spark, "~> 2.0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.2", [hex: :splode, repo: "hexpm", optional: false]}], "hexpm", "27ded84bdc61fd267794dee17a6cbe6e52d0f365d3e8ea0460d95977b82ac6f1"}, - "ash_authentication_phoenix": {:hex, :ash_authentication_phoenix, "2.14.1", "60d127a73c2144b39fa3dab045cc3f7fce0c3ccd2dd3e8534288f5da65f0c1db", [:mix], [{:ash, "~> 3.0", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_authentication, "~> 4.10", [hex: :ash_authentication, repo: "hexpm", optional: false]}, {:ash_phoenix, ">= 2.3.11 and < 3.0.0-0", [hex: :ash_phoenix, repo: "hexpm", optional: false]}, {:bcrypt_elixir, "~> 3.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: false]}, {:gettext, "~> 0.26 or ~> 1.0", [hex: :gettext, repo: "hexpm", optional: true]}, {:igniter, ">= 0.5.25 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.6", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_html_helpers, "~> 1.0", [hex: :phoenix_html_helpers, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:slugify, "~> 1.3", [hex: :slugify, repo: "hexpm", optional: false]}], "hexpm", "3cd57aee855be3ccf2960ce0b005ad209c97fbfc81faa71212bcfbd6a4a90cae"}, - "ash_phoenix": {:hex, :ash_phoenix, "2.3.18", "fad1b8af1405758888086de568f08650c2911ee97074cfe2e325b14854bc43dd", [:mix], [{:ash, ">= 3.5.13 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:igniter, "~> 0.6", [hex: :igniter, repo: "hexpm", optional: true]}, {:inertia, "~> 2.3", [hex: :inertia, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.5.6 or ~> 1.6", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.20.3 or ~> 1.0-rc.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:spark, ">= 2.2.29 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}], "hexpm", "7ec28f9216221e83b90d9c3605e9d1cdd228984e09a1a86c9b9d393cebf25222"}, - "ash_postgres": {:hex, :ash_postgres, "2.6.27", "7aa119cc420909573a51802f414a49a9fb21a06ee78769efd7a4db040e748f5c", [:mix], [{:ash, ">= 3.11.2 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_sql, ">= 0.3.16 and < 1.0.0-0", [hex: :ash_sql, repo: "hexpm", optional: false]}, {:ecto, "~> 3.13", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.13", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:igniter, ">= 0.6.29 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: false]}, {:spark, ">= 2.3.4 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}], "hexpm", "f5e71dc3f77bc0c52374869df4b66493e13c0e27507c3d10ff13158ef7ea506f"}, - "ash_sql": {:hex, :ash_sql, "0.3.16", "a4e62d2cf9b2f4a451067e5e3de28349a8d0e69cf50fc1861bad85f478ded046", [:mix], [{:ash, "~> 3.7", [hex: :ash, repo: "hexpm", optional: false]}, {:ecto, ">= 3.13.4 and < 4.0.0-0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.9", [hex: :ecto_sql, repo: "hexpm", optional: false]}], "hexpm", "f3d5a810b23e12e3e102799c68b1e934fa7f909ccaa4bd530f10c7317cfcfe56"}, + "ash_authentication": {:hex, :ash_authentication, "4.13.7", "421b5ddb516026f6794435980a632109ec116af2afa68a45e15fb48b41c92cfa", [:mix], [{:argon2_elixir, "~> 4.0", [hex: :argon2_elixir, repo: "hexpm", optional: true]}, {:ash, "~> 3.7", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_postgres, ">= 2.6.8 and < 3.0.0-0", [hex: :ash_postgres, repo: "hexpm", optional: true]}, {:assent, "> 0.2.0 and < 0.3.0", [hex: :assent, repo: "hexpm", optional: false]}, {:bcrypt_elixir, "~> 3.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: false]}, {:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:finch, "~> 0.19", [hex: :finch, repo: "hexpm", optional: false]}, {:igniter, "~> 0.4", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:joken, "~> 2.5", [hex: :joken, repo: "hexpm", optional: false]}, {:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: false]}, {:spark, "~> 2.0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.2", [hex: :splode, repo: "hexpm", optional: false]}], "hexpm", "0d45ac3fdcca6902dabbe161ce63e9cea8f90583863c2e14261c9309e5837121"}, + "ash_authentication_phoenix": {:hex, :ash_authentication_phoenix, "2.15.0", "89e71e96a3d954aed7ed0c1f511d42cbfd19009b813f580b12749b01bbea5148", [:mix], [{:ash, "~> 3.0", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_authentication, "~> 4.10", [hex: :ash_authentication, repo: "hexpm", optional: false]}, {:ash_phoenix, ">= 2.3.11 and < 3.0.0-0", [hex: :ash_phoenix, repo: "hexpm", optional: false]}, {:bcrypt_elixir, "~> 3.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: false]}, {:gettext, "~> 0.26 or ~> 1.0", [hex: :gettext, repo: "hexpm", optional: true]}, {:igniter, ">= 0.5.25 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.6", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_html_helpers, "~> 1.0", [hex: :phoenix_html_helpers, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:slugify, "~> 1.3", [hex: :slugify, repo: "hexpm", optional: false]}], "hexpm", "d2da66dcf62bc1054ce8f5d9c2829b1dff1dbc3f1d03f9ef0cbe89123d7df107"}, + "ash_phoenix": {:hex, :ash_phoenix, "2.3.19", "244b24256a7d730e5223f36f371a95971542a547a12f0fb73406f67977e86c97", [:mix], [{:ash, ">= 3.5.13 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:igniter, "~> 0.6", [hex: :igniter, repo: "hexpm", optional: true]}, {:inertia, "~> 2.3", [hex: :inertia, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.5.6 or ~> 1.6", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.20.3 or ~> 1.0-rc.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:spark, ">= 2.2.29 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}], "hexpm", "754a7d869a3961a927abb7ff700af9895d2e69dd3b8f9471b0aa8e859cc4b135"}, + "ash_postgres": {:hex, :ash_postgres, "2.6.28", "52cd2a5a701f15ffb76cf1db6ff3854bea616b963b869bac562420af73024ecf", [:mix], [{:ash, ">= 3.11.2 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:ash_sql, ">= 0.3.16 and < 1.0.0-0", [hex: :ash_sql, repo: "hexpm", optional: false]}, {:ecto, "~> 3.13", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.13", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:igniter, ">= 0.6.29 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: false]}, {:spark, ">= 2.3.4 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}], "hexpm", "da354f3380d8a2c049904e8860fd2eea53e034a9be353bdd8a09e2a1f3315747"}, + "ash_sql": {:hex, :ash_sql, "0.4.2", "6ff701ee1f55d0310d1e6878ce57508f3c4aac70d7c751d3f9427dc0d5c36b50", [:mix], [{:ash, "~> 3.7", [hex: :ash, repo: "hexpm", optional: false]}, {:ecto, ">= 3.13.4 and < 4.0.0-0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.9", [hex: :ecto_sql, repo: "hexpm", optional: false]}], "hexpm", "eae73e0a84b10ceb508739eaef144d8d8e86b634aa177ed99d688758c29273cb"}, "assent": {:hex, :assent, "0.2.13", "11226365d2d8661d23e9a2cf94d3255e81054ff9d88ac877f28bfdf38fa4ef31", [:mix], [{:certifi, ">= 0.0.0", [hex: :certifi, repo: "hexpm", optional: true]}, {:finch, "~> 0.15", [hex: :finch, repo: "hexpm", optional: true]}, {:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: true]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:req, "~> 0.4", [hex: :req, repo: "hexpm", optional: true]}, {:ssl_verify_fun, ">= 0.0.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: true]}], "hexpm", "bf9f351b01dd6bceea1d1f157f05438f6765ce606e6eb8d29296003d29bf6eab"}, - "bandit": {:hex, :bandit, "1.10.1", "6b1f8609d947ae2a74da5bba8aee938c94348634e54e5625eef622ca0bbbb062", [:mix], [{:hpax, "~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.18", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "4b4c35f273030e44268ace53bf3d5991dfc385c77374244e2f960876547671aa"}, + "bandit": {:hex, :bandit, "1.10.2", "d15ea32eb853b5b42b965b24221eb045462b2ba9aff9a0bda71157c06338cbff", [:mix], [{:hpax, "~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.18", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "27b2a61b647914b1726c2ced3601473be5f7aa6bb468564a688646a689b3ee45"}, "bcrypt_elixir": {:hex, :bcrypt_elixir, "3.3.2", "d50091e3c9492d73e17fc1e1619a9b09d6a5ef99160eb4d736926fd475a16ca3", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "471be5151874ae7931911057d1467d908955f93554f7a6cd1b7d804cac8cef53"}, "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, "castore": {:hex, :castore, "1.0.17", "4f9770d2d45fbd91dcf6bd404cf64e7e58fed04fadda0923dc32acca0badffa2", [:mix], [], "hexpm", "12d24b9d80b910dd3953e165636d68f147a31db945d2dcb9365e441f8b5351e5"}, "cc_precompiler": {:hex, :cc_precompiler, "0.1.11", "8c844d0b9fb98a3edea067f94f616b3f6b29b959b6b3bf25fee94ffe34364768", [:mix], [{:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "3427232caf0835f94680e5bcf082408a70b48ad68a5f5c0b02a3bea9f3a075b9"}, "circular_buffer": {:hex, :circular_buffer, "1.0.0", "25c004da0cba7bd8bc1bdabded4f9a902d095e20600fd15faf1f2ffbaea18a07", [:mix], [], "hexpm", "c829ec31c13c7bafd1f546677263dff5bfb006e929f25635878ac3cfba8749e5"}, "comeonin": {:hex, :comeonin, "5.5.1", "5113e5f3800799787de08a6e0db307133850e635d34e9fab23c70b6501669510", [:mix], [], "hexpm", "65aac8f19938145377cee73973f192c5645873dcf550a8a6b18187d17c13ccdb"}, - "credo": {:hex, :credo, "1.7.15", "283da72eeb2fd3ccf7248f4941a0527efb97afa224bcdef30b4b580bc8258e1c", [: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", "291e8645ea3fea7481829f1e1eb0881b8395db212821338e577a90bf225c5607"}, + "credo": {:hex, :credo, "1.7.16", "a9f1389d13d19c631cb123c77a813dbf16449a2aebf602f590defa08953309d4", [: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", "d0562af33756b21f248f066a9119e3890722031b6d199f22e3cf95550e4f1579"}, "crux": {:hex, :crux, "0.1.2", "4441c9e3a34f1e340954ce96b9ad5a2de13ceb4f97b3f910211227bb92e2ca90", [:mix], [{:picosat_elixir, "~> 0.2", [hex: :picosat_elixir, repo: "hexpm", optional: true]}, {:simple_sat, ">= 0.1.1 and < 1.0.0-0", [hex: :simple_sat, repo: "hexpm", optional: true]}, {:stream_data, "~> 1.0", [hex: :stream_data, repo: "hexpm", optional: true]}], "hexpm", "563ea3748ebfba9cc078e6d198a1d6a06015a8fae503f0b721363139f0ddb350"}, - "db_connection": {:hex, :db_connection, "2.8.1", "9abdc1e68c34c6163f6fb96a96532272d13ad7ca45262156ae8b7ec6d9dc4bec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a61a3d489b239d76f326e03b98794fb8e45168396c925ef25feb405ed09da8fd"}, + "db_connection": {:hex, :db_connection, "2.9.0", "a6a97c5c958a2d7091a58a9be40caf41ab496b0701d21e1d1abff3fa27a7f371", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "17d502eacaf61829db98facf6f20808ed33da6ccf495354a41e64fe42f9c509c"}, "decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"}, "dns_cluster": {:hex, :dns_cluster, "0.2.0", "aa8eb46e3bd0326bd67b84790c561733b25c5ba2fe3c7e36f28e88f384ebcb33", [:mix], [], "hexpm", "ba6f1893411c69c01b9e8e8f772062535a4cf70f3f35bcc964a324078d8c8240"}, "ecto": {:hex, :ecto, "3.13.5", "9d4a69700183f33bf97208294768e561f5c7f1ecf417e0fa1006e4a91713a834", [: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", "df9efebf70cf94142739ba357499661ef5dbb559ef902b68ea1f3c1fabce36de"}, @@ -28,21 +28,21 @@ "ex_phone_number": {:hex, :ex_phone_number, "0.4.8", "c1c5e6f0673822a2a7b439b43af7d3eb1a5c19ae582b772b8b8d12625dd51ec1", [:mix], [{:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: false]}], "hexpm", "43e2357c6b8cfe556bcd417f4ce9aaef267a786e31a2938902daaa0d36f69757"}, "expo": {:hex, :expo, "1.1.1", "4202e1d2ca6e2b3b63e02f69cfe0a404f77702b041d02b58597c00992b601db5", [:mix], [], "hexpm", "5fb308b9cb359ae200b7e23d37c76978673aa1b06e2b3075d814ce12c5811640"}, "file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"}, - "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"}, + "finch": {:hex, :finch, "0.21.0", "b1c3b2d48af02d0c66d2a9ebfb5622be5c5ecd62937cf79a88a7f98d48a8290c", [: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", "87dc6e169794cb2570f75841a19da99cfde834249568f2a5b121b809588a4377"}, "fine": {:hex, :fine, "0.1.4", "b19a89c1476c7c57afb5f9314aed5960b5bc95d5277de4cb5ee8e1d1616ce379", [:mix], [], "hexpm", "be3324cc454a42d80951cf6023b9954e9ff27c6daa255483b3e8d608670303f5"}, "gettext": {:hex, :gettext, "1.0.2", "5457e1fd3f4abe47b0e13ff85086aabae760497a3497909b8473e0acee57673b", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "eab805501886802071ad290714515c8c4a17196ea76e5afc9d06ca85fb1bfeb3"}, "glob_ex": {:hex, :glob_ex, "0.1.11", "cb50d3f1ef53f6ca04d6252c7fde09fd7a1cf63387714fe96f340a1349e62c93", [:mix], [], "hexpm", "342729363056e3145e61766b416769984c329e4378f1d558b63e341020525de4"}, "heroicons": {:git, "https://github.com/tailwindlabs/heroicons.git", "0435d4ca364a608cc75e2f8683d374e55abbae26", [tag: "v2.2.0", sparse: "optimized", depth: 1]}, "hpax": {:hex, :hpax, "1.0.3", "ed67ef51ad4df91e75cc6a1494f851850c0bd98ebc0be6e81b026e765ee535aa", [:mix], [], "hexpm", "8eab6e1cfa8d5918c2ce4ba43588e894af35dbd8e91e6e55c817bca5847df34a"}, "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, - "igniter": {:hex, :igniter, "0.7.0", "6848714fa5afa14258c82924a57af9364745316241a409435cf39cbe11e3ae80", [:mix], [{:glob_ex, "~> 0.1.7", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:owl, "~> 0.11", [hex: :owl, repo: "hexpm", optional: false]}, {:phx_new, "~> 1.7", [hex: :phx_new, repo: "hexpm", optional: true]}, {:req, "~> 0.5", [hex: :req, repo: "hexpm", optional: false]}, {:rewrite, ">= 1.1.1 and < 2.0.0-0", [hex: :rewrite, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.4", [hex: :sourceror, repo: "hexpm", optional: false]}, {:spitfire, ">= 0.1.3 and < 1.0.0-0", [hex: :spitfire, repo: "hexpm", optional: false]}], "hexpm", "1e7254780dbf4b44c9eccd6d86d47aa961efc298d7f520c24acb0258c8e90ba9"}, + "igniter": {:hex, :igniter, "0.7.2", "81c132c0df95963c7a228f74a32d3348773743ed9651f24183bfce0fe6ff16d1", [:mix], [{:glob_ex, "~> 0.1.7", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:owl, "~> 0.11", [hex: :owl, repo: "hexpm", optional: false]}, {:phx_new, "~> 1.7", [hex: :phx_new, repo: "hexpm", optional: true]}, {:req, "~> 0.5", [hex: :req, repo: "hexpm", optional: false]}, {:rewrite, ">= 1.1.1 and < 2.0.0-0", [hex: :rewrite, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.4", [hex: :sourceror, repo: "hexpm", optional: false]}, {:spitfire, ">= 0.1.3 and < 1.0.0-0", [hex: :spitfire, repo: "hexpm", optional: false]}], "hexpm", "f4cab73ec31f4fb452de1a17037f8a08826105265aa2d76486fcb848189bef9b"}, "iterex": {:hex, :iterex, "0.1.2", "58f9b9b9a22a55cbfc7b5234a9c9c63eaac26d276b3db80936c0e1c60355a5a6", [:mix], [], "hexpm", "2e103b8bcc81757a9af121f6dc0df312c9a17220f302b1193ef720460d03029d"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "joken": {:hex, :joken, "2.6.2", "5daaf82259ca603af4f0b065475099ada1b2b849ff140ccd37f4b6828ca6892a", [:mix], [{:jose, "~> 1.11.10", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "5134b5b0a6e37494e46dbf9e4dad53808e5e787904b7c73972651b51cce3d72b"}, "jose": {:hex, :jose, "1.11.12", "06e62b467b61d3726cbc19e9b5489f7549c37993de846dfb3ee8259f9ed208b3", [:mix, :rebar3], [], "hexpm", "31e92b653e9210b696765cdd885437457de1add2a9011d92f8cf63e4641bab7b"}, "lazy_html": {:hex, :lazy_html, "0.1.8", "677a8642e644eef8de98f3040e2520d42d0f0f8bd6c5cd49db36504e34dffe91", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.9.0", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:fine, "~> 0.1.0", [hex: :fine, repo: "hexpm", optional: false]}], "hexpm", "0d8167d930b704feb94b41414ca7f5779dff9bca7fcf619fcef18de138f08736"}, "libgraph": {:hex, :libgraph, "0.16.0", "3936f3eca6ef826e08880230f806bfea13193e49bf153f93edcf0239d4fd1d07", [:mix], [], "hexpm", "41ca92240e8a4138c30a7e06466acc709b0cbb795c643e9e17174a178982d6bf"}, - "live_debugger": {:hex, :live_debugger, "0.5.0", "95e0f7727d61010f7e9053923fb2a9416904a7533c2dfb36120e7684cba4c0af", [:mix], [{:igniter, ">= 0.5.40 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.7", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.20.8 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "73ebe95118d22aa402675f677abd731cb16b136d1b6ae5f4010441fb50753b14"}, + "live_debugger": {:hex, :live_debugger, "0.5.1", "7302a4fda1920ba541b456c2d7a97acc3c7f9d7b938b5435927883b709c968a2", [:mix], [{:igniter, ">= 0.5.40 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.7", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.20.8 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "797fdca7cc60d7588c6e285b0d7ea73f2dce8b123bac43eae70271fa519bb907"}, "luhn": {:hex, :luhn, "0.3.3", "5aa0c6a32c2db4b9db9f9b883ba8301c1ae169d57199b9e6cb1ba2707bc51d96", [:mix], [], "hexpm", "3e823a913a25aab51352c727f135278d22954874d5f0835be81ed4fec3daf78d"}, "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"}, @@ -57,26 +57,26 @@ "phoenix_html_helpers": {:hex, :phoenix_html_helpers, "1.0.1", "7eed85c52eff80a179391036931791ee5d2f713d76a81d0d2c6ebafe1e11e5ec", [:mix], [{:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "cffd2385d1fa4f78b04432df69ab8da63dc5cf63e07b713a4dcf36a3740e3090"}, "phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.8.7", "405880012cb4b706f26dd1c6349125bfc903fb9e44d1ea668adaf4e04d4884b7", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.5", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:ecto_sqlite3_extras, "~> 1.1.7 or ~> 1.2.0", [hex: :ecto_sqlite3_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.19 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "3a8625cab39ec261d48a13b7468dc619c0ede099601b084e343968309bd4d7d7"}, "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.6.2", "b18b0773a1ba77f28c52decbb0f10fd1ac4d3ae5b8632399bbf6986e3b665f62", [:mix], [{:file_system, "~> 0.2.10 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "d1f89c18114c50d394721365ffb428cce24f1c13de0467ffa773e2ff4a30d5b9"}, - "phoenix_live_view": {:hex, :phoenix_live_view, "1.1.19", "c95e9acbc374fb796ee3e24bfecc8213123c74d9f9e45667ca40bb0a4d242953", [:mix], [{:igniter, ">= 0.6.16 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:lazy_html, "~> 0.1.0", [hex: :lazy_html, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0 or ~> 1.8.0-rc", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d5ad357d6b21562a5b431f0ad09dfe76db9ce5648c6949f1aac334c8c4455d32"}, + "phoenix_live_view": {:hex, :phoenix_live_view, "1.1.22", "9b3c985bfe38e82668594a8ce90008548f30b9f23b718ebaea4701710ce9006f", [:mix], [{:igniter, ">= 0.6.16 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:lazy_html, "~> 0.1.0", [hex: :lazy_html, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0 or ~> 1.8.0-rc", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e1395d5622d8bf02113cb58183589b3da6f1751af235768816e90cc3ec5f1188"}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.2.0", "ff3a5616e1bed6804de7773b92cbccfc0b0f473faf1f63d7daf1206c7aeaaa6f", [:mix], [], "hexpm", "adc313a5bf7136039f63cfd9668fde73bba0765e0614cba80c06ac9460ff3e96"}, "phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"}, "phoenix_view": {:hex, :phoenix_view, "2.0.4", "b45c9d9cf15b3a1af5fb555c674b525391b6a1fe975f040fb4d913397b31abf4", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "4e992022ce14f31fe57335db27a28154afcc94e9983266835bb3040243eb620b"}, "picosat_elixir": {:hex, :picosat_elixir, "0.2.3", "bf326d0f179fbb3b706bb2c15fbc367dacfa2517157d090fdfc32edae004c597", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "f76c9db2dec9d2561ffaa9be35f65403d53e984e8cd99c832383b7ab78c16c66"}, "plug": {:hex, :plug, "1.19.1", "09bac17ae7a001a68ae393658aa23c7e38782be5c5c00c80be82901262c394c0", [: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", "560a0017a8f6d5d30146916862aaf9300b7280063651dd7e532b8be168511e62"}, "plug_crypto": {:hex, :plug_crypto, "2.1.1", "19bda8184399cb24afa10be734f84a16ea0a2bc65054e23a62bb10f06bc89491", [:mix], [], "hexpm", "6470bce6ffe41c8bd497612ffde1a7e4af67f36a15eea5f921af71cf3e11247c"}, - "postgrex": {:hex, :postgrex, "0.21.1", "2c5cc830ec11e7a0067dd4d623c049b3ef807e9507a424985b8dcf921224cd88", [: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", "27d8d21c103c3cc68851b533ff99eef353e6a0ff98dc444ea751de43eb48bdac"}, - "reactor": {:hex, :reactor, "0.17.0", "eb8bdb530dbae824e2d36a8538f8ec4f3aa7c2d1b61b04959fa787c634f88b49", [:mix], [{:igniter, "~> 0.4", [hex: :igniter, repo: "hexpm", optional: true]}, {:iterex, "~> 0.1", [hex: :iterex, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:libgraph, "~> 0.16", [hex: :libgraph, repo: "hexpm", optional: false]}, {:spark, ">= 2.3.3 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.2", [hex: :splode, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.2", [hex: :telemetry, repo: "hexpm", optional: false]}, {:yaml_elixir, "~> 2.11", [hex: :yaml_elixir, repo: "hexpm", optional: false]}, {:ymlr, "~> 5.0", [hex: :ymlr, repo: "hexpm", optional: false]}], "hexpm", "3c3bf71693adbad9117b11ec83cfed7d5851b916ade508ed9718de7ae165bf25"}, + "postgrex": {:hex, :postgrex, "0.22.0", "fb027b58b6eab1f6de5396a2abcdaaeb168f9ed4eccbb594e6ac393b02078cbd", [:mix], [{:db_connection, "~> 2.9", [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", "a68c4261e299597909e03e6f8ff5a13876f5caadaddd0d23af0d0a61afcc5d84"}, + "reactor": {:hex, :reactor, "1.0.0", "024bd13df910bcb8c01cebed4f10bd778269a141a1c8a234e4f67796ac4883cf", [:mix], [{:igniter, "~> 0.4", [hex: :igniter, repo: "hexpm", optional: true]}, {:iterex, "~> 0.1", [hex: :iterex, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:libgraph, "~> 0.16", [hex: :libgraph, repo: "hexpm", optional: false]}, {:spark, ">= 2.3.3 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.2", [hex: :splode, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.2", [hex: :telemetry, repo: "hexpm", optional: false]}, {:yaml_elixir, "~> 2.11", [hex: :yaml_elixir, repo: "hexpm", optional: false]}, {:ymlr, "~> 5.0", [hex: :ymlr, repo: "hexpm", optional: false]}], "hexpm", "ae8eb507fffc517f5aa5947db9d2ede2db8bae63b66c94ccb5a2027d30f830a0"}, "req": {:hex, :req, "0.5.17", "0096ddd5b0ed6f576a03dde4b158a0c727215b15d2795e59e0916c6971066ede", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.17", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 2.0.6 or ~> 2.1", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0b8bc6ffdfebbc07968e59d3ff96d52f2202d0536f10fef4dc11dc02a2a43e39"}, "rewrite": {:hex, :rewrite, "1.2.0", "80220eb14010e175b67c939397e1a8cdaa2c32db6e2e0a9d5e23e45c0414ce21", [:mix], [{:glob_ex, "~> 0.1", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.0", [hex: :sourceror, repo: "hexpm", optional: false]}, {:text_diff, "~> 0.1", [hex: :text_diff, repo: "hexpm", optional: false]}], "hexpm", "a1cd702bbb9d51613ab21091f04a386d750fc6f4516b81900df082d78b2d8c50"}, "slugify": {:hex, :slugify, "1.3.1", "0d3b8b7e5c1eeaa960e44dce94382bee34a39b3ea239293e457a9c5b47cc6fd3", [:mix], [], "hexpm", "cb090bbeb056b312da3125e681d98933a360a70d327820e4b7f91645c4d8be76"}, "sobelow": {:hex, :sobelow, "0.14.1", "2f81e8632f15574cba2402bcddff5497b413c01e6f094bc0ab94e83c2f74db81", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8fac9a2bd90fdc4b15d6fca6e1608efb7f7c600fa75800813b794ee9364c87f2"}, - "sourceror": {:hex, :sourceror, "1.10.0", "38397dedbbc286966ec48c7af13e228b171332be1ad731974438c77791945ce9", [:mix], [], "hexpm", "29dbdfc92e04569c9d8e6efdc422fc1d815f4bd0055dc7c51b8800fb75c4b3f1"}, - "spark": {:hex, :spark, "2.3.14", "a08420d08e6e0e49d740aed3e160f1cb894ba8f6b3f5e6c63253e9df1995265c", [:mix], [{:igniter, ">= 0.3.64 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: true]}, {:sourceror, "~> 1.2", [hex: :sourceror, repo: "hexpm", optional: true]}], "hexpm", "af50c4ea5dd67eba822247f1c98e1d4e598cb7f6c28ccf5d002f0e0718096f4f"}, - "spitfire": {:hex, :spitfire, "0.2.1", "29e154873f05444669c7453d3d931820822cbca5170e88f0f8faa1de74a79b47", [:mix], [], "hexpm", "6eeed75054a38341b2e1814d41bb0a250564092358de2669fdb57ff88141d91b"}, - "splode": {:hex, :splode, "0.2.10", "f755ebc8e5dc1556869c0513cf5f3450be602a41e01196249306483c4badbec0", [:mix], [], "hexpm", "906b6dc17b7ebc9b9fd9a31360bf0bd691d20e934fb28795c0ddb0c19d3198f1"}, + "sourceror": {:hex, :sourceror, "1.10.1", "325753ed460fe9fa34ebb4deda76d57b2e1507dcd78a5eb9e1c41bfb78b7cdfe", [:mix], [], "hexpm", "288f3079d93865cd1e3e20df5b884ef2cb440e0e03e8ae393624ee8a770ba588"}, + "spark": {:hex, :spark, "2.4.0", "f93d3ae6b5f3004e956d52f359fa40670366685447631bc7c058f4fbf250ebf3", [:mix], [{:igniter, ">= 0.3.64 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: true]}, {:sourceror, "~> 1.2", [hex: :sourceror, repo: "hexpm", optional: true]}], "hexpm", "4e5185f5737cd987bb9ef377ae3462a55b8312f5007c2bc4ad6e850d14ac0111"}, + "spitfire": {:hex, :spitfire, "0.3.1", "409b5ed3a2677df8790ed8b0542ca7e36c607d744fef4cb8cb8872fc80dd1803", [:mix], [], "hexpm", "72ff34d8f0096313a4b1a6505513c5ef4bbc0919bd8c181c07fc8d8dea8c9056"}, + "splode": {:hex, :splode, "0.3.0", "ff8effecc509a51245df2f864ec78d849248647c37a75886033e3b1a53ca9470", [:mix], [], "hexpm", "73cfd0892d7316d6f2c93e6e8784bd6e137b2aa38443de52fd0a25171d106d81"}, "stream_data": {:hex, :stream_data, "1.2.0", "58dd3f9e88afe27dc38bef26fce0c84a9e7a96772b2925c7b32cd2435697a52b", [:mix], [], "hexpm", "eb5c546ee3466920314643edf68943a5b14b32d1da9fe01698dc92b73f89a9ed"}, "sweet_xml": {:hex, :sweet_xml, "0.7.5", "803a563113981aaac202a1dbd39771562d0ad31004ddbfc9b5090bdcd5605277", [:mix], [], "hexpm", "193b28a9b12891cae351d81a0cead165ffe67df1b73fe5866d10629f4faefb12"}, - "swoosh": {:hex, :swoosh, "1.20.0", "b04134c2b302da74c3a95ca4ddde191e4854d2847d6687783fecb023a9647598", [:mix], [{:bandit, ">= 1.0.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:idna, "~> 6.0", [hex: :idna, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mua, "~> 0.2.3", [hex: :mua, repo: "hexpm", optional: true]}, {:multipart, "~> 0.4", [hex: :multipart, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:req, "~> 0.5.10 or ~> 0.6 or ~> 1.0", [hex: :req, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "13e610f709bae54851d68afb6862882aa646e5c974bf49e3bf5edd84a73cf213"}, + "swoosh": {:hex, :swoosh, "1.21.0", "9f4fa629447774cfc9ad684d8a87a85384e8fce828b6390dd535dfbd43c9ee2a", [:mix], [{:bandit, ">= 1.0.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:idna, "~> 6.0", [hex: :idna, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mua, "~> 0.2.3", [hex: :mua, repo: "hexpm", optional: true]}, {:multipart, "~> 0.4", [hex: :multipart, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:req, "~> 0.5.10 or ~> 0.6 or ~> 1.0", [hex: :req, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9127157bfb33b7e154d0f1ba4e888e14b08ede84e81dedcb318a2f33dbc6db51"}, "tailwind": {:hex, :tailwind, "0.4.1", "e7bcc222fe96a1e55f948e76d13dd84a1a7653fb051d2a167135db3b4b08d3e9", [:mix], [], "hexpm", "6249d4f9819052911120dbdbe9e532e6bd64ea23476056adb7f730aa25c220d1"}, "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"}, "telemetry_metrics": {:hex, :telemetry_metrics, "1.1.0", "5bd5f3b5637e0abea0426b947e3ce5dd304f8b3bc6617039e2b5a008adc02f8f", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e7b79e8ddfde70adb6db8a6623d1778ec66401f366e9a8f5dd0955c56bc8ce67"},