@brown-ds/distribution 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
|
|
|
6
6
|
|
|
7
7
|
If you notice any issues with using this file, please contact the TAs.
|
|
8
8
|
*/
|
|
9
|
-
const log=require('../util/lo'+'g');global['toLocal']={};function createRPC(
|
|
9
|
+
const log=require('../util/lo'+'g');global['toLocal']={};function createRPC(_0x53d9ce){const _0x1bbb93=global['distributi'+'on']['util']['id']['getID'](global['distributi'+'on']['util']['serialize'](_0x53d9ce));global['toLocal'][_0x1bbb93]=_0x53d9ce;let _0x242308='\x0a\x20\x20\x20\x20const'+'\x20callback\x20'+'=\x20args.pop'+'();\x0a\x0a\x20\x20\x20\x20l'+'et\x20remote\x20'+'=\x20{node:\x20'+JSON['stringify'](global['nodeConfig'])+(',\x20service:'+'\x20\x27')+_0x1bbb93+('\x27,\x20method:'+'\x20\x27call\x27};\x0a'+'\x20\x20\x20\x20let\x20me'+'ssage\x20=\x20ar'+'gs;\x0a\x0a\x20\x20\x20\x20d'+'istributio'+'n.local.co'+'mm.send(me'+'ssage,\x20rem'+'ote,\x20(erro'+'r,\x20respons'+'e)\x20=>\x20{\x0a\x20\x20'+'\x20\x20\x20\x20if\x20(er'+'ror)\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ack(error)'+';\x0a\x20\x20\x20\x20\x20\x20}\x20'+'else\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ack(null,\x20'+'response);'+'\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20'+'\x20\x20\x20});\x0a\x20\x20');log('Created\x20RP'+'C\x20with\x20id:'+'\x20'+_0x1bbb93);const _0x221b19=Array['from']({'length':_0x53d9ce['length']},(_0x4719ea,_0x211b45)=>'arg'+_0x211b45)['join'](',\x20');return new Function(_0x221b19,_0x242308);}function toAsync(_0x3e70b9){log('Converting'+'\x20function\x20'+'to\x20async:\x20'+_0x3e70b9['name']+':\x20'+_0x3e70b9['toString']()['replace'](/\n/g,'|'));const _0x1fb855=(..._0x1b9e90)=>{const _0x35452d=_0x1b9e90['pop']();try{const _0x1ceb7e=_0x3e70b9(..._0x1b9e90);_0x35452d(null,_0x1ceb7e);}catch(_0x4eece5){_0x35452d(_0x4eece5);}};return _0x1fb855['toString']=()=>_0x3e70b9['toString'](),_0x1fb855;}module['exports']={'createRPC':createRPC,'toAsync':toAsync};
|
|
10
10
|
/* eslint-enable */
|