@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,210 +0,0 @@
1
- /**
2
- * Update Checker
3
- * Check GitHub releases for new easiarr versions
4
- */
5
-
6
- import { existsSync, readFileSync, writeFileSync } from "node:fs"
7
-
8
- import { getConfigPath } from "~/utils/paths"
9
- import { VersionInfo } from "~/VersionInfo"
10
-
11
- const GITHUB_REPO = "muhammedaksam/easiarr"
12
- const CACHE_FILE = getConfigPath(".update-cache.json")
13
- const CACHE_DURATION_MS = 24 * 60 * 60 * 1000 // 24 hours
14
-
15
- export interface UpdateInfo {
16
- currentVersion: string
17
- latestVersion: string
18
- updateAvailable: boolean
19
- releaseUrl: string
20
- releaseNotes?: string
21
- publishedAt?: string
22
- }
23
-
24
- interface CachedUpdate {
25
- checkedAt: string
26
- latestVersion: string
27
- releaseUrl: string
28
- releaseNotes?: string
29
- publishedAt?: string
30
- }
31
-
32
- /**
33
- * Get cached update info if still valid
34
- */
35
- function getCachedUpdate(): CachedUpdate | null {
36
- if (!existsSync(CACHE_FILE)) return null
37
-
38
- try {
39
- const content = readFileSync(CACHE_FILE, "utf-8")
40
- const cached = JSON.parse(content) as CachedUpdate
41
-
42
- const checkedAt = new Date(cached.checkedAt).getTime()
43
- const now = Date.now()
44
-
45
- // Cache still valid
46
- if (now - checkedAt < CACHE_DURATION_MS) {
47
- return cached
48
- }
49
- } catch {
50
- // Ignore cache errors
51
- }
52
-
53
- return null
54
- }
55
-
56
- /**
57
- * Save update info to cache
58
- */
59
- function cacheUpdate(info: Omit<CachedUpdate, "checkedAt">): void {
60
- try {
61
- const cached: CachedUpdate = {
62
- ...info,
63
- checkedAt: new Date().toISOString(),
64
- }
65
- writeFileSync(CACHE_FILE, JSON.stringify(cached, null, 2), "utf-8")
66
- } catch {
67
- // Ignore cache write errors
68
- }
69
- }
70
-
71
- /**
72
- * Compare semver versions
73
- * Returns true if v2 is newer than v1
74
- */
75
- function isNewerVersion(v1: string, v2: string): boolean {
76
- const normalize = (v: string) => v.replace(/^v/, "")
77
- const parts1 = normalize(v1).split(".").map(Number)
78
- const parts2 = normalize(v2).split(".").map(Number)
79
-
80
- for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
81
- const p1 = parts1[i] || 0
82
- const p2 = parts2[i] || 0
83
- if (p2 > p1) return true
84
- if (p2 < p1) return false
85
- }
86
-
87
- return false
88
- }
89
-
90
- /**
91
- * Fetch latest release from GitHub API
92
- */
93
- async function fetchLatestRelease(): Promise<{
94
- version: string
95
- url: string
96
- notes?: string
97
- publishedAt?: string
98
- } | null> {
99
- try {
100
- const response = await fetch(`https://api.github.com/repos/${GITHUB_REPO}/releases/latest`, {
101
- headers: {
102
- Accept: "application/vnd.github.v3+json",
103
- "User-Agent": "easiarr-update-checker",
104
- },
105
- })
106
-
107
- if (!response.ok) {
108
- return null
109
- }
110
-
111
- const data = (await response.json()) as {
112
- tag_name: string
113
- html_url: string
114
- body?: string
115
- published_at?: string
116
- }
117
-
118
- return {
119
- version: data.tag_name,
120
- url: data.html_url,
121
- notes: data.body,
122
- publishedAt: data.published_at,
123
- }
124
- } catch {
125
- return null
126
- }
127
- }
128
-
129
- /**
130
- * Check for updates
131
- * Uses cache to avoid repeated API calls
132
- */
133
- export async function checkForUpdates(): Promise<UpdateInfo> {
134
- const currentVersion = VersionInfo.version
135
-
136
- // Check cache first
137
- const cached = getCachedUpdate()
138
- if (cached) {
139
- return {
140
- currentVersion,
141
- latestVersion: cached.latestVersion,
142
- updateAvailable: isNewerVersion(currentVersion, cached.latestVersion),
143
- releaseUrl: cached.releaseUrl,
144
- releaseNotes: cached.releaseNotes,
145
- publishedAt: cached.publishedAt,
146
- }
147
- }
148
-
149
- // Fetch from GitHub
150
- const release = await fetchLatestRelease()
151
-
152
- if (!release) {
153
- return {
154
- currentVersion,
155
- latestVersion: currentVersion,
156
- updateAvailable: false,
157
- releaseUrl: `https://github.com/${GITHUB_REPO}/releases`,
158
- }
159
- }
160
-
161
- // Cache the result
162
- cacheUpdate({
163
- latestVersion: release.version,
164
- releaseUrl: release.url,
165
- releaseNotes: release.notes,
166
- publishedAt: release.publishedAt,
167
- })
168
-
169
- return {
170
- currentVersion,
171
- latestVersion: release.version,
172
- updateAvailable: isNewerVersion(currentVersion, release.version),
173
- releaseUrl: release.url,
174
- releaseNotes: release.notes,
175
- publishedAt: release.publishedAt,
176
- }
177
- }
178
-
179
- /**
180
- * Force refresh update check (ignores cache)
181
- */
182
- export async function forceCheckForUpdates(): Promise<UpdateInfo> {
183
- const currentVersion = VersionInfo.version
184
- const release = await fetchLatestRelease()
185
-
186
- if (!release) {
187
- return {
188
- currentVersion,
189
- latestVersion: currentVersion,
190
- updateAvailable: false,
191
- releaseUrl: `https://github.com/${GITHUB_REPO}/releases`,
192
- }
193
- }
194
-
195
- cacheUpdate({
196
- latestVersion: release.version,
197
- releaseUrl: release.url,
198
- releaseNotes: release.notes,
199
- publishedAt: release.publishedAt,
200
- })
201
-
202
- return {
203
- currentVersion,
204
- latestVersion: release.version,
205
- updateAvailable: isNewerVersion(currentVersion, release.version),
206
- releaseUrl: release.url,
207
- releaseNotes: release.notes,
208
- publishedAt: release.publishedAt,
209
- }
210
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * URL Utilities
3
- * Functions for generating app URLs based on Traefik configuration
4
- */
5
-
6
- import type { EasiarrConfig } from "~/config/schema"
7
- import { getLocalIp } from "./env"
8
-
9
- /**
10
- * Get the local URL for an app (http://LOCAL_IP:PORT)
11
- */
12
- export function getLocalAppUrl(port: number): string {
13
- const localIp = getLocalIp()
14
- return `http://${localIp}:${port}`
15
- }
16
-
17
- /**
18
- * Get the external URL for an app (https://APP.DOMAIN)
19
- * Returns null if Traefik is not enabled
20
- */
21
- export function getExternalAppUrl(appId: string, config: EasiarrConfig): string | null {
22
- if (!config.traefik?.enabled || !config.traefik.domain) {
23
- return null
24
- }
25
- return `https://${appId}.${config.traefik.domain}`
26
- }
27
-
28
- /**
29
- * Get the appropriate applicationUrl based on Traefik status
30
- * Returns external URL if Traefik enabled, otherwise local URL
31
- */
32
- export function getApplicationUrl(appId: string, port: number, config: EasiarrConfig): string {
33
- const externalUrl = getExternalAppUrl(appId, config)
34
- if (externalUrl) {
35
- return externalUrl
36
- }
37
- return getLocalAppUrl(port)
38
- }