MCPcopy Create free account
hub / github.com/callstack/agent-device / buildScriptGlobals

Function buildScriptGlobals

src/compat/maestro/run-script.ts:124–137  ·  view source on GitHub ↗
(
  env: Record<string, string>,
  output: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

122}
123
124function buildScriptGlobals(
125 env: Record<string, string>,
126 output: Record<string, unknown>,
127): vm.Context {
128 return {
129 ...env,
130 output,
131 json: parseRunScriptJson,
132 http: {
133 post: (url: string, options?: { headers?: Record<string, string>; body?: string }) =>
134 runHttpRequestSync('POST', url, options),
135 },
136 };
137}
138
139function parseRunScriptJson(value: unknown): unknown {
140 if (typeof value !== 'string') {

Callers 1

executeRunScriptFileFunction · 0.85

Calls 1

runHttpRequestSyncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…