Built motion from commit a679711e.|2.6.15
[motion2.git] / server / services / routing / server / applications / system.js
index 6bb27a2..9a1555c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a72=['error','map','message','join','info','next','[%s][SYSTEM]\x20commnad:\x20%s','exec','[%s][SYSTEM]\x20result\x20code:\x20%s','isNil','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','[%s][SYSTEM]\x20%s','isObject','stringify','validate','shelljs','lodash','../../../../config/logger','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length'];(function(_0x4f0b7d,_0x515942){var _0x599cf3=function(_0x496712){while(--_0x496712){_0x4f0b7d['push'](_0x4f0b7d['shift']());}};_0x599cf3(++_0x515942);}(_0x6a72,0x118));var _0x26a7=function(_0x3768f3,_0x4a40f1){_0x3768f3=_0x3768f3-0x0;var _0x526a13=_0x6a72[_0x3768f3];return _0x526a13;};'use strict';var schema=require(_0x26a7('0x0'));var sh=require(_0x26a7('0x1'));var _=require(_0x26a7('0x2'));var utils=require('./utils');var logger=require(_0x26a7('0x3'))('routing');var system=schema({'command':{'type':_0x26a7('0x4'),'required':!![],'message':_0x26a7('0x5')}});exports[_0x26a7('0x6')]=function(_0x113515,_0x3c326e){return function(_0x3f8f56){try{var _0x4751bb={'command':_0x3c326e[0x0]};var _0x27c9b0=system['validate'](_0x4751bb,{'typecast':!![]});if(_0x27c9b0[_0x26a7('0x7')]){logger[_0x26a7('0x8')]('[%s][SYSTEM]\x20%s',_0x113515,_[_0x26a7('0x9')](_0x27c9b0,_0x26a7('0xa'))[_0x26a7('0xb')](',\x20'));logger[_0x26a7('0xc')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x113515);_0x3f8f56[_0x26a7('0xd')]();}else{var _0x28115a=this;var _0x4a639f=utils['getMustacheRender'](_0x3c326e[0x0],this);logger[_0x26a7('0xc')](_0x26a7('0xe'),_0x113515,_0x4a639f);sh[_0x26a7('0xf')](_['trim'](_0x4a639f),function(_0x1d16e1,_0x3460ca){logger[_0x26a7('0xc')](_0x26a7('0x10'),_0x113515,_0x1d16e1);if(_0x1d16e1==0x0){var _0x193766=_0x3460ca['replace'](/(\r\n|\n|\r)/gm,'');if(_[_0x26a7('0x11')](_0x3c326e[0x1])||_['isEmpty'](_0x3c326e[0x1])){logger[_0x26a7('0xc')](_0x26a7('0x12'),_0x113515);_0x28115a[_0x26a7('0x13')][_0x3c326e[0x1]]=_0x193766;}else{logger[_0x26a7('0xc')](_0x26a7('0x14'),_0x113515,_0x3c326e[0x1],_0x193766);_0x28115a[_0x26a7('0x13')][_0x3c326e[0x1]]=_0x193766;}}_0x3f8f56[_0x26a7('0xd')]();});}}catch(_0x399795){logger[_0x26a7('0x8')](_0x26a7('0x15'),_0x113515,_[_0x26a7('0x16')](_0x399795)?JSON[_0x26a7('0x17')](_0x399795):_0x399795);logger[_0x26a7('0xc')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x113515);_0x3f8f56[_0x26a7('0xd')]();}};};
\ No newline at end of file
+var _0x0fbb=['body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','next','stringify','validate','shelljs','lodash','./utils','../../../../config/logger','routing','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','length','error','[%s][SYSTEM]\x20%s','map','message','join','info','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','exec','trim','[%s][SYSTEM]\x20result\x20code:\x20%s','replace','isNil','isEmpty'];(function(_0x5416db,_0x55683a){var _0x243e35=function(_0x1eb623){while(--_0x1eb623){_0x5416db['push'](_0x5416db['shift']());}};_0x243e35(++_0x55683a);}(_0x0fbb,0x17e));var _0xb0fb=function(_0x457672,_0x5d3cb3){_0x457672=_0x457672-0x0;var _0x10f577=_0x0fbb[_0x457672];return _0x10f577;};'use strict';var schema=require(_0xb0fb('0x0'));var sh=require(_0xb0fb('0x1'));var _=require(_0xb0fb('0x2'));var utils=require(_0xb0fb('0x3'));var logger=require(_0xb0fb('0x4'))(_0xb0fb('0x5'));var system=schema({'command':{'type':'string','required':!![],'message':_0xb0fb('0x6')}});exports['consequence']=function(_0x139dd8,_0x492f61){return function(_0x346477){try{var _0xc778bb={'command':_0x492f61[0x0]};var _0x5b7f5e=system[_0xb0fb('0x0')](_0xc778bb,{'typecast':!![]});if(_0x5b7f5e[_0xb0fb('0x7')]){logger[_0xb0fb('0x8')](_0xb0fb('0x9'),_0x139dd8,_[_0xb0fb('0xa')](_0x5b7f5e,_0xb0fb('0xb'))[_0xb0fb('0xc')](',\x20'));logger[_0xb0fb('0xd')](_0xb0fb('0xe'),_0x139dd8);_0x346477['next']();}else{var _0x5a774a=this;var _0x3dc8af=utils[_0xb0fb('0xf')](_0x492f61[0x0],this);logger[_0xb0fb('0xd')](_0xb0fb('0x10'),_0x139dd8,_0x3dc8af);sh[_0xb0fb('0x11')](_[_0xb0fb('0x12')](_0x3dc8af),function(_0x5672c8,_0x31ab0f){logger[_0xb0fb('0xd')](_0xb0fb('0x13'),_0x139dd8,_0x5672c8);if(_0x5672c8==0x0){var _0x5785ef=_0x31ab0f[_0xb0fb('0x14')](/(\r\n|\n|\r)/gm,'');if(_[_0xb0fb('0x15')](_0x492f61[0x1])||_[_0xb0fb('0x16')](_0x492f61[0x1])){logger[_0xb0fb('0xd')]('[%s][SYSTEM]\x20no\x20variable',_0x139dd8);_0x5a774a[_0xb0fb('0x17')][_0x492f61[0x1]]=_0x5785ef;}else{logger[_0xb0fb('0xd')](_0xb0fb('0x18'),_0x139dd8,_0x492f61[0x1],_0x5785ef);_0x5a774a[_0xb0fb('0x17')][_0x492f61[0x1]]=_0x5785ef;}}_0x346477[_0xb0fb('0x19')]();});}}catch(_0x176520){logger[_0xb0fb('0x8')](_0xb0fb('0x9'),_0x139dd8,_['isObject'](_0x176520)?JSON[_0xb0fb('0x1a')](_0x176520):_0x176520);logger['info'](_0xb0fb('0xe'),_0x139dd8);_0x346477[_0xb0fb('0x19')]();}};};
\ No newline at end of file