-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
138 lines (118 loc) · 3.52 KB
/
mix.exs
File metadata and controls
138 lines (118 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
defmodule Loopctl.MixProject do
use Mix.Project
def project do
[
app: :loopctl,
version: "1.0.0",
elixir: "~> 1.18",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
escript: escript(),
releases: releases(),
listeners: [Phoenix.CodeReloader],
dialyzer: [
plt_add_apps: [:mix, :ex_unit, :ecto, :ecto_sql],
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
ignore_warnings: "priv/plts/dialyzer_ignore.exs"
]
]
end
def application do
[
mod: {Loopctl.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
def cli do
[
preferred_envs: [precommit: :test]
]
end
defp escript do
[
main_module: Loopctl.CLI.Main,
name: :loopctl
]
end
defp releases do
[
loopctl: [
include_executables_for: [:unix],
strip_beams: [keep: ["Docs"]],
applications: [runtime_tools: :permanent],
overlays: "rel/overlays"
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
# Phoenix
{:phoenix, "~> 1.8.4"},
{:phoenix_ecto, "~> 4.5"},
{:phoenix_html, "~> 4.2"},
{:phoenix_live_view, "~> 1.0"},
{:ecto_sql, "~> 3.13"},
{:postgrex, ">= 0.0.0"},
{:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
{:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"},
{:gettext, "~> 1.0"},
{:jason, "~> 1.2"},
{:dns_cluster, "~> 0.2.0"},
{:bandit, "~> 1.5"},
# HTTP client
{:req, "~> 0.5"},
# Background jobs
{:oban, "~> 2.19"},
# Encryption at rest (webhook signing secrets, API key idempotency cache)
{:cloak, "~> 1.1"},
{:cloak_ecto, "~> 1.3"},
# OpenAPI spec and Swagger UI
{:open_api_spex, "~> 3.21"},
# Structured JSON logging
{:logger_json, "~> 7.0"},
# Rate limiting
{:hammer, "~> 6.2"},
# Remote IP resolution behind reverse proxy
{:remote_ip, "~> 1.2"},
# Vector similarity search (pgvector)
{:pgvector, "~> 0.3"},
# WebAuthn / FIDO2 attestation verification (US-26.0.1)
{:wax_, "~> 0.6"},
# Markdown rendering for wiki articles (US-26.0.3)
{:earmark, "~> 1.4"},
# Testing
{:mox, "~> 1.2", only: :test},
{:lazy_html, ">= 0.1.0", only: :test},
# Code quality
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false}
]
end
defp aliases do
[
setup: ["deps.get", "ecto.setup", "assets.setup"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.create", "ecto.migrate"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
"assets.deploy": ["tailwind loopctl --minify", "esbuild loopctl --minify", "phx.digest"],
precommit: [
"compile --warnings-as-errors",
"deps.unlock --check-unused",
"format --check-formatted",
"credo --strict",
"deps.audit",
"dialyzer",
"test"
]
]
end
end