-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathmix.exs
More file actions
322 lines (313 loc) · 9.71 KB
/
Copy pathmix.exs
File metadata and controls
322 lines (313 loc) · 9.71 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
defmodule Lightning.MixProject do
use Mix.Project
def project do
[
app: :lightning,
version: "2.18.1",
elixir: "~> 1.18",
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [
warnings_as_errors: true
],
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
dialyzer: [
plt_add_apps: [:mix],
plt_local_path: "priv/plts/",
plt_core_path: "priv/plts/core.plt"
],
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
"coveralls.detail": :test,
"coveralls.html": :test,
"coveralls.post": :test,
"coveralls.json": :test,
"test.watch": :test,
coveralls: :test,
verify: :test
],
compilers: Mix.compilers(),
hex: hex_audit(),
# Docs
name: "Lightning",
docs: docs()
]
|> then(fn project ->
if System.get_env("UMBRELLA") == "true" do
project ++
[
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock"
]
else
project
end
end)
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Lightning.Application, [:timex]},
extra_applications: [:logger, :runtime_tools, :os_mon, :scrivener],
start_phases: [seed_prom_ex_telemetry: []]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# cowlib advisories we have checked and accepted. Each names a function on
# cowlib's header-building path, and nothing in our tree calls any of them. The
# parse side of two of them is reachable through cowboy_req, so recheck by
# function rather than by module. No patched cowlib release exists yet. Hex
# matches an advisory's primary ID or any alias, so the CVE form also silences
# the GHSA and EEF variants. Detail in #5102.
defp hex_audit do
[
ignore_advisories: [
# cowlib
# cow_http_struct_hd:escape_string/2
"CVE-2026-43966",
# cow_cookie:cookie/1
"CVE-2026-43969",
# cow_link:link/1
"CVE-2026-43971"
]
]
end
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
# {:rexbug, ">= 1.0.0", only: :test},
{:bcrypt_elixir, "~> 3.3"},
{:bodyguard, "~> 2.2"},
{:broadway_kafka, "~> 0.4.2"},
{:bypass, "~> 2.1", only: :test},
{:briefly, "~> 0.5.0"},
{:cachex, "~> 4.0"},
{:castore, "~> 1.0"},
{:cloak_ecto, "~> 1.3.0"},
{:credo, "~> 1.7.3", only: [:test, :dev]},
{:crontab, "~> 1.1"},
{:dialyxir, "~> 1.4.5", only: [:test, :dev], runtime: false},
# Ecto pins ~> 2.0, but decimal 3.0 is API-compatible and patches
# GHSA-rhv4-8758-jx7v (unbounded exponent DoS in `Decimal.new`).
{:decimal, "~> 3.0", override: true},
{:ecto_enum, "~> 1.4"},
{:ecto_psql_extras, "~> 0.8.2"},
{:ecto_sql, "~> 3.13"},
{:esbuild, "~> 0.9", runtime: Mix.env() == :dev},
{:ex_doc, "~> 0.39", only: :dev, runtime: false},
{:ex_json_schema, "~> 0.11.2"},
{:ex_machina, "~> 2.8.0", only: :test},
{:excoveralls, "~> 0.18.5", only: [:test, :dev]},
{:finch, "~> 0.23"},
{:floki, ">= 0.30.0", only: :test},
{:gettext, "~> 0.26"},
{:git_hooks, "~> 0.9.0", only: [:dev], runtime: false},
# Overridden because phoenix_swoosh 1.2.1 (latest) still declares
# hackney ~> 1.10. It never actually calls hackney, so the constraint is
# dead weight, but it has to be overridden to resolve.
# 4.6.0 is the ceiling: 4.6.1+ require h2 ~> 0.11.0 while hackney's own
# webtransport dep requires h2 ~> 0.10.4, so newer releases cannot resolve.
{:hackney, "~> 4.6.0", override: true},
{:heroicons, "~> 0.5.3"},
{:httpoison, "~> 3.0.0", override: true},
{:jason, "~> 1.4"},
{:joken, "~> 2.6.0"},
{:jsonpatch, "~> 2.2"},
{:junit_formatter, "~> 3.0", only: [:test]},
{:libcluster, "~> 3.3"},
{:libcluster_postgres, "~> 0.2.0"},
{:live_debugger, "~> 0.3.0", only: :dev},
{:mimic, "~> 1.12.0", only: :test},
{:mint, "~> 1.0"},
{:mix_test_watch, "~> 1.2.0", only: [:test, :dev], runtime: false},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
{:mock, "~> 0.3.8", only: :test},
{:mox, "~> 1.2.0", only: :test},
{:oauth2, "~> 2.1"},
{:oban, "~> 2.19"},
{:petal_components, "~> 3.0"},
{:phoenix, "~> 1.7.11"},
{:phoenix_ecto, "~> 4.6"},
{:phoenix_html, "~> 4.1"},
{:phoenix_html_helpers, "~> 1.0"},
{:phoenix_live_dashboard, "~> 0.8"},
{:phoenix_live_reload, "~> 1.5", only: :dev},
{:phoenix_live_view, "~> 1.0.17"},
{:cors_plug, "~> 3.0"},
{:plug_cowboy, "~> 2.5"},
{:postgrex, ">= 0.0.0"},
{:prom_ex, "~> 1.11.0"},
{:rambo, "~> 0.3.4"},
{:retry, "~> 0.18"},
{:scrivener, "~> 2.7"},
{:sentry, "~> 13.2.0"},
{:sobelow, "~> 0.14.1", only: [:test, :dev]},
{:sweet_xml, "~> 0.7.1", only: [:test]},
{:swoosh, "~> 1.26"},
{:gen_smtp, "~> 1.1"},
{:tailwind, "~> 0.3", runtime: Mix.env() == :dev},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"},
{:tesla, "~> 1.18.2"},
{:tidewave, "~> 0.8.0", only: :dev},
{:timex, "~> 3.7"},
# Pinned to the merge of `hackney ~> 1.17 or ~> 4.0` (lau/tzdata#170),
# which lets tzdata keep its autoupdater on hackney 4. Not on Hex yet --
# 1.1.4 predates the fix and no release is scheduled. Move back to a Hex
# release once one carries #170, since git deps are invisible to
# `mix deps.audit`.
{:tzdata,
github: "lau/tzdata",
ref: "766f38de21e9cd3dc4b185ac6244466e4ee65308",
override: true},
{:replug, "~> 0.1.0"},
{:phoenix_swoosh, "~> 1.2.1"},
{:hammer_backend_mnesia, "~> 0.6"},
{:hammer, "~> 6.0"},
{:dotenvy, "~> 1.1.0"},
{:goth, "~> 1.3"},
{:gcs_signed_url, "~> 0.4.6"},
{:packmatic, "~> 1.2"},
# MFA
{:nimble_totp, "~> 1.0"},
{:eqrcode, "~> 0.2"},
# Github API Secret Encoding
{:enacl, github: "aeternity/enacl", branch: "master"},
{:mdex, "~> 0.13"},
{:eventually, "~> 1.1", only: [:test]},
{:benchee, "~> 1.5.0", only: :dev},
{:statistics, "~> 0.6", only: :dev},
{:tls_certificate_check, "~> 1.32"},
philter_dep(),
{:y_ex, "~> 0.8.0"},
{:chameleon, "~> 2.5"}
]
end
defp philter_dep do
if path = System.get_env("PHILTER_PATH") do
{:philter, path: path}
else
{:philter, "~> 0.4.0"}
end
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to install project dependencies and perform other setup tasks, run:
#
# $ mix setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
setup: [
"deps.get",
"tailwind.install --if-missing",
"esbuild.install --if-missing",
"lightning.install_runtime",
"lightning.install_adaptor_icons",
"lightning.install_schemas",
"ecto.setup"
],
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
"assets.setup": [
"tailwind.install --if-missing",
"esbuild.install --if-missing"
],
"assets.deploy": [
"tailwind default --minify",
"esbuild default --minify",
"phx.digest"
],
verify: [
"coveralls.html",
"format --check-formatted",
"dialyzer",
"credo --strict --all",
"sobelow"
],
compile: [
"compile --warnings-as-errors"
]
]
end
defp docs do
[
# The main page in the docs
main: "readme",
logo: "priv/static/images/square-logo.png",
extras: [
"README.md": [title: "Lightning"],
"RUNNINGLOCAL.md": [title: "Running Locally"],
"DEPLOYMENT.md": [title: "Deployment"],
"tooling/benchmarking/README.md": [
title: "Benchmarking",
filename: "benchmarking.md"
],
"WORKERS.md": [title: "Workers"],
"PROVISIONING.md": [title: "Provisioning"],
"CHANGELOG.md": [title: "Changelog"]
],
source_url: "https://github.com/OpenFn/lightning",
homepage_url: "https://openfn.github.io/lightning",
groups_for_modules: [
API: [
~r/LightningWeb.API/
],
Accounts: [
~r/Lightning.Accounts/
],
Config: [
~r/Lightning.Config/
],
Runs: [
~r/Lightning.Runs/
],
WorkOrders: [
~r/Lightning.WorkOrders/
],
Credentials: [
~r/Lightning.Credentials/
],
Invocations: [
~r/Lightning.Invocation/
],
Pipeline: [
~r/Lightning.Pipeline/
],
Jobs: [
~r/Lightning.Jobs/
],
Projects: [
~r/Lightning.Projects/
],
Runtime: [
~r/Lightning.Runtime/
],
Workflows: [
~r/Lightning.Workflow/
],
"Custom Data Types": [
~r/Lightning.LogMessage/,
~r/Lightning.UnixDateTime/
],
Web: [
~r/LightningWeb/
],
Other: [
~r/Lightning.Graph/,
~r/Lightning./
]
]
]
end
end