ash/mix.exs

204 lines
5.6 KiB
Elixir
Raw Normal View History

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.
"""
2021-03-14 03:25:47 +13:00
@version "1.36.4"
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",
consolidate_protocols: Mix.env() != :test,
2019-10-03 16:08:36 +13:00
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
2019-12-05 04:16:34 +13:00
package: package(),
deps: deps(),
2020-06-30 09:42:01 +12:00
dialyzer: [plt_add_apps: [:mix, :mnesia]],
2020-06-03 00:52:41 +12:00
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.github": :test,
"coveralls.html": :test
2020-06-03 00:52:41 +12:00
],
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
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-10-10 03:13:44 +13:00
main: "readme",
source_ref: "v#{@version}",
logo: "logos/small-logo.png",
2020-07-10 01:25:48 +12:00
extra_section: "GUIDES",
extras: [
"README.md": [],
"documentation/introduction/getting_started.md": [
title: "Getting Started"
],
"documentation/introduction/getting_started_phx.md": [
title: "Getting Started with Phoenix"
],
"documentation/topics/authorization.md": [
title: "Authorization"
],
"documentation/topics/identities.md": [
title: "Identities"
],
"documentation/topics/pagination.md": [
title: "Pagination"
],
"documentation/topics/validation.md": [
title: "Validation"
],
"documentation/topics/notifiers.md": [
title: "Notifiers"
],
"documentation/topics/error_handling.md": [
title: "Error Handling"
],
"documentation/topics/aggregates.md": [
title: "Aggregates"
],
"documentation/topics/calculations.md": [
title: "Calculations"
],
"documentation/topics/embedded_resources.md": [
title: "Embedded Resources"
],
"documentation/topics/contexts_and_domains.md": [
title: "Context And Domains"
],
"documentation/topics/multitenancy.md": [
title: "Multitenancy"
]
],
2020-07-10 01:25:48 +12:00
groups_for_extras: [
Introduction: Path.wildcard("documentation/introduction/*.md"),
2020-07-16 13:17:57 +12:00
Topics: Path.wildcard("documentation/topics/*")
2020-07-10 01:25:48 +12:00
],
groups_for_modules: [
entrypoint: [
Ash,
Ash.Api,
2020-07-12 18:25:53 +12:00
Ash.Query,
2020-10-12 16:55:47 +13:00
Ash.Changeset,
Ash.Resource.Dsl,
Ash.Api.Dsl
],
2020-09-23 03:22:21 +12:00
validations: ~r/Ash.Resource.Validation/,
changes: ~r/Ash.Resource.Change/,
calculations: [
~r/Ash.Resource.Calculation/,
Ash.Query.Calculation,
Ash.Calculation
],
values: [
Ash.CiString
],
type: ~r/Ash.Type/,
data_layer: ~r/Ash.DataLayer/,
authorizer: ~r/Ash.Authorizer/,
2020-10-12 16:55:47 +13:00
pagination: ~r/Ash.Page/,
2020-10-15 17:54:02 +13:00
notifications: ~r/Ash.Notifier/,
extension: [
Ash.Dsl.Entity,
Ash.Dsl.Extension,
2020-08-10 19:51:28 +12:00
Ash.Dsl.Section,
Ash.Dsl.Transformer
],
2021-01-14 19:17:26 +13:00
"dsl tooling": [
Ash.Dsl
],
"resource dsl transformers": ~r/Ash.Resource.Transformers/,
2020-06-29 15:43:35 +12:00
"api dsl transformers": ~r/Ash.Api.Transformers/,
"filter operators": ~r/Ash.Query.Operator/,
"filter functions": ~r/Ash.Query.Function/,
2020-10-07 18:20:03 +13:00
"query expressions": [
Ash.Query.BooleanExpression,
2020-10-07 18:20:03 +13:00
Ash.Query.Not,
feat: freeform expressions feat: validatiosn in actions feat: query arguments feat: add `Ash.Query.for_read/3` feat: return changeset with API errors feat: add case insensitive string `CiString`/`:ci_string` feat: support `context/1` and `arg/1` in filter templates feat: support targeting notifications with the `for` option feat: add `ago/2` query function feat: add basic arithmetic operators (+, *, -, /) feat: `sensitive?` option for attributes feat: `sensitive?` option for arguments feat: `private` arguments, which can’t be set using `for_<action>` feat: add `prevent_change` which will erase changes just before the changeset is committed feat: add `match?` validation that supports a custom error message feat: add `interval` type to support `ago/2` function feat: add `url_encoded_binary` type feat: add `function` type improvement: `changing?` is now a validation improvement: add `Transformer.get_persisted/3` improvement: add `api` field to `Notification` improvement: standardize errors, add `to_error_class` improvement: use `Comp` everywhere Improvement: use action on changeset if set by `for_<action_type>` improvement: `action_failed?` field on change sets improvement: remove ability for data layers to add operators (for now at least) Improvement: Changeset.apply_attributes/2 now returns an error tuple Improvement: add a bunch of new/informative errors improvement: runtime filter now uses left join logic (a naive implementation of it) improvement: support more filter templates in resources Improvement: basic/naive type system for operators/functions Fix: properly expand module aliases for options w/o compile time dependency chore(engine): track changeset changes for the request with `manage_changeset?: true`
2021-01-22 09:21:58 +13:00
Ash.Query.Ref,
Ash.Query.Call
2020-10-07 18:20:03 +13:00
],
2020-07-12 18:25:53 +12:00
filter: ~r/Ash.Filter/,
"resource introspection": ~r/Ash.Resource/,
2020-08-10 19:51:28 +12:00
"api introspection": ~r/Ash.Api/,
2020-09-25 16:36:50 +12:00
engine: [
~r/Ash.Engine/
],
2021-02-23 14:57:27 +13:00
errors: [
Ash.Error.Stacktrace,
Ash.Error.Exception
],
2020-08-10 19:51:28 +12:00
miscellaneous: [
2021-02-23 14:57:27 +13:00
Ash.UUID,
2020-08-10 19:51:28 +12:00
Ash.NotLoaded,
Ash.Query.Aggregate,
Ash.Query.Type
],
comparable: ~r/Comparable/
]
]
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"],
links: %{
GitHub: "https://github.com/ash-project/ash"
}
2019-10-03 16:08:36 +13:00
]
end
defp elixirc_paths(:test) do
["lib", "test/support"]
end
2019-11-29 19:54:11 +13:00
defp elixirc_paths(_), do: ["lib"]
2019-10-03 16:08:36 +13:00
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ecto, "~> 3.4"},
2019-12-07 09:54:30 +13:00
{:ets, "~> 0.8.0"},
2021-01-10 05:47:50 +13:00
{:decimal, "~> 2.0"},
{:picosat_elixir, "~> 0.1.5"},
{:nimble_options, "~> 0.3.5"},
feat: freeform expressions feat: validatiosn in actions feat: query arguments feat: add `Ash.Query.for_read/3` feat: return changeset with API errors feat: add case insensitive string `CiString`/`:ci_string` feat: support `context/1` and `arg/1` in filter templates feat: support targeting notifications with the `for` option feat: add `ago/2` query function feat: add basic arithmetic operators (+, *, -, /) feat: `sensitive?` option for attributes feat: `sensitive?` option for arguments feat: `private` arguments, which can’t be set using `for_<action>` feat: add `prevent_change` which will erase changes just before the changeset is committed feat: add `match?` validation that supports a custom error message feat: add `interval` type to support `ago/2` function feat: add `url_encoded_binary` type feat: add `function` type improvement: `changing?` is now a validation improvement: add `Transformer.get_persisted/3` improvement: add `api` field to `Notification` improvement: standardize errors, add `to_error_class` improvement: use `Comp` everywhere Improvement: use action on changeset if set by `for_<action_type>` improvement: `action_failed?` field on change sets improvement: remove ability for data layers to add operators (for now at least) Improvement: Changeset.apply_attributes/2 now returns an error tuple Improvement: add a bunch of new/informative errors improvement: runtime filter now uses left join logic (a naive implementation of it) improvement: support more filter templates in resources Improvement: basic/naive type system for operators/functions Fix: properly expand module aliases for options w/o compile time dependency chore(engine): track changeset changes for the request with `manage_changeset?: true`
2021-01-22 09:21:58 +13:00
{:timex, ">= 3.0.0"},
{:comparable, "~> 1.0"},
2021-01-23 12:20:08 +13:00
{:jason, ">= 1.0.0"},
2021-01-10 05:47:50 +13:00
# Dev/Test dependencies
{:ex_doc, "~> 0.22", only: :dev, runtime: false},
{:ex_check, "~> 0.12.0", only: :dev},
{:credo, ">= 0.0.0", only: :dev, runtime: false},
{:dialyxir, ">= 0.0.0", only: :dev, runtime: false},
{:sobelow, ">= 0.0.0", only: :dev, runtime: false},
2021-01-09 09:27:39 +13:00
{:git_ops, "~> 2.4.2", only: :dev},
2020-08-21 13:27:32 +12:00
{:excoveralls, "~> 0.13.0", only: [:dev, :test]},
{:mix_test_watch, "~> 1.0", only: :dev, runtime: false},
{:parse_trans, "3.3.0", only: [:dev, :test], override: true}
]
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",
credo: "credo --strict",
2020-06-30 09:20:29 +12:00
"ash.formatter":
2020-10-18 06:06:27 +13:00
"ash.formatter --extensions Ash.Resource.Dsl,Ash.Api.Dsl,Ash.DataLayer.Ets,Ash.DataLayer.Mnesia,Ash.Notifier.PubSub"
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