diff --git a/packages/voidauth/override-frontend-path.patch b/packages/voidauth/override-frontend-path.patch index 0f20e5df..6a035f9b 100644 --- a/packages/voidauth/override-frontend-path.patch +++ b/packages/voidauth/override-frontend-path.patch @@ -1,20 +1,3 @@ -diff --git c/docs/Getting-Started.md w/docs/Getting-Started.md -index 2effedc..7a864a6 100644 ---- c/docs/Getting-Started.md -+++ w/docs/Getting-Started.md -@@ -125,6 +125,7 @@ VoidAuth is configurable primarily by environment variable. The available enviro - | APP_COLOR | `#906bc7` | Theme color, rgb format; ex. #xxyyzz | | ✅ | - | APP_FONT | `monospace` | Font used in the web interface and sent emails. Safe fonts should be used, if a font is missing it will fallback to default. Multiple font families may be chosen in fallback-font format. ex. `APP_FONT: "Tahoma, Verdana, sans-serif"` | | | - | CONTACT_EMAIL | | The email address used for 'Contact' links, which are shown on most end-user pages if this is set. | | | -+| FRONTEND_PATH | | The **absoulute** path from which to serve frontend files, if not set, the default frontend files will be used. | | | - - #### Database Settings - When using the `sqlite` database adapter type, no additional database connection variables are required. You will need a mounted volume to hold the generated `db.sqlite` file, as shown in the SQLite docker compose example above. -@@ -198,4 +199,3 @@ For information on how to change the email templates used for invitations, passw - - ### Multi-Domain Protection - You can secure multiple domains you own by running multiple instances of VoidAuth using the same database. They should have the same **STORAGE_KEY** and **DB_\*** variables, but may otherwise have completely different configurations. The **APP_URL** variables of each would cover a different domain. If the domains you were trying to secure were `example.com` and `your-domain.net` you might set the **APP_URL** variables like `https://auth.example.com` and `https://id.your-domain.net`. These two instances would share everything in the shared DB, including users, OIDC Apps, ProxyAuth Domains, etc. -- diff --git c/server/cli/server.ts w/server/cli/server.ts index f076cf2..39253b0 100644 --- c/server/cli/server.ts @@ -30,7 +13,7 @@ index f076cf2..39253b0 100644 export async function serve() { // Do not wait for theme to generate before starting -@@ -217,7 +219,7 @@ export async function serve() { +@@ -231,7 +231,7 @@ export async function serve() { } next() }, @@ -39,7 +22,7 @@ index f076cf2..39253b0 100644 index: false, fallthrough: true, }), -@@ -272,7 +274,8 @@ export async function serve() { +@@ -283,7 +283,8 @@ export async function serve() { function modifyIndex() { // add APP_TITLE @@ -53,10 +36,10 @@ diff --git c/server/util/config.ts w/server/util/config.ts index 16a3a57..7801278 100644 --- c/server/util/config.ts +++ w/server/util/config.ts -@@ -8,12 +8,16 @@ import { clientUpsertValidator } from '@shared/api-request/admin/ClientUpsert' - import zod from 'zod' +@@ -9,12 +9,16 @@ import zod from 'zod' import type { SecureVersion } from 'node:tls' import { randomBytes } from 'node:crypto' + import { parseDN } from '../ldap/util' +import path from 'node:path' + +const PROCESS_ROOT = path.dirname(process.argv[1] ?? '.') diff --git a/packages/voidauth/package.nix b/packages/voidauth/package.nix index ec0d60a4..fda9aba8 100644 --- a/packages/voidauth/package.nix +++ b/packages/voidauth/package.nix @@ -9,13 +9,13 @@ }: buildNpmPackage (finalAttrs: { pname = "voidauth"; - version = "1.12.5"; + version = "1.13.0"; src = fetchFromGitHub { owner = "voidauth"; repo = "voidauth"; tag = "v${finalAttrs.version}"; - hash = "sha256-FLCD8KRflW9jJ0/igg1kxg/S8JLtGfLZmbVdUZMDGWo="; + hash = "sha256-+F5btbMriLlctKg4uaQ8GF/Fnlp7N4y0SxTyhuxYL+g="; }; # Override frontend path with an environment variable so we don't need to copy it around @@ -41,7 +41,8 @@ buildNpmPackage (finalAttrs: { --replace-fail "path.join('./config'" "path.join('/var/lib/voidauth/config'" substituteInPlace server/db/connection.ts \ - --replace-fail './db' '/var/lib/voidauth/db' + --replace-fail './db' '/var/lib/voidauth/db' \ + --replace-fail "loadExtensions: ['.ts']," "loadExtensions: ['.ts'], directory: $out," # Needed to explicitly deal with installing echo '*' > .npmignore