Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / services / routing / server / applications / system.js
index 63f41fd..72e290e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c4f=['[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','[%s][SYSTEM]\x20%s','isObject','stringify','validate','shelljs','lodash','../../../../config/logger','routing','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','error','map','message','join','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','getMustacheRender','info','trim','[%s][SYSTEM]\x20result\x20code:\x20%s','replace','isEmpty'];(function(_0x4d5c1c,_0x528c84){var _0xece11a=function(_0x536832){while(--_0x536832){_0x4d5c1c['push'](_0x4d5c1c['shift']());}};_0xece11a(++_0x528c84);}(_0x1c4f,0x1f4));var _0xf1c4=function(_0x4b3eb0,_0x24fb3b){_0x4b3eb0=_0x4b3eb0-0x0;var _0x352a69=_0x1c4f[_0x4b3eb0];return _0x352a69;};'use strict';var schema=require(_0xf1c4('0x0'));var sh=require(_0xf1c4('0x1'));var _=require(_0xf1c4('0x2'));var utils=require('./utils');var logger=require(_0xf1c4('0x3'))(_0xf1c4('0x4'));var system=schema({'command':{'type':'string','required':!![],'message':_0xf1c4('0x5')}});exports[_0xf1c4('0x6')]=function(_0x3e3ba9,_0x5f4827){return function(_0x2ca074){try{var _0xedb6c9={'command':_0x5f4827[0x0]};var _0x7ba7d1=system[_0xf1c4('0x0')](_0xedb6c9,{'typecast':!![]});if(_0x7ba7d1[_0xf1c4('0x7')]){logger[_0xf1c4('0x8')]('[%s][SYSTEM]\x20%s',_0x3e3ba9,_[_0xf1c4('0x9')](_0x7ba7d1,_0xf1c4('0xa'))[_0xf1c4('0xb')](',\x20'));logger['info'](_0xf1c4('0xc'),_0x3e3ba9);_0x2ca074[_0xf1c4('0xd')]();}else{var _0x1f7c5b=this;var _0x1b96ee=utils[_0xf1c4('0xe')](_0x5f4827[0x0],this);logger[_0xf1c4('0xf')]('[%s][SYSTEM]\x20commnad:\x20%s',_0x3e3ba9,_0x1b96ee);sh['exec'](_[_0xf1c4('0x10')](_0x1b96ee),function(_0x881426,_0x3206d4){logger[_0xf1c4('0xf')](_0xf1c4('0x11'),_0x3e3ba9,_0x881426);if(_0x881426==0x0){var _0x2f7302=_0x3206d4[_0xf1c4('0x12')](/(\r\n|\n|\r)/gm,'');if(_['isNil'](_0x5f4827[0x1])||_[_0xf1c4('0x13')](_0x5f4827[0x1])){logger['info'](_0xf1c4('0x14'),_0x3e3ba9);_0x1f7c5b[_0xf1c4('0x15')][_0x5f4827[0x1]]=_0x2f7302;}else{logger[_0xf1c4('0xf')](_0xf1c4('0x16'),_0x3e3ba9,_0x5f4827[0x1],_0x2f7302);_0x1f7c5b[_0xf1c4('0x15')][_0x5f4827[0x1]]=_0x2f7302;}}_0x2ca074[_0xf1c4('0xd')]();});}}catch(_0x30efff){logger[_0xf1c4('0x8')](_0xf1c4('0x17'),_0x3e3ba9,_[_0xf1c4('0x18')](_0x30efff)?JSON[_0xf1c4('0x19')](_0x30efff):_0x30efff);logger['info'](_0xf1c4('0xc'),_0x3e3ba9);_0x2ca074['next']();}};};
\ No newline at end of file
+var _0xa243=['../../../../config/logger','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','length','map','join','info','next','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','exec','[%s][SYSTEM]\x20result\x20code:\x20%s','replace','isNil','isEmpty','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','error','[%s][SYSTEM]\x20%s','isObject','stringify','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','validate','shelljs','./utils'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa243,0x19d));var _0x3a24=function(_0x5b43ea,_0x5afa05){_0x5b43ea=_0x5b43ea-0x0;var _0x504339=_0xa243[_0x5b43ea];return _0x504339;};'use strict';var schema=require(_0x3a24('0x0'));var sh=require(_0x3a24('0x1'));var _=require('lodash');var utils=require(_0x3a24('0x2'));var logger=require(_0x3a24('0x3'))('routing');var system=schema({'command':{'type':_0x3a24('0x4'),'required':!![],'message':_0x3a24('0x5')}});exports['consequence']=function(_0x40cd57,_0x5edcdf){return function(_0x41a232){try{var _0x3d8646={'command':_0x5edcdf[0x0]};var _0x384882=system['validate'](_0x3d8646,{'typecast':!![]});if(_0x384882[_0x3a24('0x6')]){logger['error']('[%s][SYSTEM]\x20%s',_0x40cd57,_[_0x3a24('0x7')](_0x384882,'message')[_0x3a24('0x8')](',\x20'));logger[_0x3a24('0x9')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x40cd57);_0x41a232[_0x3a24('0xa')]();}else{var _0x431d3c=this;var _0x82b1c9=utils[_0x3a24('0xb')](_0x5edcdf[0x0],this);logger[_0x3a24('0x9')](_0x3a24('0xc'),_0x40cd57,_0x82b1c9);sh[_0x3a24('0xd')](_['trim'](_0x82b1c9),function(_0x4e12f1,_0x3683f6){logger[_0x3a24('0x9')](_0x3a24('0xe'),_0x40cd57,_0x4e12f1);if(_0x4e12f1==0x0){var _0x2964d7=_0x3683f6[_0x3a24('0xf')](/(\r\n|\n|\r)/gm,'');if(_[_0x3a24('0x10')](_0x5edcdf[0x1])||_[_0x3a24('0x11')](_0x5edcdf[0x1])){logger['info'](_0x3a24('0x12'),_0x40cd57);_0x431d3c[_0x3a24('0x13')][_0x5edcdf[0x1]]=_0x2964d7;}else{logger[_0x3a24('0x9')](_0x3a24('0x14'),_0x40cd57,_0x5edcdf[0x1],_0x2964d7);_0x431d3c[_0x3a24('0x13')][_0x5edcdf[0x1]]=_0x2964d7;}}_0x41a232['next']();});}}catch(_0x190dbd){logger[_0x3a24('0x15')](_0x3a24('0x16'),_0x40cd57,_[_0x3a24('0x17')](_0x190dbd)?JSON[_0x3a24('0x18')](_0x190dbd):_0x190dbd);logger[_0x3a24('0x9')](_0x3a24('0x19'),_0x40cd57);_0x41a232[_0x3a24('0xa')]();}};};
\ No newline at end of file