046e10a815119b04818464ecec642c76b0d85dd3
[motion-next.git] / server / config / pm2 / index.js
1 const a849_0x2fa7=['nodeArgs','debug','list','saved','start','node_args','environment','stop','interpreter_args','restart','node','disconnect','interpreter','delete','--inspect','then','connect','Restarted','../config.service','Stopped','connected'];(function(_0x468ae8,_0x2fa741){const _0x28ff41=function(_0x4ef275){while(--_0x4ef275){_0x468ae8['push'](_0x468ae8['shift']());}};_0x28ff41(++_0x2fa741);}(a849_0x2fa7,0xf6));const a849_0x28ff=function(_0x468ae8,_0x2fa741){_0x468ae8=_0x468ae8-0x0;let _0x28ff41=a849_0x2fa7[_0x468ae8];return _0x28ff41;};const _0x3803c8=a849_0x28ff;'use strict';const pm2=require('pm2'),cs=require(_0x3803c8('0x3'))['getConfigService']();function connect(){return new Promise(function(_0x4ef275,_0x57f131){const _0x22044b=a849_0x28ff;return pm2[_0x22044b('0x1')](function(_0x173caa){const _0x2ba5cc=_0x22044b;_0x173caa?_0x57f131(_0x173caa):_0x4ef275(_0x2ba5cc('0x5'));});});}exports['start']=function(_0x1673bc){const _0x317b1c=_0x3803c8;return!(cs['isProduction']||cs['isTest']||cs[_0x317b1c('0xc')]==='vscode_debugger')&&(_0x1673bc[_0x317b1c('0x12')]=_0x317b1c('0x10'),_0x1673bc[_0x317b1c('0xe')]=[_0x317b1c('0x14')],_0x1673bc[_0x317b1c('0xb')]=[_0x317b1c('0x14')],_0x1673bc['interpreterArgs']=[_0x317b1c('0x14')],_0x1673bc[_0x317b1c('0x6')]=[_0x317b1c('0x14')]),connect()[_0x317b1c('0x0')](function(){return new Promise(function(_0x5eb8af,_0x49af19){const _0x23fb24=a849_0x28ff;return pm2[_0x23fb24('0xa')](_0x1673bc,function(_0x52658d,_0x2e3525){const _0x1963f9=_0x23fb24;_0x52658d?_0x49af19(_0x52658d):(pm2[_0x1963f9('0x11')](),_0x5eb8af(_0x2e3525));});});});},exports['stop']=function(_0xc15fcd){const _0x299d4c=_0x3803c8;return connect()[_0x299d4c('0x0')](function(){return new Promise(function(_0x3f68e3,_0x52de2f){const _0x574d8a=a849_0x28ff;return pm2[_0x574d8a('0xd')](_0xc15fcd,function(_0x58aa7b,_0x2e98bd){const _0x217d2e=_0x574d8a;_0x58aa7b?_0x52de2f(_0x58aa7b):(console[_0x217d2e('0x7')](_0x217d2e('0x4'),_0xc15fcd),_0x3f68e3(_0x2e98bd));});});});},exports[_0x3803c8('0xf')]=function(_0xdcc60d){return connect()['then'](function(){return new Promise(function(_0x139526,_0x30959a){const _0x3524aa=a849_0x28ff;return pm2[_0x3524aa('0xf')](_0xdcc60d,function(_0x1ae1f4,_0x4920ea){const _0x37d506=_0x3524aa;_0x1ae1f4?_0x30959a(_0x1ae1f4):(console[_0x37d506('0x7')](_0x37d506('0x2'),_0xdcc60d),_0x139526(_0x4920ea));});});});},exports[_0x3803c8('0x8')]=function(){const _0x26bf93=_0x3803c8;return connect()[_0x26bf93('0x0')](function(){return new Promise(function(_0x481a50,_0x2eebfb){const _0x4dd82a=a849_0x28ff;return pm2[_0x4dd82a('0x8')](function(_0x36069f,_0x1195bc){_0x36069f?_0x2eebfb(_0x36069f):_0x481a50(_0x1195bc);});});});},exports['describe']=function(_0x22f9f6){const _0x118b00=_0x3803c8;return connect()[_0x118b00('0x0')](function(){return new Promise(function(_0x3e439f,_0x5a1b86){return pm2['describe'](_0x22f9f6,function(_0x268562,_0x2bcce7){_0x268562?_0x5a1b86(_0x268562):_0x3e439f(_0x2bcce7);});});});},exports[_0x3803c8('0x13')]=function(_0x1c9114){return connect()['then'](function(){return new Promise(function(_0x76d188,_0x307941){const _0x575e9b=a849_0x28ff;return pm2[_0x575e9b('0x13')](_0x1c9114,function(_0xff63d0,_0xf329e2){const _0xd32e40=_0x575e9b;_0xff63d0?_0x307941(_0xff63d0):(console[_0xd32e40('0x7')]('Stopped\x20and\x20Deleted',_0x1c9114),_0x76d188(_0xf329e2));});});});},exports['dump']=function(){return connect()['then'](function(){return new Promise(function(_0x14cb07,_0x27d0c9){return pm2['dump'](function(_0x5957fd){const _0x4da485=a849_0x28ff;_0x5957fd?_0x27d0c9(_0x5957fd):_0x14cb07(_0x4da485('0x9'));});});});};