Commit graph

163 commits

Author SHA1 Message Date
dependabot[bot]
fae2c728b0
chore(deps-dev): bump ex_doc in the dev-dependencies group (#1251) 2024-06-20 18:33:10 -04:00
dependabot[bot]
aa93fe086d
chore(deps): bump the production-dependencies group with 2 updates (#1250) 2024-06-20 18:32:53 -04:00
dependabot[bot]
81812d22e9
chore(deps): bump spark from 2.2.1 to 2.2.3 (#1245)
Bumps [spark](https://github.com/ash-project/spark) from 2.2.1 to 2.2.3.
- [Changelog](https://github.com/ash-project/spark/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/spark/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: spark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 20:36:14 -04:00
dependabot[bot]
3a20262db2
chore(deps): bump spark from 2.2.0 to 2.2.1 (#1243) 2024-06-14 18:51:35 -04:00
dependabot[bot]
4c73aa82bd
chore(deps): bump stream_data from 1.1.0 to 1.1.1 (#1241)
Bumps [stream_data](https://github.com/whatyouhide/stream_data) from 1.1.0 to 1.1.1.
- [Changelog](https://github.com/whatyouhide/stream_data/blob/main/CHANGELOG.md)
- [Commits](https://github.com/whatyouhide/stream_data/commits)

---
updated-dependencies:
- dependency-name: stream_data
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 19:56:20 -04:00
dependabot[bot]
3a02de77a7
chore(deps): bump spark from 2.1.24 to 2.2.0 (#1240)
Bumps [spark](https://github.com/ash-project/spark) from 2.1.24 to 2.2.0.
- [Changelog](https://github.com/ash-project/spark/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/spark/compare/v2.1.24...v2.2.0)

---
updated-dependencies:
- dependency-name: spark
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 19:56:10 -04:00
dependabot[bot]
fc6e377941
chore(deps-dev): bump credo from 1.7.6 to 1.7.7 (#1237)
Bumps [credo](https://github.com/rrrene/credo) from 1.7.6 to 1.7.7.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.7.6...v1.7.7)

---
updated-dependencies:
- dependency-name: credo
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-12 19:39:27 -04:00
dependabot[bot]
55457d4b8d
chore(deps): bump spark from 2.1.23 to 2.1.24 (#1235)
Bumps [spark](https://github.com/ash-project/spark) from 2.1.23 to 2.1.24.
- [Changelog](https://github.com/ash-project/spark/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/spark/compare/v2.1.23...v2.1.24)

---
updated-dependencies:
- dependency-name: spark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:59:46 -04:00
dependabot[bot]
1f34fa9191
chore(deps): bump spark from 2.1.22 to 2.1.23 (#1231) 2024-06-07 19:02:59 -04:00
dependabot[bot]
225fcf9199
chore(deps-dev): bump benchee from 1.3.0 to 1.3.1 (#1226) 2024-06-05 20:44:32 -04:00
dependabot[bot]
fba3287ddb
chore(deps-dev): bump ex_doc from 0.33.0 to 0.34.0 (#1215)
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-31 09:39:50 -05:00
dependabot[bot]
4910bf9d6d
chore(deps): bump stream_data from 1.0.0 to 1.1.0 (#1212) 2024-05-29 19:49:51 -04:00
dependabot[bot]
f2bfc51988
chore(deps): bump reactor from 0.8.3 to 0.8.4 (#1207) 2024-05-27 19:37:37 -04:00
dependabot[bot]
98adffd1bb
chore(deps): bump reactor from 0.8.2 to 0.8.3 (#1199) 2024-05-24 19:14:16 -04:00
dependabot[bot]
a964b3b27a
--- (#1190)
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 19:33:38 -04:00
dependabot[bot]
ee261f6aef
--- (#1184) 2024-05-20 18:56:40 -04:00
Zach Daniel
124a3c734e improvement: better types for checks, for spark autocomplete
chore: update spark
2024-05-14 11:38:33 -04:00
dependabot[bot]
610c0195c5
chore(deps): bump stream_data from 0.6.0 to 1.0.0 (#1162) 2024-05-13 20:11:00 -04:00
dependabot[bot]
1e53cddddb
chore(deps): bump spark from 2.1.20 to 2.1.21 (#1148)
Bumps [spark](https://github.com/ash-project/spark) from 2.1.20 to 2.1.21.
- [Changelog](https://github.com/ash-project/spark/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/spark/compare/v2.1.20...v2.1.21)

---
updated-dependencies:
- dependency-name: spark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-11 02:05:27 -04:00
dependabot[bot]
f7844a8b6b
chore(deps-dev): bump ex_doc from 0.32.1 to 0.32.2 (#1149)
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.32.1 to 0.32.2.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.32.1...v0.32.2)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-11 02:05:14 -04:00
dependabot[bot]
1678e35d84
chore(deps-dev): bump git_ops from 2.6.0 to 2.6.1 (#1150)
Bumps [git_ops](https://github.com/zachdaniel/git_ops) from 2.6.0 to 2.6.1.
- [Changelog](https://github.com/zachdaniel/git_ops/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zachdaniel/git_ops/compare/v2.6.0...v2.6.1)

---
updated-dependencies:
- dependency-name: git_ops
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-11 02:04:59 -04:00
dependabot[bot]
f82a467e7e
chore(deps-dev): bump credo from 1.7.5 to 1.7.6 (#1144) 2024-05-11 01:58:46 -04:00
dependabot[bot]
c71940ed47
chore(deps): bump reactor from 0.8.1 to 0.8.2 (#1138)
Bumps [reactor](https://github.com/ash-project/reactor) from 0.8.1 to 0.8.2.
- [Changelog](https://github.com/ash-project/reactor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/reactor/compare/v0.8.1...v0.8.2)

---
updated-dependencies:
- dependency-name: reactor
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 20:37:48 -04:00
Zach Daniel
c1354d503e fix: run changesets w/ after_transaction hooks through standard logic 2024-05-02 00:06:31 -04:00
Zach Daniel
dad4d5effc fix: ensure that errors for nested forms are transformed 2024-04-23 14:03:40 -04:00
dependabot[bot]
be65cbcf82
chore(deps): bump spark from 2.1.19 to 2.1.20 (#1041)
Bumps [spark](https://github.com/ash-project/spark) from 2.1.19 to 2.1.20.
- [Changelog](https://github.com/ash-project/spark/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/spark/compare/v2.1.19...v2.1.20)

---
updated-dependencies:
- dependency-name: spark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 18:59:30 -04:00
Zach Daniel
34470d4494 improvement: make extension discovery faster 2024-04-21 11:16:33 -04:00
dependabot[bot]
10cc7354e3
chore(deps-dev): bump ex_doc from 0.32.0 to 0.32.1 (#1018)
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.32.0 to 0.32.1.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/v0.32.1/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.32.0...v0.32.1)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-12 19:08:39 -04:00
Zach Daniel
0e2b392413 fix: compilation time improvements (hopefully) 2024-04-12 14:14:14 -04:00
dependabot[bot]
13f0497d44
chore(deps): bump spark from 2.1.16 to 2.1.17 (#1013)
Bumps [spark](https://github.com/ash-project/spark) from 2.1.16 to 2.1.17.
- [Changelog](https://github.com/ash-project/spark/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/spark/compare/v2.1.16...v2.1.17)

---
updated-dependencies:
- dependency-name: spark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 18:27:34 -04:00
dependabot[bot]
6ba0f50ba5
chore(deps): bump spark from 2.1.13 to 2.1.16 (#1005)
Bumps [spark](https://github.com/ash-project/spark) from 2.1.13 to 2.1.16.
- [Changelog](https://github.com/ash-project/spark/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/spark/compare/v2.1.13...v2.1.16)

---
updated-dependencies:
- dependency-name: spark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 17:31:39 -04:00
dependabot[bot]
a2802874bc
chore(deps-dev): bump mix_audit from 2.1.2 to 2.1.3 (#1006)
Bumps [mix_audit](https://github.com/mirego/mix_audit) from 2.1.2 to 2.1.3.
- [Changelog](https://github.com/mirego/mix_audit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mirego/mix_audit/compare/v2.1.2...v2.1.3)

---
updated-dependencies:
- dependency-name: mix_audit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 17:31:30 -04:00
dependabot[bot]
6aa55000e0
chore(deps): bump simple_sat from 0.1.1 to 0.1.3 (#1007)
Bumps [simple_sat](https://github.com/ash-project/simple_sat) from 0.1.1 to 0.1.3.
- [Changelog](https://github.com/ash-project/simple_sat/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ash-project/simple_sat/compare/v0.1.1...v0.1.3)

---
updated-dependencies:
- dependency-name: simple_sat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 17:31:21 -04:00
Zach Daniel
a5074d9d2f chore: update ex_doc 2024-04-10 10:01:57 -04:00
2973c0db94 improvement(Ash.Reactor): Allow create to be provided an initial value.
The initial value can be either a resource or a changeset.
2024-04-09 09:03:04 +12:00
Zach Daniel
ec76778b49 chore: backport fixes from 2.0 2024-04-04 14:45:03 -04:00
Zach Daniel
f8384e44b5 improvement: add skip_unknown_inputs option, use it for embeds in unions 2024-03-28 16:29:37 -04:00
Zach Daniel
5967ed3a48 improvement!: 3.0 (#955)
* improvement!: use `%Ash.NotSelected{}` for unselected values

* improvement!: default `require_atomic?` to `true`

* improvement!: raise errors on unknown generic action arguments

* improvement!: default bulk strategy to `:atomic`

* improvement!: warnings on `require_atomic?` `true` actions
improvement!: revise `Ash.NotSelected` to `Ash.NotLoaded`
improvement!: errors on unknown action inputs across the board

* doc: clarify wording in notifiers.md

closes #889

* improvement!: default `api.authorization.authorize` to `:by_default`

* improvement!: require the api when constructing changesets

this commit also fixes some work from prior commits around
the default value for the `authorize` option

* improvement!: code_interface.define_for -> code_interface.api

`code_interface.define_for` is now `code_interface.api`. Additionally, it is set automatically if the `api` option is specified on `use Ash.Resource`.

* improvement!: remove registries

* improvement!: pubsub notifier default to `previous_values?: false`
improvement!: requires_original_data? callback defaults to false

* improvement!: rename Ash.Calculation -> Ash.Resource.Calculation
improvement!: improve `Ash.Query.Calculation.new` signature
improvement!: anonymous function calculations now take lists and return lists
improvement!: make callback contexts into structs
improvement!: pass context to builtin lifecycle hook changes
improvement!: calculation arguments are now in the `arguments` key of the context

* chore: fix build

* improvement!: remove `aggregates` and `calculations` from `Filter.parse` and `Filter.parse_input`

* improvement: update spark to 2.0

* improvement!: make picosat_elixir optional with `simple_sat`

* improvement!: rename api to domain

* docs: add more info to upgrading guide

* docs: tweak docs formatting

* improvement!: remove `Ash.Changeset.new!`

* docs: update docs for `Ash.Changeset.new/1`

* improvement!: deprecate `private?: false` in favor of `public?: true`

* doc: add upgrade guide for private -> public

* improvement: update reactor to 3.0

* improvement!: default `default_accept` is now `[]`

* improvement!: `Ash.CiString.new/1` returns `nil` on `nil` input

* improvement!(Ash.Reactor): Improve integration with Ash 3.0 changes.

* improvement!: clean up and reorganize `Ash` functions

this is in preparation of deprecating the functions that are defined
on the api

improvement!: remove context-based functionality

* chore: update docs references from `Ash.Domain` to `Ash`

* chore: fix bad merge

* chore: fix context access in atomic changes

* improvement!: Deprecate calling functions on (domain) api in favor of `Ash`

* improvement!: add `attribute_public?` and update `attribute_writable?` behavior

* improvement!: update atomic behaviors, default to invalid

* chore: update downcase docs

* improvement!: changeset.filters -> changeset.filter

* improvement!: remove deprecated functions

* improvement!: remove and simplify `Ash.Filter.TemplateHelpers`

* improvement: import Ash.Expr in modules where it is used
improvement: require Ash.QUery in modules where it makes sense

* fix!: keyword lists are no longer special cased in ash expressions

* improvement: add structs for more context implementations

* chore: small tweaks, finish `:all` -> `:*` conversion

* chore: update DSL docs for multitenancy.global?

* improvement: ensure selects are applied on destroys
chore: remove TODOs

* chore: some docs changes

* improvement!: introduce strict mode to calculations

* chore: update tests

* improvement: support custom expressions

* docs: document custom expressions

* chore: fix and test custom expressions and function fragments
docs: update relevant docs w/ the changes

* improvement!: reverse order of before action & before transaction hooks

* improvement!: default read actions are now paginatable

* improvement!: require explicit accept lists in default actions

* chore: update docs

* improvement!: remove Ash.Flow and Ash.Engine

* chore: unlock unused deps

* chore: don't use unused variable

* chore: include ash flow change in upgrade guide

* improvement!: standardize various exception keys and names

* improvement!: use `Splode` for errors

* improvement: update upgrade guide to include Splode

* feat: code interface on the domain

* improvement: only require primary key if resource has actions or fields
improvement: only build schema if resource has actions or fields
improvement: verify primary key in its own verifier

* improvement: add `resource/1` builtin check

* improvement!: move simple_notifiers to an option instead of a DSL builder
improvement!: update spark for better autocomplete, configure autocomplete for key functions
docs: replace `an domain` with `a domain`

* improvement: better code interface documentation

* fix: set tenant on query so that root calles to Api.aggreagte work as expected (#929)

* chore: fixes from previous improvements

* chore: update splode

* chore: update splode

* improvement!: swap position of sort order and arguments in calculation sorting

* improvement!: add `include_nil?` aggregate option, and default it to `false`

* improvement: support notifiers within actions

* improvement: support specifying multiple filters

* improvement: add `sortable?` flags to all fields
improvement: support multiple filters on relationships

* improvement: support sensitive? on calculations and arguments

* improvement: validate resources in inputs to code interface

* chore: don't require explicit accept lists when using `default_accept :*`

* chore: update spark

* chore: update public attribute handling per 3.0

* improvement: update reactor and tests

* chore: better error message

* chore: fix rebase issue

* chore: handle merge issues
improvement: don't require domain on relationships if destination has domain

* improvement!: errors on unknown inputs for calculations

* improvement: always choose to cast atomic

* improvement: support casting some embeds atomically

* improvement: various 3.0 updates, documented in upgrade.md

* chore: Add failing tests for loads with with explicit domains. (#948)

Co-authored-by: James Harton <james@harton.nz>

* improvement: ensure non-static dynamic domains works

* improvement: add Ash.ToTenant protocol

* chore: add docs for no ToTenant option

* fix: properly construct new query in `build/3`

* chore: update simple_sat dependency

* chore: don't reselect when missing primary keys

* chore: remove IO.inspect

* chore: update spark

* chore: update spark

* improvement: use `Keyword.put_new` in `Ash.Context.to_opts` (#953)

* improvement: support bulk and atomic operations in code interfaces

---------

Co-authored-by: James Harton <james@harton.nz>
Co-authored-by: WIGGLES <55168935+WIGGLES-dev@users.noreply.github.com>
Co-authored-by: Dmitry Maganov <vonagam@gmail.com>
2024-03-27 16:31:59 -04:00
86d74ed789
feat(Ash.Reactor): Add a Reactor extension that makes working with resources easy. (#683)
* feat: Add `Ash.Reactor` with create support.

* improvement: Add `Ash.Reactor` update support.

* improvement: Add `Ash.Reactor` destroy support.

* improvement(Ash.Reactor): Support for transactional handling of notifications.

* improvement(Ash.Reactor): Add `read` and `get` steps.

* docs: Add the beginnings of a Reactor topic.

* improvement(Ash.Reactor): add support for generic actions.

* improvement: Add `undo` capability to `create` step.

* improvement: transaction and undo working.

* docs: Start documenting undo behaviour.

* chore: Update to Reactor 0.6.

* improvement: Automatically thread Ash tracers through Reactor.

* improvement(Ash.Reactor): Add undo to generic actions.

* docs: Improve reactor documentation.

* fix: Mimic copying `Ash.Notifier` seems to break the compiler for some reason.
2024-03-02 10:26:25 +13:00
Zach Daniel
944f69b16e fix: properly annotate run_flow's recursive DSL tag
docs: update spark & docs
2024-02-16 21:25:18 -05:00
Zach Daniel
d013818c0a improvement: handle pkey-less resources when attaching fields
improvement: set lazy defaults when applying changeset attributes
2024-01-21 00:45:35 -05:00
Zach Daniel
3db822d775 improvement: optimize embedded resource creation 2024-01-19 09:58:54 -05:00
Zach Daniel
072486bebd docs: revamp hexdocs
fix: use current read action for counting
2024-01-12 14:07:35 -05:00
Zach Daniel
63c15bbfe9 improvement: error on using relate_actor with :many cardinality relationships 2024-01-10 05:56:22 -05:00
Zach Daniel
3be83d6ca4 improvement: lay the groundwork for fully atomic actions 2023-12-16 10:14:02 -05:00
Zach Daniel
14db149473 chore: update spark 2023-12-12 20:38:51 -05:00
Zach Daniel
e680867be9 fix: don't reorder global validations/changes
fix: use latest spark, and new persisters callback
fix: properly validate belongs_to relationships
2023-10-25 17:45:55 -04:00
Zach Daniel
7f7469eb9f improvement: various performance improvements 2023-10-17 01:08:26 -04:00
Zach Daniel
969ebf7f3f docs: update spark to fix docs 2023-10-11 09:30:22 -04:00
Zach Daniel
1042ea14fd chore: use uuids instead of unique integer for performance reasons 2023-10-03 13:42:18 -04:00