ae81e208d3e4bbce716b0c4873dd378f2048abdc
[motion2.git] / server / services / ami / trigger / script / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xfd6e=['../../../../config/logger','trigger','exec','data2','Script','data3','render','error','format','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs','mustache'];(function(_0x44bd02,_0x114cbb){var _0x3649c0=function(_0x5c33f3){while(--_0x5c33f3){_0x44bd02['push'](_0x44bd02['shift']());}};_0x3649c0(++_0x114cbb);}(_0xfd6e,0xfc));var _0xefd6=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xfd6e[_0x2641f9];return _0x585741;};'use strict';var util=require(_0xefd6('0x0'));var sh=require(_0xefd6('0x1'));var Mustache=require(_0xefd6('0x2'));var logger=require(_0xefd6('0x3'))(_0xefd6('0x4'));exports[_0xefd6('0x5')]=function(_0x545757,_0x4ee1a0){var _0x48e647=_0x545757['data2']?_0x545757[_0xefd6('0x6')]:_0xefd6('0x7');var _0x16a6dd=_0x545757[_0xefd6('0x8')]?Mustache[_0xefd6('0x9')](_0x545757[_0xefd6('0x8')],_0x4ee1a0):_0x4ee1a0;sh[_0xefd6('0x5')](_0x16a6dd,function(_0x2c3228,_0x4df111,_0x23e985){if(_0x2c3228!==0x0){logger[_0xefd6('0xa')](util[_0xefd6('0xb')](_0xefd6('0xc'),_0x48e647,_0x16a6dd,_0x2c3228,_0x23e985));}else{logger[_0xefd6('0xd')](util['format'](_0xefd6('0xe'),_0x48e647,_0x16a6dd,_0x4df111));}});};