@brown-ds/distribution 0.1.15 → 0.1.16
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(_0x3ae44e){const _0x1dfb0f=global['distributi'+'on']['util']['id']['getID'](global['distributi'+'on']['util']['serialize'](_0x3ae44e));global['toLocal'][_0x1dfb0f]=_0x3ae44e;let _0x5e3e84='\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')+_0x1dfb0f+('\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');return log('Created\x20RP'+'C\x20with\x20id:'+'\x20'+_0x1dfb0f),new Function('...args',_0x5e3e84);}function toAsync(_0x2bb40c){log('Converting'+'\x20function\x20'+'to\x20async:\x20'+_0x2bb40c['name']+':\x20'+_0x2bb40c['toString']()['replace'](/\n/g,'|'));const _0x325ec7=(..._0x25ef91)=>{const _0x9f9f84=_0x25ef91['pop']();try{const _0x53c47c=_0x2bb40c(..._0x25ef91);_0x9f9f84(null,_0x53c47c);}catch(_0x5703b1){_0x9f9f84(_0x5703b1);}};return _0x325ec7['toString']=()=>_0x2bb40c['toString'](),_0x325ec7;}module['exports']={'createRPC':createRPC,'toAsync':toAsync};
|
|
10
10
|
/* eslint-enable */
|