Socket
Socket
Sign inDemoInstall

magi-cli

Package Overview
Dependencies
Maintainers
7
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magi-cli - npm Package Compare versions

Comparing version 0.9.2 to 0.10.0

bin/magi-release

35

lib/tools.js

@@ -12,5 +12,3 @@ 'use strict';

const asyncExec = require('util').promisify(require('child_process').exec);
/**

@@ -26,2 +24,32 @@ * Runs the command and captures the stdout

const spawn = require('child_process').spawn;
/**
* Runs the command without opening a new shell.
* It prints stdout and stderr at the same time that captures it in
* order to be passed in the resolved promise.
*/
async function exe(cmd, quiet) {
const args = cmd.split(/ +/);
const child = spawn(args[0], args.slice(1));
let out = '';
const capture = data => {
const s = data.toString('utf-8');
!quiet && process.stdout.write(s);
out += s;
};
child.stdout.on('data', capture);
child.stderr.on('data', capture);
return new Promise((resolve, reject) => child.on('exit', async function(code) {
if (code == 0) {
resolve(out);
} else {
reject(`${(quiet ? out : '')}\n!!! ERROR !!! Process '${cmd}' exited with code ${code}`);
}
}));
}
module.exports.exe = exe;
const rl = require('readline').createInterface({

@@ -39,7 +67,6 @@ input: process.stdin,

const path = require('path');
const workingPackage = require(path.resolve(process.cwd(), 'package.json'));
module.exports.workingPackage = workingPackage;
module.exports.elementName = workingPackage.name.replace(/^@vaadin\//, '');
module.exports.elementName = workingPackage.name.replace(/^@.+?\//, '');

@@ -46,0 +73,0 @@ const cliPackageName = require('../package.json').name;

2

package.json
{
"name": "magi-cli",
"version": "0.9.2",
"version": "0.10.0",
"description": "Elements team command-line team member",

@@ -5,0 +5,0 @@ "main": "./bin/magi",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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