Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / services / routing / server / applications / system.js
index 41f4d1a..a553971 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 _0xbd3a=['[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','exec','trim','info','[%s][SYSTEM]\x20result\x20code:\x20%s','replace','isNil','isEmpty','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','body','error','[%s][SYSTEM]\x20%s','isObject','stringify','shelljs','lodash','./utils','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','map','join'];(function(_0x355677,_0x29057c){var _0xc583e8=function(_0x4ff513){while(--_0x4ff513){_0x355677['push'](_0x355677['shift']());}};_0xc583e8(++_0x29057c);}(_0xbd3a,0x1e5));var _0xabd3=function(_0x3be7de,_0x16a63d){_0x3be7de=_0x3be7de-0x0;var _0x99d03d=_0xbd3a[_0x3be7de];return _0x99d03d;};'use strict';var schema=require('validate');var sh=require(_0xabd3('0x0'));var _=require(_0xabd3('0x1'));var utils=require(_0xabd3('0x2'));var logger=require('../../../../config/logger')(_0xabd3('0x3'));var system=schema({'command':{'type':_0xabd3('0x4'),'required':!![],'message':_0xabd3('0x5')}});exports[_0xabd3('0x6')]=function(_0x4552b7,_0x2ee490){return function(_0x45f933){try{var _0x2d2001={'command':_0x2ee490[0x0]};var _0xf6590b=system['validate'](_0x2d2001,{'typecast':!![]});if(_0xf6590b['length']){logger['error']('[%s][SYSTEM]\x20%s',_0x4552b7,_[_0xabd3('0x7')](_0xf6590b,'message')[_0xabd3('0x8')](',\x20'));logger['info'](_0xabd3('0x9'),_0x4552b7);_0x45f933[_0xabd3('0xa')]();}else{var _0xd53540=this;var _0x1aa002=utils[_0xabd3('0xb')](_0x2ee490[0x0],this);logger['info'](_0xabd3('0xc'),_0x4552b7,_0x1aa002);sh[_0xabd3('0xd')](_[_0xabd3('0xe')](_0x1aa002),function(_0x418072,_0x5eb74a){logger[_0xabd3('0xf')](_0xabd3('0x10'),_0x4552b7,_0x418072);if(_0x418072==0x0){var _0x3f3498=_0x5eb74a[_0xabd3('0x11')](/(\r\n|\n|\r)/gm,'');if(_[_0xabd3('0x12')](_0x2ee490[0x1])||_[_0xabd3('0x13')](_0x2ee490[0x1])){logger['info']('[%s][SYSTEM]\x20no\x20variable',_0x4552b7);_0xd53540['body'][_0x2ee490[0x1]]=_0x3f3498;}else{logger[_0xabd3('0xf')](_0xabd3('0x14'),_0x4552b7,_0x2ee490[0x1],_0x3f3498);_0xd53540[_0xabd3('0x15')][_0x2ee490[0x1]]=_0x3f3498;}}_0x45f933[_0xabd3('0xa')]();});}}catch(_0x1ad1fb){logger[_0xabd3('0x16')](_0xabd3('0x17'),_0x4552b7,_[_0xabd3('0x18')](_0x1ad1fb)?JSON[_0xabd3('0x19')](_0x1ad1fb):_0x1ad1fb);logger[_0xabd3('0xf')](_0xabd3('0x9'),_0x4552b7);_0x45f933['next']();}};};
\ No newline at end of file