dependents-editor-backend
Advanced tools
Comparing version 1.12.6 to 1.13.0
@@ -29,2 +29,3 @@ #!/usr/bin/env node | ||
.option('--get-tree', 'get the dependency tree of the current file') | ||
.option('--get-tree-pic [imagePath]', 'get the dependency tree of the current file as a picture') | ||
.option('--get-path', 'get the import form of the current filename') | ||
@@ -31,0 +32,0 @@ |
@@ -11,2 +11,3 @@ var Config = require('./Config'); | ||
var findDrivers = require('taxicab'); | ||
var treePic = require('tree-pic'); | ||
@@ -130,4 +131,3 @@ var q = require('q'); | ||
try { | ||
var results = tree(options); | ||
deferred.resolve(results); | ||
deferred.resolve(tree(options)); | ||
} catch (e) { | ||
@@ -156,4 +156,27 @@ mixpanel.track('Tree_Error', {message: e.message || e}); | ||
} else if (program.getConfig) { | ||
debug('running getConfig'); | ||
deferred.resolve(config.toJSON()); | ||
} else if (program.getTreePic) { | ||
debug('running getTreePic'); | ||
mixpanel.track('Run_Tree_PIc'); | ||
options.requireConfig = options.config; | ||
if (typeof program.getTreePic === 'string') { | ||
options.imagePath = program.getTreePic; | ||
} | ||
treePic(options) | ||
.then(function(imagePath) { | ||
debug('treePic image path: ' + imagePath); | ||
deferred.resolve(imagePath); | ||
}) | ||
.catch(function(error) { | ||
debug('treePic error: ' + error.message); | ||
mixpanel.track('Tree_Pic_Error', {message: error.message}); | ||
deferred.reject(error); | ||
}); | ||
} else { | ||
@@ -160,0 +183,0 @@ deferred.reject('No valid command given'); |
{ | ||
"name": "dependents-editor-backend", | ||
"version": "1.12.6", | ||
"version": "1.13.0", | ||
"description": "The brains behind Dependents editor plugins", | ||
@@ -30,6 +30,9 @@ "main": "lib/cli.js", | ||
"babel": "~5.8.38", | ||
"file-exists": "~1.0.0", | ||
"jscs": "~2.1.0", | ||
"jscs-preset-mrjoelkemp": "~1.0.0", | ||
"jshint": "~2.8.0", | ||
"mocha": "~2.2.5" | ||
"mocha": "~2.2.5", | ||
"os-tmpdir": "~1.0.1", | ||
"rewire": "~2.5.1" | ||
}, | ||
@@ -47,4 +50,5 @@ "dependencies": { | ||
"q": "~1.4.1", | ||
"taxicab": "~2.2.0" | ||
"taxicab": "~2.2.0", | ||
"tree-pic": "~1.0.0" | ||
} | ||
} |
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
12999
327
12
8
+ Addedtree-pic@~1.0.0
+ Addedgraphviz@0.0.8(transitive)
+ Addedtemp@0.4.0(transitive)
+ Addedtree-pic@1.0.1(transitive)