UNPKG

run-on-ssh

Version:

Run a node.js script on a given ssh server

15 lines (14 loc) 526 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getSnapshot; function getSnapshot(client) { return client.getPaged('/images', 'images', function (image) { return image.distribution === 'CentOS' && image.public === true && /^\d+\.\d+ x64$/.test(image.name) || image.name === name && image.public === false; }).then(function (images) { return images.reduce(function (current, next) { return next.slug > current.slug ? next : current; }, images[0]); }); }