14 lines
292 B
TypeScript
14 lines
292 B
TypeScript
|
|
import { Config } from './conf';
|
|
|
|
export function build_env_scope(conf: Config) {
|
|
const whitelist = conf.templates?.env ?? [ ];
|
|
const scope: Record<string, string> = Object.create(null);
|
|
|
|
for (const variable of whitelist) {
|
|
scope[variable] = process.env[variable];
|
|
}
|
|
|
|
return scope;
|
|
}
|