@brown-ds/distribution 0.1.4 → 0.1.6

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.
package/README.md CHANGED
@@ -16,6 +16,7 @@ There are several categories of tests:
16
16
  * Regular Tests (`*.test.js`)
17
17
  * Scenario Tests (`*.scenario.js`)
18
18
  * Extra Credit Tests (`*.extra.test.js`)
19
+ * Student Tests (`*.student.test.js`) - inside `test/test-student`
19
20
 
20
21
  ### Running Tests
21
22
 
@@ -74,3 +75,7 @@ You can also send messages to other nodes:
74
75
  ```js
75
76
  distribution.all.comm.send(['sid'], {node: node, service: 'status', method: 'get'}, console.log); // 8cf1c
76
77
  ```
78
+
79
+ # Results and Reflections
80
+
81
+ > ...
@@ -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 nativeFunctions={'forward':new Map(),'reverse':new Map()};function createNativeMap(){const _0xc6d8f=[];function _0x2fb7ce(_0x11977c,_0x5de529){if(_0x5de529===null||_0x5de529===undefined)return;if(_0xc6d8f['indexOf'](_0x5de529)!==-(0xbef+-0xa3f+-0x1*0x1af))return;_0xc6d8f['push'](_0x5de529),Object['getOwnProp'+'ertyNames'](_0x5de529)['forEach'](_0x295632=>{if(typeof _0x5de529[_0x295632]==='function'){nativeFunctions['forward']['set'](_0x5de529[_0x295632],_0x11977c+'.'+_0x295632),nativeFunctions['reverse']['set'](_0x11977c+'.'+_0x295632,_0x5de529[_0x295632]);return;}typeof _0x5de529[_0x295632]==='object'&&_0xc6d8f['indexOf'](_0x5de529[_0x295632])===-(-0x21f0+0x128f*-0x1+-0x18*-0x230)&&_0x2fb7ce(_0x11977c+'.'+_0x295632,_0x5de529[_0x295632]);});}const _0x54302c=require('fs'),_0x2600b2=require('http'),_0x57e596=require('https'),_0x56d74f=require('url'),_0x1fb2b2=require('path'),_0x50ed0a=require('os'),_0x558728=require('events'),_0x1dadfd=require('stream'),_0x4e7b48=require('util'),_0x4f7dd6=require('querystrin'+'g'),_0x37aa3e=require('zlib'),_0x3b507b=require('buffer'),_0x1bc678=require('child_proc'+'ess'),_0x1b2558=require('cluster'),_0x5452cf=require('dgram'),_0x2b307c=require('dns'),_0x25a2a9=require('http2'),_0x4eb107=require('v8');_0x2fb7ce('globalThis',global['globalThis']),_0x2fb7ce('fs',_0x54302c),_0x2fb7ce('http',_0x2600b2),_0x2fb7ce('https',_0x57e596),_0x2fb7ce('url',_0x56d74f),_0x2fb7ce('path',_0x1fb2b2),_0x2fb7ce('os',_0x50ed0a),_0x2fb7ce('events',_0x558728),_0x2fb7ce('stream',_0x1dadfd),_0x2fb7ce('util',_0x4e7b48),_0x2fb7ce('querystrin'+'g',_0x4f7dd6),_0x2fb7ce('zlib',_0x37aa3e),_0x2fb7ce('buffer',_0x3b507b),_0x2fb7ce('child_proc'+'ess',_0x1bc678),_0x2fb7ce('cluster',_0x1b2558),_0x2fb7ce('dgram',_0x5452cf),_0x2fb7ce('dns',_0x2b307c),_0x2fb7ce('http2',_0x25a2a9),_0x2fb7ce('v8',_0x4eb107);}createNativeMap();function decycleObject(_0x1157f4){if(_0x1157f4===null||_0x1157f4===undefined)return _0x1157f4;const _0x3a1ee0=new WeakMap();function _0x11a17a(_0x31b5b1,_0x3ef205){let _0xa7393f;if(!(typeof _0x31b5b1==='object'&&!(_0x31b5b1 instanceof Error)&&!(_0x31b5b1 instanceof Date)&&!(_0x31b5b1 instanceof Boolean)&&_0x31b5b1!==null))return _0x31b5b1;const _0x3f8b9b=_0x3a1ee0['get'](_0x31b5b1);if(_0x3f8b9b!==undefined)return{'$reference':_0x3f8b9b};return _0x3a1ee0['set'](_0x31b5b1,_0x3ef205),Array['isArray'](_0x31b5b1)?(_0xa7393f=[],_0x31b5b1['forEach'](function(_0x38034f,_0x4469cc){const _0x112129=[..._0x3ef205,_0x4469cc];_0xa7393f[_0x4469cc]=_0x11a17a(_0x38034f,_0x112129);})):(_0xa7393f={},Object['keys'](_0x31b5b1)['forEach'](_0x3b360a=>{const _0x1a3045=[..._0x3ef205,JSON['stringify'](_0x3b360a)];_0xa7393f[_0x3b360a]=_0x11a17a(_0x31b5b1[_0x3b360a],_0x1a3045);})),_0xa7393f;}return _0x11a17a(_0x1157f4,[]);};function serializeBaseStructure(_0x52c553){return{'type':typeof _0x52c553,'value':_0x52c553['toString']()};}function serializeUndefined(_0x3466ec){return{'type':'undefined','value':''};}function getObjectSubType(_0x914276){if(_0x914276 instanceof Array)return'array';if(_0x914276 instanceof Date)return'date';if(_0x914276 instanceof Error)return'error';if(_0x914276===null)return'null';return'object';}function serializeObject(_0x596dbe){const _0x2edff4=getObjectSubType(_0x596dbe);if(_0x2edff4==='null')return{'type':_0x2edff4,'value':''};if(_0x2edff4==='date')return{'type':_0x2edff4,'value':_0x596dbe['toJSON']()};if(_0x2edff4==='error')return{'type':_0x2edff4,'value':serializeObject({'name':_0x596dbe['name'],'message':_0x596dbe['message'],'cause':_0x596dbe['cause']})};function _0xec9fcd(_0x346d1e){return Object['keys'](_0x346d1e)['length']==0x1c22+0x6a*-0x35+0x1*-0x62f&&Object['keys'](_0x346d1e)[-0x4ff+0x48e*-0x8+0x296f]=='$reference';}if(_0xec9fcd(_0x596dbe))return{'type':'reference','value':_0x596dbe['$reference']};const _0x14a448={};for(const [_0x251b82,_0x296244]of Object['entries'](_0x596dbe)){_0x14a448[_0x251b82]=serialize(_0x296244);}return{'type':_0x2edff4,'value':_0x14a448};}function serializeFunction(_0x514058){if(nativeFunctions['forward']['has'](_0x514058))return{'type':'native','value':nativeFunctions['forward']['get'](_0x514058)};return{'type':'function','value':_0x514058['toString']()};}function serialize(_0x4950fb){_0x4950fb=decycleObject(_0x4950fb);let _0xfb1c0f;switch(typeof _0x4950fb){case'object':_0xfb1c0f=serializeObject(_0x4950fb);break;case'function':_0xfb1c0f=serializeFunction(_0x4950fb);break;case'undefined':_0xfb1c0f=serializeUndefined(_0x4950fb);break;case'number':case'string':case'boolean':_0xfb1c0f=serializeBaseStructure(_0x4950fb);break;}return JSON['stringify'](_0xfb1c0f);}function deserializeObject(_0x1f7b43,_0xec1817){for(const [_0x35812e,_0x336a3c]of Object['entries'](_0x1f7b43)){_0xec1817[_0x35812e]=doSerialize(_0x336a3c,_0xec1817);}return _0xec1817;}function deserializeArray(_0x3a6a51,_0x549fd1){for(const [_0x5046cd,_0x2c5037]of Object['entries'](_0x3a6a51)){_0x549fd1[_0x5046cd]=doSerialize(_0x2c5037,_0x549fd1);}return _0x549fd1;}function deserializeString(_0xf8e884){return _0xf8e884;}function deserializeNumber(_0x1898ec){return Number(_0x1898ec);}function deserializeFunction(_0x1a63b1){return new Function('return\x20'+_0x1a63b1)();}function deserializeError(_0x52f2e3){const _0x41c220=doSerialize(_0x52f2e3),_0x5389ad=new Error(_0x41c220['message'],_0x41c220['cause']);return _0x5389ad;}function deserializeReference(_0xa9cbc5,_0x3208d6){let _0x495475=_0x3208d6;for(let _0xffa868 of _0xa9cbc5){_0xffa868=JSON['parse'](_0xffa868),_0x495475=_0x495475[_0xffa868];}return _0x495475;}function deserializeNative(_0x1c691c){return nativeFunctions['reverse']['get'](_0x1c691c);}function doSerialize(_0x58bc8a,_0x4085a3=null){let _0x421f14;if(typeof _0x58bc8a==='object')_0x421f14=_0x58bc8a;else{if(typeof _0x58bc8a==='string')_0x421f14=JSON['parse'](_0x58bc8a);else throw new Error('Invalid\x20ar'+'gument\x20typ'+'e:\x20'+typeof _0x58bc8a+'.');}_0x4085a3===null&&(_0x4085a3={});switch(_0x421f14['type']){case'object':_0x4085a3=deserializeObject(_0x421f14['value'],{});break;case'array':_0x4085a3=deserializeArray(_0x421f14['value'],[]);break;case'function':_0x4085a3=deserializeFunction(_0x421f14['value']);break;case'native':_0x4085a3=deserializeNative(_0x421f14['value']);break;case'reference':_0x4085a3=deserializeReference(_0x421f14['value'],_0x4085a3);break;case'number':_0x4085a3=deserializeNumber(_0x421f14['value']);break;case'string':_0x4085a3=deserializeString(_0x421f14['value']);break;case'boolean':_0x4085a3=_0x421f14['value']==='true';break;case'date':_0x4085a3=new Date(_0x421f14['value']);break;case'error':_0x4085a3=deserializeError(_0x421f14['value']);break;case'null':_0x4085a3=null;break;case'undefined':_0x4085a3=undefined;break;}return _0x4085a3;}function deserialize(_0x109993){return doSerialize(_0x109993);}module['exports']={'serialize':serialize,'deserialize':deserialize};
9
+ const nativeFunctions={'forward':new Map(),'reverse':new Map()};function createNativeMap(){const _0x23de2e=[];function _0xbb0e59(_0x3b3ca1,_0x19c497){if(_0x19c497===null||_0x19c497===undefined)return;if(_0x23de2e['indexOf'](_0x19c497)!==-(0x449*-0x2+0x1777*0x1+-0xee4))return;_0x23de2e['push'](_0x19c497),Object['getOwnProp'+'ertyNames'](_0x19c497)['forEach'](_0x20f76b=>{if(typeof _0x19c497[_0x20f76b]==='function'){nativeFunctions['forward']['set'](_0x19c497[_0x20f76b],_0x3b3ca1+'.'+_0x20f76b),nativeFunctions['reverse']['set'](_0x3b3ca1+'.'+_0x20f76b,_0x19c497[_0x20f76b]);return;}typeof _0x19c497[_0x20f76b]==='object'&&_0x23de2e['indexOf'](_0x19c497[_0x20f76b])===-(0x207e+0x1bfb+-0x3c78)&&_0xbb0e59(_0x3b3ca1+'.'+_0x20f76b,_0x19c497[_0x20f76b]);});}for(const _0x48e6f7 of require('repl')['_builtinLi'+'bs']){if(['wasi','sys','punycode','crypto']['includes'](_0x48e6f7))continue;const _0x259a2f=require(_0x48e6f7);_0xbb0e59(_0x48e6f7,_0x259a2f);}}createNativeMap();function decycleObject(_0x4a136c){if(_0x4a136c===null||_0x4a136c===undefined)return _0x4a136c;const _0x21d2b8=new WeakMap();function _0x4711d9(_0x4b012f,_0x54c3f3){let _0x130aaa;if(!(typeof _0x4b012f==='object'&&!(_0x4b012f instanceof Error)&&!(_0x4b012f instanceof Date)&&!(_0x4b012f instanceof Boolean)&&_0x4b012f!==null))return _0x4b012f;const _0x382721=_0x21d2b8['get'](_0x4b012f);if(_0x382721!==undefined)return{'$reference':_0x382721};return _0x21d2b8['set'](_0x4b012f,_0x54c3f3),Array['isArray'](_0x4b012f)?(_0x130aaa=[],_0x4b012f['forEach'](function(_0x59773e,_0x30f68f){const _0x44816c=[..._0x54c3f3,_0x30f68f];_0x130aaa[_0x30f68f]=_0x4711d9(_0x59773e,_0x44816c);})):(_0x130aaa={},Object['keys'](_0x4b012f)['forEach'](_0xfeb2b8=>{const _0x2cf11f=[..._0x54c3f3,JSON['stringify'](_0xfeb2b8)];_0x130aaa[_0xfeb2b8]=_0x4711d9(_0x4b012f[_0xfeb2b8],_0x2cf11f);})),_0x130aaa;}return _0x4711d9(_0x4a136c,[]);};function serializeBaseStructure(_0x23bba5){return{'type':typeof _0x23bba5,'value':_0x23bba5['toString']()};}function serializeUndefined(_0x50228c){return{'type':'undefined','value':''};}function getObjectSubType(_0x159214){if(_0x159214 instanceof Array)return'array';if(_0x159214 instanceof Date)return'date';if(_0x159214 instanceof Error)return'error';if(_0x159214===null)return'null';return'object';}function serializeObject(_0x574ad8){const _0x3c8955=getObjectSubType(_0x574ad8);if(_0x3c8955==='null')return{'type':_0x3c8955,'value':''};if(_0x3c8955==='date')return{'type':_0x3c8955,'value':_0x574ad8['toJSON']()};if(_0x3c8955==='error')return{'type':_0x3c8955,'value':serializeObject({'name':_0x574ad8['name'],'message':_0x574ad8['message'],'cause':_0x574ad8['cause']})};function _0xfb778c(_0x220579){return Object['keys'](_0x220579)['length']==0x8c+0x1265+-0x12f0&&Object['keys'](_0x220579)[0x818+-0x3ea+-0x42e]=='$reference';}if(_0xfb778c(_0x574ad8))return{'type':'reference','value':_0x574ad8['$reference']};const _0x54256f={};for(const [_0x1b6323,_0x28ee3d]of Object['entries'](_0x574ad8)){_0x54256f[_0x1b6323]=serialize(_0x28ee3d);}return{'type':_0x3c8955,'value':_0x54256f};}function serializeFunction(_0x25b5a1){if(nativeFunctions['forward']['has'](_0x25b5a1))return{'type':'native','value':nativeFunctions['forward']['get'](_0x25b5a1)};return{'type':'function','value':_0x25b5a1['toString']()};}function serialize(_0x121261){_0x121261=decycleObject(_0x121261);let _0x371c0a;switch(typeof _0x121261){case'object':_0x371c0a=serializeObject(_0x121261);break;case'function':_0x371c0a=serializeFunction(_0x121261);break;case'undefined':_0x371c0a=serializeUndefined(_0x121261);break;case'number':case'string':case'boolean':_0x371c0a=serializeBaseStructure(_0x121261);break;}return JSON['stringify'](_0x371c0a);}function deserializeObject(_0x44f43f,_0x3ee716){for(const [_0x3118bd,_0x4d2bf5]of Object['entries'](_0x44f43f)){_0x3ee716[_0x3118bd]=doSerialize(_0x4d2bf5,_0x3ee716);}return _0x3ee716;}function deserializeArray(_0x587ccf,_0x743561){for(const [_0xa5a463,_0x87b682]of Object['entries'](_0x587ccf)){_0x743561[_0xa5a463]=doSerialize(_0x87b682,_0x743561);}return _0x743561;}function deserializeString(_0x5536e1){return _0x5536e1;}function deserializeNumber(_0x2bc0ad){return Number(_0x2bc0ad);}function deserializeFunction(_0x2a0c06){return new Function('return\x20'+_0x2a0c06)();}function deserializeError(_0x21a5ef){const _0x381e35=doSerialize(_0x21a5ef),_0x3fdad2=new Error(_0x381e35['message'],_0x381e35['cause']);return _0x3fdad2;}function deserializeReference(_0x3c2961,_0x2b05a1){let _0x22e9d6=_0x2b05a1;for(let _0x78ff58 of _0x3c2961){_0x78ff58=JSON['parse'](_0x78ff58),_0x22e9d6=_0x22e9d6[_0x78ff58];}return _0x22e9d6;}function deserializeNative(_0xd33203){return nativeFunctions['reverse']['get'](_0xd33203);}function doSerialize(_0x4345eb,_0x3a4cb1=null){let _0x29bb02;if(typeof _0x4345eb==='object')_0x29bb02=_0x4345eb;else{if(typeof _0x4345eb==='string')_0x29bb02=JSON['parse'](_0x4345eb);else throw new Error('Invalid\x20ar'+'gument\x20typ'+'e:\x20'+typeof _0x4345eb+'.');}_0x3a4cb1===null&&(_0x3a4cb1={});switch(_0x29bb02['type']){case'object':_0x3a4cb1=deserializeObject(_0x29bb02['value'],{});break;case'array':_0x3a4cb1=deserializeArray(_0x29bb02['value'],[]);break;case'function':_0x3a4cb1=deserializeFunction(_0x29bb02['value']);break;case'native':_0x3a4cb1=deserializeNative(_0x29bb02['value']);break;case'reference':_0x3a4cb1=deserializeReference(_0x29bb02['value'],_0x3a4cb1);break;case'number':_0x3a4cb1=deserializeNumber(_0x29bb02['value']);break;case'string':_0x3a4cb1=deserializeString(_0x29bb02['value']);break;case'boolean':_0x3a4cb1=_0x29bb02['value']==='true';break;case'date':_0x3a4cb1=new Date(_0x29bb02['value']);break;case'error':_0x3a4cb1=deserializeError(_0x29bb02['value']);break;case'null':_0x3a4cb1=null;break;case'undefined':_0x3a4cb1=undefined;break;}return _0x3a4cb1;}function deserialize(_0x49e39d){return doSerialize(_0x49e39d);}module['exports']={'serialize':serialize,'deserialize':deserialize};
10
10
  /* eslint-enable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brown-ds/distribution",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "A library for building distributed systems.",
5
5
  "main": "distribution.js",
6
6
  "useLibrary": false,
@@ -23,5 +23,23 @@
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
25
  "yargs": "^17.7.2"
26
+ },
27
+ "report": {
28
+ "hours": 999,
29
+ "loc": 999,
30
+ "dev": {
31
+ "cpu-no": 999,
32
+ "mem-gb": 999,
33
+ "ssd-gb": 999
34
+ },
35
+ "throughput": {
36
+ "dev": [],
37
+ "aws": []
38
+ },
39
+ "latency": {
40
+ "dev": [],
41
+ "aws": []
42
+ },
43
+ "dloc": -99
26
44
  }
27
45
  }