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

machinepack

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

bin/machinepack-add.js

57

bin/machinepack.js
#!/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"
}
}
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