Sha256: 9e5fe733f0a16449445173f71365caf0d5cff5e0898916f75e8adb04fd82f81c

Contents?: true

Size: 628 Bytes

Versions: 248

Compression:

Stored size: 628 Bytes

Contents

#!/usr/bin/env node

const functionMap = require("../lib");

function output(obj) {
  process.stdout.write(JSON.stringify(obj));
}

const input = [];
process.stdin.on("data", data => input.push(data));
process.stdin.on("end", () => {
  const request = JSON.parse(input.join(""));
  const func = functionMap[request.function];
  if (!func) {
    output({ error: `Invalid function ${request.function}` });
    process.exit(1);
  }

  func
    .apply(null, request.args)
    .then(result => {
      output({ result: result });
    })
    .catch(error => {
      output({ error: error.message });
      process.exit(1);
    });
});

Version data entries

248 entries across 124 versions & 1 rubygems

Version Path
dependabot-npm_and_yarn-0.95.84 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.84 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.83 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.83 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.82 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.82 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.81 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.81 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.80 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.80 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.79 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.79 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.78 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.78 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.77 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.77 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.76 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.76 helpers/yarn/bin/run.js
dependabot-npm_and_yarn-0.95.75 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.95.75 helpers/yarn/bin/run.js