diff --git a/.formatter.exs b/.formatter.exs index ef8840c..377068f 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -2,5 +2,6 @@ import_deps: [:ecto, :ecto_sql, :phoenix], subdirectories: ["priv/*/migrations"], plugins: [Phoenix.LiveView.HTMLFormatter], + line_length: 120, inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"] ] diff --git a/config/runtime.exs b/config/runtime.exs index 9047684..e0f22fc 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -20,8 +20,7 @@ if System.get_env("PHX_SERVER") do config :tempest, TempestWeb.Endpoint, server: true end -config :tempest, TempestWeb.Endpoint, - http: [port: String.to_integer(System.get_env("PORT", "4000"))] +config :tempest, TempestWeb.Endpoint, http: [port: String.to_integer(System.get_env("PORT", "4000"))] if hostname = System.get_env("TEMPEST_HOSTNAME") do config :tempest, Tempest.Config, hostname: hostname diff --git a/lib/tempest.ex b/lib/tempest.ex index 5950550..469b4cd 100644 --- a/lib/tempest.ex +++ b/lib/tempest.ex @@ -8,15 +8,11 @@ defmodule Tempest do """ @version Mix.Project.config()[:version] - @git_commit_count (case System.cmd("git", ["rev-list", "--count", "HEAD"], - stderr_to_stdout: true - ) do + @git_commit_count (case System.cmd("git", ["rev-list", "--count", "HEAD"], stderr_to_stdout: true) do {count, 0} -> String.trim(count) _ -> "0" end) - @git_short_sha (case System.cmd("git", ["rev-parse", "--short=7", "HEAD"], - stderr_to_stdout: true - ) do + @git_short_sha (case System.cmd("git", ["rev-parse", "--short=7", "HEAD"], stderr_to_stdout: true) do {sha, 0} -> String.trim(sha) _ -> "0000000" end) diff --git a/lib/tempest/storage.ex b/lib/tempest/storage.ex index 8ff71a5..cb08a9f 100644 --- a/lib/tempest/storage.ex +++ b/lib/tempest/storage.ex @@ -52,8 +52,7 @@ defmodule Tempest.Storage do "dataDir" => public_path(config.data_dir, env), "accountDb" => public_path(account_db, env), "sequencerDb" => public_path(sequencer_db, env), - "writable" => - writable?(config.data_dir) and File.exists?(account_db) and File.exists?(sequencer_db) + "writable" => writable?(config.data_dir) and File.exists?(account_db) and File.exists?(sequencer_db) } end diff --git a/lib/tempest_web/components/core_components.ex b/lib/tempest_web/components/core_components.ex index cfc46c2..8daaffc 100644 --- a/lib/tempest_web/components/core_components.ex +++ b/lib/tempest_web/components/core_components.ex @@ -166,8 +166,7 @@ defmodule TempestWeb.CoreComponents do values: ~w(checkbox color date datetime-local email file month number password search select tel text textarea time url week hidden) - attr :field, Phoenix.HTML.FormField, - doc: "a form field struct retrieved from the form, for example: @form[:email]" + attr :field, Phoenix.HTML.FormField, doc: "a form field struct retrieved from the form, for example: @form[:email]" attr :errors, :list, default: [] attr :checked, :boolean, doc: "the checked flag for checkbox inputs" @@ -177,8 +176,7 @@ defmodule TempestWeb.CoreComponents do attr :class, :any, default: nil, doc: "the input class to use over defaults" attr :error_class, :any, default: nil, doc: "the input error class to use over defaults" - attr :rest, :global, - include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength + attr :rest, :global, include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength multiple pattern placeholder readonly required rows size step) def input(%{field: %Phoenix.HTML.FormField{} = field} = assigns) do @@ -452,8 +450,7 @@ defmodule TempestWeb.CoreComponents do to: selector, time: 300, transition: - {"transition-all ease-out duration-300", - "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", + {"transition-all ease-out duration-300", "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", "opacity-100 translate-y-0 sm:scale-100"} ) end diff --git a/lib/tempest_web/telemetry.ex b/lib/tempest_web/telemetry.ex index 1c86817..4668b93 100644 --- a/lib/tempest_web/telemetry.ex +++ b/lib/tempest_web/telemetry.ex @@ -71,8 +71,7 @@ defmodule TempestWeb.Telemetry do ), summary("tempest.repo.query.idle_time", unit: {:native, :millisecond}, - description: - "The time the connection spent waiting before being checked out for the query" + description: "The time the connection spent waiting before being checked out for the query" ), # VM Metrics diff --git a/mix.exs b/mix.exs index 901d165..9ba7cec 100644 --- a/mix.exs +++ b/mix.exs @@ -52,12 +52,7 @@ defmodule Tempest.MixProject do {:esbuild, "~> 0.10", runtime: Mix.env() == :dev}, {:tailwind, "~> 0.3", runtime: Mix.env() == :dev}, {:heroicons, - github: "tailwindlabs/heroicons", - tag: "v2.2.0", - sparse: "optimized", - app: false, - compile: false, - depth: 1}, + github: "tailwindlabs/heroicons", tag: "v2.2.0", sparse: "optimized", app: false, compile: false, depth: 1}, {:swoosh, "~> 1.16"}, {:req, "~> 0.5"}, {:telemetry_metrics, "~> 1.0"},