@brown-ds/distribution 0.2.24 → 0.2.25
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.js');function getNode(
|
|
9
|
+
const log=require('../util/lo'+'g.js');function getNode(_0x1de661,_0x24d5f0,_0x28af9d){const _0x15363d=_0x24d5f0&&typeof _0x24d5f0==='object'?_0x24d5f0['key']:_0x24d5f0;globalThis['distributi'+'on'][_0x1de661['gid']]['status']['get']('nid',(_0x3dd193,_0x1b7cfb)=>{const _0x285dc5=Object['values'](_0x1b7cfb),_0x453505=globalThis['distributi'+'on']['util']['id']['getID'](_0x15363d),_0x1d2a3f=_0x1de661['hash'](_0x453505,_0x285dc5),_0x1a412c=_0x1d2a3f['substring'](0x46*-0xe+-0xa*-0xc4+-0x3d4,-0x1ef7+-0x1fd5+-0x3ed1*-0x1);globalThis['distributi'+'on']['local']['groups']['get'](_0x1de661['gid'],(_0x187315,_0x580f04)=>{if(!_0x580f04)return _0x28af9d(_0x187315);else{const _0x5e76ae=_0x580f04[_0x1a412c];return log('[store\x20(ge'+'tNode)]\x20co'+'nfiguratio'+'n:\x20'+JSON['stringify'](_0x24d5f0)+'group:\x20'+JSON['stringify'](_0x580f04)+'\x20node:\x20'+JSON['stringify'](_0x5e76ae)+'nid:\x20'+JSON['stringify'](_0x1d2a3f)+'\x20sid:\x20'+JSON['stringify'](_0x1a412c)),_0x28af9d(null,_0x5e76ae);}});});}function normalize(_0x163895,_0x3c4f62){if(_0x163895===null)return{'key':null,'gid':_0x3c4f62,'action':'put'};else return typeof _0x163895==='string'?{'key':_0x163895,'gid':_0x3c4f62,'action':'put'}:_0x163895;}function store(_0x167984){const _0x16f33e={'gid':_0x167984['gid']||'all','hash':_0x167984['hash']||globalThis['distributi'+'on']['util']['id']['naiveHash'],'subset':_0x167984['subset']};function _0x10eab0(_0x2ef6b7,_0x38ef93){if(!_0x2ef6b7){const _0x17ea1c=[{'key':null,'gid':_0x16f33e['gid']}];globalThis['distributi'+'on'][_0x16f33e['gid']]['comm']['send'](_0x17ea1c,{'service':'store','method':'get'},(_0x4a2e4d,_0x178482)=>{const _0x29f2dc=Object['values'](_0x178482)['reduce']((_0x24e18b,_0x2b1ab4)=>_0x24e18b['concat'](_0x2b1ab4),[]);_0x38ef93(_0x4a2e4d,_0x29f2dc);});return;}_0x2ef6b7=normalize(_0x2ef6b7,_0x16f33e['gid']),getNode(_0x16f33e,_0x2ef6b7,(_0x2fa49e,_0x175203)=>{if(!_0x175203){_0x38ef93(_0x2fa49e);return;}const _0x307ff0=[_0x2ef6b7],_0x39c751={'service':'store','method':'get','node':_0x175203};log('[all.store'+'.get]confi'+'guration:\x20'+JSON['stringify'](_0x2ef6b7)+'node:\x20'+JSON['stringify'](globalThis['distributi'+'on']['node']['config'])+('\x20target\x20no'+'de:\x20')+JSON['stringify'](_0x175203)),globalThis['distributi'+'on']['local']['comm']['send'](_0x307ff0,_0x39c751,_0x38ef93);});return;return _0x38ef93(new Error('store.get\x20'+'not\x20implem'+'ented'));}function _0xb8a2c2(_0x46c1d8,_0x3db568,_0x2fc7d4){_0x3db568=_0x3db568||globalThis['distributi'+'on']['util']['id']['getID'](_0x46c1d8),_0x3db568=normalize(_0x3db568,_0x16f33e['gid']),getNode(_0x16f33e,_0x3db568,(_0x57a329,_0x4cfaf5)=>{if(!_0x4cfaf5){_0x2fc7d4(_0x57a329);return;}const _0x36a221=[_0x46c1d8,_0x3db568],_0x27fa35={'service':'store','method':'put','node':_0x4cfaf5};log('[all.store'+'.put]\x20stat'+'e:\x20'+JSON['stringify'](_0x46c1d8)+('configurat'+'ion:\x20')+JSON['stringify'](_0x3db568)+('target\x20nod'+'e:\x20')+JSON['stringify'](_0x4cfaf5)),globalThis['distributi'+'on']['local']['comm']['send'](_0x36a221,_0x27fa35,_0x2fc7d4);});return;return _0x2fc7d4(new Error('store.put\x20'+'not\x20implem'+'ented'));}function _0x35f63d(_0x251e9e,_0x310679){getNode(_0x16f33e,_0x251e9e,(_0x100c81,_0x2bfec2)=>{if(!_0x2bfec2){_0x310679(_0x100c81);return;}const _0x3b78c7=[{'key':_0x251e9e,'gid':_0x16f33e['gid']}],_0x59b50f={'service':'store','method':'del','node':_0x2bfec2};globalThis['distributi'+'on']['local']['comm']['send'](_0x3b78c7,_0x59b50f,_0x310679);});return;return _0x310679(new Error('store.del\x20'+'not\x20implem'+'ented'));}function _0x319cf7(_0x3b9ecb,_0x38b6e8){log('[store.rec'+'onf]\x20confi'+'guration:\x20'+JSON['stringify'](_0x3b9ecb)+'\x20gid:\x20'+_0x16f33e['gid']),globalThis['distributi'+'on']['local']['groups']['get'](_0x16f33e['gid'],(_0xb5991f,_0x31995e)=>{if(!_0x31995e){_0x38b6e8(_0xb5991f);return;}globalThis['distributi'+'on']['local']['groups']['put'](_0x16f33e['gid'],_0x3b9ecb,(_0xa9fad1,_0x359f20)=>{globalThis['distributi'+'on'][_0x16f33e['gid']]['store']['get'](null,(_0x59ad7f,_0x461adf)=>{globalThis['distributi'+'on']['local']['groups']['put'](_0x16f33e['gid'],_0x31995e,(_0x3a7608,_0x392309)=>{globalThis['distributi'+'on'][_0x16f33e['gid']]['status']['get']('nid',(_0x413fe7,_0x1b3c9d)=>{const _0x4c3b12=Object['values'](_0x1b3c9d),_0x43ddad=Object['values'](_0x3b9ecb)['map'](_0x34d599=>globalThis['distributi'+'on']['util']['id']['getNID'](_0x34d599));log('[store.rec'+'onf\x20receiv'+'ed\x20'+_0x461adf['length']+('\x20keys\x20from'+'\x20')+_0x1b3c9d['length']+'\x20nodes');let _0x5a990f=-0x35e+0x53*-0x17+0xad3;const _0xfcd7de=()=>{if(_0x5a990f===_0x461adf['length'])return _0x38b6e8(null);};if(_0x461adf['length']===-0x1f29+-0x8*-0x11f+0x1631)return _0x38b6e8(null);for(const _0x2e69f4 of _0x461adf){const _0x2c2a50=globalThis['distributi'+'on']['util']['id']['getID'](_0x2e69f4),_0x543052=_0x16f33e['hash'](_0x2c2a50,_0x43ddad),_0x268cd0=_0x16f33e['hash'](_0x2c2a50,_0x4c3b12);log('[store.rec'+'onf]\x20old\x20n'+'id:\x20'+_0x543052+'\x20new\x20nid:\x20'+_0x268cd0);if(_0x543052===_0x268cd0){_0x5a990f++,_0xfcd7de();continue;}const _0x23d5c7=_0x3b9ecb[_0x543052['substring'](-0x1*-0xa7b+-0xf53*-0x1+-0xce7*0x2,0x2083+0x16f7+0x1*-0x3775)],_0x21600b=[{'key':_0x2e69f4,'gid':_0x16f33e['gid']}],_0x6f378e={'service':'store','method':'del','node':_0x23d5c7};log('[store.rec'+'onf]\x20delet'+'ing\x20key\x20'+_0x2e69f4+'\x20from\x20'+JSON['stringify'](_0x6f378e)),globalThis['distributi'+'on']['local']['comm']['send'](_0x21600b,_0x6f378e,(_0x4f778a,_0x11da82)=>{globalThis['distributi'+'on'][_0x16f33e['gid']]['store']['put'](_0x11da82,_0x2e69f4,(_0x23ad1a,_0x12dab4)=>{_0x5a990f++,_0xfcd7de();});});}});});});});});return;return _0x38b6e8(new Error('store.reco'+'nf\x20not\x20imp'+'lemented'));}return{'get':_0x10eab0,'put':_0xb8a2c2,'del':_0x35f63d,'reconf':_0x319cf7};}module['exports']=store;
|
|
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 http=require('node:http'),log=require('../util/lo'+'g.js');function createGuardedCallback(
|
|
9
|
+
const http=require('node:http'),log=require('../util/lo'+'g.js');function createGuardedCallback(_0x2b0d0a){let _0x4d4299=-0x2*-0x70a+-0x278*-0xb+-0x293c;function _0x257e21(_0x49d050,_0x592541){_0x4d4299+=0x26b7+0x5*0x4b5+-0x1*0x3e3f;if(_0x4d4299>-0x11*0x149+0x6f*0x1+0x156b){log('Warning:\x20C'+'allback\x20fu'+'nction\x20cal'+'led\x20'+_0x4d4299+'\x20times');return;}if(_0x2b0d0a!==undefined){_0x2b0d0a(_0x49d050,_0x592541);return;}}return _0x257e21;}function send(_0x4f68b0,_0x51eca9,_0x403dbc){_0x403dbc=createGuardedCallback(_0x403dbc);if(_0x51eca9===undefined){_0x403dbc(new Error('Remote\x20is\x20'+'required'));return;}if(_0x51eca9?.['node']?.['ip']===undefined||_0x51eca9?.['node']?.['port']===undefined){_0x403dbc(new Error('Remote\x20nod'+'e\x20IP\x20and\x20p'+'ort\x20requir'+'ed'));return;}if(_0x51eca9?.['service']===undefined){_0x403dbc(new Error('Remote\x20ser'+'vice\x20is\x20re'+'quired'));return;}if(_0x51eca9?.['method']===undefined){_0x403dbc(new Error('Remote\x20met'+'hod\x20is\x20req'+'uired'));return;}if(!(_0x4f68b0 instanceof Array)){_0x403dbc(new Error('Message\x20mu'+'st\x20be\x20an\x20a'+'rray\x20of\x20ar'+'guments'));return;}const _0x3e15cb=_0x51eca9['node'],_0x54402a=_0x51eca9['service'],_0xea0f43=_0x51eca9['method'],_0x119530=_0x51eca9['gid']||'local';log('[comm.send'+']:\x20Sending'+'\x20'+JSON['stringify'](_0x4f68b0)+'\x20to\x20'+_0x51eca9['service']+':'+_0x51eca9['method']+'\x20on\x20'+_0x51eca9['node']['ip']+':'+_0x51eca9['node']['port']);const _0x453a77=globalThis['distributi'+'on']['util']['serialize'](_0x4f68b0),_0x37c092={'hostname':_0x3e15cb['ip'],'port':_0x3e15cb['port'],'path':'/'+_0x119530+'/'+_0x54402a+'/'+_0xea0f43,'method':'PUT','headers':{'Content-Type':'applicatio'+'n/json','Content-Length':Buffer['byteLength'](_0x453a77)}},_0x4045c9=http['request'](_0x37c092,_0x50b48f=>{let _0x5cbef9='';_0x50b48f['on']('data',function(_0x550a00){_0x5cbef9+=_0x550a00;}),_0x50b48f['on']('end',function(){let _0xd40dff=undefined,_0x17f3ca=undefined;try{const _0x4409a1=globalThis['distributi'+'on']['util']['deserializ'+'e'](_0x5cbef9);_0xd40dff=_0x4409a1[0xb0a+-0x3b9*0x3+-0x1*-0x21],_0x17f3ca=_0x4409a1[0x1eb6+-0x1e0e+-0xa7*0x1];}catch(_0x28a0eb){let _0x21ae3b=_0x5cbef9['slice'](0x12*0x1cd+0x819+-0x2883,-0x267b+0x7*0x2fb+-0x2*-0xac3);_0x5cbef9['length']>0x442+0x1322+-0x137c&&(_0x21ae3b+='...');_0x403dbc(new Error('Failed\x20to\x20'+'deserializ'+'e\x20HTTP\x20res'+'ponse:\x20'+_0x21ae3b));return;}_0x403dbc(_0xd40dff,_0x17f3ca);return;}),_0x50b48f['on']('error',_0x2688c0=>{_0x403dbc(new Error('HTTP\x20respo'+'nse\x20error:'+'\x20'+_0x2688c0?.['message']));return;});});_0x4045c9['on']('error',_0x42ae41=>{_0x403dbc(new Error('HTTP\x20reque'+'st\x20error:\x20'+_0x42ae41?.['message']));return;}),_0x4045c9['write'](_0x453a77),_0x4045c9['end']();return;return _0x403dbc(new Error('comm.send\x20'+'not\x20implem'+'ented'));}module['exports']={'send':send};
|
|
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'),groupsStore={};groupsStore['all']={},groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config'])]=globalThis['distributi'+'on']['node']['config'];function get(
|
|
9
|
+
const log=require('../util/lo'+'g'),groupsStore={};groupsStore['all']={},groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config'])]=globalThis['distributi'+'on']['node']['config'];function get(_0x5748d0,_0x5b311d){return _0x5748d0 in groupsStore?_0x5b311d(null,groupsStore[_0x5748d0]):_0x5b311d(new Error('Group\x20'+_0x5748d0+'\x20not\x20found'),null);return _0x5b311d(new Error('groups.get'+'\x20not\x20imple'+'mented'));}function put(_0xcee79c,_0x51fd4c,_0x4b2b48){log('groups.put'+':\x20config:\x20'+JSON['stringify'](_0xcee79c)+'\x20group:\x20'+JSON['stringify'](_0x51fd4c)),_0x51fd4c=_0x51fd4c||{};typeof _0xcee79c==='string'&&(_0xcee79c={'gid':_0xcee79c});if(!_0xcee79c['gid'])return _0x4b2b48(Error('Config\x20gid'+'\x20was\x20null'),null);groupsStore[_0xcee79c['gid']]=_0x51fd4c,Object['values'](_0x51fd4c)['forEach'](_0xfc3f1b=>{groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](_0xfc3f1b)]=_0xfc3f1b;});const {setup:_0x18b3ee}=require('../../dist'+'ribution/a'+'ll/all.js');globalThis['distributi'+'on'][_0xcee79c['gid']]=_0x18b3ee(_0xcee79c);return _0x4b2b48(null,_0x51fd4c);return _0x4b2b48(new Error('groups.put'+'\x20not\x20imple'+'mented'));}function del(_0x382b9b,_0x364ed3){if(_0x382b9b in groupsStore){const _0x2a528f=groupsStore[_0x382b9b];return delete groupsStore[_0x382b9b],globalThis['distributi'+'on'][_0x382b9b]&&delete globalThis['distributi'+'on'][_0x382b9b],_0x364ed3(null,_0x2a528f);}else return _0x364ed3(new Error('Group\x20'+_0x382b9b+'\x20not\x20found'));return _0x364ed3(new Error('groups.del'+'\x20not\x20imple'+'mented'));}function add(_0x149d92,_0x5165ee,_0x443236){log('[all.group'+'s.add]\x20gro'+'up\x20name:\x20'+_0x149d92+'\x20node:\x20'+JSON['stringify'](_0x5165ee));if(_0x149d92 in groupsStore){!groupsStore[_0x149d92]&&(groupsStore[_0x149d92]={});groupsStore[_0x149d92][globalThis['distributi'+'on']['util']['id']['getSID'](_0x5165ee)]=_0x5165ee,groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](_0x5165ee)]=_0x5165ee;if(_0x443236)return _0x443236(null,groupsStore[_0x149d92]);}else{if(_0x443236)return _0x443236(new Error('Group\x20'+_0x149d92+'\x20not\x20found'));}return;return _0x443236(new Error('groups.add'+'\x20not\x20imple'+'mented'));};function rem(_0x421508,_0x363eca,_0x20828b){log('[all.group'+'s.rem]\x20nam'+'e:\x20'+_0x421508+'\x20node:\x20'+_0x363eca);return _0x421508 in groupsStore?(delete groupsStore[_0x421508][_0x363eca],delete groupsStore['all'][_0x363eca],_0x20828b(null,groupsStore[_0x421508])):_0x20828b(new Error('Group\x20'+_0x421508+'\x20not\x20found'));return _0x20828b(new Error('groups.rem'+'\x20not\x20imple'+'mented'));};module['exports']={'get':get,'put':put,'del':del,'add':add,'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'),routesStore=new Map();function get(
|
|
9
|
+
const log=require('../util/lo'+'g'),routesStore=new Map();function get(_0x3c878b,_0x2d8a42){log('[routes.ge'+'t]\x20Getting'+'\x20service:\x20'+JSON['stringify'](_0x3c878b));if(!_0x3c878b)return _0x2d8a42(new Error('No\x20configu'+'ration\x20pro'+'vided!'));typeof _0x3c878b==='string'&&(_0x3c878b={'service':_0x3c878b});const _0x7cc0c2=_0x3c878b['service'],_0x1d7c39=_0x3c878b['gid'];if(_0x1d7c39&&_0x1d7c39!=='local')return log('[routes.ge'+'t]\x20Found\x20d'+'istributed'+'\x20service:\x20'+_0x7cc0c2),_0x2d8a42(null,globalThis['distributi'+'on'][_0x1d7c39][_0x7cc0c2]);else{const _0x33155b=routesStore['get'](_0x7cc0c2);if(_0x33155b)return log('[routes.ge'+'t]\x20Found\x20l'+'ocal\x20servi'+'ce:\x20'+_0x7cc0c2),_0x2d8a42(null,_0x33155b);else{const _0x2f3260=globalThis['toLocal']['get'](_0x7cc0c2);return _0x2f3260?(log('[routes.ge'+'t]\x20Found\x20R'+'PC:\x20'+_0x7cc0c2),_0x2d8a42(null,{'call':_0x2f3260})):_0x2d8a42(new Error('Service\x20'+_0x7cc0c2+('\x20not\x20found'+'\x20in\x20routes')));}}return _0x2d8a42(new Error('routes.get'+'\x20not\x20imple'+'mented'));}function put(_0xf948d0,_0x194d97,_0xa8d9f8){log('[routes.pu'+'t]\x20Putting'+'\x20service:\x20'+_0x194d97),routesStore['set'](_0x194d97,_0xf948d0);return _0xa8d9f8(null,_0x194d97);return _0xa8d9f8(new Error('routes.put'+'\x20not\x20imple'+'mented'));}function rem(_0x485265,_0x567b0f){const _0xd2df8c=routesStore['get'](_0x485265);routesStore['delete'](_0x485265);return _0x567b0f(null,_0xd2df8c);return _0x567b0f(new Error('routes.rem'+'\x20not\x20imple'+'mented'));}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'),counts
|
|
9
|
+
const log=require('../util/lo'+'g'),counts=0x8a8*-0x1+0x2537+-0x985*0x3;function get(_0x1a50b3,_0x30db05){if(_0x1a50b3 in globalThis['distributi'+'on']['node']['config']){_0x30db05(null,globalThis['distributi'+'on']['node']['config'][_0x1a50b3]);return;}if(_0x1a50b3==='sid'){_0x30db05(null,globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config']));return;}if(_0x1a50b3==='nid'){_0x30db05(null,globalThis['distributi'+'on']['util']['id']['getNID'](globalThis['distributi'+'on']['node']['config']));return;}if(_0x1a50b3==='counts'){_0x30db05(null,counts);return;}if(_0x1a50b3==='heapTotal'){_0x30db05(null,process['memoryUsag'+'e']()['heapTotal']);return;}if(_0x1a50b3==='heapUsed'){_0x30db05(null,process['memoryUsag'+'e']()['heapUsed']);return;}return _0x30db05(new Error('Status\x20key'+'\x20not\x20found'));return _0x30db05(new Error('status.get'+'\x20not\x20imple'+'mented'));};const fs=require('fs'),path=require('path'),proc=require('node:child'+'_process');function getDistribution(){let _0x1136ce='';try{const _0x5ef89a=proc['execSync']('git\x20rev-pa'+'rse\x20--show'+'-toplevel',{'encoding':'utf8'})['trim']();_0x1136ce=path['join'](_0x5ef89a,'distributi'+'on.js');if(fs['existsSync'](_0x1136ce))return _0x1136ce;}catch(_0xdddb85){log('[status]\x20C'+'ould\x20not\x20d'+'etermine\x20g'+'it\x20root:',_0xdddb85['message']);}_0x1136ce=path['join'](__dirname,'../../','distributi'+'on.js');if(fs['existsSync'](_0x1136ce))return _0x1136ce;_0x1136ce=path['join'](process['cwd'](),'distributi'+'on.js');if(fs['existsSync'](_0x1136ce))return _0x1136ce;throw new Error('Failed\x20to\x20'+'find\x20proje'+'ct\x20root.');}function createOnStart(_0x15e5ae,_0x5d1f67){const _0x525c88='\x0a\x20\x20\x20\x20retur'+'n\x20function'+'(e)\x20{\x0a\x20\x20\x20\x20'+'\x20\x20let\x20onSt'+'art\x20=\x20'+_0x15e5ae['toString']()+(';\x0a\x20\x20\x20\x20\x20\x20le'+'t\x20callback'+'RPC\x20=\x20')+globalThis['distributi'+'on']['util']['wire']['createRPC'](globalThis['distributi'+'on']['util']['wire']['toAsync'](_0x5d1f67))['toString']()+(';\x0a\x20\x20\x20\x20\x20\x20if'+'\x20(e)\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ackRPC(e,\x20'+'null,\x20()\x20='+'>\x20{});\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20retur'+'n;\x0a\x20\x20\x20\x20\x20\x20}'+'\x0a\x20\x20\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.distr'+'ibution.no'+'de.config,'+'\x20()\x20=>\x20{})'+';\x0a\x20\x20\x20\x20\x20\x20}\x20'+'catch(e)\x20{'+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20c'+'allbackRPC'+'(e,\x20null,\x20'+'()\x20=>\x20{});'+'\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20'+'\x20\x20\x20};\x0a\x20\x20');return new Function(_0x525c88)();}function spawn(_0x1e1257,_0x427366){const _0x549ffe=_0x1e1257;_0x549ffe['onStart']=_0x549ffe['onStart']||function(){};if(!_0x549ffe['port']||!_0x549ffe['ip']){_0x427366(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'](_0x549ffe));const _0x189e4c=(_0x3a9f27,_0xfc46c8)=>{if(_0x3a9f27){_0x427366(_0x3a9f27);return;}globalThis['distributi'+'on']['local']['groups']['add']('all',_0xfc46c8,()=>{_0x427366(_0x3a9f27,_0xfc46c8);});};_0x549ffe['onStart']=createOnStart(_0x549ffe['onStart'],_0x189e4c);const _0x199ff3=getDistribution();log('[status.sp'+'awn]\x20Using'+'\x20distribut'+'ion\x20path:\x20'+_0x199ff3);const _0x1f1f23=proc['spawn']('node',[_0x199ff3,'--config',globalThis['distributi'+'on']['util']['serialize'](_0x549ffe)],{'detached':!![],'stdio':'inherit'});_0x1f1f23;return;_0x427366(new Error('status.spa'+'wn\x20not\x20imp'+'lemented'));}function stop(_0x46a0a8){log('[status.st'+'op]\x20Shutti'+'ng\x20down\x20no'+'de'),globalThis['distributi'+'on']['node']['server']['close'](),process['nextTick'](()=>process['exit'](-0x16eb*0x1+-0x2*0xc6e+0x2fc7));return _0x46a0a8(null,globalThis['distributi'+'on']['node']['config']);_0x46a0a8(new Error('status.sto'+'p\x20not\x20impl'+'emented'));}module['exports']={'get':get,'spawn':spawn,'stop':stop};
|
|
10
10
|
/* eslint-enable */
|