Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / services / routing / server / applications / system.js
index 5e5f789..e96f607 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x4ea2=['join','info','[%s][SYSTEM]\x20commnad:\x20%s','trim','replace','isEmpty','[%s][SYSTEM]\x20no\x20variable','body','isObject','next','validate','shelljs','lodash','./utils','../../../../config/logger','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','error','[%s][SYSTEM]\x20%s','map','message'];(function(_0x34373d,_0x1c2910){var _0x3bd00c=function(_0x564722){while(--_0x564722){_0x34373d['push'](_0x34373d['shift']());}};_0x3bd00c(++_0x1c2910);}(_0x4ea2,0x15a));var _0x24ea=function(_0x3b3f4f,_0x403216){_0x3b3f4f=_0x3b3f4f-0x0;var _0x174dbe=_0x4ea2[_0x3b3f4f];return _0x174dbe;};'use strict';var schema=require(_0x24ea('0x0'));var sh=require(_0x24ea('0x1'));var _=require(_0x24ea('0x2'));var utils=require(_0x24ea('0x3'));var logger=require(_0x24ea('0x4'))(_0x24ea('0x5'));var system=schema({'command':{'type':_0x24ea('0x6'),'required':!![],'message':_0x24ea('0x7')}});exports[_0x24ea('0x8')]=function(_0x7314a6,_0x4c6e8c){return function(_0x3047ca){try{var _0x581387={'command':_0x4c6e8c[0x0]};var _0x734683=system[_0x24ea('0x0')](_0x581387,{'typecast':!![]});if(_0x734683[_0x24ea('0x9')]){logger[_0x24ea('0xa')](_0x24ea('0xb'),_0x7314a6,_[_0x24ea('0xc')](_0x734683,_0x24ea('0xd'))[_0x24ea('0xe')](',\x20'));logger[_0x24ea('0xf')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x7314a6);_0x3047ca['next']();}else{var _0x3ba94e=this;var _0x27612f=utils['getMustacheRender'](_0x4c6e8c[0x0],this);logger[_0x24ea('0xf')](_0x24ea('0x10'),_0x7314a6,_0x27612f);sh['exec'](_[_0x24ea('0x11')](_0x27612f),function(_0x4b766b,_0x4d04c4){logger['info']('[%s][SYSTEM]\x20result\x20code:\x20%s',_0x7314a6,_0x4b766b);if(_0x4b766b==0x0){var _0x2f96af=_0x4d04c4[_0x24ea('0x12')](/(\r\n|\n|\r)/gm,'');if(_['isNil'](_0x4c6e8c[0x1])||_[_0x24ea('0x13')](_0x4c6e8c[0x1])){logger['info'](_0x24ea('0x14'),_0x7314a6);_0x3ba94e[_0x24ea('0x15')][_0x4c6e8c[0x1]]=_0x2f96af;}else{logger[_0x24ea('0xf')]('[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s',_0x7314a6,_0x4c6e8c[0x1],_0x2f96af);_0x3ba94e[_0x24ea('0x15')][_0x4c6e8c[0x1]]=_0x2f96af;}}_0x3047ca['next']();});}}catch(_0x17f339){logger[_0x24ea('0xa')](_0x24ea('0xb'),_0x7314a6,_[_0x24ea('0x16')](_0x17f339)?JSON['stringify'](_0x17f339):_0x17f339);logger[_0x24ea('0xf')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x7314a6);_0x3047ca[_0x24ea('0x17')]();}};};
\ No newline at end of file