mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-06-25 17:06:24 +00:00
* test: restore Playwright smoke e2e * test: harden e2e smoke setup * test: sync e2e server bindings * test: normalize e2e auth urls
21 lines
458 B
TypeScript
21 lines
458 B
TypeScript
import fs from 'fs';
|
|
import { getRuntimeEnvPath } from './env';
|
|
|
|
export function applyRuntimeEnv() {
|
|
const runtimeEnvPath = getRuntimeEnvPath();
|
|
|
|
if (!fs.existsSync(runtimeEnvPath)) {
|
|
return;
|
|
}
|
|
|
|
const runtimeEnv = JSON.parse(fs.readFileSync(runtimeEnvPath, 'utf8')) as Record<
|
|
string,
|
|
string | undefined
|
|
>;
|
|
|
|
for (const [key, value] of Object.entries(runtimeEnv)) {
|
|
if (value != null) {
|
|
process.env[key] = value;
|
|
}
|
|
}
|
|
}
|