Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / services / routing / server / applications / system.js
index 3d3abab..5e5f789 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x37fc=['[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','exec','replace','isEmpty','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','body','stringify','validate','./utils','../../../../config/logger','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','error','message','join','info'];(function(_0x4161af,_0x39d7e0){var _0x231a2a=function(_0x2fcb5e){while(--_0x2fcb5e){_0x4161af['push'](_0x4161af['shift']());}};_0x231a2a(++_0x39d7e0);}(_0x37fc,0x199));var _0xc37f=function(_0x213e06,_0x140042){_0x213e06=_0x213e06-0x0;var _0x55f6d8=_0x37fc[_0x213e06];return _0x55f6d8;};'use strict';var schema=require(_0xc37f('0x0'));var sh=require('shelljs');var _=require('lodash');var utils=require(_0xc37f('0x1'));var logger=require(_0xc37f('0x2'))('routing');var system=schema({'command':{'type':_0xc37f('0x3'),'required':!![],'message':_0xc37f('0x4')}});exports['consequence']=function(_0x404098,_0x14fba3){return function(_0x1c41aa){try{var _0x32662f={'command':_0x14fba3[0x0]};var _0x29970c=system['validate'](_0x32662f,{'typecast':!![]});if(_0x29970c['length']){logger[_0xc37f('0x5')]('[%s][SYSTEM]\x20%s',_0x404098,_['map'](_0x29970c,_0xc37f('0x6'))[_0xc37f('0x7')](',\x20'));logger[_0xc37f('0x8')](_0xc37f('0x9'),_0x404098);_0x1c41aa[_0xc37f('0xa')]();}else{var _0x407ece=this;var _0x1e5d0b=utils[_0xc37f('0xb')](_0x14fba3[0x0],this);logger[_0xc37f('0x8')](_0xc37f('0xc'),_0x404098,_0x1e5d0b);sh[_0xc37f('0xd')](_['trim'](_0x1e5d0b),function(_0x176840,_0x20ed0a){logger[_0xc37f('0x8')]('[%s][SYSTEM]\x20result\x20code:\x20%s',_0x404098,_0x176840);if(_0x176840==0x0){var _0x1cc55e=_0x20ed0a[_0xc37f('0xe')](/(\r\n|\n|\r)/gm,'');if(_['isNil'](_0x14fba3[0x1])||_[_0xc37f('0xf')](_0x14fba3[0x1])){logger['info']('[%s][SYSTEM]\x20no\x20variable',_0x404098);_0x407ece['body'][_0x14fba3[0x1]]=_0x1cc55e;}else{logger[_0xc37f('0x8')](_0xc37f('0x10'),_0x404098,_0x14fba3[0x1],_0x1cc55e);_0x407ece[_0xc37f('0x11')][_0x14fba3[0x1]]=_0x1cc55e;}}_0x1c41aa[_0xc37f('0xa')]();});}}catch(_0x30038f){logger['error']('[%s][SYSTEM]\x20%s',_0x404098,_['isObject'](_0x30038f)?JSON[_0xc37f('0x12')](_0x30038f):_0x30038f);logger['info']('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x404098);_0x1c41aa[_0xc37f('0xa')]();}};};
\ No newline at end of file
+var _0x192f=['../../../../config/logger','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','[%s][SYSTEM]\x20%s','map','message','join','info','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','exec','trim','[%s][SYSTEM]\x20result\x20code:\x20%s','replace','isNil','isEmpty','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','error','isObject','stringify','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','validate','lodash'];(function(_0x35d007,_0x132d5c){var _0x5e960f=function(_0x56771c){while(--_0x56771c){_0x35d007['push'](_0x35d007['shift']());}};_0x5e960f(++_0x132d5c);}(_0x192f,0xd6));var _0xf192=function(_0x211a57,_0x181dbf){_0x211a57=_0x211a57-0x0;var _0x306f48=_0x192f[_0x211a57];return _0x306f48;};'use strict';var schema=require(_0xf192('0x0'));var sh=require('shelljs');var _=require(_0xf192('0x1'));var utils=require('./utils');var logger=require(_0xf192('0x2'))('routing');var system=schema({'command':{'type':'string','required':!![],'message':_0xf192('0x3')}});exports[_0xf192('0x4')]=function(_0x1a2945,_0x22d0b0){return function(_0x1df2e1){try{var _0x221f55={'command':_0x22d0b0[0x0]};var _0x5a05b0=system[_0xf192('0x0')](_0x221f55,{'typecast':!![]});if(_0x5a05b0[_0xf192('0x5')]){logger['error'](_0xf192('0x6'),_0x1a2945,_[_0xf192('0x7')](_0x5a05b0,_0xf192('0x8'))[_0xf192('0x9')](',\x20'));logger[_0xf192('0xa')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x1a2945);_0x1df2e1['next']();}else{var _0x3004d1=this;var _0x3389aa=utils[_0xf192('0xb')](_0x22d0b0[0x0],this);logger[_0xf192('0xa')](_0xf192('0xc'),_0x1a2945,_0x3389aa);sh[_0xf192('0xd')](_[_0xf192('0xe')](_0x3389aa),function(_0x1ae751,_0x5be8c7){logger[_0xf192('0xa')](_0xf192('0xf'),_0x1a2945,_0x1ae751);if(_0x1ae751==0x0){var _0x127c90=_0x5be8c7[_0xf192('0x10')](/(\r\n|\n|\r)/gm,'');if(_[_0xf192('0x11')](_0x22d0b0[0x1])||_[_0xf192('0x12')](_0x22d0b0[0x1])){logger[_0xf192('0xa')](_0xf192('0x13'),_0x1a2945);_0x3004d1[_0xf192('0x14')][_0x22d0b0[0x1]]=_0x127c90;}else{logger[_0xf192('0xa')](_0xf192('0x15'),_0x1a2945,_0x22d0b0[0x1],_0x127c90);_0x3004d1[_0xf192('0x14')][_0x22d0b0[0x1]]=_0x127c90;}}_0x1df2e1['next']();});}}catch(_0x1bd912){logger[_0xf192('0x16')]('[%s][SYSTEM]\x20%s',_0x1a2945,_[_0xf192('0x17')](_0x1bd912)?JSON[_0xf192('0x18')](_0x1bd912):_0x1bd912);logger[_0xf192('0xa')](_0xf192('0x19'),_0x1a2945);_0x1df2e1[_0xf192('0x1a')]();}};};
\ No newline at end of file