index.js 3.8 KB

1
  1. const _0x303e=['csPlugin','service_id','readServiceParam','onSettings','fs-extra','csUtil','path','existsSync','push','plugins','shift','debug','use\x20strict','join','main','includes','onSettingsBrowser','browser','service_component_name','csLogger','defineProperty','map','jsList','filter','all','onSettingsSimulator','../../utils','builder'];(function(_0x18c47b,_0x426839){const _0x303eb4=function(_0x15c8a9){while(--_0x15c8a9){_0x18c47b['push'](_0x18c47b['shift']());}};_0x303eb4(++_0x426839);}(_0x303e,0x187));const _0x15c8=function(_0x18c47b,_0x426839){_0x18c47b=_0x18c47b-0x92;let _0x303eb4=_0x303e[_0x18c47b];return _0x303eb4;};const _0x83ebe6=_0x15c8,_0x5f99=['require','getServicePluginInfo',_0x83ebe6(0xa9),_0x83ebe6(0xab),_0x83ebe6(0x9e),_0x83ebe6(0xa4),_0x83ebe6(0x98),_0x83ebe6(0xa1),'csConfig','readEnableServices',_0x83ebe6(0xa7),_0x83ebe6(0x9b),'path',_0x83ebe6(0x96),'simulator',_0x83ebe6(0x92),'map',_0x83ebe6(0x94),_0x83ebe6(0xa5),'onSettingsSimulator',_0x83ebe6(0x97),'readServiceList',_0x83ebe6(0xa6),_0x83ebe6(0x9c),_0x83ebe6(0xaa),_0x83ebe6(0xa2),_0x83ebe6(0xa3),'__esModule'];(function(_0x15c592,_0x135193){const _0x226f09=function(_0x4b5475){const _0x2be054=_0x15c8;while(--_0x4b5475){_0x15c592['push'](_0x15c592[_0x2be054(0x9d)]());}};_0x226f09(++_0x135193);}(_0x5f99,0x13b));const _0x307e=function(_0xc21c5e,_0x12f168){_0xc21c5e=_0xc21c5e-0x1f4;let _0x54eaa6=_0x5f99[_0xc21c5e];return _0x54eaa6;},_0x345fdc=_0x307e;_0x83ebe6(0x9f),(Object[_0x345fdc(0x1f7)](exports,_0x345fdc(0x208),{'value':!0x0}),exports[_0x345fdc(0x200)]=exports[_0x345fdc(0x207)]=void 0x0);const fs_extra_1=require(_0x345fdc(0x201)),path_1=require(_0x83ebe6(0x99)),utils_1=require(_0x83ebe6(0xad));async function scanfServiceBuilders(){const _0x3601b7=_0x83ebe6,_0x251996=_0x345fdc;let _0xe5d9fc=[];try{let _0x522c8a=await utils_1[_0x251996(0x1f5)][_0x251996(0x202)](),_0x180076=await utils_1['csConfig'][_0x251996(0x1f6)](),_0x93d454=_0x522c8a[_0x251996(0x205)](_0x2d2821=>_0x180076[_0x251996(0x206)](_0x2d2821[_0x3601b7(0x94)]));await Promise[_0x251996(0x20c)](_0x93d454[_0x251996(0x1fd)](_0x249cc9=>{const _0x4cc581=_0x3601b7,_0x27f6e1=_0x251996;var _0xa28bca;let _0xa840ac=utils_1[_0x4cc581(0x93)][_0x27f6e1(0x20a)](_0x249cc9[_0x27f6e1(0x1ff)]);if(void 0x0===_0xa840ac||!(null===(_0xa28bca=_0xa840ac[_0x27f6e1(0x1fc)])||void 0x0===_0xa28bca?void 0x0:_0xa28bca[_0x27f6e1(0x1f4)]))return;let _0x12f491=path_1[_0x4cc581(0xa0)](_0xa840ac[_0x27f6e1(0x1f9)],_0xa840ac[_0x4cc581(0x92)][_0x27f6e1(0x1f4)]);fs_extra_1[_0x4cc581(0x9a)](_0x12f491)&&_0xe5d9fc[_0x4cc581(0x9b)]({'service_id':_0x249cc9[_0x27f6e1(0x1fe)],'builder':utils_1[_0x27f6e1(0x20f)][_0x27f6e1(0x209)](_0x12f491)});}));}catch(_0x1878f6){utils_1[_0x251996(0x203)][_0x251996(0x20d)](_0x1878f6);}return _0xe5d9fc;}async function onCommonSettings(_0x585a67,_0x543778){const _0x57952f=_0x83ebe6,_0x5b30c6=_0x345fdc;let _0x1e4fc0=await scanfServiceBuilders();try{await Promise[_0x5b30c6(0x20c)](_0x1e4fc0[_0x57952f(0xa8)](async _0x74050f=>{const _0x2ac71a=_0x57952f,_0x2f077e=_0x5b30c6;_0x74050f[_0x2f077e(0x1fc)][_0x2f077e(0x1fa)]&&_0x74050f['builder'][_0x2f077e(0x1fa)](await utils_1[_0x2f077e(0x1f5)][_0x2ac71a(0x95)](_0x74050f[_0x2ac71a(0x94)]),_0x543778,_0xebd38f=>{const _0x373244=_0x2f077e;_0x585a67[_0x373244(0x20b)]?_0x585a67[_0x373244(0x20b)][_0x373244(0x1f8)](_0xebd38f):_0x585a67[_0x373244(0x204)]&&_0x585a67[_0x373244(0x204)][_0x373244(0x20b)]&&_0x585a67[_0x373244(0x204)]['jsList'][_0x373244(0x1f8)](_0xebd38f);});}));}catch(_0x3d7ba5){utils_1[_0x5b30c6(0x203)][_0x5b30c6(0x20d)](_0x3d7ba5);}}async function onSettingsBrowser(_0x1918c4){const _0x412a1a=_0x345fdc;await onCommonSettings(_0x1918c4,_0x412a1a(0x20e));}async function onSettingsSimulator(_0x464e03){const _0x558c18=_0x345fdc;await onCommonSettings(_0x464e03,_0x558c18(0x1fb));}exports[_0x345fdc(0x207)]=onSettingsBrowser,exports[_0x83ebe6(0xac)]=onSettingsSimulator;