refactor: rename environment variables and update related configurations
- Updated environment variable names from JERAPAH_FLOW_* to JFLOW_* for consistency and clarity. - Adjusted database path handling in knexfile.js to reflect the new variable naming. - Modified logging and retention days configurations to use the new variable names. - Ensured that the JWT secret and secrets key checks are aligned with the new naming convention. - Updated workflow test storage prefix to match the new project branding. This refactor enhances the clarity of environment variable usage and aligns with the project's rebranding efforts.
This commit is contained in:
@@ -2,12 +2,8 @@ import fs from "fs";
|
||||
import path from "path";
|
||||
import { DATA_DIR, SERVER_ROOT } from "./paths.js";
|
||||
|
||||
const defaultNew = path.join(DATA_DIR, "jerapah-flow.db");
|
||||
const defaultLegacy = path.join(DATA_DIR, "scrunner.db");
|
||||
const dbPath =
|
||||
process.env.JERAPAH_FLOW_DB_PATH ??
|
||||
process.env.SCRUNNER_DB_PATH ??
|
||||
(fs.existsSync(defaultLegacy) && !fs.existsSync(defaultNew) ? defaultLegacy : defaultNew);
|
||||
process.env.JFLOW_DB_PATH ?? path.join(DATA_DIR, "jerapah-flow.db");
|
||||
fs.mkdirSync(path.dirname(dbPath), { recursive: true });
|
||||
|
||||
/** @type {import("knex").Knex.Config} */
|
||||
|
||||
Reference in New Issue
Block a user