MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / envInfo

Function envInfo

deployments/desktop/static/desktop.js:4803–4817  ·  view source on GitHub ↗
(env, key, fallback = "", aliases = [])

Source from the content-addressed store, hash-verified

4801 }
4802
4803 function envInfo(env, key, fallback = "", aliases = []) {
4804 const candidates = [key, ...aliases];
4805 const actualKey = candidates.find((candidate) => {
4806 const item = env[candidate];
4807 return item && (item.present || item.value);
4808 }) || candidates.find((candidate) => env[candidate]);
4809 const item = env[actualKey] || { key, value: fallback, is_secret: false, present: Boolean(fallback) };
4810 const value = item.value || fallback || "";
4811 return {
4812 key: actualKey || key,
4813 value,
4814 isSecret: Boolean(item.is_secret || item.masked),
4815 present: Boolean(item.present || value || fallback)
4816 };
4817 }
4818
4819 function setEnvFieldValue(id, env, key, fallback = "", aliases = []) {
4820 const input = $(id);

Callers 4

setEnvFieldValueFunction · 0.85
updateSourceAuthStatusFunction · 0.85
envRowFunction · 0.85
renderSettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected