Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function list (params) {
const { alias, 'add-export': addExports } = params.options;
const { org_id, app_id: appId } = await AppConfig.getAppData(alias).toPromise();
const [envFromApp, envFromAddons, envFromDeps] = await Promise.all([
application.getAllEnvVars({ id: org_id, appId }).then(sendToApi),
application.getAllEnvVarsForAddons({ id: org_id, appId }).then(sendToApi),
application.getAllEnvVarsForDependencies({ id: org_id, appId }).then(sendToApi),
]);
Logger.println('# Manually set env variables');
Logger.println(toNameEqualsValueString(envFromApp, { addExports }));
envFromAddons.forEach((addon) => {
Logger.println('# Addon ' + addon.addon_name);
Logger.println(toNameEqualsValueString(addon.env, { addExports }));
});
envFromDeps.forEach((dep) => {
Logger.println('# Dependency ' + dep.app_name);
Logger.println(toNameEqualsValueString(dep.env, { addExports }));
});
};
envFromAddons.forEach((addon) => {
Logger.println('# Addon ' + addon.addon_name);
Logger.println(toNameEqualsValueString(addon.env, { addExports }));
});