2022-10-25 17:02:56 +13:00
|
|
|
defmodule AshAuthentication.Phoenix.MixProject do
|
|
|
|
@moduledoc false
|
2022-10-25 10:39:57 +13:00
|
|
|
use Mix.Project
|
|
|
|
|
2023-04-17 10:16:21 +12:00
|
|
|
@version "1.7.2"
|
2022-10-25 11:23:05 +13:00
|
|
|
|
2022-10-25 10:39:57 +13:00
|
|
|
def project do
|
|
|
|
[
|
|
|
|
app: :ash_authentication_phoenix,
|
2022-10-25 11:23:05 +13:00
|
|
|
version: @version,
|
2022-12-08 16:02:51 +13:00
|
|
|
description: "Phoenix integration for Ash Authentication",
|
2022-10-25 10:39:57 +13:00
|
|
|
elixir: "~> 1.14",
|
|
|
|
start_permanent: Mix.env() == :prod,
|
2022-10-25 11:23:05 +13:00
|
|
|
preferred_cli_env: [ci: :test],
|
|
|
|
aliases: aliases(),
|
|
|
|
deps: deps(),
|
|
|
|
package: package(),
|
|
|
|
elixirc_paths: elixirc_paths(Mix.env()),
|
|
|
|
dialyzer: [
|
2022-10-25 17:02:56 +13:00
|
|
|
plt_add_apps: [:mix, :ex_unit, :ash_authentication],
|
2022-10-25 11:23:05 +13:00
|
|
|
plt_core_path: "priv/plts",
|
|
|
|
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
|
2022-10-25 17:02:56 +13:00
|
|
|
],
|
|
|
|
docs: [
|
|
|
|
main: "readme",
|
2023-01-27 04:01:37 +13:00
|
|
|
extras: extra_documentation(),
|
|
|
|
groups_for_extras: extra_documentation_groups(),
|
2022-10-25 17:02:56 +13:00
|
|
|
formatters: ["html"],
|
|
|
|
filter_modules: ~r/^Elixir.AshAuthentication.Phoenix/,
|
|
|
|
source_url_pattern:
|
|
|
|
"https://github.com/team-alembic/ash_authentication_phoenix/blob/main/%{path}#L%{line}",
|
|
|
|
groups_for_modules: [
|
2022-10-26 20:21:10 +13:00
|
|
|
Welcome: [
|
|
|
|
AshAuthentication.Phoenix
|
|
|
|
],
|
2022-10-25 17:02:56 +13:00
|
|
|
"Routing and Controller": [
|
|
|
|
AshAuthentication.Phoenix.Controller,
|
|
|
|
AshAuthentication.Phoenix.Plug,
|
2023-02-13 09:29:01 +13:00
|
|
|
AshAuthentication.Phoenix.Router,
|
|
|
|
AshAuthentication.Phoenix.LiveSession
|
2022-10-25 17:02:56 +13:00
|
|
|
],
|
|
|
|
Customisation: [
|
2023-01-27 10:22:51 +13:00
|
|
|
~r/^AshAuthentication\.Phoenix\..+Live/,
|
|
|
|
~r/^AshAuthentication\.Phoenix\.Overrides/,
|
2023-01-27 09:42:08 +13:00
|
|
|
~r/^AshAuthentication\.Phoenix\.Components/
|
2022-10-26 20:21:10 +13:00
|
|
|
],
|
|
|
|
Internals: ~r/.*/
|
2022-10-25 17:02:56 +13:00
|
|
|
]
|
2022-10-25 11:23:05 +13:00
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2023-01-27 04:01:37 +13:00
|
|
|
defp extra_documentation do
|
|
|
|
(["README.md"] ++
|
|
|
|
Path.wildcard("documentation/**/*.md"))
|
|
|
|
|> Enum.map(fn
|
|
|
|
"README.md" ->
|
|
|
|
{:"README.md", title: "Read Me", ash_hq?: false}
|
|
|
|
|
|
|
|
"documentation/tutorials/" <> _ = path ->
|
|
|
|
{String.to_atom(path), []}
|
|
|
|
|
|
|
|
"documentation/topics/" <> _ = path ->
|
|
|
|
{String.to_atom(path), []}
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
|
|
|
defp extra_documentation_groups do
|
|
|
|
"documentation/*"
|
|
|
|
|> Path.wildcard()
|
|
|
|
|> Enum.map(fn dir ->
|
|
|
|
name =
|
|
|
|
dir
|
|
|
|
|> Path.basename()
|
|
|
|
|> String.split(~r/_+/)
|
|
|
|
|> Enum.join(" ")
|
|
|
|
|> String.capitalize()
|
|
|
|
|
|
|
|
{name, dir |> Path.join("**") |> Path.wildcard()}
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
2022-10-25 11:23:05 +13:00
|
|
|
def package do
|
|
|
|
[
|
|
|
|
maintainers: [
|
2022-12-08 16:02:51 +13:00
|
|
|
"James Harton <james.harton@alembic.com.au>",
|
|
|
|
"Zach Daniel <zach@zachdaniel.dev>"
|
2022-10-25 11:23:05 +13:00
|
|
|
],
|
|
|
|
licenses: ["MIT"],
|
|
|
|
links: %{
|
|
|
|
"Source" => "https://github.com/team-alembic/ash_authentication_phoenix"
|
|
|
|
},
|
2022-10-25 17:02:56 +13:00
|
|
|
source_url: "https://github.com/team-alembic/ash_authentication_phoenix",
|
2022-12-08 16:02:51 +13:00
|
|
|
files: ~w[lib .formatter.exs mix.exs README* LICENSE* CHANGELOG* documentation]
|
2022-10-25 10:39:57 +13:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Run "mix help compile.app" to learn about applications.
|
2022-10-25 11:23:05 +13:00
|
|
|
def application, do: application(Mix.env())
|
|
|
|
|
|
|
|
def application(:dev) do
|
2022-10-25 10:39:57 +13:00
|
|
|
[
|
|
|
|
extra_applications: [:logger],
|
2022-10-25 11:23:05 +13:00
|
|
|
mod: {Dev.Application, []}
|
2022-10-25 10:39:57 +13:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2022-10-25 11:23:05 +13:00
|
|
|
def application(_),
|
|
|
|
do: [
|
|
|
|
extra_applications: [:logger]
|
|
|
|
]
|
|
|
|
|
2022-10-25 10:39:57 +13:00
|
|
|
# Run "mix help deps" to learn about dependencies.
|
|
|
|
defp deps do
|
|
|
|
[
|
2023-04-06 15:59:52 +12:00
|
|
|
{:ash_authentication, "~> 3.10"},
|
2022-10-25 11:23:05 +13:00
|
|
|
{:ash_phoenix, "~> 1.1"},
|
|
|
|
{:ash, "~> 2.2"},
|
|
|
|
{:jason, "~> 1.0"},
|
|
|
|
{:phoenix_html, "~> 3.2"},
|
|
|
|
{:phoenix_live_view, "~> 0.18"},
|
2023-03-07 10:25:42 +13:00
|
|
|
{:phoenix_view, "~> 2.0"},
|
2022-10-25 11:23:05 +13:00
|
|
|
{:phoenix, "~> 1.6"},
|
2022-11-15 11:52:13 +13:00
|
|
|
{:bcrypt_elixir, "~> 3.0"},
|
2022-12-08 14:32:26 +13:00
|
|
|
{:slugify, "~> 1.3"},
|
2022-10-25 11:23:05 +13:00
|
|
|
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
|
|
|
|
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
|
|
|
|
{:doctor, "~> 0.18", only: [:dev, :test]},
|
|
|
|
{:ex_doc, "~> 0.23", only: :dev, runtime: false},
|
2023-01-11 10:13:00 +13:00
|
|
|
{:faker, "~> 0.17", only: [:dev, :test]},
|
2022-10-25 11:23:05 +13:00
|
|
|
{:git_ops, "~> 2.4", only: [:dev, :test], runtime: false},
|
|
|
|
{:mimic, "~> 1.7", only: [:dev, :test]},
|
|
|
|
{:plug_cowboy, "~> 2.5", only: [:dev, :test]}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp aliases do
|
|
|
|
[
|
|
|
|
ci: [
|
|
|
|
"format --check-formatted",
|
|
|
|
"doctor --full --raise",
|
|
|
|
"credo --strict",
|
|
|
|
"dialyzer",
|
|
|
|
"hex.audit",
|
|
|
|
"test"
|
2023-02-24 16:13:33 +13:00
|
|
|
],
|
|
|
|
docs: ["docs", "ash.replace_doc_links"]
|
2022-10-25 10:39:57 +13:00
|
|
|
]
|
|
|
|
end
|
2022-10-25 11:23:05 +13:00
|
|
|
|
|
|
|
defp elixirc_paths(:test), do: ["lib", "test/support", "dev"]
|
|
|
|
defp elixirc_paths(:dev), do: ["lib", "test/support", "dev"]
|
|
|
|
defp elixirc_paths(_), do: ["lib"]
|
2022-10-25 10:39:57 +13:00
|
|
|
end
|