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

composerize

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

composerize - npm Package Compare versions

Comparing version 1.6.6 to 1.6.7

27

cli.js

@@ -5,7 +5,28 @@ #!/usr/bin/env node

const composerize = require('./dist/composerize');
const argv = require('yargs-parser')(process.argv.slice(2), {
configuration: {
'halt-at-non-option': true,
}
});
const command = process.argv.slice(2).join(' ');
const command = argv['_'].join(' ');
if (argv.help || argv.h)
{
console.log(`
Convert a "docker run/create/container run/service create" command to docker-compose file.
An existing docker-compose.yml can be passed to stdin to be merged with provided command line.
Available options:
-f, --format: Docker Compose format (v2x, v3x, latest). Default: latest
-i, --indent: number of space for indentation. Default: 2
Samples:
composerize -i 4 -f v2x docker run -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --restart always --log-opt max-size=1g nginx
`);
process.exit();
}
if (process.stdin.isTTY){
console.log(composerize(command));
console.log(composerize(command, '', argv.format || argv.f || 'latest', argv.indent || argv.i || 2));
}

@@ -17,4 +38,4 @@ else {

}).on('end', function() {
console.log(composerize(command, existingDockerCompose));
console.log(composerize(command, existingDockerCompose, argv.format || argv.f || 'latest', argv.indent || argv.i || 2));
}).setEncoding('utf8');
}

2

package.json
{
"name": "composerize",
"version": "1.6.6",
"version": "1.6.7",
"main": "dist/composerize.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -0,0 +0,0 @@ # composerize

Sorry, the diff of this file is too big to display

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