MCPcopy Create free account
hub / github.com/PalisadoesFoundation/talawa-api / resolvePaths

Function resolvePaths

scripts/setup/envFileManager.ts:53–72  ·  view source on GitHub ↗
(paths?: EnvPaths)

Source from the content-addressed store, hash-verified

51}
52
53function resolvePaths(paths?: EnvPaths): Required<EnvPaths> {
54 const envFile = paths?.envFile ?? DEFAULT_ENV_FILE;
55
56 // For the default env file, keep the canonical names used elsewhere in setup.
57 // For overrides (e.g. .env_test), derive adjacent backup/temp files.
58 const backupFile =
59 paths?.backupFile ??
60 (envFile === DEFAULT_ENV_FILE
61 ? DEFAULT_ENV_BACKUP_FILE
62 : `${envFile}.backup`);
63 const tempFile =
64 paths?.tempFile ??
65 (envFile === DEFAULT_ENV_FILE ? DEFAULT_ENV_TEMP_FILE : `${envFile}.tmp`);
66
67 return {
68 envFile,
69 backupFile,
70 tempFile,
71 };
72}
73
74export async function checkEnvFile(
75 envFile: string = DEFAULT_ENV_FILE,

Callers 2

initializeEnvFileFunction · 0.85
updateEnvVariableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected