@muhammedaksam/easiarr 0.8.4 → 0.9.0
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.
- package/README.md +24 -0
- package/package.json +1 -1
- package/src/api/cloudflare-api.ts +368 -0
- package/src/api/jellyfin-api.ts +1 -1
- package/src/apps/registry.ts +43 -12
- package/src/compose/generator.ts +27 -4
- package/src/compose/index.ts +1 -0
- package/src/compose/templates.ts +5 -0
- package/src/compose/traefik-config.ts +174 -0
- package/src/config/bookmarks-generator.ts +127 -0
- package/src/config/homepage-config.ts +7 -7
- package/src/config/schema.ts +13 -2
- package/src/index.ts +1 -1
- package/src/ui/screens/AppConfigurator.ts +24 -1
- package/src/ui/screens/AppManager.ts +1 -1
- package/src/ui/screens/CloudflaredSetup.ts +758 -0
- package/src/ui/screens/FullAutoSetup.ts +72 -0
- package/src/ui/screens/JellyfinSetup.ts +1 -1
- package/src/ui/screens/MainMenu.ts +45 -1
- package/src/ui/screens/QuickSetup.ts +7 -7
- package/src/ui/screens/SettingsScreen.ts +571 -0
- package/src/utils/browser.ts +26 -0
- package/src/utils/debug.ts +2 -2
- package/src/utils/migrations/1765707135_rename_easiarr_status.ts +90 -0
- package/src/utils/migrations/1765732722_remove_cloudflare_dns_api_token.ts +44 -0
- package/src/utils/migrations.ts +24 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration: remove cloudflare dns api token
|
|
3
|
+
* Removes the unused CLOUDFLARE_DNS_API_TOKEN from .env
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs"
|
|
7
|
+
import { getEnvPath } from "../env"
|
|
8
|
+
import { debugLog } from "../debug"
|
|
9
|
+
|
|
10
|
+
export const name = "remove_cloudflare_dns_api_token"
|
|
11
|
+
|
|
12
|
+
export function up(): boolean {
|
|
13
|
+
debugLog("Migrations", "Running migration: remove_cloudflare_dns_api_token")
|
|
14
|
+
|
|
15
|
+
const envPath = getEnvPath()
|
|
16
|
+
if (!existsSync(envPath)) {
|
|
17
|
+
debugLog("Migrations", ".env file not found, skipping")
|
|
18
|
+
return true
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const content = readFileSync(envPath, "utf-8")
|
|
22
|
+
|
|
23
|
+
// Check if CLOUDFLARE_DNS_API_TOKEN exists
|
|
24
|
+
if (!content.includes("CLOUDFLARE_DNS_API_TOKEN")) {
|
|
25
|
+
debugLog("Migrations", "CLOUDFLARE_DNS_API_TOKEN not found, skipping")
|
|
26
|
+
return true
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Remove the line containing CLOUDFLARE_DNS_API_TOKEN
|
|
30
|
+
const lines = content.split("\n")
|
|
31
|
+
const filtered = lines.filter((line) => !line.startsWith("CLOUDFLARE_DNS_API_TOKEN="))
|
|
32
|
+
const newContent = filtered.join("\n")
|
|
33
|
+
|
|
34
|
+
writeFileSync(envPath, newContent, "utf-8")
|
|
35
|
+
debugLog("Migrations", "Removed CLOUDFLARE_DNS_API_TOKEN from .env")
|
|
36
|
+
|
|
37
|
+
return true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function down(): boolean {
|
|
41
|
+
debugLog("Migrations", "Reverting migration: remove_cloudflare_dns_api_token")
|
|
42
|
+
// No revert needed - the token was unused
|
|
43
|
+
return true
|
|
44
|
+
}
|
package/src/utils/migrations.ts
CHANGED
|
@@ -69,6 +69,30 @@ async function loadMigrations(): Promise<Migration[]> {
|
|
|
69
69
|
debugLog("Migrations", `Failed to load migration: ${e}`)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
try {
|
|
73
|
+
const m1765707135 = await import("./migrations/1765707135_rename_easiarr_status")
|
|
74
|
+
migrations.push({
|
|
75
|
+
timestamp: "1765707135",
|
|
76
|
+
name: m1765707135.name,
|
|
77
|
+
up: m1765707135.up,
|
|
78
|
+
down: m1765707135.down,
|
|
79
|
+
})
|
|
80
|
+
} catch (e) {
|
|
81
|
+
debugLog("Migrations", `Failed to load migration: ${e}`)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
const m1765732722 = await import("./migrations/1765732722_remove_cloudflare_dns_api_token")
|
|
86
|
+
migrations.push({
|
|
87
|
+
timestamp: "1765732722",
|
|
88
|
+
name: m1765732722.name,
|
|
89
|
+
up: m1765732722.up,
|
|
90
|
+
down: m1765732722.down,
|
|
91
|
+
})
|
|
92
|
+
} catch (e) {
|
|
93
|
+
debugLog("Migrations", `Failed to load migration: ${e}`)
|
|
94
|
+
}
|
|
95
|
+
|
|
72
96
|
// Add future migrations here:
|
|
73
97
|
// const m2 = await import("./migrations/1734xxxxxx_xxx")
|
|
74
98
|
// migrations.push({ timestamp: "...", name: m2.name, up: m2.up })
|