machinepack
Advanced tools
Comparing version 0.0.1 to 1.0.0
#!/usr/bin/env node | ||
/** | ||
@@ -8,49 +7,15 @@ * Module dependencies | ||
var Path = require('path'); | ||
var _ = require('lodash'); | ||
var MachinepackUtils = require('../'); | ||
var program = require('commander'); | ||
var chalk = require('chalk'); | ||
// Arguments | ||
var INPUTS = { | ||
program | ||
.version(require('../package.json').version) | ||
.usage(chalk.gray('[options]')+' '+chalk.bold('<command>')) | ||
.command('ls', 'list machines') | ||
.command('add', 'add a new machine') | ||
.command('rm <identity>', 'delete existing machine') | ||
.command('mv <originalIdentity> <newIdentity>', 'rename machine') | ||
.parse(process.argv); | ||
// `dir` is the path to the machinepack of interest | ||
// (defaults to process.cwd()) | ||
dir: Path.resolve(process.cwd()) | ||
}; | ||
MachinepackUtils.dehydrateMachines({ | ||
dir: INPUTS.dir | ||
}).exec({ | ||
success: function (machines){ | ||
console.log(); | ||
console.log('Machines in "%s":\n', | ||
INPUTS.dir, | ||
(_.map(machines, function (machine){ | ||
return ''+ | ||
' • ' + (machine.friendlyName || machine.identity) + | ||
(machine.description ? ' (' + machine.description + ')' : ''); | ||
})).join('\n') | ||
); | ||
console.log(); | ||
}, | ||
error: function (err){ | ||
console.error('Error listing contents of "%s":', INPUTS.dir); | ||
console.error(err); | ||
return; | ||
} | ||
}); | ||
/* | ||
// for later: | ||
var inquirer = require("inquirer"); | ||
inquirer.prompt([ | ||
//Pass your questions in here | ||
], function( answers ) { | ||
// Use user feedback for... whatever!! | ||
}); | ||
*/ | ||
console.log(program.help()); |
{ | ||
"name": "machinepack", | ||
"version": "0.0.1", | ||
"description": "Library and CLI tool for working with machinepacks", | ||
"main": "index.js", | ||
"version": "1.0.0", | ||
"description": "CLI tool for working with machinepacks and their machines.", | ||
"bin": { | ||
"machinepack": "./bin/machinepack.js" | ||
"machinepack": "./bin/machinepack.js", | ||
"machinepack-add": "./bin/machinepack-add.js", | ||
"machinepack-ls": "./bin/machinepack-ls.js", | ||
"machinepack-mv": "./bin/machinepack-mv.js", | ||
"machinepack-rm": "./bin/machinepack-rm.js" | ||
}, | ||
@@ -14,17 +17,16 @@ "scripts": { | ||
"node-machine", | ||
"utility" | ||
"machinepack", | ||
"machinepacks", | ||
"machines", | ||
"utility", | ||
"cli" | ||
], | ||
"author": "Mike McNeil", | ||
"license": "MIT", | ||
"machinepack": { | ||
"dir": "./lib/", | ||
"machines": [ | ||
"dehydrate-machines" | ||
] | ||
}, | ||
"dependencies": { | ||
"node-machine": "^0.3.0", | ||
"machinepack-fs": "^0.2.0", | ||
"lodash": "^2.4.1" | ||
"lodash": "^2.4.1", | ||
"commander": "^2.5.1", | ||
"machinepack-fs": "^1.5.0", | ||
"chalk": "^0.5.1" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9188
8
256
1
4
1
+ Addedchalk@^0.5.1
+ Addedcommander@^2.5.1
+ Addedansi-regex@0.2.1(transitive)
+ Addedansi-styles@1.1.0(transitive)
+ Addedchalk@0.5.1(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedconvert-to-ecmascript-compatible-varname@0.1.5(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@0.1.0(transitive)
+ Addedmachine@1.3.2(transitive)
+ Addedmachinepack-fs@1.6.5(transitive)
+ Addedrttc@0.2.4(transitive)
+ Addedstrip-ansi@0.3.0(transitive)
+ Addedsupports-color@0.2.0(transitive)
+ Addedswitchback@1.1.3(transitive)
- Removednode-machine@^0.3.0
- Removedlist-directory-contents@0.0.2(transitive)
- Removedmachinepack-fs@0.2.0(transitive)
- Removednode-machine@0.2.40.3.0(transitive)
- Removednode-switchback@0.1.2(transitive)
- Removedpartial-apply@0.1.0(transitive)
Updatedmachinepack-fs@^1.5.0