Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

box-view-cli

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

box-view-cli - npm Package Compare versions

Comparing version 0.8.1 to 0.9.0

27

cli/content.js

@@ -9,7 +9,6 @@ var fs = require('fs'),

var extension = cmd.extension || '';
var outputFn;
if (!cmd.output) {
throw new Error('--output (-o) file required');
}
if (cmd.documentId) {

@@ -25,9 +24,15 @@ debug('content requested with document id "%s"', cmd.documentId);

debug('got content (type %s)', extension);
debug('writing to file %s', cmd.output);
var file = fs.createWriteStream(cmd.output);
file.on('finish', function() {
debug('finished writing to file %s', cmd.output);
file.close();
});
res.pipe(file);
if (cmd.output) {
debug('writing to file %s', cmd.output);
var file = fs.createWriteStream(cmd.output);
file.on('finish', function() {
debug('finished writing to file %s', cmd.output);
file.close();
});
res.pipe(file);
} else {
// just send it to stdout
debug('no output file given... writing to stdout');
res.pipe(process.stdout);
}
}

@@ -46,3 +51,3 @@ }

['-e, --extension [extension]', 'the type of content to request (zip, pdf); if empty, get the original document type'],
['-o, --output [file]', 'the name of the file to output data to']
['-o, --output [file]', 'the name of the file to output data to (otherwise stdout)']
],

@@ -49,0 +54,0 @@ actions: [

@@ -9,3 +9,3 @@ var path = require('path'),

if (err) {
output.error(res);
output.error(res.toString());
} else {

@@ -12,0 +12,0 @@ output.log(res);

{
"name": "box-view-cli",
"version": "0.8.1",
"version": "0.9.0",
"description": "A CLI for Box View API",

@@ -5,0 +5,0 @@ "author": "Cameron Lakenen <lakenen@box.com>",

@@ -110,3 +110,3 @@ # Box View API CLI

-e, --extension [extension] the type of content to request (zip, pdf); if empty, get the original document type
-o, --output [file] the name of the file to output data to
-o, --output [file] the name of the file to output data to (otherwise stdout)
```

@@ -113,0 +113,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc