@brown-ds/distribution 0.1.13 → 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'),routesStore=new Map();function get(_0xd7907f,_0xed0098){log('[routes.ge'+'t]\x20Getting'+'\x20service:\x20'+JSON['stringify'](_0xd7907f));if(!_0xed0098)return;typeof _0xd7907f==='string'&&(_0xd7907f={'service':_0xd7907f});const _0x3ba868=_0xd7907f['service'],_0x5195df=_0xd7907f['gid'];if(_0x5195df&&_0x5195df!=='local')log('[routes.ge'+'t]\x20Found\x20d'+'istributed'+'\x20service:\x20'+_0x3ba868),_0xed0098(null,global['distributi'+'on'][_0x5195df][_0x3ba868]);else{if(_0x3ba868 in routesStore)log('[routes.ge'+'t]\x20Found\x20l'+'ocal\x20servi'+'ce:\x20'+_0x3ba868),_0xed0098(null,routesStore[_0x3ba868]);else{const _0x32adc9=global['toLocal']['get'](_0x3ba868);_0x32adc9?(log('[routes.ge'+'t]\x20Found\x20R'+'PC:\x20'+_0x3ba868),_0xed0098(null,{'call':_0x32adc9})):_0xed0098(new Error('Service\x20'+_0x3ba868+('\x20not\x20found'+'\x20in\x20routes')));}}}function put(_0x1f51cd,_0x4a907d,_0x41a465){log('[routes.pu'+'t]\x20Putting'+'\x20service:\x20'+_0x4a907d+'\x20'+JSON['stringify'](_0x1f51cd)),routesStore[_0x4a907d]=_0x1f51cd;_0x41a465&&_0x41a465(null,_0x4a907d);;}function rem(_0x451b3f,_0x3f58ab){const _0x5b8abb=routesStore[_0x451b3f];delete routesStore[_0x451b3f],_0x3f58ab(null,_0x5b8abb);};module['exports']={'get':get,'put':put,'rem':rem};
9
+ const log=require('../util/lo'+'g'),routesStore=new Map();function get(_0x3313fa,_0x95e876){log('[routes.ge'+'t]\x20Getting'+'\x20service:\x20'+JSON['stringify'](_0x3313fa));if(!_0x95e876)return;typeof _0x3313fa==='string'&&(_0x3313fa={'service':_0x3313fa});const _0x260761=_0x3313fa['service'],_0x54d5f3=_0x3313fa['gid'];if(_0x54d5f3&&_0x54d5f3!=='local')log('[routes.ge'+'t]\x20Found\x20d'+'istributed'+'\x20service:\x20'+_0x260761),_0x95e876(null,global['distributi'+'on'][_0x54d5f3][_0x260761]);else{if(_0x260761 in routesStore)log('[routes.ge'+'t]\x20Found\x20l'+'ocal\x20servi'+'ce:\x20'+_0x260761),_0x95e876(null,routesStore[_0x260761]);else{const _0x57d4b5=global['toLocal'][_0x260761];_0x57d4b5?(log('[routes.ge'+'t]\x20Found\x20R'+'PC:\x20'+_0x260761),_0x95e876(null,{'call':_0x57d4b5})):_0x95e876(new Error('Service\x20'+_0x260761+('\x20not\x20found'+'\x20in\x20routes')));}}}function put(_0x2dd48b,_0x506066,_0xabfbb8){log('[routes.pu'+'t]\x20Putting'+'\x20service:\x20'+_0x506066+'\x20'+JSON['stringify'](_0x2dd48b)),routesStore[_0x506066]=_0x2dd48b;_0xabfbb8&&_0xabfbb8(null,_0x506066);;}function rem(_0x1866c7,_0xee2305){const _0x348046=routesStore[_0x1866c7];delete routesStore[_0x1866c7],_0xee2305(null,_0x348046);};module['exports']={'get':get,'put':put,'rem':rem};
10
10
  /* eslint-enable */
@@ -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']=new Map();function createRPC(_0x188a3c){const _0x374a92=global['distributi'+'on']['util']['id']['getID'](global['distributi'+'on']['util']['serialize'](_0x188a3c));global['toLocal']['set'](_0x374a92,_0x188a3c);let _0x487026='\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')+_0x374a92+('\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'+_0x374a92),new Function('...args',_0x487026);}function toAsync(_0x417259){log('Converting'+'\x20function\x20'+'to\x20async:\x20'+_0x417259['name']+':\x20'+_0x417259['toString']()['replace'](/\n/g,'|'));const _0x12fb5a=(..._0x4bd1d3)=>{const _0x4c1f50=_0x4bd1d3['pop']();try{const _0x1d6e1a=_0x417259(..._0x4bd1d3);_0x4c1f50(null,_0x1d6e1a);}catch(_0x384053){_0x4c1f50(_0x384053);}};return _0x12fb5a['toString']=()=>_0x417259['toString'](),_0x12fb5a;}module['exports']={'createRPC':createRPC,'toAsync':toAsync};
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 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brown-ds/distribution",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "A library for building distributed systems.",
5
5
  "main": "distribution.js",
6
6
  "useLibrary": false,