How to use @comunica/runner - 1 common examples

To help you get started, we’ve selected a few @comunica/runner examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github comunica / comunica / packages / runner-cli / lib / ArgsRunner.ts View on Github external
export function runArgs(configResourceUrl: string, argv: string[], stdin: NodeJS.ReadStream,
                        stdout: NodeJS.WriteStream, stderr: NodeJS.WriteStream, env: NodeJS.ProcessEnv,
                        runnerUri?: string, properties?: ISetupProperties) {
  Setup.run(configResourceUrl, { argv, env, stdin }, runnerUri, properties)
    .then((results: IActorOutputInit[]) => {
      results.forEach((result: IActorOutputInit) => {
        if (result.stdout) {
          result.stdout.on('error', console.error);
          result.stdout.pipe(stdout);
        }
        if (result.stderr) {
          result.stderr.on('error', console.error);
          result.stderr.pipe(stderr);
        }
      });
    })
    .catch(console.error);
}

@comunica/runner

Utility module for Comunica runner modules

MIT
Latest version published 20 days ago

Package Health Score

84 / 100
Full package analysis

Popular @comunica/runner functions