renovate
Version:
Automated dependency updates. Flexible so you don't need to be.
31 lines (30 loc) • 661 B
JavaScript
import { get, set } from "./cache/memory/index.js";
//#region lib/util/env.ts
let customEnv = {};
function setCustomEnv(envObj) {
customEnv = envObj;
}
function getCustomEnv() {
return customEnv;
}
function setUserEnv(envObj) {
set("userEnv", envObj);
}
function getUserEnv() {
return get("userEnv") ?? {};
}
/**
* Combination of process.env, customEnvVariables and user configured env
*
* Precedence: userEnv > customEnvVariables > process.env
*/
function getEnv() {
return {
...process.env,
...getCustomEnv(),
...getUserEnv()
};
}
//#endregion
export { getCustomEnv, getEnv, getUserEnv, setCustomEnv, setUserEnv };
//# sourceMappingURL=env.js.map