fix: Build errors after cleanup
This commit is contained in:
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -54,7 +54,7 @@ jobs:
|
||||
done
|
||||
fi
|
||||
|
||||
printf '%s\n' "${ALL_TAGS[@]}"
|
||||
echo "ALL_TAGS=$(printf '%s\n' "${ALL_TAGS[@]}")" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3
|
||||
|
||||
5
.github/workflows/electron.yml
vendored
5
.github/workflows/electron.yml
vendored
@@ -764,10 +764,11 @@ jobs:
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Get latest release
|
||||
- name: Get latest release tag
|
||||
id: get_release
|
||||
run: |
|
||||
LATEST_RELEASE=$(gh release list --repo ${{ github.repository }} --limit 1 --json tagName,name,isLatest -q '.[0]') env:
|
||||
echo "RELEASE_TAG=$(gh release list --repo ${{ github.repository }} --limit 1 --json tagName -q '.[0].tagName')" >> $GITHUB_ENV
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Display artifact structure
|
||||
|
||||
5520
package-lock.json
generated
5520
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/import Database from "better-sqlite3";
|
||||
import Database from "better-sqlite3";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { databaseLogger } from "./logger.js";
|
||||
|
||||
@@ -23,22 +23,12 @@ class SystemCrypto {
|
||||
const envSecret = process.env.JWT_SECRET;
|
||||
if (envSecret && envSecret.length >= 64) {
|
||||
this.jwtSecret = envSecret;
|
||||
databaseLogger.info("JWT secret loaded from environment variable", {
|
||||
operation: "jwt_init_from_env",
|
||||
secretLength: envSecret.length,
|
||||
secretPrefix: envSecret.substring(0, 8) + "...",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const dataDir = process.env.DATA_DIR || "./db/data";
|
||||
const envPath = path.join(dataDir, ".env");
|
||||
|
||||
databaseLogger.info("Attempting to load JWT secret from .env file", {
|
||||
operation: "jwt_init_from_file",
|
||||
envPath,
|
||||
});
|
||||
|
||||
try {
|
||||
const envContent = await fs.readFile(envPath, "utf8");
|
||||
const jwtMatch = envContent.match(/^JWT_SECRET=(.+)$/m);
|
||||
|
||||
Reference in New Issue
Block a user