diff --git a/server/lib/consts.ts b/server/lib/consts.ts index 3855ce72..2c35427a 100644 --- a/server/lib/consts.ts +++ b/server/lib/consts.ts @@ -2,7 +2,7 @@ import path from "path"; import { fileURLToPath } from "url"; // This is a placeholder value replaced by the build process -export const APP_VERSION = "1.0.0-beta.15"; +export const APP_VERSION = "1.0.0"; export const __FILENAME = fileURLToPath(import.meta.url); export const __DIRNAME = path.dirname(__FILENAME); diff --git a/server/setup/migrations.ts b/server/setup/migrations.ts index 99451797..5ea065d4 100644 --- a/server/setup/migrations.ts +++ b/server/setup/migrations.ts @@ -16,6 +16,7 @@ import m7 from "./scripts/1.0.0-beta10"; import m8 from "./scripts/1.0.0-beta12"; import m13 from "./scripts/1.0.0-beta13"; import m15 from "./scripts/1.0.0-beta15"; +import m16 from "./scripts/1.0.0"; // THIS CANNOT IMPORT ANYTHING FROM THE SERVER // EXCEPT FOR THE DATABASE AND THE SCHEMA @@ -31,7 +32,8 @@ const migrations = [ { version: "1.0.0-beta.10", run: m7 }, { version: "1.0.0-beta.12", run: m8 }, { version: "1.0.0-beta.13", run: m13 }, - { version: "1.0.0-beta.15", run: m15 } + { version: "1.0.0-beta.15", run: m15 }, + { version: "1.0.0", run: m16 } // Add new migrations here as they are created ] as const; diff --git a/server/setup/scripts/1.0.0.ts b/server/setup/scripts/1.0.0.ts new file mode 100644 index 00000000..c82966de --- /dev/null +++ b/server/setup/scripts/1.0.0.ts @@ -0,0 +1,57 @@ +import { APP_PATH } from "@server/lib/consts"; +import fs from "fs"; +import yaml from "js-yaml"; +import path from "path"; +import { z } from "zod"; +import { fromZodError } from "zod-validation-error"; + +const version = "1.0.0"; + +export default async function migration() { + console.log(`Running setup script ${version}...`); + + 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 traefikFileContents = fs.readFileSync(traefikPath, "utf8"); + const traefikConfig = yaml.load(traefikFileContents) as any; + + const parsedConfig = schema.safeParse(traefikConfig); + + if (!parsedConfig.success) { + throw new Error(fromZodError(parsedConfig.error).toString()); + } + + traefikConfig.experimental.plugins.badger.version = "v1.0.0"; + + const updatedTraefikYaml = yaml.dump(traefikConfig); + + fs.writeFileSync(traefikPath, updatedTraefikYaml, "utf8"); + + console.log( + "Updated the version of Badger in your Traefik configuration to 1.0.0" + ); + } catch (e) { + console.log( + "We were unable to update the version of Badger in your Traefik configuration. Please update it manually." + ); + console.error(e); + } + + console.log(`${version} migration complete`); +} diff --git a/src/app/[orgId]/settings/resources/[resourceId]/authentication/page.tsx b/src/app/[orgId]/settings/resources/[resourceId]/authentication/page.tsx index c50afc4d..8f8e584c 100644 --- a/src/app/[orgId]/settings/resources/[resourceId]/authentication/page.tsx +++ b/src/app/[orgId]/settings/resources/[resourceId]/authentication/page.tsx @@ -408,7 +408,7 @@ export default function ResourceAuthenticationPage() { setSsoEnabled(val)} /> diff --git a/src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx b/src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx index fa72dc8d..5178986d 100644 --- a/src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx +++ b/src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx @@ -455,7 +455,7 @@ export default function ReverseProxyTargets(props: { SSL Configuration - Setup SSL to secure your connections with certificates + Set up SSL to secure your connections with certificates @@ -477,7 +477,7 @@ export default function ReverseProxyTargets(props: { Target Configuration - Setup targets to route traffic to your services + Set up targets to route traffic to your services diff --git a/src/app/auth/login/page.tsx b/src/app/auth/login/page.tsx index 118cfcd0..e10c18ce 100644 --- a/src/app/auth/login/page.tsx +++ b/src/app/auth/login/page.tsx @@ -41,7 +41,7 @@ export default async function Page(props: { Looks like you've been invited!

- To accept the invite, you must login or create an + To accept the invite, you must log in or create an account.

diff --git a/src/app/auth/reset-password/ResetPasswordForm.tsx b/src/app/auth/reset-password/ResetPasswordForm.tsx index 5bc525bf..7ddac325 100644 --- a/src/app/auth/reset-password/ResetPasswordForm.tsx +++ b/src/app/auth/reset-password/ResetPasswordForm.tsx @@ -182,7 +182,7 @@ export default function ResetPasswordForm({ return; } - setSuccessMessage("Password reset successfully! Back to login..."); + setSuccessMessage("Password reset successfully! Back to log in..."); setTimeout(() => { if (redirect) { diff --git a/src/app/auth/signup/page.tsx b/src/app/auth/signup/page.tsx index 361cc0db..69e023da 100644 --- a/src/app/auth/signup/page.tsx +++ b/src/app/auth/signup/page.tsx @@ -57,7 +57,7 @@ export default async function Page(props: { Looks like you've been invited!

- To accept the invite, you must login or create an + To accept the invite, you must log in or create an account.

diff --git a/src/app/setup/page.tsx b/src/app/setup/page.tsx index 7966d587..0cb98a5f 100644 --- a/src/app/setup/page.tsx +++ b/src/app/setup/page.tsx @@ -112,7 +112,7 @@ export default function StepperForm() { <> - Setup New Organization + New Organization Create your organization, site, and resources