Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async stateChanged({ env, state }) {
const envPath = join(__dirname, ".env.json");
const json = await loadJson(envPath);
if (!json[env]) {
json[env] = {};
}
Object.assign(json[env], await getStateValues(state, envMap));
await writeJson(envPath, json);
}
}
async stateChanged({ env, state }) {
const envPath = join(__dirname, ".env.json");
const json = await loadJson(envPath);
if (!json[env]) {
json[env] = {};
}
Object.assign(json[env], await getStateValues(state, envMap));
await writeJson(envPath, json);
}
}