box-view-cli
Advanced tools
+22
-1
@@ -6,3 +6,4 @@ var open = require('open'), | ||
| module.exports = function (prog) { | ||
| function requestSession(cmd) { | ||
| function validateParams(cmd) { | ||
| var params = {}; | ||
@@ -22,3 +23,20 @@ | ||
| } | ||
| if (cmd.annotations) { | ||
| params['is_annotatable'] = true; | ||
| if (!cmd.authorName) { | ||
| throw new Error('--author-name is required when annotations are enabled'); | ||
| } | ||
| if (!cmd.authorId) { | ||
| throw new Error('--author-id is required when annotations are enabled'); | ||
| } | ||
| params['author_name'] = cmd.authorName || 'Test User'; | ||
| params['author_external_id'] = cmd.authorId || 1; | ||
| } | ||
| return params; | ||
| } | ||
| function requestSession(cmd) { | ||
| var params = validateParams(cmd); | ||
| if (cmd.documentId) { | ||
@@ -53,2 +71,5 @@ debug('session requested with document id "%s"', cmd.documentId); | ||
| ['-T, --disable-text', 'disable text selection'], | ||
| ['-a, --annotations', 'enable annotations'], | ||
| ['-N, --author-name [authorName]', 'annotation author name'], | ||
| ['-A, --author-id [authorId]', 'annotation author id'], | ||
| ['-o, --open', 'open the viewing session URL on success'] | ||
@@ -55,0 +76,0 @@ ], |
+1
-1
| { | ||
| "name": "box-view-cli", | ||
| "version": "0.6.0", | ||
| "version": "0.7.0-annotations", | ||
| "description": "A CLI for Box View API", | ||
@@ -5,0 +5,0 @@ "author": "Cameron Lakenen <lakenen@box.com>", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
22874
3.66%469
3.99%