2021-10-08 06:24:05 -06:00
|
|
|
const envOption = {
|
|
|
|
onlyQueue: false,
|
|
|
|
onlyServer: false,
|
|
|
|
noDaemons: false,
|
|
|
|
disableClustering: false,
|
|
|
|
verbose: false,
|
|
|
|
withLogTime: false,
|
|
|
|
quiet: false,
|
|
|
|
slow: false,
|
|
|
|
};
|
|
|
|
|
|
|
|
for (const key of Object.keys(envOption) as (keyof typeof envOption)[]) {
|
2023-01-12 21:40:33 -07:00
|
|
|
if (
|
|
|
|
process.env[
|
|
|
|
`MK_${key.replace(/[A-Z]/g, (letter) => `_${letter}`).toUpperCase()}`
|
|
|
|
]
|
|
|
|
)
|
|
|
|
envOption[key] = true;
|
2021-10-08 06:24:05 -06:00
|
|
|
}
|
|
|
|
|
2023-01-12 21:40:33 -07:00
|
|
|
if (process.env.NODE_ENV === "test") envOption.disableClustering = true;
|
|
|
|
if (process.env.NODE_ENV === "test") envOption.quiet = true;
|
|
|
|
if (process.env.NODE_ENV === "test") envOption.noDaemons = true;
|
2021-10-08 06:24:05 -06:00
|
|
|
|
|
|
|
export { envOption };
|