Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lock-verify/cli.js')
-rwxr-xr-xnode_modules/lock-verify/cli.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/lock-verify/cli.js b/node_modules/lock-verify/cli.js
new file mode 100755
index 000000000..2cc5e16ab
--- /dev/null
+++ b/node_modules/lock-verify/cli.js
@@ -0,0 +1,17 @@
+#!/usr/bin/env node
+'use strict'
+require('@iarna/cli')(main)
+ .usage('lock-verify [projectPath]')
+ .help()
+
+const lockVerify = require('./index.js')
+
+function main (opts, check) {
+ return lockVerify(check).then(result => {
+ result.warnings.forEach(w => console.error('Warning:', w))
+ if (!result.status) {
+ result.errors.forEach(e => console.error(e))
+ throw 1
+ }
+ })
+}