Socket
Socket
Sign inDemoInstall

cox

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cox - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

lib/commands/checkout.js

45

lib/commands/start.js
var path = require('path');
var shell = require('../shell-utils');
var repeater = require('../repeater');
var prompt = require('prompt');
var prompt = require('../prompt-utils');
prompt.start();
prompt.message = prompt.delimiter = '';
module.exports = function(args){
var ticket = args._[1];
console.info( ("You are about to start development for a new ticket " + ticket).warning );
console.info( ("this will void all the uncommited changes in this project and every module").warning );
prompt.get(resetPrompt, function(err, result){
var moveForward = result.reset.match(/^y/i);
if(moveForward){
repeater(command, function(){
});
} else {
console.info('thank you for using cox'.success);
process.exit(0)
}
});

@@ -35,6 +19,2 @@ var command = function(moduleName, moduleRepo, done){

var errors = shell.run([
'git reset --hard',
'git checkout develop',
'git pull origin develop',
'git branch -D ' + ticket,
'git checkout -b' + ticket

@@ -52,13 +32,16 @@ ]);

};
};
var resetPrompt = {
properties: {
reset: {
description: 'are you sure you want to go through with this? (yes/no)'.prompt,
required: true,
pattern: /^(y|n|yes|no)$/i,
message: 'please answer yes or no'
}
}
//[TODO]: PROMISES!!!
require('./reset')(args, function(){
require('./checkout')('develop', function(){
require('./pull')(args, function(){
args.b = ticket;
require('./checkout')(args, function(){
console.info(('\n---------------------------------------------').success);
console.info(('you can now start working on ticket ' + ticket).success);
console.info(('---------------------------------------------\n').success);
});
});
});
});
};

@@ -10,8 +10,8 @@ var shelljs = require('shelljs/global');

// try{
try{
command = require( path.join(__dirname, 'commands', commandName ) );
// } catch(ex){
// console.error(('Error: there is no command ' + commandName + ' in cox').error);
// process.exit(1);
// }
} catch(ex){
console.error(('Error: there is no command ' + commandName + ' in cox').error);
process.exit(1);
}

@@ -18,0 +18,0 @@ command(args);

{
"name": "cox",
"version": "0.4.6",
"version": "0.4.7",
"preferGlobal": "true",

@@ -5,0 +5,0 @@ "description": "git commander for multi-repositories",

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