Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const request = require('request');
const fs = require('fs');
const chalk = require('chalk');
const ora = require('ora');
const childProcess = require('child_process');
const spinner = ora();
const domain = 'https://www.imgcook.com';
const { homedir } = require('@imgcook/cli-utils');
const userhome = homedir();
const imgcookConfigPath = `${userhome}/.imgcook`;
const imgcookRc = `${imgcookConfigPath}/.imgcookrc`;
const imgcookModules = `${imgcookConfigPath}/imgcook_modules`;
const cliConfig = {
path: imgcookConfigPath,
configFile: imgcookRc,
imgcookModules,
module: {
url: `${domain}/api-open/code-acquire`
}
};
// Post request
const ajaxPost = (url, param) => {
return new Promise(resolve => {
request.post(