MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / prepareSandboxVars

Function prepareSandboxVars

packages/components/src/utils.ts:1013–1033  ·  view source on GitHub ↗
(variables: IVariable[])

Source from the content-addressed store, hash-verified

1011 * @param {IVariable[]} variables
1012 */
1013export const prepareSandboxVars = (variables: IVariable[]) => {
1014 let vars = {}
1015 if (variables) {
1016 for (const item of variables) {
1017 let value = item.value
1018
1019 // read from .env file
1020 if (item.type === 'runtime') {
1021 value = process.env[item.name] ?? ''
1022 }
1023
1024 Object.defineProperty(vars, item.name, {
1025 enumerable: true,
1026 configurable: true,
1027 writable: true,
1028 value: value
1029 })
1030 }
1031 }
1032 return vars
1033}
1034
1035let version: string
1036export const getVersion: () => Promise<{ version: string }> = async () => {

Callers 8

resolveVarsInStringMethod · 0.90
getToolsMethod · 0.90
runConditionFunction · 0.90
getReturnOutputFunction · 0.90
getReturnOutputFunction · 0.90
runConditionFunction · 0.90
getReturnOutputFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected