@muhammedaksam/easiarr 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/index.js +29837 -0
  2. package/package.json +15 -15
  3. package/src/VersionInfo.ts +0 -12
  4. package/src/api/arr-api.ts +0 -521
  5. package/src/api/auto-setup-types.ts +0 -64
  6. package/src/api/base-api.ts +0 -216
  7. package/src/api/bazarr-api.ts +0 -297
  8. package/src/api/cloudflare-api.ts +0 -493
  9. package/src/api/custom-format-api.ts +0 -224
  10. package/src/api/grafana-api.ts +0 -230
  11. package/src/api/heimdall-api.ts +0 -141
  12. package/src/api/homarr-api.ts +0 -209
  13. package/src/api/huntarr-api.ts +0 -457
  14. package/src/api/index.ts +0 -9
  15. package/src/api/jellyfin-api.ts +0 -389
  16. package/src/api/jellyseerr-api.ts +0 -559
  17. package/src/api/maintainerr-api.ts +0 -461
  18. package/src/api/naming-config.ts +0 -101
  19. package/src/api/overseerr-api.ts +0 -392
  20. package/src/api/plex-api.ts +0 -308
  21. package/src/api/portainer-api.ts +0 -374
  22. package/src/api/profilarr-api.ts +0 -391
  23. package/src/api/prowlarr-api.ts +0 -488
  24. package/src/api/qbittorrent-api.ts +0 -300
  25. package/src/api/quality-profile-api.ts +0 -272
  26. package/src/api/tautulli-api.ts +0 -244
  27. package/src/api/uptime-kuma-api.ts +0 -343
  28. package/src/apps/categories.ts +0 -14
  29. package/src/apps/index.ts +0 -2
  30. package/src/apps/registry.ts +0 -1275
  31. package/src/compose/caddy-config.ts +0 -130
  32. package/src/compose/generator.ts +0 -287
  33. package/src/compose/index.ts +0 -7
  34. package/src/compose/templates.ts +0 -78
  35. package/src/compose/traefik-config.ts +0 -187
  36. package/src/config/bookmarks-generator.ts +0 -160
  37. package/src/config/defaults.ts +0 -37
  38. package/src/config/homepage-config.ts +0 -381
  39. package/src/config/index.ts +0 -6
  40. package/src/config/manager.ts +0 -150
  41. package/src/config/recyclarr-config.ts +0 -181
  42. package/src/config/schema.ts +0 -310
  43. package/src/config/slskd-config.ts +0 -86
  44. package/src/config/soularr-config.ts +0 -105
  45. package/src/config/trash-quality-definitions.ts +0 -213
  46. package/src/data/lidarr-custom-formats.ts +0 -127
  47. package/src/data/trash-profiles.ts +0 -333
  48. package/src/docker/client.ts +0 -312
  49. package/src/docker/index.ts +0 -18
  50. package/src/index.ts +0 -77
  51. package/src/setup/actions/arr-common.ts +0 -307
  52. package/src/setup/actions/dashboards.ts +0 -79
  53. package/src/setup/actions/download-clients.ts +0 -54
  54. package/src/setup/actions/jellyseerr.ts +0 -331
  55. package/src/setup/actions/media-servers.ts +0 -68
  56. package/src/setup/actions/monitoring.ts +0 -120
  57. package/src/setup/actions/prowlarr.ts +0 -137
  58. package/src/setup/actions/utilities.ts +0 -490
  59. package/src/setup/index.ts +0 -78
  60. package/src/setup/types.ts +0 -144
  61. package/src/structure/manager.ts +0 -129
  62. package/src/ui/App.ts +0 -111
  63. package/src/ui/components/ApplicationSelector.ts +0 -275
  64. package/src/ui/components/CredentialsForm.ts +0 -180
  65. package/src/ui/components/DownloadClientForm.ts +0 -114
  66. package/src/ui/components/FileEditor.ts +0 -91
  67. package/src/ui/components/FooterHint.ts +0 -119
  68. package/src/ui/components/PageLayout.ts +0 -160
  69. package/src/ui/components/UpdateNotification.ts +0 -102
  70. package/src/ui/index.ts +0 -7
  71. package/src/ui/screens/AdvancedSettings.ts +0 -188
  72. package/src/ui/screens/ApiKeyViewer.ts +0 -511
  73. package/src/ui/screens/AppConfigurator.ts +0 -543
  74. package/src/ui/screens/AppManager.ts +0 -284
  75. package/src/ui/screens/ContainerControl.ts +0 -581
  76. package/src/ui/screens/LogsViewer.ts +0 -478
  77. package/src/ui/screens/MainMenu.ts +0 -299
  78. package/src/ui/screens/MonitorDashboard.ts +0 -881
  79. package/src/ui/screens/SecretsEditor.ts +0 -216
  80. package/src/ui/screens/SettingsScreen.ts +0 -633
  81. package/src/ui/screens/index.ts +0 -22
  82. package/src/ui/screens/setup/BaseAppSetupScreen.ts +0 -375
  83. package/src/ui/screens/setup/CloudflaredSetup.ts +0 -460
  84. package/src/ui/screens/setup/FullAutoSetup.ts +0 -766
  85. package/src/ui/screens/setup/HomepageSetup.ts +0 -165
  86. package/src/ui/screens/setup/JellyfinSetup.ts +0 -328
  87. package/src/ui/screens/setup/JellyseerrSetup.ts +0 -242
  88. package/src/ui/screens/setup/ProwlarrSetup.ts +0 -500
  89. package/src/ui/screens/setup/QBittorrentSetup.ts +0 -221
  90. package/src/ui/screens/setup/QuickSetup.ts +0 -1169
  91. package/src/ui/screens/setup/RecyclarrSetup.ts +0 -270
  92. package/src/ui/screens/setup/TRaSHProfileSetup.ts +0 -381
  93. package/src/utils/arch.ts +0 -78
  94. package/src/utils/browser.ts +0 -27
  95. package/src/utils/categories.ts +0 -61
  96. package/src/utils/debug.ts +0 -84
  97. package/src/utils/env.ts +0 -138
  98. package/src/utils/index.ts +0 -8
  99. package/src/utils/logs.ts +0 -119
  100. package/src/utils/migrations/1765626338_rename_env_variables.ts +0 -102
  101. package/src/utils/migrations/1765707135_rename_easiarr_status.ts +0 -91
  102. package/src/utils/migrations/1765732722_remove_cloudflare_dns_api_token.ts +0 -45
  103. package/src/utils/migrations/1769515650_migrate_to_xdg.ts +0 -114
  104. package/src/utils/migrations.ts +0 -165
  105. package/src/utils/password.ts +0 -42
  106. package/src/utils/paths.ts +0 -33
  107. package/src/utils/unraid.ts +0 -103
  108. package/src/utils/update-checker.ts +0 -210
  109. package/src/utils/url-utils.ts +0 -38
