mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
improvement: update igniter and fix deprecation warnings
This commit is contained in:
parent
65ade2b014
commit
8ae2a1cd90
7 changed files with 7 additions and 7 deletions
|
@ -29,7 +29,7 @@ defmodule Ash.Resource.Igniter do
|
||||||
Igniter.Code.Function.move_to_nth_argument(zipper, 1),
|
Igniter.Code.Function.move_to_nth_argument(zipper, 1),
|
||||||
{:ok, zipper} <- Igniter.Code.Keyword.get_key(zipper, :domain),
|
{:ok, zipper} <- Igniter.Code.Keyword.get_key(zipper, :domain),
|
||||||
module when not is_nil(module) <-
|
module when not is_nil(module) <-
|
||||||
Igniter.Code.Module.to_module_name(zipper.node) do
|
Igniter.Project.Module.to_module_name(zipper.node) do
|
||||||
{:ok, igniter, module}
|
{:ok, igniter, module}
|
||||||
else
|
else
|
||||||
_ ->
|
_ ->
|
||||||
|
|
|
@ -14,7 +14,7 @@ defmodule Mix.Tasks.Ash.Gen.BaseResource do
|
||||||
@impl Igniter.Mix.Task
|
@impl Igniter.Mix.Task
|
||||||
def igniter(igniter, [base_resource | _argv]) do
|
def igniter(igniter, [base_resource | _argv]) do
|
||||||
base_resource = Igniter.Code.Module.parse(base_resource)
|
base_resource = Igniter.Code.Module.parse(base_resource)
|
||||||
base_resource_file = Igniter.Code.Module.proper_location(base_resource)
|
base_resource_file = Igniter.Project.Module.proper_location(igniter, base_resource)
|
||||||
|
|
||||||
glob = Path.join([base_resource_file, "..", "**", "*.ex"])
|
glob = Path.join([base_resource_file, "..", "**", "*.ex"])
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ defmodule Mix.Tasks.Ash.Gen.Domain do
|
||||||
{%{domain: domain}, argv} = positional_args!(argv)
|
{%{domain: domain}, argv} = positional_args!(argv)
|
||||||
domain = Igniter.Code.Module.parse(domain)
|
domain = Igniter.Code.Module.parse(domain)
|
||||||
|
|
||||||
domain_file = Igniter.Code.Module.proper_location(domain)
|
domain_file = Igniter.Project.Module.proper_location(igniter, domain)
|
||||||
|
|
||||||
app_name = Igniter.Project.Application.app_name(igniter)
|
app_name = Igniter.Project.Application.app_name(igniter)
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ defmodule Mix.Tasks.Ash.Gen.Enum do
|
||||||
{%{module_name: module_name, types: types}, argv} = positional_args!(argv)
|
{%{module_name: module_name, types: types}, argv} = positional_args!(argv)
|
||||||
|
|
||||||
enum = Igniter.Code.Module.parse(module_name)
|
enum = Igniter.Code.Module.parse(module_name)
|
||||||
file_name = Igniter.Code.Module.proper_location(enum)
|
file_name = Igniter.Project.Module.proper_location(igniter, enum)
|
||||||
|
|
||||||
opts = options!(argv)
|
opts = options!(argv)
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ defmodule Mix.Tasks.Ash.Gen.Resource do
|
||||||
resource
|
resource
|
||||||
)
|
)
|
||||||
|> Igniter.create_new_file(
|
|> Igniter.create_new_file(
|
||||||
Igniter.Code.Module.proper_location(resource),
|
Igniter.Project.Module.proper_location(igniter, resource),
|
||||||
"""
|
"""
|
||||||
defmodule #{inspect(resource)} do
|
defmodule #{inspect(resource)} do
|
||||||
use #{base},
|
use #{base},
|
||||||
|
|
2
mix.exs
2
mix.exs
|
@ -360,7 +360,7 @@ defmodule Ash.MixProject do
|
||||||
{:simple_sat, "~> 0.1 and >= 0.1.1", optional: true},
|
{:simple_sat, "~> 0.1 and >= 0.1.1", optional: true},
|
||||||
|
|
||||||
# Code Generators
|
# Code Generators
|
||||||
{:igniter, "~> 0.3 and >= 0.3.35"},
|
{:igniter, "~> 0.3 and >= 0.3.36"},
|
||||||
|
|
||||||
# IO Utilities
|
# IO Utilities
|
||||||
{:owl, "~> 0.11"},
|
{:owl, "~> 0.11"},
|
||||||
|
|
2
mix.lock
2
mix.lock
|
@ -19,7 +19,7 @@
|
||||||
"git_ops": {:hex, :git_ops, "2.6.1", "cc7799a68c26cf814d6d1a5121415b4f5bf813de200908f930b27a2f1fe9dad5", [:mix], [{:git_cli, "~> 0.2", [hex: :git_cli, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "ce62d07e41fe993ec22c35d5edb11cf333a21ddaead6f5d9868fcb607d42039e"},
|
"git_ops": {:hex, :git_ops, "2.6.1", "cc7799a68c26cf814d6d1a5121415b4f5bf813de200908f930b27a2f1fe9dad5", [:mix], [{:git_cli, "~> 0.2", [hex: :git_cli, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "ce62d07e41fe993ec22c35d5edb11cf333a21ddaead6f5d9868fcb607d42039e"},
|
||||||
"glob_ex": {:hex, :glob_ex, "0.1.8", "f7ef872877ca2ae7a792ab1f9ff73d9c16bf46ecb028603a8a3c5283016adc07", [:mix], [], "hexpm", "9e39d01729419a60a937c9260a43981440c43aa4cadd1fa6672fecd58241c464"},
|
"glob_ex": {:hex, :glob_ex, "0.1.8", "f7ef872877ca2ae7a792ab1f9ff73d9c16bf46ecb028603a8a3c5283016adc07", [:mix], [], "hexpm", "9e39d01729419a60a937c9260a43981440c43aa4cadd1fa6672fecd58241c464"},
|
||||||
"ham": {:hex, :ham, "0.3.0", "7cd031b4a55fba219c11553e7b13ba73bd86eab4034518445eff1e038cb9a44d", [:mix], [], "hexpm", "7d6c6b73d7a6a83233876cc1b06a4d9b5de05562b228effda4532f9a49852bf6"},
|
"ham": {:hex, :ham, "0.3.0", "7cd031b4a55fba219c11553e7b13ba73bd86eab4034518445eff1e038cb9a44d", [:mix], [], "hexpm", "7d6c6b73d7a6a83233876cc1b06a4d9b5de05562b228effda4532f9a49852bf6"},
|
||||||
"igniter": {:hex, :igniter, "0.3.35", "edd8db6234db7639eb2f954b45ab23db98b1fd0a940850f58db8900912a908bf", [:mix], [{:glob_ex, "~> 0.1.7", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:rewrite, "~> 0.9", [hex: :rewrite, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.4", [hex: :sourceror, repo: "hexpm", optional: false]}, {:spitfire, ">= 0.1.3 and < 1.0.0-0", [hex: :spitfire, repo: "hexpm", optional: false]}], "hexpm", "d2826d94d8c851e2bc8b920766815b3df4b184cab05eae8423e965363a2e02b1"},
|
"igniter": {:hex, :igniter, "0.3.36", "7dffb41e8c25dac3de8a0947c4973dc3db3cd25f394fd87ac334fe18a725f291", [:mix], [{:glob_ex, "~> 0.1.7", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:rewrite, "~> 0.9", [hex: :rewrite, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.4", [hex: :sourceror, repo: "hexpm", optional: false]}, {:spitfire, ">= 0.1.3 and < 1.0.0-0", [hex: :spitfire, repo: "hexpm", optional: false]}], "hexpm", "5a493222cbf4e3cf0106cd090c93a1f61fa4df958b7d00e03a836e8a67a4bab2"},
|
||||||
"iterex": {:hex, :iterex, "0.1.2", "58f9b9b9a22a55cbfc7b5234a9c9c63eaac26d276b3db80936c0e1c60355a5a6", [:mix], [], "hexpm", "2e103b8bcc81757a9af121f6dc0df312c9a17220f302b1193ef720460d03029d"},
|
"iterex": {:hex, :iterex, "0.1.2", "58f9b9b9a22a55cbfc7b5234a9c9c63eaac26d276b3db80936c0e1c60355a5a6", [:mix], [], "hexpm", "2e103b8bcc81757a9af121f6dc0df312c9a17220f302b1193ef720460d03029d"},
|
||||||
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
|
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
|
||||||
"libgraph": {:hex, :libgraph, "0.16.0", "3936f3eca6ef826e08880230f806bfea13193e49bf153f93edcf0239d4fd1d07", [:mix], [], "hexpm", "41ca92240e8a4138c30a7e06466acc709b0cbb795c643e9e17174a178982d6bf"},
|
"libgraph": {:hex, :libgraph, "0.16.0", "3936f3eca6ef826e08880230f806bfea13193e49bf153f93edcf0239d4fd1d07", [:mix], [], "hexpm", "41ca92240e8a4138c30a7e06466acc709b0cbb795c643e9e17174a178982d6bf"},
|
||||||
|
|
Loading…
Reference in a new issue