Implement check of newer versions in the list command.

Also:
- Fix some errors not being emitted when a command failed.
- Update semver module; no need to check .valid against null.
This commit is contained in:
André Cruz
2013-07-03 14:37:28 +01:00
parent deee654426
commit 7becb19da4
16 changed files with 199 additions and 87 deletions

View File

@@ -49,6 +49,23 @@ function json2decomposed(key, value) {
return decompose(endpoint);
}
function decomposed2json(decEndpoint) {
var key = decEndpoint.name;
var value = '';
var ret = {};
if (decEndpoint.source !== decEndpoint.name) {
value += decEndpoint.source + '#';
}
value += decEndpoint.target;
ret[key] = value;
return ret;
}
module.exports.decompose = decompose;
module.exports.compose = compose;
module.exports.json2decomposed = json2decomposed;
module.exports.decomposed2json = decomposed2json;