Socket
Socket
Sign inDemoInstall

qcobjects-cli

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcobjects-cli - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

2

package.json
{
"name": "qcobjects-cli",
"version": "0.1.7",
"version": "0.1.8",
"description": "qcobjects cli command line tool",

@@ -5,0 +5,0 @@ "main": "qcobjects-cli.js",

@@ -8,5 +8,35 @@ #!/usr/bin/env node

require('qcobjects');
CONFIG.set('projectPath',`${process.cwd()}/`);
CONFIG.set('private-key-pem','localhost-privkey.pem');
CONFIG.set('private-cert-pem','localhost-cert.pem');
CONFIG.set('domain','localhost');
try {
const _config = require(CONFIG.get('projectPath')+'config.json');
logger.debug('Loading settings from your config.json');
for (var k in _config){
CONFIG.set(k,_config[k]);
}
if (typeof CONFIG.get('backend') != 'undefined'){
global.set('backendAvailable',true);
if (typeof CONFIG.get('basePath') != 'undefined'){
logger.debug(`Changing the current directory: ${process.cwd()}`);
try {
process.chdir(CONFIG.get('basePath'));
logger.debug(`New directory: ${process.cwd()}`);
} catch (err) {
logger.warn(`It was impossible to change the current chdir: ${err}`);
}
}
}
}catch (e){
logger.debug('No config.json file in your project');
}
const { execSync } = require('child_process');
// stderr is sent to stderr of parent process
// you can set options.stdio if you want it to go elsewhere
let stdout = execSync('openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj \'/CN=localhost\' -keyout localhost-privkey.pem -out localhost-cert.pem');
let stdout = execSync('openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj \'/CN='+CONFIG.get('domain')+'\' -keyout '+CONFIG.get('private-key-pem')+' -out '+CONFIG.get('private-cert-pem'));
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