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

vizion

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vizion - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

35

lib/identify.js

@@ -8,31 +8,14 @@ var fs = require('fs');

var isGit = function(cb) {
fs.exists(folder+'.git', function(exists) {
async.eachSeries(['git', 'hg', 'svn'],
function(type, callback) {
fs.exists(folder+'.'+type, function(exists) {
if (exists)
return cb('git');
return cb(null);
return callback(type);
else
return callback();
});
}
var isHg = function(cb) {
fs.exists(folder+'.hg', function(exists) {
if (exists)
return cb('hg');
return cb(null);
});
}
var isSvn = function(cb) {
fs.exists(folder+'.svn', function(exists) {
if (exists)
return cb('svn');
return cb(null);
});
}
async.series([isGit, isHg, isSvn], function(err, results) {
if (err !== null)
return cb(err, folder);
return cb('No versioning system found', folder);
},
function(final) {
return cb(final ? final : 'No versioning system found', folder);
});
}

@@ -1,7 +0,10 @@

var hg = require('./hg.js');
var git = require('./git.js');
var svn = require('./svn.js');
var ALL = {};
var vizion = {};
ALL.hg = require('./hg.js');
ALL.git = require('./git.js');
ALL.svn = require('./svn.js');
// Add more revision control tools here
var identify = require('./identify.js');
var vizion = {};

@@ -12,15 +15,8 @@ vizion.analyze = function(argv, cb) {

identify(_folder, function(type, folder) {
if (type === 'git')
return git.parse(folder, cb);
else if (type === 'hg')
return hg.parse(folder, cb);
else if (type === 'svn')
return svn.parse(folder, cb);
if (ALL[type])
return ALL[type].parse(folder, cb);
else
return cb({
msg : type,
path : folder
});
return cb('Error vizion::analyze() for given folder: '+folder);
});
}
};

@@ -31,15 +27,8 @@ vizion.isUpToDate = function(argv, cb) {

identify(_folder, function(type, folder) {
if (type === 'git')
return git.isUpdated(folder, cb);
// else if (type === 'hg')
// return hg.isUpdated(folder, cb);
else if (type === 'svn')
return svn.isUpdated(folder, cb);
if (ALL[type])
return ALL[type].isUpdated(folder, cb);
else
return cb({
msg : type,
path : folder
});
return cb('Error vizion::isUpToDate() for given folder: '+folder);
});
}
};

@@ -50,13 +39,6 @@ vizion.update = function(argv, cb) {

identify(_folder, function(type, folder) {
if (type === 'git')
return git.update(folder, cb);
// else if (type === 'hg')
// return hg.update(folder, cb);
else if (type === 'svn')
return svn.update(folder, cb);
if (ALL[type])
return ALL[type].update(folder, cb);
else
return cb({
msg : type,
path : folder
});
return cb('Error vizion::update() for given folder: '+folder);
});

@@ -73,13 +55,6 @@ }

identify(_folder, function(type, folder) {
if (type === 'git')
return git.revert({folder: folder, revision: rev}, cb);
// else if (type === 'hg')
// return hg.revert({folder: folder, revision: rev}, cb);
// else if (type === 'svn')
// return svn.revert({folder: folder, revision: rev}, cb);
if (ALL[type])
return ALL[type].revert({folder: folder, revision: rev}, cb);
else
return cb({
msg : type,
path : folder
});
return cb('Error vizion::analyze() for given folder: '+folder);
});

@@ -92,13 +67,6 @@ }

identify(_folder, function(type, folder) {
if (type === 'git')
return git.prev(folder, cb);
// else if (type === 'hg')
// return hg.update(folder, cb);
// else if (type === 'svn')
// return svn.update(folder, cb);
if (ALL[type])
return ALL[type].prev(folder, cb);
else
return cb({
msg : type,
path : folder
});
return cb('Error vizion::prev() for given folder: '+folder);
});

@@ -111,13 +79,6 @@ }

identify(_folder, function(type, folder) {
if (type === 'git')
return git.next(folder, cb);
// else if (type === 'hg')
// return hg.update(folder, cb);
// else if (type === 'svn')
// return svn.update(folder, cb);
if (ALL[type])
return ALL[type].next(folder, cb);
else
return cb({
msg : type,
path : folder
});
return cb('Error vizion::next() for given folder: '+folder);
});

@@ -124,0 +85,0 @@ }

{
"name": "vizion",
"version": "0.1.8",
"version": "0.1.9",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=0.10"

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