Sha256: 2683643b18fd3627e259c28f61e64152e468b5e2a92e27caf0fe7ce1c9418420

Contents?: true

Size: 956 Bytes

Versions: 107

Compression:

Stored size: 956 Bytes

Contents

const updater = require("../lib/updater");
const peerDependencyChecker = require("../lib/peer-dependency-checker");
const subdependencyUpdater = require("../lib/subdependency-updater");

const functionMap = {
  update: updater.updateDependencyFiles,
  updateSubdependency: subdependencyUpdater.updateDependencyFile,
  checkPeerDependencies: peerDependencyChecker.checkPeerDependencies
};

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

107 entries across 107 versions & 2 rubygems

Version Path
dependabot-npm_and_yarn-0.91.8 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.91.7 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.91.6 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.91.5 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.91.4 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.91.3 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.91.2 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.91.1 helpers/npm/bin/run.js
dependabot-npm_and_yarn-0.91.0 helpers/npm/bin/run.js
dependabot-core-0.90.7 helpers/npm/bin/run.js
dependabot-core-0.90.6 helpers/npm/bin/run.js
dependabot-core-0.90.5 helpers/npm/bin/run.js
dependabot-core-0.90.4 helpers/npm/bin/run.js
dependabot-core-0.90.3 helpers/npm/bin/run.js
dependabot-core-0.90.2 helpers/npm/bin/run.js
dependabot-core-0.90.1 helpers/npm/bin/run.js
dependabot-core-0.90.0 helpers/npm/bin/run.js
dependabot-core-0.89.5 helpers/npm/bin/run.js
dependabot-core-0.89.4 helpers/npm/bin/run.js
dependabot-core-0.89.3 helpers/npm/bin/run.js