-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathmix.exs
More file actions
257 lines (244 loc) · 8.23 KB
/
Copy pathmix.exs
File metadata and controls
257 lines (244 loc) · 8.23 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
# SPDX-FileCopyrightText: SUSE LLC
# SPDX-License-Identifier: Apache-2.0
defmodule Trento.MixProject do
use Mix.Project
@source_url "https://github.com/trento-project/web"
def project do
[
app: :trento,
description:
"Easing your life in administering SAP applications. Trento is an open-source web application, built by SUSE, to enhance day-2 operations of SAP workloads. It can be used to proactively prevent infrastructural issues by diagnosing common issues, validate systems configuration against best practices, and remove toil from routine OS tasks on mission-critical systems.",
version: get_version(),
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [infer_signatures: false],
compilers: Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
name: "Trento Web",
docs: docs(),
test_coverage: [tool: ExCoveralls],
dialyzer: [
plt_add_apps: [:ex_unit, :mix, :llm_db]
# check_plt: true,
# ignore_warnings: "dialyzer_ignore.exs"
],
releases: [
trento: [
applications: [llm_db: :load]
]
]
]
end
def cli do
[preferred_envs: [coveralls: :test, "coveralls.github": :test]]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Trento.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test),
do: [
"lib",
"test/support"
]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:llm_db, "~> 2026.7", runtime: false},
{:sagents, "~> 0.7.0"},
# temporary override to pull in an elixir 1.15 compatible version
{:langchain,
github: "nelsonkopliku/langchain",
ref: "a4f2439d99747205884a013ffd6f16c2f0a7a32f",
override: true},
# used for the event envelopes
{:ag_ui_ex, "~> 0.1.0"},
{:cachex, "~> 4.1"},
{:commanded, "~> 1.4"},
{:commanded_ecto_projections, "~> 1.4"},
{:commanded_eventstore_adapter, "~> 1.4"},
{:cloak, "~> 1.1.2"},
{:cloak_ecto, "~> 1.3.0"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4.7", only: [:dev, :test], runtime: false},
{:ecto_sql, "~> 3.14"},
{:esbuild, "~> 0.2", runtime: Mix.env() == :dev},
{:eventstore, "~> 1.4"},
# {:eventstore_dashboard, github: "commanded/eventstore-dashboard"},
{:ex_doc, "~> 0.29", only: [:dev, :test], runtime: false},
{:ex_machina, "~> 2.8.0", only: :test},
{:excoveralls, "~> 0.10", only: :test},
{:faker, "~> 0.17", only: [:dev, :test]},
{:flop, "~> 0.26.5"},
{:floki, ">= 0.36.2", only: :test},
{:gettext, "~> 0.26"},
{:gen_smtp, "~> 1.3.0"},
{:gen_rmq, github: "trento-project/trnt_gen_rmq", ref: "v5.0.1"},
{:hackney, "~> 4.0", override: true},
{:httpoison, "~> 3.0", override: true},
{:jason, "~> 1.4"},
{:junit_formatter, "~> 3.4", only: [:test]},
{:mox, "~> 1.0", only: :test},
{:nimble_parsec, "~> 1.4"},
{:open_api_spex, "~> 3.21"},
{:pegasus, "~> 1.0.0"},
{:phoenix, "~> 1.7.23"},
{:phoenix_ecto, "~> 4.5"},
{:phoenix_html, "~> 4.1"},
{:phoenix_live_dashboard, "~> 0.8.7"},
{:phoenix_live_reload, "~> 1.7.0", only: [:dev, :wanda]},
{:phoenix_live_view, "~> 1.1.28"},
{:plug_cowboy, "~> 2.5"},
{:postgrex, ">= 0.0.0"},
{:pow, "~> 1.0.39"},
{:process_tree, "~> 0.3.0", only: [:dev, :test]},
{:quantum, ">= 1.8.0"},
{:swoosh, "~> 1.24"},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"},
{:timex, "~> 3.7.7"},
{:tzdata, "~> 1.1.4"},
{:trento_contracts,
github: "trento-project/contracts",
ref: "af252ccb0e64234d65e0581043996b6574687fc8",
sparse: "elixir"},
{:unplug, "~> 1.1.0"},
{:proper_case, "~> 1.3.1"},
{:polymorphic_embed, "~> 5.0"},
{:joken, "~> 2.6.2"},
{:ecto, "~> 3.14"},
# https://github.com/deadtrickster/ssl_verify_fun.erl/pull/27
{:ssl_verify_fun, "~> 1.1", manager: :rebar3, override: true},
{:parallel_stream, "~> 1.1.0"},
{:x509, "~> 0.9.0"},
{:argon2_elixir, "~> 4.0"},
{:ecto_commons, "~> 0.3.4"},
{:bodyguard, "~> 2.4"},
{:nimble_totp, "~> 1.0"},
{:phoenix_html_helpers, "~> 1.0"},
{:pow_assent, "~> 0.4.18"},
# Pin assent: 0.2.13 strictly dereferences session_params.state and
# crashes the SSO callback because session_params is never persisted
# server-side. Re-bump only after page_controller/session_controller
# are reworked to thread session_params through Plug.Session.
{:assent, "== 0.2.10", override: true},
{:samly, "~> 1.0"}
]
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
[
start: [
"deps.get",
"ecto.create",
"ecto.migrate",
"event_store.setup",
"phx.server"
],
setup: ["deps.get", "event_store.setup", "ecto.setup"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
"event_store.setup": ["event_store.create", "event_store.init"],
"event_store.reset": ["event_store.drop", "event_store.setup"],
test: [
"ecto.create --quiet",
"ecto.migrate --quiet",
"event_store.create --quiet",
"event_store.init --quiet",
"test"
],
"coveralls.github": [
"ecto.create --quiet",
"ecto.migrate --quiet",
"event_store.create --quiet",
"event_store.init --quiet",
"coveralls.github"
],
"assets.deploy": [
"cmd --cd assets npm run tailwind:build",
"cmd --cd assets npm run build",
"phx.digest"
]
]
end
defp docs do
[
main: "api-reference",
logo: "priv/static/images/trento.svg",
extra_section: "Info",
extras: extras(),
source_url: @source_url,
groups_for_modules: [
Clusters: [~r/Trento.Clusters.*/],
Hosts: [~r/Trento.Hosts.*/],
SapSystems: [~r/Trento.SapSystems.*/],
Discovery: [~r/Trento.Discovery.*/],
Enums: [~r/Trento.Enums.*/],
Services: [~r/Trento.Services.*/],
"Event handlers": [~r/Trento.*EventHandler$/],
Infrastructure: [~r/Trento.Infrastructure.*/],
Support: [~r/Trento.Support.*/],
Web: [~r/TrentoWeb.*/],
"Legacy events": [~r/Trento.Domain.Events.*/]
],
nest_modules_by_prefix: [
Trento.Clusters,
Trento.Clusters.Commands,
Trento.Clusters.Enums,
Trento.Clusters.Events,
Trento.Clusters.Projections,
Trento.Clusters.ValueObjects,
Trento.Hosts,
Trento.Hosts.Commands,
Trento.Hosts.Events,
Trento.Hosts.Projections,
Trento.Hosts.ValueObjects,
Trento.SapSystems,
Trento.SapSystems.Commands,
Trento.SapSystems.Enums,
Trento.SapSystems.Events,
Trento.SapSystems.Projections,
Trento.SapSystems.Services,
Trento.Infrastructure.Checks,
Trento.Discovery.Payloads,
Trento.Discovery.Policies,
Trento.Domain.Events
]
]
end
def extras() do
[
"CHANGELOG.md"
]
end
defp get_version do
case System.get_env("VERSION", "") do
"" -> get_version_from_file()
version -> version
end
end
# Dependabot's hex file fetcher only pulls mix.exs, mix.lock, subapp mixfiles and paths
# referenced by Code.eval_file/Code.require_file.
# get_version_from_file/0 reads VERSION, so the reference below is what makes Dependabot fetch it.
# Do not delete.
#
# Code.eval_file("VERSION")
defp get_version_from_file do
__DIR__ |> Path.join("VERSION") |> File.read!() |> String.trim()
end
end