add global environment variable feature

This commit is contained in:
Hiroyasu Nishiyama
2022-11-04 18:42:51 +09:00
parent 7da3773f7f
commit f23d0480e4
18 changed files with 460 additions and 3 deletions

View File

@@ -777,6 +777,16 @@ const flowAPI = {
}
function getGlobalConfig() {
let gconf = null;
eachNode((n) => {
if (n.type === "global-config") {
gconf = n;
}
});
return gconf;
}
module.exports = {
init: init,
@@ -790,6 +800,9 @@ module.exports = {
get:getNode,
eachNode: eachNode,
getGlobalConfig: getGlobalConfig,
/**
* Gets the current flow configuration
*/