function copyNodeJSCodeTask() { log('building and copying server code into the directory') return webpack_stream(webpack_config) .pipe(dest(`${paths.prod_build}`)) }
mailListener.on("server:disconnected", () => { log(logSymbols.error, `E-Mail listener disconnected. Attempting reconnect...`) setTimeout(() => { mailListener.restart() }, 5* 1000) })
gulp.task('test', function () { return gulp .src('fixtures/test.js') .pipe( tape({ bail: true, nyc: true }) ) .on('error', function (error) { log(error.message) process.exit(1) }) })
/** * Make sure that only one mail is being handled at a time */ function runOneAtATime(mail) { if (runningMailHandler) { setTimeout(runOneAtATime, 100, mail); } else { runningMailHandler = true; handleMail(mail); log(logSymbols.info, 'Listening for new TradeingView notifications...'); runningMailHandler = false; } }
var createRootCA = function() { log(">>> Creating Root CA"); return new Promise(function(resolve, reject) { // Create root key exec('openssl genrsa -aes256 -out root.key.pem -passout pass:' + global.config.ca.root.passphrase + ' 4096', { cwd: pkidir + 'root' }, function() { // Create Root certificate exec('openssl req -config openssl.cnf -key root.key.pem -new -x509 -days ' + global.config.ca.root.days + ' -sha256 -extensions v3_ca -out root.cert.pem -passin pass:' + global.config.ca.root.passphrase, { cwd: pkidir + 'root' }, function() { resolve(); }); }); }); }
function clean() { log('removing the old files in the directory') return del('../prod-build/**', {force:true}); }
var stopServer = function() { ocsp.kill('SIGHUP'); log("OCSP server stopped."); }
function copyReactCodeTask() { log('copying React code into the directory') return src(`${paths.react_src}`) .pipe(dest(`${paths.react_dist}`)); }
function zippingTask() { log('zipping the code ') return src(`${paths.prod_build}/**`) .pipe(zip(`${paths.zipped_file_name}`)) .pipe(dest(`${paths.prod_build}`)) }
rpc.on('ready', () => { log(`Connected to Discord! (${appClient})`); global.intloop = setInterval(checkSpotify, 1500); });
mailListener.on("error", (err) => { log(logSymbols.error, "Mail Listener Error:", err) })