@@ -1,242 +0,0 @@
1
- /**
2
- * Jellyseerr Setup Screen
3
- * Automates the Jellyseerr setup wizard via API
4
- *
5
- * Uses shared setup actions from src/setup/actions/jellyseerr.ts
6
- */
7
-
8
- import { CliRenderer, TextRenderable } from "@opentui/core"
9
-
10
- import type { SetupContext } from "~/setup"
11
- import type { MenuItem, SetupResult } from "~/ui/screens/setup/BaseAppSetupScreen"
12
- import { EasiarrConfig } from "~/config/schema"
13
- import {
14
- checkJellyseerrPrerequisites,
15
- configureJellyseerrRadarr,
16
- configureJellyseerrSonarr,
17
- createJellyseerrClient,
18
- createSetupContext,
19
- runJellyseerrFullSetup,
20
- syncJellyseerrLibraries,
21
- } from "~/setup"
22
- import { BaseAppSetupScreen } from "~/ui/screens/setup/BaseAppSetupScreen"
23
- import { readEnvSync, writeEnvSync } from "~/utils/env"
24
-
25
- export class JellyseerrSetup extends BaseAppSetupScreen {
26
- private mediaServerType: "jellyfin" | "plex" | null = null
27
- private healthChecked = false
28
- private healthMessage = ""
29
- private healthFg = "#aaaaaa"
30
-
31
- constructor(cliRenderer: CliRenderer, config: EasiarrConfig, onBack: () => void) {
32
- super(cliRenderer, config, onBack)
33
- this.detectMediaServer()
34
- this.checkHealth()
35
- }
36
-
37
- getTitle(): string {
38
- return "Jellyseerr Setup"
39
- }
40
-
41
- getStepInfo(): string {
42
- return "Configure Jellyseerr via API"
43
- }
44
-
45
- getMenuItems(): MenuItem[] {
46
- return [
47
- {
48
- name: "🚀 Run Full Setup",
49
- description: "Configure media server, create admin, and connect *arr apps",
50
- action: () => this.runFullSetup(),
51
- },
52
- {
53
- name: "📚 Sync Libraries",
54
- description: "Sync and enable libraries from media server",
55
- action: () => this.runSyncLibraries(),
56
- },
57
- {
58
- name: "🔗 Configure Radarr",
59
- description: "Connect Radarr for movie requests",
60
- action: () => this.runConfigureRadarr(),
61
- },
62
- {
63
- name: "🔗 Configure Sonarr",
64
- description: "Connect Sonarr for TV show requests",
65
- action: () => this.runConfigureSonarr(),
66
- },
67
- {
68
- name: "↩️ Back",
69
- description: "Return to main menu",
70
- action: () => this.cleanup(),
71
- },
72
- ]
73
- }
74
-
75
- protected getMenuDescription(): string {
76
- return "Select an action:"
77
- }
78
-
79
- // ============================================
80
- // CUSTOM RENDERING - Shows health status above menu
81
- // ============================================
82
-
83
- protected renderCustomContent(): boolean {
84
- if (this.currentStep === "menu") {
85
- // Show health status before menu
86
- if (this.healthChecked && this.healthMessage) {
87
- this.contentBox.add(
88
- new TextRenderable(this.cliRenderer, {
89
- content: this.healthMessage + "\n\n",
90
- fg: this.healthFg,
91
- })
92
- )
93
- }
94
-
95
- // Then render normal menu
96
- this.contentBox.add(
97
- new TextRenderable(this.cliRenderer, {
98
- content: this.getMenuDescription() + "\n\n",
99
- fg: "#aaaaaa",
100
- })
101
- )
102
-
103
- this.getMenuItems().forEach((item, idx) => {
104
- const pointer = idx === this.menuIndex ? "→ " : " "
105
- const fg = idx === this.menuIndex ? "#50fa7b" : "#8be9fd"
106
-
107
- this.contentBox.add(
108
- new TextRenderable(this.cliRenderer, {
109
- content: `${pointer}${item.name}\n`,
110
- fg,
111
- })
112
- )
113
- this.contentBox.add(
114
- new TextRenderable(this.cliRenderer, {
115
- content: ` ${item.description}\n\n`,
116
- fg: "#6272a4",
117
- })
118
- )
119
- })
120
-
121
- return true // Handled
122
- }
123
- return false // Use default for results
124
- }
125
-
126
- // ============================================
127
- // PRIVATE METHODS
128
- // ============================================
129
-
130
- private detectMediaServer(): void {
131
- const jellyfin = this.config.apps.find((a) => a.id === "jellyfin" && a.enabled)
132
- const plex = this.config.apps.find((a) => a.id === "plex" && a.enabled)
133
-
134
- if (jellyfin) this.mediaServerType = "jellyfin"
135
- else if (plex) this.mediaServerType = "plex"
136
- }
137
-
138
- private buildContext(): SetupContext {
139
- const env = readEnvSync()
140
- return createSetupContext(this.config, env, {
141
- onStepStart: (name) => {
142
- this.addOrUpdateResult(name, "configuring")
143
- this.refreshContent()
144
- },
145
- onStepComplete: (step) => {
146
- this.addOrUpdateResult(step.name, step.status as SetupResult["status"], step.message)
147
- this.refreshContent()
148
- },
149
- })
150
- }
151
-
152
- private addOrUpdateResult(name: string, status: SetupResult["status"], message?: string): void {
153
- const existing = this.results.find((r) => r.name === name)
154
- if (existing) {
155
- existing.status = status
156
- existing.message = message
157
- } else {
158
- this.results.push({ name, status, message })
159
- }
160
- }
161
-
162
- private async checkHealth(): Promise<void> {
163
- const ctx = this.buildContext()
164
- const prereq = await checkJellyseerrPrerequisites(ctx)
165
-
166
- if (!prereq.success) {
167
- this.healthMessage = `⚠️ ${prereq.message || "Requirements not met"}`
168
- this.healthFg = "#ff5555"
169
- this.healthChecked = true
170
- this.refreshContent()
171
- return
172
- }
173
-
174
- const client = createJellyseerrClient(ctx)
175
- if (client) {
176
- try {
177
- const isHealthy = await client.isHealthy()
178
- const isInit = isHealthy ? await client.isInitialized() : false
179
-
180
- if (!isHealthy) {
181
- this.healthMessage = "⚠️ Jellyseerr is not reachable. Make sure the container is running."
182
- this.healthFg = "#ffb86c"
183
- } else if (!isInit) {
184
- this.healthMessage = `✨ Jellyseerr needs setup. Will connect to ${this.mediaServerType}.`
185
- this.healthFg = "#50fa7b"
186
- } else {
187
- this.healthMessage = "✓ Jellyseerr is running and configured."
188
- this.healthFg = "#50fa7b"
189
- }
190
- } catch {
191
- // Ignore health check errors
192
- }
193
- }
194
-
195
- this.healthChecked = true
196
- this.refreshContent()
197
- }
198
-
199
- // ============================================
200
- // MENU ACTIONS
201
- // ============================================
202
-
203
- private async runFullSetup(): Promise<void> {
204
- this.currentStep = "running"
205
- this.results = []
206
- this.refreshContent()
207
-
208
- const ctx = this.buildContext()
209
- const result = await runJellyseerrFullSetup(ctx)
210
-
211
- // Save env updates
212
- if (result.envUpdates && Object.keys(result.envUpdates).length > 0) {
213
- const env = readEnvSync()
214
- Object.assign(env, result.envUpdates)
215
- writeEnvSync(env)
216
- }
217
-
218
- this.currentStep = "done"
219
- this.refreshContent()
220
- }
221
-
222
- private async runSyncLibraries(): Promise<void> {
223
- await this.runAction("Sync libraries", async () => {
224
- const ctx = this.buildContext()
225
- return syncJellyseerrLibraries(ctx)
226
- })
227
- }
228
-
229
- private async runConfigureRadarr(): Promise<void> {
230
- await this.runAction("Configure Radarr", async () => {
231
- const ctx = this.buildContext()
232
- return configureJellyseerrRadarr(ctx)
233
- })
234
- }
235
-
236
- private async runConfigureSonarr(): Promise<void> {
237
- await this.runAction("Configure Sonarr", async () => {
238
- const ctx = this.buildContext()
239
- return configureJellyseerrSonarr(ctx)
240
- })
241
- }
242
- }