From d60219ae892a7fb165d46ae3be3c8160d2caf117 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 21 Oct 2026 15:18:18 -0400 Subject: [PATCH] Cant update badger yet --- server/setup/scriptsPg/1.25.0.ts | 78 ++++++++++++++-------------- server/setup/scriptsSqlite/1.25.0.ts | 76 +++++++++++++-------------- src/components/RedirectForm.tsx | 4 +- 3 files changed, 79 insertions(+), 79 deletions(-) diff --git a/server/setup/scriptsPg/1.25.0.ts b/server/setup/scriptsPg/1.25.0.ts index 14ec3d3a2..3f28460bf 100644 --- a/server/setup/scriptsPg/1.25.0.ts +++ b/server/setup/scriptsPg/1.25.0.ts @@ -1,11 +1,11 @@ import { db } from "@server/db/pg/driver"; import { APP_PATH } from "@server/lib/consts"; import { sql } from "drizzle-orm"; -import fs from "fs"; -import * as yaml from "js-yaml"; -import path from "path"; -import z from "zod"; -import { fromZodError } from "zod-validation-error"; +// import fs from "fs"; +// import * as yaml from "js-yaml"; +// import path from "path"; +// import z from "zod"; +// import { fromZodError } from "zod-validation-error"; const version = "1.25.0"; @@ -125,48 +125,48 @@ export default async function migration() { throw e; } - try { - const traefikPath = path.join( - APP_PATH, - "traefik", - "traefik_config.yml" - ); + // try { + // const traefikPath = path.join( + // APP_PATH, + // "traefik", + // "traefik_config.yml" + // ); - const schema = z.object({ - experimental: z.object({ - plugins: z.object({ - badger: z.object({ - moduleName: z.string(), - version: z.string() - }) - }) - }) - }); + // const schema = z.object({ + // experimental: z.object({ + // plugins: z.object({ + // badger: z.object({ + // moduleName: z.string(), + // version: z.string() + // }) + // }) + // }) + // }); - const traefikFileContents = fs.readFileSync(traefikPath, "utf8"); - const traefikConfig = yaml.load(traefikFileContents) as any; + // const traefikFileContents = fs.readFileSync(traefikPath, "utf8"); + // const traefikConfig = yaml.load(traefikFileContents) as any; - const parsedConfig = schema.safeParse(traefikConfig); + // const parsedConfig = schema.safeParse(traefikConfig); - if (!parsedConfig.success) { - throw new Error(fromZodError(parsedConfig.error).toString()); - } + // if (!parsedConfig.success) { + // throw new Error(fromZodError(parsedConfig.error).toString()); + // } - traefikConfig.experimental.plugins.badger.version = "v1.8.0"; + // traefikConfig.experimental.plugins.badger.version = "v1.8.0"; - const updatedTraefikYaml = yaml.dump(traefikConfig); + // const updatedTraefikYaml = yaml.dump(traefikConfig); - fs.writeFileSync(traefikPath, updatedTraefikYaml, "utf8"); + // fs.writeFileSync(traefikPath, updatedTraefikYaml, "utf8"); - console.log( - "Updated the version of Badger in your Traefik configuration to v1.8.0" - ); - } catch (e) { - console.log( - "We were unable to update the version of Badger in your Traefik configuration. Please update it manually. Check the release notes for this version for more information." - ); - console.error(e); - } + // console.log( + // "Updated the version of Badger in your Traefik configuration to v1.8.0" + // ); + // } catch (e) { + // console.log( + // "We were unable to update the version of Badger in your Traefik configuration. Please update it manually. Check the release notes for this version for more information." + // ); + // console.error(e); + // } console.log(`${version} migration complete`); } diff --git a/server/setup/scriptsSqlite/1.25.0.ts b/server/setup/scriptsSqlite/1.25.0.ts index f0279179a..04d20fcc1 100644 --- a/server/setup/scriptsSqlite/1.25.0.ts +++ b/server/setup/scriptsSqlite/1.25.0.ts @@ -1,10 +1,10 @@ import { APP_PATH } from "@server/lib/consts"; import Database from "better-sqlite3"; -import fs from "fs"; -import * as yaml from "js-yaml"; import path from "path"; -import z from "zod"; -import { fromZodError } from "zod-validation-error"; +// import fs from "fs"; +// import * as yaml from "js-yaml"; +// import z from "zod"; +// import { fromZodError } from "zod-validation-error"; const version = "1.25.0"; @@ -136,48 +136,48 @@ export default async function migration() { throw e; } - try { - const traefikPath = path.join( - APP_PATH, - "traefik", - "traefik_config.yml" - ); + // try { + // const traefikPath = path.join( + // APP_PATH, + // "traefik", + // "traefik_config.yml" + // ); - const schema = z.object({ - experimental: z.object({ - plugins: z.object({ - badger: z.object({ - moduleName: z.string(), - version: z.string() - }) - }) - }) - }); + // const schema = z.object({ + // experimental: z.object({ + // plugins: z.object({ + // badger: z.object({ + // moduleName: z.string(), + // version: z.string() + // }) + // }) + // }) + // }); - const traefikFileContents = fs.readFileSync(traefikPath, "utf8"); - const traefikConfig = yaml.load(traefikFileContents) as any; + // const traefikFileContents = fs.readFileSync(traefikPath, "utf8"); + // const traefikConfig = yaml.load(traefikFileContents) as any; - const parsedConfig = schema.safeParse(traefikConfig); + // const parsedConfig = schema.safeParse(traefikConfig); - if (!parsedConfig.success) { - throw new Error(fromZodError(parsedConfig.error).toString()); - } + // if (!parsedConfig.success) { + // throw new Error(fromZodError(parsedConfig.error).toString()); + // } - traefikConfig.experimental.plugins.badger.version = "v1.8.0"; + // traefikConfig.experimental.plugins.badger.version = "v1.8.0"; - const updatedTraefikYaml = yaml.dump(traefikConfig); + // const updatedTraefikYaml = yaml.dump(traefikConfig); - fs.writeFileSync(traefikPath, updatedTraefikYaml, "utf8"); + // fs.writeFileSync(traefikPath, updatedTraefikYaml, "utf8"); - console.log( - "Updated the version of Badger in your Traefik configuration to v1.8.0" - ); - } catch (e) { - console.log( - "We were unable to update the version of Badger in your Traefik configuration. Please update it manually. Check the release notes for this version for more information." - ); - console.error(e); - } + // console.log( + // "Updated the version of Badger in your Traefik configuration to v1.8.0" + // ); + // } catch (e) { + // console.log( + // "We were unable to update the version of Badger in your Traefik configuration. Please update it manually. Check the release notes for this version for more information." + // ); + // console.error(e); + // } console.log(`${version} migration complete`); } diff --git a/src/components/RedirectForm.tsx b/src/components/RedirectForm.tsx index 56846d3bc..1ad513530 100644 --- a/src/components/RedirectForm.tsx +++ b/src/components/RedirectForm.tsx @@ -449,7 +449,7 @@ export default function RedirectForm({ /> - + {/* )} /> - + */} )}