bionode-sam
Advanced tools
Comparing version 0.0.5 to 1.0.1
28
cli.js
#!/usr/bin/env node | ||
var through = require('through2') | ||
var minimist = require('minimist') | ||
var bionodeSAM = require('./') | ||
var args = process.argv.slice(2) | ||
var args = minimist(process.argv.slice(2)) | ||
var command = args[0] //args.length > 2 ? args.slice(0, args.length-2) : null | ||
var command = args._[0] | ||
var lastArg = args._[args._.length - 1] | ||
var wantsStdin = false | ||
if (lastArg === '-') { | ||
wantsStdin = true | ||
args._.pop() | ||
} | ||
var srdDest | ||
@@ -18,17 +26,15 @@ | ||
process.stdin.setEncoding('utf8'); | ||
if (!process.stdin.isTTY) { | ||
if (wantsStdin) { | ||
process.stdin.setEncoding('utf8'); | ||
process.stdin.on('data', function(data) { | ||
var data = data.trim() | ||
if (data === '') { return } | ||
args.push(data.trim()) | ||
var samStream = sam(args) | ||
args._.push(data.trim()) | ||
var samStream = sam(args._) | ||
samStream.pipe(JSONstringify()).pipe(process.stdout) | ||
samStream.on('error', console.log) | ||
}) | ||
} | ||
else { | ||
var samStream = sam(args) | ||
} else { | ||
var samStream = sam(args._) | ||
samStream.pipe(JSONstringify()).pipe(process.stdout) | ||
@@ -35,0 +41,0 @@ samStream.on('error', console.log) |
{ | ||
"name": "bionode-sam", | ||
"description": "Node.js wrapper for samtools.", | ||
"version": "0.0.5", | ||
"version": "1.0.1", | ||
"homepage": "http://github.com/bionode/bionode-sam", | ||
@@ -15,3 +15,4 @@ "repository": { | ||
"dependencies": { | ||
"through2": "~0.5.1" | ||
"through2": "~0.5.1", | ||
"minimist": "^1.1.0" | ||
}, | ||
@@ -18,0 +19,0 @@ "devDependencies": { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
12851
194
0
2
3
+ Addedminimist@^1.1.0
+ Addedminimist@1.2.8(transitive)