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

Function createCodeExecutionSandbox

packages/components/src/utils.ts:1819–1839  ·  view source on GitHub ↗
(
    input: string,
    variables: IVariable[],
    flow: ICommonObject,
    additionalSandbox: ICommonObject = {}
)

Source from the content-addressed store, hash-verified

1817 * @returns {ICommonObject} - The sandbox object
1818 */
1819export const createCodeExecutionSandbox = (
1820 input: string,
1821 variables: IVariable[],
1822 flow: ICommonObject,
1823 additionalSandbox: ICommonObject = {}
1824): ICommonObject => {
1825 const sandbox: ICommonObject = {
1826 $input: input,
1827 util: undefined,
1828 Symbol: undefined,
1829 child_process: undefined,
1830 fs: undefined,
1831 process: undefined,
1832 ...additionalSandbox
1833 }
1834
1835 sandbox['$vars'] = prepareSandboxVars(variables)
1836 sandbox['$flow'] = flow
1837
1838 return sandbox
1839}
1840
1841/**
1842 * Process template variables in state object, replacing {{ output }} and {{ output.property }} patterns

Callers 15

_callMethod · 0.90
_callMethod · 0.90
_callMethod · 0.90
_callMethod · 0.90
checkMessageHistoryFunction · 0.90
executeFuncMethod · 0.90
runConditionFunction · 0.90
getReturnOutputFunction · 0.90
getReturnOutputFunction · 0.90
initMethod · 0.90
runConditionFunction · 0.90
executeFuncMethod · 0.90

Calls 1

prepareSandboxVarsFunction · 0.85

Tested by

no test coverage detected