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