UNPKG

json-processing

Version:

JSON Processing Tool

35 lines (34 loc) 1.24 kB
/// <reference types="node" /> import { NodeVM } from 'vm2'; import requireDir from 'require-dir'; import { Stream } from 'stream'; export declare class ScriptRunner { _input: any; _global: {}; _inlineScript: any; _command: any; _commandArgs: any; _commandsPath: any; constructor(input?: Stream); _createSandbox(): { requireDir: typeof requireDir; __transpileCode: (code: string, filename: string) => string; run: (command: string, input: Stream) => any; from: (path: string) => import("fs").ReadStream; select: (pathOrInput: string | Stream, input: Stream) => import("rxjs").Observable<any>; }; _createVM(): NodeVM; _runScript(script: string, path?: string): any; _transpileCode(code: string, filename: string): string; addGlobal(object: any): this; addGlobalFromPath(path: string): this; setInlineScript(inline: string): this; setCommand(command: string): this; setCommandArgs(args: any): this; setCommandsPath(path: string): this; setPluginsInfo(pluginsInfo: string): this; run(): any; _loadPlugins(pluginsInfo: string): any; _loadPath(path: string): any; _run(command: string, input: Stream): any; }