Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / services / routing / server / applications / system.js
1 const a1214_0x1a3e=['next','string','[%s][SYSTEM]\x20commnad:\x20%s','getMustacheRender','message','join','isEmpty','exec','shelljs','[%s][SYSTEM]\x20no\x20variable','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','length','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','consequence','error','../../../../config/logger','lodash','routing','./utils','isObject','[%s][SYSTEM]\x20%s','[%s][SYSTEM]\x20result\x20code:\x20%s','info','trim','replace','body','stringify'];(function(_0x3924fb,_0x1a3e9a){const _0x5b996a=function(_0x1fb44f){while(--_0x1fb44f){_0x3924fb['push'](_0x3924fb['shift']());}};_0x5b996a(++_0x1a3e9a);}(a1214_0x1a3e,0x16c));const a1214_0x5b99=function(_0x3924fb,_0x1a3e9a){_0x3924fb=_0x3924fb-0x0;let _0x5b996a=a1214_0x1a3e[_0x3924fb];return _0x5b996a;};const _0x1608e6=a1214_0x5b99;'use strict';const schema=require('validate'),sh=require(_0x1608e6('0x16')),_=require(_0x1608e6('0x3')),utils=require(_0x1608e6('0x5')),logger=require(_0x1608e6('0x2'))(_0x1608e6('0x4')),system=schema({'command':{'type':_0x1608e6('0xf'),'required':!![],'message':'command\x20is\x20a\x20string\x20and\x20it\x20is\x20required'}});exports[_0x1608e6('0x0')]=function(_0x1fb44f,_0x31a318){return function(_0x52dc78){const _0x58f75f=a1214_0x5b99;try{const _0x3d9deb={'command':_0x31a318[0x0]},_0x26c0aa=system['validate'](_0x3d9deb,{'typecast':!![]});if(_0x26c0aa[_0x58f75f('0x19')])logger[_0x58f75f('0x1')](_0x58f75f('0x7'),_0x1fb44f,_['map'](_0x26c0aa,_0x58f75f('0x12'))[_0x58f75f('0x13')](',\x20')),logger[_0x58f75f('0x9')](_0x58f75f('0x1a'),_0x1fb44f),_0x52dc78[_0x58f75f('0xe')]();else{const _0x3be6f7=this,_0x59a154=utils[_0x58f75f('0x11')](_0x31a318[0x0],this);logger['info'](_0x58f75f('0x10'),_0x1fb44f,_0x59a154),sh[_0x58f75f('0x15')](_[_0x58f75f('0xa')](_0x59a154),function(_0x23a4a2,_0x260ded){const _0x2981d6=_0x58f75f;logger[_0x2981d6('0x9')](_0x2981d6('0x8'),_0x1fb44f,_0x23a4a2);if(_0x23a4a2==0x0){const _0x1af0ce=_0x260ded[_0x2981d6('0xb')](/(\r\n|\n|\r)/gm,'');_['isNil'](_0x31a318[0x1])||_[_0x2981d6('0x14')](_0x31a318[0x1])?(logger[_0x2981d6('0x9')](_0x2981d6('0x17'),_0x1fb44f),_0x3be6f7[_0x2981d6('0xc')][_0x31a318[0x1]]=_0x1af0ce):(logger['info'](_0x2981d6('0x18'),_0x1fb44f,_0x31a318[0x1],_0x1af0ce),_0x3be6f7[_0x2981d6('0xc')][_0x31a318[0x1]]=_0x1af0ce);}_0x52dc78['next']();});}}catch(_0x590060){logger[_0x58f75f('0x1')](_0x58f75f('0x7'),_0x1fb44f,_[_0x58f75f('0x6')](_0x590060)?JSON[_0x58f75f('0xd')](_0x590060):_0x590060),logger[_0x58f75f('0x9')](_0x58f75f('0x1a'),_0x1fb44f),_0x52dc78[_0x58f75f('0xe')]();}};};