diff --git a/.formatter.exs b/.formatter.exs index 0648ad7..5660644 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -7,8 +7,6 @@ :ash_graphql, :ash_admin, :ash_csv, - :ash_authentication, - :ash_authentication_phoenix, :ash_oban ], inputs: [ diff --git a/lib/ash_hq/blog/resources/post/post.ex b/lib/ash_hq/blog/resources/post/post.ex index de03143..50a4e58 100644 --- a/lib/ash_hq/blog/resources/post/post.ex +++ b/lib/ash_hq/blog/resources/post/post.ex @@ -61,6 +61,7 @@ defmodule AshHq.Blog.Post do attribute :tag_names, {:array, :ci_string} do public? true + constraints items: [ match: ~r/^[a-zA-Z]*$/, casing: :lower @@ -83,6 +84,7 @@ defmodule AshHq.Blog.Post do relationships do has_many :tags, AshHq.Blog.Tag do public? true + manual fn posts, %{query: query} -> all_tags = Enum.flat_map(posts, &(&1.tag_names || [])) diff --git a/lib/ash_hq/discord/resources/message.ex b/lib/ash_hq/discord/resources/message.ex index 91597ed..542ce6c 100644 --- a/lib/ash_hq/discord/resources/message.ex +++ b/lib/ash_hq/discord/resources/message.ex @@ -70,6 +70,7 @@ defmodule AshHq.Discord.Message do attribute :content, :string do public? true end + attribute :content_html, :string do public? true end diff --git a/lib/ash_hq/discord/resources/thread.ex b/lib/ash_hq/discord/resources/thread.ex index 5586bee..cc122b3 100644 --- a/lib/ash_hq/discord/resources/thread.ex +++ b/lib/ash_hq/discord/resources/thread.ex @@ -66,6 +66,7 @@ defmodule AshHq.Discord.Thread do attributes do integer_primary_key :id, generated?: false, writable?: true + attribute :type, :integer do public? true end diff --git a/lib/ash_hq/docs/resources/dsl/dsl.ex b/lib/ash_hq/docs/resources/dsl/dsl.ex index 99f229c..dba89a4 100644 --- a/lib/ash_hq/docs/resources/dsl/dsl.ex +++ b/lib/ash_hq/docs/resources/dsl/dsl.ex @@ -101,12 +101,15 @@ defmodule AshHq.Docs.Dsl do attribute :arg_defaults, :map do public? true end + attribute :path, {:array, :string} do public? true end + attribute :recursive_as, :string do public? true end + attribute :order, :integer do public? true allow_nil? false @@ -135,9 +138,11 @@ defmodule AshHq.Docs.Dsl do belongs_to :dsl, __MODULE__ do public? true end + has_many :options, AshHq.Docs.Option do public? true end + has_many :dsls, __MODULE__ do public? true end diff --git a/lib/ash_hq/docs/resources/extension/extension.ex b/lib/ash_hq/docs/resources/extension/extension.ex index cb0dd2b..533fb74 100644 --- a/lib/ash_hq/docs/resources/extension/extension.ex +++ b/lib/ash_hq/docs/resources/extension/extension.ex @@ -51,6 +51,7 @@ defmodule AshHq.Docs.Extension do has_many :dsls, AshHq.Docs.Dsl do public? true end + has_many :options, AshHq.Docs.Option do public? true end @@ -66,7 +67,6 @@ defmodule AshHq.Docs.Extension do end code_interface do - define :destroy end diff --git a/lib/ash_hq/docs/resources/function/function.ex b/lib/ash_hq/docs/resources/function/function.ex index fd496f9..58c64d8 100644 --- a/lib/ash_hq/docs/resources/function/function.ex +++ b/lib/ash_hq/docs/resources/function/function.ex @@ -60,6 +60,7 @@ defmodule AshHq.Docs.Function do attribute :file, :string do public? true end + attribute :line, :integer do public? true end @@ -132,7 +133,6 @@ defmodule AshHq.Docs.Function do end end - resource do description "A function in a module exposed by an Ash library" end diff --git a/lib/ash_hq/docs/resources/guide/guide.ex b/lib/ash_hq/docs/resources/guide/guide.ex index 4b5cca4..6fbab24 100644 --- a/lib/ash_hq/docs/resources/guide/guide.ex +++ b/lib/ash_hq/docs/resources/guide/guide.ex @@ -131,7 +131,6 @@ defmodule AshHq.Docs.Guide do end end - resource do description "Represents a markdown guide exposed by a library" end diff --git a/lib/ash_hq/docs/resources/library_version/library_version.ex b/lib/ash_hq/docs/resources/library_version/library_version.ex index ec9c4dd..0272b88 100644 --- a/lib/ash_hq/docs/resources/library_version/library_version.ex +++ b/lib/ash_hq/docs/resources/library_version/library_version.ex @@ -114,12 +114,15 @@ defmodule AshHq.Docs.LibraryVersion do has_many :extensions, AshHq.Docs.Extension do public? true end + has_many :guides, AshHq.Docs.Guide do public? true end + has_many :modules, AshHq.Docs.Module do public? true end + has_many :mix_tasks, AshHq.Docs.MixTask do public? true end diff --git a/lib/ash_hq/docs/resources/mix_task/mix_task.ex b/lib/ash_hq/docs/resources/mix_task/mix_task.ex index 1221bd2..f020414 100644 --- a/lib/ash_hq/docs/resources/mix_task/mix_task.ex +++ b/lib/ash_hq/docs/resources/mix_task/mix_task.ex @@ -105,7 +105,6 @@ defmodule AshHq.Docs.MixTask do end end - resource do description "Represents a mix task that has been exposed by a library" end diff --git a/lib/ash_hq/docs/resources/module/module.ex b/lib/ash_hq/docs/resources/module/module.ex index ad70a34..8ec7986 100644 --- a/lib/ash_hq/docs/resources/module/module.ex +++ b/lib/ash_hq/docs/resources/module/module.ex @@ -108,7 +108,6 @@ defmodule AshHq.Docs.Module do end end - resource do description "Represents a module that has been exposed by a library" end diff --git a/lib/ash_hq/docs/resources/option/option.ex b/lib/ash_hq/docs/resources/option/option.ex index c9cd38c..2cbfd2d 100644 --- a/lib/ash_hq/docs/resources/option/option.ex +++ b/lib/ash_hq/docs/resources/option/option.ex @@ -95,9 +95,11 @@ defmodule AshHq.Docs.Option do attribute :default, :string do public? true end + attribute :path, {:array, :string} do public? true end + attribute :order, :integer do public? true allow_nil? false diff --git a/lib/ash_hq/github/contributor/contributor.ex b/lib/ash_hq/github/contributor/contributor.ex index 0541e81..ccbd7d7 100644 --- a/lib/ash_hq/github/contributor/contributor.ex +++ b/lib/ash_hq/github/contributor/contributor.ex @@ -48,7 +48,6 @@ defmodule AshHq.Github.Contributor do end code_interface do - define :in_order end end diff --git a/lib/ash_hq_web/core_components.ex b/lib/ash_hq_web/core_components.ex index e69de29..8b13789 100644 --- a/lib/ash_hq_web/core_components.ex +++ b/lib/ash_hq_web/core_components.ex @@ -0,0 +1 @@ + diff --git a/lib/ash_hq_web/views/app_view_live.ex b/lib/ash_hq_web/views/app_view_live.ex index 71e4cee..59e5f0a 100644 --- a/lib/ash_hq_web/views/app_view_live.ex +++ b/lib/ash_hq_web/views/app_view_live.ex @@ -49,7 +49,6 @@ defmodule AshHqWeb.AppViewLive do