Comparing version 1.1.0 to 1.1.1
@@ -28,1 +28,9 @@ 'use strict'; | ||
}; | ||
exports.assertDummy = (options) => { | ||
if (!options.dummy) { | ||
throw new Error(`Dummy device ID not set. Set a dummy device ID with a --dummy parameter. | ||
Or save to vinlirc with 'vinli-cli dummy set-current'`); | ||
} | ||
return options; | ||
}; |
@@ -7,2 +7,4 @@ 'use strict'; | ||
exports.isId = (nameOrId) => /^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.test(nameOrId); | ||
exports.search = (nameOrId, field, url, listLabel, appId, secretKey) => { | ||
@@ -28,5 +30,8 @@ return yarp({ | ||
}); | ||
const matchById = _.head(_.filter(distances, _.matches({ id: nameOrId }))); | ||
if (matchById) { | ||
return matchById; | ||
if (exports.isId(nameOrId)) { | ||
const matchById = _.head(_.filter(distances, _.matches({ id: nameOrId }))); | ||
if (matchById) { | ||
return matchById; | ||
} | ||
throw new Error(`No ID match for ${nameOrId}`); | ||
} | ||
@@ -33,0 +38,0 @@ |
@@ -24,1 +24,8 @@ 'use strict'; | ||
}; | ||
exports.assertRoute = (options) => { | ||
if (!options.route) { | ||
throw new Error(`Route ID not set. Set a route ID with a --route parameter.`); | ||
} | ||
return options; | ||
}; |
{ | ||
"name": "vinli-cli", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Vinli Developers don't use web interfaces", | ||
@@ -9,2 +9,3 @@ "preferGlobal": true, | ||
"test": "NODE_ENV=test mocha --recursive -R spec", | ||
"lint": "eslint --quiet bin/* .", | ||
"start": "bin/vinli", | ||
@@ -11,0 +12,0 @@ "perm": "chmod -R a+x ./bin/*" |
Vinli CLI | ||
========= | ||
[![NPM](https://nodei.co/npm/vinli-cli.png?compact=true)](https://nodei.co/npm/vinli-cli/) | ||
[![NPM](https://nodei.co/npm/vinli-cli.png?downloadRank=true)](https://nodei.co/npm/vinli-cli/) | ||
<!-- | ||
@@ -265,3 +265,3 @@ Badge to be added in when there is some stats history: | ||
> vlinli app create --name "My App" | ||
> vinli app create --name "My App" | ||
[prompted for email and password] | ||
@@ -268,0 +268,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126714
48
1412