Built motion from commit a679711e.|2.6.15
[motion2.git] / server / services / routing / server / applications / system.js
index 41f4d1a..9a1555c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2c9=['[%s][SYSTEM]\x20result\x20code:\x20%s','isNil','isEmpty','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','isObject','validate','shelljs','lodash','./utils','../../../../config/logger','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','[%s][SYSTEM]\x20%s','map','message','join','info','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','[%s][SYSTEM]\x20commnad:\x20%s','trim'];(function(_0x270c4f,_0x45a4c9){var _0x33c664=function(_0x568ab4){while(--_0x568ab4){_0x270c4f['push'](_0x270c4f['shift']());}};_0x33c664(++_0x45a4c9);}(_0xf2c9,0x187));var _0x9f2c=function(_0x117994,_0x46bbbb){_0x117994=_0x117994-0x0;var _0x40814a=_0xf2c9[_0x117994];return _0x40814a;};'use strict';var schema=require(_0x9f2c('0x0'));var sh=require(_0x9f2c('0x1'));var _=require(_0x9f2c('0x2'));var utils=require(_0x9f2c('0x3'));var logger=require(_0x9f2c('0x4'))('routing');var system=schema({'command':{'type':'string','required':!![],'message':_0x9f2c('0x5')}});exports[_0x9f2c('0x6')]=function(_0xcffe9a,_0x44bccb){return function(_0x47b67f){try{var _0x49faa9={'command':_0x44bccb[0x0]};var _0x118d31=system['validate'](_0x49faa9,{'typecast':!![]});if(_0x118d31[_0x9f2c('0x7')]){logger['error'](_0x9f2c('0x8'),_0xcffe9a,_[_0x9f2c('0x9')](_0x118d31,_0x9f2c('0xa'))[_0x9f2c('0xb')](',\x20'));logger[_0x9f2c('0xc')](_0x9f2c('0xd'),_0xcffe9a);_0x47b67f[_0x9f2c('0xe')]();}else{var _0x55c20b=this;var _0x677381=utils['getMustacheRender'](_0x44bccb[0x0],this);logger['info'](_0x9f2c('0xf'),_0xcffe9a,_0x677381);sh['exec'](_[_0x9f2c('0x10')](_0x677381),function(_0xa52b97,_0x545719){logger['info'](_0x9f2c('0x11'),_0xcffe9a,_0xa52b97);if(_0xa52b97==0x0){var _0x2008dc=_0x545719['replace'](/(\r\n|\n|\r)/gm,'');if(_[_0x9f2c('0x12')](_0x44bccb[0x1])||_[_0x9f2c('0x13')](_0x44bccb[0x1])){logger[_0x9f2c('0xc')](_0x9f2c('0x14'),_0xcffe9a);_0x55c20b[_0x9f2c('0x15')][_0x44bccb[0x1]]=_0x2008dc;}else{logger['info'](_0x9f2c('0x16'),_0xcffe9a,_0x44bccb[0x1],_0x2008dc);_0x55c20b['body'][_0x44bccb[0x1]]=_0x2008dc;}}_0x47b67f[_0x9f2c('0xe')]();});}}catch(_0x32e746){logger['error'](_0x9f2c('0x8'),_0xcffe9a,_[_0x9f2c('0x17')](_0x32e746)?JSON['stringify'](_0x32e746):_0x32e746);logger[_0x9f2c('0xc')](_0x9f2c('0xd'),_0xcffe9a);_0x47b67f['next']();}};};
\ 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