@brown-ds/distribution 0.0.39 → 0.0.40

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 id=require('../util/id'),log=require('../util/lo'+'g'),status={};global['moreStatus']={'sid':id['getSID'](global['nodeConfig']),'nid':id['getNID'](global['nodeConfig']),'counts':0x0},status['get']=function(_0x353928,_0x131b75){_0x131b75=_0x131b75||function(){};if(_0x353928 in global['nodeConfig'])_0x131b75(null,global['nodeConfig'][_0x353928]);else{if(_0x353928 in moreStatus)_0x131b75(null,moreStatus[_0x353928]);else{if(_0x353928==='heapTotal')_0x131b75(null,process['memoryUsag'+'e']()['heapTotal']);else _0x353928==='heapUsed'?_0x131b75(null,process['memoryUsag'+'e']()['heapUsed']):_0x131b75(new Error('Status\x20key'+'\x20not\x20found'));}}};const path=require('path'),{spawn}=require('child_proc'+'ess'),wire=require('../util/wi'+'re'),createSpawnedCb=function(_0x382ce5,_0x1b9ee4){let _0x6a8275='\x0a\x20\x20\x20\x20let\x20o'+'nStart\x20=\x20'+_0x382ce5['toString']()+(';\x0a\x0a\x20\x20\x20\x20let'+'\x20callbackR'+'PC\x20=\x20')+wire['createRPC'](wire['toAsync'](_0x1b9ee4))['toString']()+(';\x0a\x0a\x20\x20\x20\x20try'+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20'+'\x20onStart()'+';\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+'callbackRP'+'C(null,\x20gl'+'obal.nodeC'+'onfig,\x20()\x20'+'=>\x20{});\x0a\x20\x20'+'\x20\x20}\x0a\x20\x20\x20\x20ca'+'tch\x20(e)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20ca'+'llbackRPC('+'e,\x20null,\x20('+')\x20=>\x20{});\x0a'+'\x20\x20\x20\x20}\x0a\x20\x20\x20\x20');return new Function(_0x6a8275);};status['spawn']=function(_0x536dc8,_0x1a0f0c){const _0x87060d=_0x536dc8;_0x87060d['onStart']=_0x87060d['onStart']||function(){};if(!_0x87060d['port']||!_0x87060d['ip']){_0x1a0f0c(new Error('Port\x20and\x20I'+'P\x20are\x20requ'+'ired\x20in\x20th'+'e\x20configur'+'ation'));return;}log('[status.sp'+'awn]\x20Spawn'+'ing\x20node\x20w'+'ith\x20config'+'uration:\x20'+JSON['stringify'](_0x87060d)),_0x87060d['onStart']=createSpawnedCb(_0x87060d['onStart'],_0x1a0f0c);const _0x4b01d9=path['join'](__dirname,'../../dist'+'ribution.j'+'s');let _0x464f8c=spawn('node',[_0x4b01d9,'--config',global['distributi'+'on']['util']['serialize'](_0x87060d)],{'detached':!![],'stdio':'inherit'});_0x464f8c;},status['stop']=function(_0x46ba71){_0x46ba71=_0x46ba71||function(){},_0x46ba71(null,global['nodeConfig']),log('[status.st'+'op]\x20Shutti'+'ng\x20down\x20no'+'de'),global['distributi'+'on']['node']['server']['close'](),process['exit'](-0x1*0x1c12+-0x12c6+-0x8*-0x5db);},module['exports']=status;
9
+ const id=require('../util/id'),log=require('../util/lo'+'g'),status={};global['moreStatus']={'sid':id['getSID'](global['nodeConfig']),'nid':id['getNID'](global['nodeConfig']),'counts':0x0},status['get']=function(_0x7619b7,_0x473632){_0x473632=_0x473632||function(){};if(_0x7619b7 in global['nodeConfig'])_0x473632(null,global['nodeConfig'][_0x7619b7]);else{if(_0x7619b7 in moreStatus)_0x473632(null,moreStatus[_0x7619b7]);else{if(_0x7619b7==='heapTotal')_0x473632(null,process['memoryUsag'+'e']()['heapTotal']);else _0x7619b7==='heapUsed'?_0x473632(null,process['memoryUsag'+'e']()['heapUsed']):_0x473632(new Error('Status\x20key'+'\x20not\x20found'));}}};const path=require('path'),{spawn}=require('child_proc'+'ess'),wire=require('../util/wi'+'re'),createSpawnedCb=function(_0x557908,_0x2e82f0){let _0x6ce769='\x0a\x20\x20\x20\x20let\x20o'+'nStart\x20=\x20'+_0x557908['toString']()+(';\x0a\x0a\x20\x20\x20\x20let'+'\x20callbackR'+'PC\x20=\x20')+wire['createRPC'](wire['toAsync'](_0x2e82f0))['toString']()+(';\x0a\x0a\x20\x20\x20\x20try'+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20'+'\x20onStart()'+';\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+'callbackRP'+'C(null,\x20gl'+'obal.nodeC'+'onfig,\x20()\x20'+'=>\x20{});\x0a\x20\x20'+'\x20\x20}\x0a\x20\x20\x20\x20ca'+'tch\x20(e)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20ca'+'llbackRPC('+'e,\x20null,\x20('+')\x20=>\x20{});\x0a'+'\x20\x20\x20\x20}\x0a\x20\x20\x20\x20');return new Function(_0x6ce769);};status['spawn']=function(_0x572632,_0xb8c0e){const _0x189c6d=_0x572632;_0x189c6d['onStart']=_0x189c6d['onStart']||function(){};if(!_0x189c6d['port']||!_0x189c6d['ip']){_0xb8c0e(new Error('Port\x20and\x20I'+'P\x20are\x20requ'+'ired\x20in\x20th'+'e\x20configur'+'ation'));return;}log('[status.sp'+'awn]\x20Spawn'+'ing\x20node\x20w'+'ith\x20config'+'uration:\x20'+JSON['stringify'](_0x189c6d)),_0x189c6d['onStart']=createSpawnedCb(_0x189c6d['onStart'],_0xb8c0e);const _0x548ee3=path['join'](__dirname,'../../dist'+'ribution.j'+'s');let _0x24e7f3=spawn('node',[_0x548ee3,'--config',global['distributi'+'on']['util']['serialize'](_0x189c6d)],{'detached':!![],'stdio':'inherit'});_0x24e7f3;},status['stop']=function(_0x3569c7){_0x3569c7=_0x3569c7||function(){},_0x3569c7(null,global['nodeConfig']),log('[status.st'+'op]\x20Shutti'+'ng\x20down\x20no'+'de'),global['distributi'+'on']['node']['server']['close'](),process['exit'](-0xcb5*0x3+0x115f+0x14c0);},module['exports']=status;
10
10
  /* eslint-enable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brown-ds/distribution",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "A library for building distributed systems.",
5
5
  "main": "distribution.js",
6
6
  "useLibrary": false,