2019-10-03 16:08:36 +13:00
|
|
|
defmodule Ash.MixProject do
|
2020-06-02 17:51:13 +12:00
|
|
|
@moduledoc false
|
2019-10-03 16:08:36 +13:00
|
|
|
use Mix.Project
|
|
|
|
|
2019-12-05 04:18:00 +13:00
|
|
|
@description """
|
|
|
|
A resource declaration and interaction library. Built with pluggable data layers, and
|
|
|
|
designed to be used by multiple front ends.
|
|
|
|
"""
|
|
|
|
|
2022-11-30 08:24:44 +13:00
|
|
|
@version "2.4.13"
|
2020-06-01 17:23:33 +12:00
|
|
|
|
2019-10-03 16:08:36 +13:00
|
|
|
def project do
|
|
|
|
[
|
|
|
|
app: :ash,
|
2020-06-01 17:23:33 +12:00
|
|
|
version: @version,
|
2021-01-22 09:36:49 +13:00
|
|
|
elixir: "~> 1.11",
|
2021-01-07 08:39:56 +13:00
|
|
|
consolidate_protocols: Mix.env() != :test,
|
2019-10-03 16:08:36 +13:00
|
|
|
start_permanent: Mix.env() == :prod,
|
2019-11-28 18:24:29 +13:00
|
|
|
elixirc_paths: elixirc_paths(Mix.env()),
|
2019-12-05 04:16:34 +13:00
|
|
|
package: package(),
|
|
|
|
deps: deps(),
|
2022-10-28 11:52:42 +13:00
|
|
|
dialyzer: [plt_add_apps: [:mix, :mnesia, :earmark, :plug]],
|
2020-10-21 06:11:21 +13:00
|
|
|
xref: [exclude: [:mnesia]],
|
2019-12-06 07:45:02 +13:00
|
|
|
docs: docs(),
|
2020-06-02 15:37:50 +12:00
|
|
|
aliases: aliases(),
|
2019-12-05 04:18:00 +13:00
|
|
|
description: @description,
|
2019-12-05 04:16:34 +13:00
|
|
|
source_url: "https://github.com/ash-project/ash",
|
|
|
|
homepage_url: "https://github.com/ash-project/ash"
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2022-09-20 02:14:08 +12:00
|
|
|
defp extras do
|
2022-08-20 05:13:27 +12:00
|
|
|
"documentation/**/*.md"
|
2022-08-19 06:15:41 +12:00
|
|
|
|> Path.wildcard()
|
|
|
|
|> Enum.map(fn path ->
|
|
|
|
title =
|
|
|
|
path
|
|
|
|
|> Path.basename(".md")
|
|
|
|
|> String.split(~r/[-_]/)
|
2022-09-20 02:14:08 +12:00
|
|
|
|> Enum.map_join(" ", &String.capitalize/1)
|
2022-08-19 06:15:41 +12:00
|
|
|
|> case do
|
|
|
|
"F A Q" ->
|
|
|
|
"FAQ"
|
|
|
|
|
|
|
|
other ->
|
|
|
|
other
|
|
|
|
end
|
|
|
|
|
|
|
|
{String.to_atom(path),
|
|
|
|
[
|
|
|
|
title: title
|
|
|
|
]}
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
2022-09-20 02:14:08 +12:00
|
|
|
defp groups_for_extras do
|
2022-08-20 05:13:27 +12:00
|
|
|
"documentation/*"
|
2022-08-19 06:15:41 +12:00
|
|
|
|> Path.wildcard()
|
|
|
|
|> Enum.map(fn folder ->
|
|
|
|
name =
|
|
|
|
folder
|
|
|
|
|> Path.basename()
|
|
|
|
|> String.split(~r/[-_]/)
|
2022-09-20 02:14:08 +12:00
|
|
|
|> Enum.map_join(" ", &String.capitalize/1)
|
2022-08-19 06:15:41 +12:00
|
|
|
|
|
|
|
{name, folder |> Path.join("**") |> Path.wildcard()}
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
2020-06-02 17:51:13 +12:00
|
|
|
defp docs do
|
2019-12-06 07:45:02 +13:00
|
|
|
# The main page in the docs
|
2020-06-14 18:39:11 +12:00
|
|
|
[
|
2022-08-24 11:55:36 +12:00
|
|
|
main: "get-started",
|
2020-06-14 18:39:11 +12:00
|
|
|
source_ref: "v#{@version}",
|
|
|
|
logo: "logos/small-logo.png",
|
2020-07-10 01:25:48 +12:00
|
|
|
extra_section: "GUIDES",
|
2022-08-19 06:15:41 +12:00
|
|
|
extras: extras(),
|
|
|
|
groups_for_extras: groups_for_extras(),
|
2020-06-14 18:39:11 +12:00
|
|
|
groups_for_modules: [
|
2022-08-24 11:55:36 +12:00
|
|
|
"Extensions & DSLs": [
|
|
|
|
Ash.Api.Dsl,
|
|
|
|
Ash.Resource.Dsl,
|
|
|
|
Ash.Flow.Dsl,
|
|
|
|
Ash.DataLayer.Ets,
|
|
|
|
Ash.DataLayer.Mnesia,
|
|
|
|
Ash.DataLayer.Simple,
|
|
|
|
Ash.Notifier.PubSub,
|
|
|
|
Ash.Policy.Authorizer,
|
|
|
|
Ash.Registry,
|
|
|
|
Ash.Registry.Dsl,
|
|
|
|
Ash.Resource
|
|
|
|
],
|
|
|
|
Resources: [
|
2020-06-14 18:39:11 +12:00
|
|
|
Ash.Api,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Filter.TemplateHelpers,
|
|
|
|
Ash.Calculation,
|
|
|
|
Ash.Resource.Calculation.Builtins,
|
|
|
|
Ash.CodeInterface,
|
|
|
|
Ash.DataLayer,
|
|
|
|
Ash.Notifier,
|
|
|
|
Ash.Notifier.Notification,
|
|
|
|
Ash.Resource.ManualRead,
|
|
|
|
Ash.Resource.ManualRelationship
|
|
|
|
],
|
|
|
|
Queries: [
|
2020-07-12 18:25:53 +12:00
|
|
|
Ash.Query,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Resource.Preparation,
|
|
|
|
Ash.Resource.Preparation.Builtins,
|
|
|
|
Ash.Query.Calculation,
|
|
|
|
Ash.Query.Aggregate
|
|
|
|
],
|
|
|
|
Changesets: [
|
2020-10-12 16:55:47 +13:00
|
|
|
Ash.Changeset,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Resource.Change,
|
|
|
|
Ash.Resource.Change.Builtins,
|
|
|
|
Ash.Resource.Validation,
|
|
|
|
Ash.Resource.Validation.Builtins
|
2020-06-14 18:39:11 +12:00
|
|
|
],
|
2022-08-24 11:55:36 +12:00
|
|
|
Authorization: [
|
|
|
|
Ash.Authorizer,
|
|
|
|
Ash.Policy.Check,
|
2022-09-08 07:03:09 +12:00
|
|
|
Ash.Policy.Check.Builtins,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Policy.FilterCheck,
|
2022-11-23 21:36:55 +13:00
|
|
|
Ash.Policy.FilterCheckWithContext,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Policy.SimpleCheck
|
2021-03-15 11:29:30 +13:00
|
|
|
],
|
2022-08-24 11:55:36 +12:00
|
|
|
Introspection: [
|
|
|
|
Ash.Api.Info,
|
|
|
|
Ash.Registry.Info,
|
|
|
|
Ash.Resource.Info,
|
|
|
|
Ash.Flow.Info,
|
|
|
|
Ash.Policy.Info,
|
|
|
|
Ash.DataLayer.Ets.Info,
|
|
|
|
Ash.DataLayer.Mnesia.Info,
|
|
|
|
Ash.Notifier.PubSub.Info
|
2022-02-03 11:02:28 +13:00
|
|
|
],
|
2022-08-24 11:55:36 +12:00
|
|
|
Utilities: [
|
|
|
|
Ash,
|
|
|
|
Ash.Page,
|
|
|
|
Ash.Page.Keyset,
|
|
|
|
Ash.Page.Offset,
|
|
|
|
Ash.Filter,
|
|
|
|
Ash.Filter.Runtime,
|
|
|
|
Ash.Sort,
|
|
|
|
Ash.CiString,
|
|
|
|
Ash.UUID,
|
|
|
|
Ash.NotLoaded,
|
|
|
|
Ash.Changeset.ManagedRelationshipHelpers,
|
|
|
|
Ash.DataLayer.Simple,
|
|
|
|
Ash.Filter.Simple,
|
|
|
|
Ash.Filter.Simple.Not,
|
2022-10-25 07:06:07 +13:00
|
|
|
Ash.OptionsHelpers,
|
2022-11-16 10:47:06 +13:00
|
|
|
Ash.Resource.Builder,
|
|
|
|
Ash.Tracer
|
2021-01-29 08:47:59 +13:00
|
|
|
],
|
2022-08-24 11:55:36 +12:00
|
|
|
Testing: [
|
|
|
|
Ash.Generator,
|
|
|
|
Ash.Seed,
|
|
|
|
Ash.Test
|
2020-10-07 18:20:03 +13:00
|
|
|
],
|
2022-08-24 11:55:36 +12:00
|
|
|
Flow: [
|
|
|
|
Ash.Flow,
|
|
|
|
Ash.Flow.Executor,
|
|
|
|
Ash.Flow.Step,
|
|
|
|
Ash.Flow.Chart.Mermaid,
|
|
|
|
Ash.Flow.StepHelpers
|
2020-09-25 16:36:50 +12:00
|
|
|
],
|
2022-08-24 11:55:36 +12:00
|
|
|
Errors: [
|
2021-03-20 11:23:48 +13:00
|
|
|
Ash.Error,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Error.Exception,
|
|
|
|
Ash.Error.Stacktrace
|
2022-07-28 01:38:53 +12:00
|
|
|
],
|
2022-08-24 11:55:36 +12:00
|
|
|
Types: [
|
|
|
|
Ash.Type,
|
|
|
|
Ash.Type.Enum,
|
|
|
|
Ash.Type.Atom,
|
|
|
|
Ash.Type.Binary,
|
|
|
|
Ash.Type.Boolean,
|
|
|
|
Ash.Type.CiString,
|
|
|
|
Ash.Type.Date,
|
|
|
|
Ash.Type.Decimal,
|
|
|
|
Ash.Type.DurationName,
|
|
|
|
Ash.Type.Float,
|
|
|
|
Ash.Type.Function,
|
|
|
|
Ash.Type.Integer,
|
|
|
|
Ash.Type.Map,
|
|
|
|
Ash.Type.NaiveDatetime,
|
|
|
|
Ash.Type.String,
|
|
|
|
Ash.Type.Term,
|
|
|
|
Ash.Type.Time,
|
|
|
|
Ash.Type.UUID,
|
|
|
|
Ash.Type.UrlEncodedBinary,
|
|
|
|
Ash.Type.UtcDatetime,
|
|
|
|
Ash.Type.UtcDatetimeUsec
|
2021-01-29 08:47:59 +13:00
|
|
|
],
|
2022-08-24 11:55:36 +12:00
|
|
|
Transformers: [~r/\.Transformers\./, Ash.Registry.ResourceValidations],
|
|
|
|
Internals: ~r/.*/
|
2020-06-14 18:39:11 +12:00
|
|
|
]
|
|
|
|
]
|
2019-12-06 07:45:02 +13:00
|
|
|
end
|
|
|
|
|
2019-12-05 04:16:34 +13:00
|
|
|
defp package do
|
|
|
|
[
|
2020-07-21 14:16:28 +12:00
|
|
|
name: :ash,
|
2019-12-05 04:16:34 +13:00
|
|
|
licenses: ["MIT"],
|
2022-08-20 05:13:27 +12:00
|
|
|
files: ~w(lib .formatter.exs mix.exs README* LICENSE*
|
|
|
|
CHANGELOG* documentation),
|
2019-12-05 04:16:34 +13:00
|
|
|
links: %{
|
|
|
|
GitHub: "https://github.com/ash-project/ash"
|
|
|
|
}
|
2019-10-03 16:08:36 +13:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2019-11-28 18:24:29 +13:00
|
|
|
defp elixirc_paths(:test) do
|
|
|
|
["lib", "test/support"]
|
|
|
|
end
|
|
|
|
|
2019-11-29 19:54:11 +13:00
|
|
|
defp elixirc_paths(_), do: ["lib"]
|
2019-11-28 18:24:29 +13:00
|
|
|
|
2019-10-03 16:08:36 +13:00
|
|
|
# Run "mix help deps" to learn about dependencies.
|
|
|
|
defp deps do
|
2019-11-28 18:24:29 +13:00
|
|
|
[
|
2022-11-16 15:39:57 +13:00
|
|
|
{:spark, "~> 0.2 and >= 0.2.10"},
|
2021-09-14 03:44:56 +12:00
|
|
|
{:ecto, "~> 3.7"},
|
2019-12-07 09:54:30 +13:00
|
|
|
{:ets, "~> 0.8.0"},
|
2021-01-10 05:47:50 +13:00
|
|
|
{:decimal, "~> 2.0"},
|
2021-08-30 04:36:16 +12:00
|
|
|
{:picosat_elixir, "~> 0.2"},
|
2022-08-15 06:06:58 +12:00
|
|
|
{:nimble_options, "~> 0.4.0"},
|
2021-01-22 09:21:58 +13:00
|
|
|
{:comparable, "~> 1.0"},
|
2021-01-23 12:20:08 +13:00
|
|
|
{:jason, ">= 1.0.0"},
|
2022-04-19 05:39:54 +12:00
|
|
|
{:earmark, "~> 1.4", optional: true},
|
2022-06-22 13:00:47 +12:00
|
|
|
{:stream_data, "~> 0.5.0"},
|
2022-08-27 09:57:03 +12:00
|
|
|
{:telemetry, "~> 1.1"},
|
2022-11-21 05:14:58 +13:00
|
|
|
{:plug, ">= 0.0.0", optional: true},
|
2021-01-10 05:47:50 +13:00
|
|
|
# Dev/Test dependencies
|
2020-06-14 18:39:11 +12:00
|
|
|
{:ex_doc, "~> 0.22", only: :dev, runtime: false},
|
2020-08-21 13:28:25 +12:00
|
|
|
{:ex_check, "~> 0.12.0", only: :dev},
|
2020-06-02 13:22:08 +12:00
|
|
|
{:credo, ">= 0.0.0", only: :dev, runtime: false},
|
|
|
|
{:dialyxir, ">= 0.0.0", only: :dev, runtime: false},
|
|
|
|
{:sobelow, ">= 0.0.0", only: :dev, runtime: false},
|
2022-10-04 19:03:49 +13:00
|
|
|
{:git_ops, "~> 2.5", only: :dev},
|
2020-10-06 17:58:06 +13:00
|
|
|
{:mix_test_watch, "~> 1.0", only: :dev, runtime: false},
|
2021-12-14 12:17:34 +13:00
|
|
|
{:parse_trans, "3.3.0", only: [:dev, :test], override: true},
|
2022-11-15 19:34:57 +13:00
|
|
|
{:benchee, "~> 1.1", only: [:dev, :test]}
|
2019-11-28 18:24:29 +13:00
|
|
|
]
|
2019-10-03 16:08:36 +13:00
|
|
|
end
|
2020-06-02 15:37:50 +12:00
|
|
|
|
2020-06-02 17:47:25 +12:00
|
|
|
defp aliases do
|
|
|
|
[
|
|
|
|
sobelow: "sobelow --skip",
|
2020-06-15 18:40:33 +12:00
|
|
|
credo: "credo --strict",
|
2022-11-03 20:47:05 +13:00
|
|
|
docs: ["docs", "ash.replace_doc_links"],
|
2022-08-16 08:02:22 +12:00
|
|
|
"spark.formatter":
|
|
|
|
"spark.formatter --extensions Ash.Resource.Dsl,Ash.Api.Dsl,Ash.Flow.Dsl,Ash.Registry.Dsl,Ash.DataLayer.Ets,Ash.DataLayer.Mnesia,Ash.Notifier.PubSub,Ash.Policy.Authorizer"
|
2020-06-02 17:47:25 +12:00
|
|
|
]
|
2020-06-02 15:37:50 +12:00
|
|
|
end
|
2019-10-03 16:08:36 +13:00
|
|
|
end
|