@hotmeshio/hotmesh 0.3.13 → 0.3.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.
- package/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +1 -1
- package/build/services/activities/activity.js +1 -1
- package/build/services/activities/await.js +1 -1
- package/build/services/activities/cycle.js +1 -1
- package/build/services/activities/hook.js +1 -1
- package/build/services/activities/index.js +1 -1
- package/build/services/activities/interrupt.js +1 -1
- package/build/services/activities/signal.js +1 -1
- package/build/services/activities/trigger.js +1 -1
- package/build/services/activities/worker.js +1 -1
- package/build/services/collator/index.js +1 -1
- package/build/services/compiler/deployer.js +1 -1
- package/build/services/compiler/index.js +1 -1
- package/build/services/compiler/validator.js +1 -1
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/meshos/index.js +3 -3
- package/build/services/pipe/functions/array.js +1 -1
- package/build/services/pipe/functions/bitwise.js +1 -1
- package/build/services/pipe/functions/conditional.js +1 -1
- package/build/services/pipe/functions/cron.js +1 -1
- package/build/services/pipe/functions/date.js +1 -1
- package/build/services/pipe/functions/index.js +1 -1
- package/build/services/pipe/functions/json.js +1 -1
- package/build/services/pipe/functions/logical.js +1 -1
- package/build/services/pipe/functions/math.js +1 -1
- package/build/services/pipe/functions/number.js +1 -1
- package/build/services/pipe/functions/object.js +1 -1
- package/build/services/pipe/functions/string.js +1 -1
- package/build/services/pipe/functions/symbol.js +1 -1
- package/build/services/pipe/functions/unary.js +1 -1
- package/build/services/pipe/index.js +1 -1
- package/build/services/quorum/index.js +1 -1
- package/build/services/reporter/index.js +1 -1
- package/build/services/router/index.js +1 -1
- package/build/services/search/providers/postgres/postgres.js +1 -1
- package/build/services/search/providers/redis/ioredis.js +1 -1
- package/build/services/search/providers/redis/redis.js +1 -1
- package/build/services/serializer/index.js +1 -1
- package/build/services/store/providers/postgres/kvsql.js +1 -1
- package/build/services/store/providers/postgres/postgres.js +1 -1
- package/build/services/store/providers/redis/_base.js +1 -1
- package/build/services/store/providers/redis/ioredis.js +1 -1
- package/build/services/store/providers/redis/redis.js +1 -1
- package/build/services/store/providers/store-initializable.js +1 -1
- package/build/services/stream/providers/nats/nats.js +1 -1
- package/build/services/stream/providers/postgres/postgres.js +1 -1
- package/build/services/stream/providers/redis/ioredis.js +1 -1
- package/build/services/stream/providers/redis/redis.js +1 -1
- package/build/services/stream/providers/stream-initializable.js +1 -1
- package/build/services/sub/providers/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.js +1 -1
- package/build/services/task/index.js +1 -1
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x322475,_0x18fcab){const _0x4b6398=_0x26f9,_0x429ff6=_0x322475();while(!![]){try{const _0x4b5704=parseInt(_0x4b6398(0x1a1))/0x1*(-parseInt(_0x4b6398(0x1a5))/0x2)+parseInt(_0x4b6398(0x1a6))/0x3+parseInt(_0x4b6398(0x19f))/0x4*(-parseInt(_0x4b6398(0x1a0))/0x5)+parseInt(_0x4b6398(0x1a2))/0x6+parseInt(_0x4b6398(0x1a4))/0x7+-parseInt(_0x4b6398(0x19e))/0x8+parseInt(_0x4b6398(0x1a3))/0x9;if(_0x4b5704===_0x18fcab)break;else _0x429ff6['push'](_0x429ff6['shift']());}catch(_0x72b903){_0x429ff6['push'](_0x429ff6['shift']());}}}(_0x485b,0x9d87c));function _0x26f9(_0x442171,_0x1aa722){const _0x485b03=_0x485b();return _0x26f9=function(_0x26f940,_0x4c23f1){_0x26f940=_0x26f940-0x19e;let _0x233a3e=_0x485b03[_0x26f940];return _0x233a3e;},_0x26f9(_0x442171,_0x1aa722);}function _0x485b(){const _0xbfc799=['634xsbnao','570375KgulBe','5756688PomocN','772FYHqkE','30025zWenmx','2116mdHqAO','7734924TXzmsn','11338911dSZnFR','3187863RBOVZa'];_0x485b=function(){return _0xbfc799;};return _0x485b();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../../types/collator');class CollatorService{static['assertJobActive'](_0x165819,_0x17aeb8,_0x55d231,_0x407068=0x0){if(_0x165819<=_0x407068)throw new errors_1['InactiveJobError'](_0x17aeb8,_0x165819,_0x55d231);}static['getDimensionalAddress'](_0x4e4249,_0x3a98e0=![]){let _0x5e410d=_0x4e4249['context']['metadata']['dad']||_0x4e4249['metadata']['dad'];return _0x3a98e0&&_0x5e410d&&_0x4e4249['leg']===0x2&&(_0x5e410d=_0x5e410d['substring'](0x0,_0x5e410d['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([..._0x4e4249['config']['ancestors'],_0x4e4249['metadata']['aid']],_0x5e410d);}static['resolveReentryDimension'](_0x184084){const _0x10ea27=_0x184084['config']['ancestor'],_0x4bfa06=_0x184084['config']['ancestors'],_0x351239=_0x4bfa06['indexOf'](_0x10ea27),_0x38bb11=_0x184084['metadata']['dad']['split'](',');return _0x38bb11['length']=_0x351239+0x1,_0x38bb11['push']('0'),_0x38bb11['join'](',');}static async['notarizeEntry'](_0xf3e0f6,_0xc37db1){const _0x4cf246=await _0xf3e0f6['store']['collate'](_0xf3e0f6['context']['metadata']['jid'],_0xf3e0f6['metadata']['aid'],-0x5af3107a4000,this['getDimensionalAddress'](_0xf3e0f6),_0xc37db1);return this['verifyInteger'](_0x4cf246,0x1,'enter'),_0x4cf246;}static async['authorizeReentry'](_0x3c170d,_0x559fe3){const _0x567208=await _0x3c170d['store']['collate'](_0x3c170d['context']['metadata']['jid'],_0x3c170d['metadata']['aid'],-0x9184e72a000,this['getDimensionalAddress'](_0x3c170d),_0x559fe3);return _0x567208;}static async['notarizeEarlyExit'](_0xda6b76,_0x439c33){return await _0xda6b76['store']['collate'](_0xda6b76['context']['metadata']['jid'],_0xda6b76['metadata']['aid'],-0xa012317b000,this['getDimensionalAddress'](_0xda6b76),_0x439c33);}static async['notarizeEarlyCompletion'](_0x5da120,_0x372a3e){const _0x574434=_0x5da120['config']['cycle']?0x9184e72a000:0xa012317b000;return await _0x5da120['store']['collate'](_0x5da120['context']['metadata']['jid'],_0x5da120['metadata']['aid'],0xf4241-_0x574434,this['getDimensionalAddress'](_0x5da120),_0x372a3e);}static async['notarizeInception'](_0x35ffcf,_0x4a025f,_0x30c032){_0x4a025f&&await _0x35ffcf['store']['collateSynthetic'](_0x35ffcf['context']['metadata']['jid'],_0x4a025f,0xf4240,_0x30c032);}static async['isInceptionOverage'](_0x4baeb4,_0x12ef43){if(_0x12ef43){const _0x413caf=await _0x4baeb4['store']['collateSynthetic'](_0x4baeb4['context']['metadata']['jid'],_0x12ef43,0xf4240);return _0x413caf>0xf4240;}return![];}static async['notarizeReentry'](_0x6aae2a,_0x30e93a,_0x30ab75){const _0x1d79f3=_0x6aae2a['context']['metadata']['jid'],_0x149064=_0x30ab75||_0x6aae2a['store']['transact']();await _0x6aae2a['store']['collate'](_0x1d79f3,_0x6aae2a['metadata']['aid'],0xf4240,this['getDimensionalAddress'](_0x6aae2a,!![]),_0x149064),await _0x6aae2a['store']['collateSynthetic'](_0x1d79f3,_0x30e93a,0xf4240,_0x149064);const [_0x1b3cb1,_0x40d4c1]=await _0x149064['exec'](),_0x35d60a=Array['isArray'](_0x1b3cb1)?_0x1b3cb1[0x1]:_0x1b3cb1,_0x5e96bc=Array['isArray'](_0x40d4c1)?_0x40d4c1[0x1]:_0x40d4c1;return this['verifyInteger'](_0x35d60a,0x2,'enter'),this['verifySyntheticInteger'](_0x5e96bc),_0x35d60a;}static async['notarizeContinuation'](_0x228664,_0x20f4cc){return await _0x228664['store']['collate'](_0x228664['context']['metadata']['jid'],_0x228664['metadata']['aid'],0x1,this['getDimensionalAddress'](_0x228664),_0x20f4cc);}static async['notarizeCompletion'](_0x1e2296,_0xb25a79){const _0x387ee4=_0x1e2296['config']['cycle']?0x0:0xe8d4a51000;return await _0x1e2296['store']['collate'](_0x1e2296['context']['metadata']['jid'],_0x1e2296['metadata']['aid'],0x1-_0x387ee4,this['getDimensionalAddress'](_0x1e2296),_0xb25a79);}static['getDigitAtIndex'](_0x3a55cb,_0x4bfd47){const _0x2bf93b=_0x3a55cb['toString']();if(_0x4bfd47<0x0||_0x4bfd47>=_0x2bf93b['length'])return null;const _0x48e39c=parseInt(_0x2bf93b[_0x4bfd47],0xa);return _0x48e39c;}static['getDimensionalIndex'](_0x18b4c2){const _0x1428e9=_0x18b4c2['toString']();if(_0x1428e9['length']<0x9)return null;const _0xe7f5e=_0x1428e9['substring'](0x3,0x9),_0x110a58=parseInt(_0xe7f5e,0xa);return _0x110a58-0x1;}static['isDuplicate'](_0xee346c,_0x3b79c2){return this['getDigitAtIndex'](_0xee346c,_0x3b79c2)<0x8;}static['isInactive'](_0x3ab1e7){return this['getDigitAtIndex'](_0x3ab1e7,0x2)<0x9;}static['isPrimed'](_0x4da494,_0x2bdec7){return _0x2bdec7==0x1?_0x4da494!=-0x5af3107a4000:this['getDigitAtIndex'](_0x4da494,0x0)<0x9&&this['getDigitAtIndex'](_0x4da494,0x1)<0x9;}static['verifySyntheticInteger'](_0x2deddf){const _0x8781e8=_0x2deddf['toString'](),_0x1d647e=parseInt(_0x8781e8[_0x8781e8['length']-0x1],0xa);if(_0x1d647e>0x0)throw new errors_1['CollationError'](_0x2deddf,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(_0x2deddf>=0x1e8480)throw new errors_1['CollationError'](_0x2deddf,0x2,'enter',collator_1['CollationFaultType']['DUPLICATE']);}}static['verifyInteger'](_0xbea234,_0x1ed276,_0x279d16){let _0x450cc9;if(_0x1ed276===0x1&&_0x279d16==='enter'){if(!this['isPrimed'](_0xbea234,0x1))_0x450cc9=collator_1['CollationFaultType']['MISSING'];else{if(this['isDuplicate'](_0xbea234,0x0))_0x450cc9=collator_1['CollationFaultType']['DUPLICATE'];else _0xbea234!=0x331a2bfa73000&&(_0x450cc9=collator_1['CollationFaultType']['INVALID']);}}else{if(_0x1ed276===0x1&&_0x279d16==='exit'){if(_0xbea234===-0x9184e72a000)_0x450cc9=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](_0xbea234,0x1)&&(_0x450cc9=collator_1['CollationFaultType']['DUPLICATE']);}else{if(_0x1ed276===0x2&&_0x279d16==='enter'){if(!this['isPrimed'](_0xbea234,0x2))_0x450cc9=collator_1['CollationFaultType']['FORBIDDEN'];else this['isInactive'](_0xbea234)&&(_0x450cc9=collator_1['CollationFaultType']['INACTIVE']);}}}if(_0x450cc9)throw new errors_1['CollationError'](_0xbea234,_0x1ed276,_0x279d16,_0x450cc9);}static['getDimensionsById'](_0x449642,_0x3ead4f){const _0x1cff63={'$ADJACENT':_0x3ead4f+',0'};let _0x224761=_0x3ead4f;return _0x449642['reverse']()['forEach'](_0x2abfbb=>{_0x1cff63[_0x2abfbb]=_0x224761,_0x224761=_0x224761['substring'](0x0,_0x224761['lastIndexOf'](','));}),_0x1cff63;}static['getSeed'](){return'999000000000000';}static['getTriggerSeed'](){return'888000001000001';}static['compile'](_0x3f5b61){CollatorService['bindAncestorArray'](_0x3f5b61);}static['bindAncestorArray'](_0x5df7ce){_0x5df7ce['forEach'](_0x360adc=>{const _0x425964={},_0x325cc9=Object['keys'](_0x360adc['activities'])['find'](_0x1937af=>_0x360adc['activities'][_0x1937af]['type']==='trigger');if(!_0x325cc9)throw new Error('collator-trigger-activity-not-found');const _0x5c98c2=(_0x427e71,_0x377da6)=>{_0x425964[_0x427e71]=_0x377da6,_0x360adc['activities'][_0x427e71]['ancestors']=_0x377da6;const _0x39a2fe=_0x360adc['transitions']?.[_0x427e71]||[];_0x39a2fe['forEach'](_0xc8bf71=>{_0x5c98c2(_0xc8bf71['to'],[..._0x377da6,_0x427e71]);});};_0x5c98c2(_0x325cc9,[]);});}static['getDimensionalSeed'](_0x1d6316=0x0){return','+_0x1d6316;}}exports['CollatorService']=CollatorService,CollatorService['targetLength']=0xf;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x3c67(){const _0x24deab=['465500EBygLO','632951LJsWqz','1110630IsqzAE','1431woiNTN','244663peyKKa','3657591sVHwwz','2OxNqKz','6sSQCtW','8072ZaWvQB','1511880vburrX','80uYqJAX'];_0x3c67=function(){return _0x24deab;};return _0x3c67();}function _0x4864(_0x45a087,_0x37aa00){const _0x3c67cb=_0x3c67();return _0x4864=function(_0x48647c,_0x563efa){_0x48647c=_0x48647c-0xf7;let _0x7da66d=_0x3c67cb[_0x48647c];return _0x7da66d;},_0x4864(_0x45a087,_0x37aa00);}(function(_0x2cb492,_0x1e21ba){const _0xe5eb99=_0x4864,_0x21cd92=_0x2cb492();while(!![]){try{const _0xb8c4d6=parseInt(_0xe5eb99(0xfb))/0x1*(parseInt(_0xe5eb99(0xfd))/0x2)+-parseInt(_0xe5eb99(0xf9))/0x3+-parseInt(_0xe5eb99(0xf7))/0x4+parseInt(_0xe5eb99(0x100))/0x5+parseInt(_0xe5eb99(0xfe))/0x6*(parseInt(_0xe5eb99(0xfc))/0x7)+parseInt(_0xe5eb99(0xff))/0x8*(parseInt(_0xe5eb99(0xfa))/0x9)+-parseInt(_0xe5eb99(0x101))/0xa*(parseInt(_0xe5eb99(0xf8))/0xb);if(_0xb8c4d6===_0x1e21ba)break;else _0x21cd92['push'](_0x21cd92['shift']());}catch(_0x480e0f){_0x21cd92['push'](_0x21cd92['shift']());}}}(_0x3c67,0x451be));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),serializer_1=require('../serializer'),pipe_1=require('../pipe'),validator_1=require('./validator'),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;class Deployer{constructor(_0x3faf28){this['manifest']=null,this['manifest']=_0x3faf28;}async['deploy'](_0x5c2aad,_0x312433){this['store']=_0x5c2aad,this['stream']=_0x312433,collator_1['CollatorService']['compile'](this['manifest']['app']['graphs']),this['convertActivitiesToHooks'](),this['convertTopicsToTypes'](),this['copyJobSchemas'](),this['bindBackRefs'](),this['bindParents'](),this['bindCycleTarget'](),this['resolveMappingDependencies'](),this['resolveJobMapsPaths'](),await this['generateSymKeys'](),await this['generateSymVals'](),await this['deployHookPatterns'](),await this['deployActivitySchemas'](),await this['deploySubscriptions'](),await this['deployTransitions'](),await this['deployConsumerGroups']();}['getVID'](){return{'id':this['manifest']['app']['id'],'version':this['manifest']['app']['version']};}async['generateSymKeys'](){for(const _0x591865 of this['manifest']['app']['graphs']){const [,_0x35e2b4]=this['findTrigger'](_0x591865),_0x28604b=_0x35e2b4['subscribes'],[_0x484c7f,_0x28d182,_0x321c9e]=await this['store']['reserveSymbolRange']('$'+_0x28604b,DEFAULT_RANGE_SIZE,'JOB'),_0x46f029='',_0x34bca7=this['bindSymbols'](_0x484c7f,_0x28d182,_0x321c9e,_0x46f029,_0x35e2b4['PRODUCES']);Object['keys'](_0x34bca7)['length']&&await this['store']['addSymbols']('$'+_0x28604b,_0x34bca7);for(const [_0x294d18,_0x471703]of Object['entries'](_0x591865['activities'])){const [_0x5d5841,_0x49086b,_0x5e6cfe]=await this['store']['reserveSymbolRange'](_0x294d18,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x2d12f6=_0x294d18+'/';this['bindSelf'](_0x471703['consumes'],_0x471703['produces'],_0x294d18);const _0x45b8f7=this['bindSymbols'](_0x5d5841,_0x49086b,_0x5e6cfe,_0x2d12f6,_0x471703['produces']);Object['keys'](_0x45b8f7)['length']&&await this['store']['addSymbols'](_0x294d18,_0x45b8f7);}}}['bindSelf'](_0x3ab9a7,_0x473b90,_0x32f640){for(const _0x3142b7 of[_0x32f640,'$self']){const _0xd01454=_0x3ab9a7[_0x3142b7];if(_0xd01454)for(const _0x41de88 of _0xd01454){!_0x473b90['includes'](_0x41de88)&&_0x473b90['push'](_0x41de88);}}}['bindSymbols'](_0x1db165,_0x5aaa6b,_0x2f766b,_0x49b8f3,_0x389633){const _0x1f89bf={},_0xcb3401={..._0x2f766b};for(const _0x533be5 of _0x389633){const _0x2d04c1=''+_0x49b8f3+_0x533be5;if(!_0xcb3401[_0x2d04c1]){if(_0x1db165>_0x5aaa6b)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x46e167=(0x0,utils_1['getSymKey'])(_0x1db165);_0x1db165++,_0x1f89bf[_0x2d04c1]=_0x46e167,_0xcb3401[_0x2d04c1]=_0x46e167;}}return _0x1f89bf;}['copyJobSchemas'](){const _0x2762a5=this['manifest']['app']['graphs'];for(const _0x4694c2 of _0x2762a5){const _0x2c2547=_0x4694c2['output']?.['schema'],_0x3820ee=_0x4694c2['input']?.['schema'];if(!_0x2c2547&&!_0x3820ee)continue;const _0x4bdbda=_0x4694c2['activities'];for(const _0x13b8e1 in _0x4bdbda){if(_0x4bdbda[_0x13b8e1]['type']==='trigger'){const _0x116683=_0x4bdbda[_0x13b8e1];_0x2c2547&&(!_0x116683['job']&&(_0x116683['job']={}),_0x116683['job']['schema']=_0x2c2547),_0x3820ee&&(_0x116683['output']={'schema':_0x3820ee});}}}}['bindBackRefs'](){for(const _0x1913e3 of this['manifest']['app']['graphs']){const _0x293a74=_0x1913e3['activities'],_0x35d3f2=this['findTrigger'](_0x1913e3)[0x0];for(const _0x4c55cd in _0x293a74){_0x293a74[_0x4c55cd]['trigger']=_0x35d3f2,_0x293a74[_0x4c55cd]['subscribes']=_0x1913e3['subscribes'],_0x1913e3['publishes']&&(_0x293a74[_0x4c55cd]['publishes']=_0x1913e3['publishes']),_0x293a74[_0x4c55cd]['expire']=_0x1913e3['expire']??undefined,_0x293a74[_0x4c55cd]['persistent']=_0x1913e3['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x5d2323 of this['manifest']['app']['graphs']){const _0xe273af=_0x5d2323['activities'];for(const _0x17298e in _0xe273af){const _0x470148=_0xe273af[_0x17298e];_0x470148['type']==='cycle'&&(_0xe273af[_0x470148['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x4eecb9 of this['manifest']['app']['graphs']){const _0x3b194a=_0x4eecb9['activities'];for(const _0x50ea2d in _0x3b194a){const _0x3cb40c=_0x3b194a[_0x50ea2d];['worker','await']['includes'](_0x3cb40c['type'])&&_0x3cb40c['topic']&&!_0x3cb40c['subtype']&&(_0x3cb40c['subtype']=_0x3cb40c['topic']);}}}['convertActivitiesToHooks'](){for(const _0x1c507d of this['manifest']['app']['graphs']){const _0x378d5d=_0x1c507d['activities'];for(const _0x54e9bc in _0x378d5d){const _0x548301=_0x378d5d[_0x54e9bc];['activity']['includes'](_0x548301['type'])&&(_0x548301['type']='hook');}}}async['bindParents'](){const _0xb44196=this['manifest']['app']['graphs'];for(const _0x51faf2 of _0xb44196){if(_0x51faf2['transitions'])for(const _0x31e25d in _0x51faf2['transitions']){const _0x36a855=_0x51faf2['transitions'][_0x31e25d];for(const _0x1cb4aa of _0x36a855){const _0x318335=_0x1cb4aa['to'];_0x51faf2['activities'][_0x318335]['parent']=_0x31e25d;}_0x51faf2['activities'][_0x31e25d]['transitions']=_0x36a855;}}}['collectValues'](_0x113392,_0x37c65d){for(const [_0x3caafd,_0x491ffb]of Object['entries'](_0x113392)){if(_0x3caafd==='enum'||_0x3caafd==='examples'||_0x3caafd==='default'){if(Array['isArray'](_0x491ffb))for(const _0x519f7f of _0x491ffb){typeof _0x519f7f==='string'&&_0x519f7f['length']>0x5&&_0x37c65d['add'](_0x519f7f);}else typeof _0x491ffb==='string'&&_0x491ffb['length']>0x5&&_0x37c65d['add'](_0x491ffb);}else typeof _0x491ffb==='object'&&this['collectValues'](_0x491ffb,_0x37c65d);}}['traverse'](_0x56df6b,_0x132177){for(const _0x33f2d7 of Object['values'](_0x56df6b)){typeof _0x33f2d7==='object'&&('schema'in _0x33f2d7?this['collectValues'](_0x33f2d7['schema'],_0x132177):this['traverse'](_0x33f2d7,_0x132177));}}async['generateSymVals'](){const _0x240c63=new Set();for(const _0x179202 of this['manifest']['app']['graphs']){this['traverse'](_0x179202,_0x240c63);}const _0x423bb5=await this['store']['getSymbolValues'](),_0x20ff4c=Object['keys'](_0x423bb5)['length'],_0x58cfa8=Math['pow'](0x34,0x2)-0x1,_0x4f9f21=serializer_1['SerializerService']['filterSymVals'](_0x20ff4c,_0x58cfa8,_0x423bb5,_0x240c63);await this['store']['addSymbolValues'](_0x4f9f21);}['resolveJobMapsPaths'](){function _0x391a16(_0x135cc5){const _0x156914=[];function _0x3a287c(_0x534552,_0xc1aadf=[]){for(const _0x1fd9fb in _0x534552){if(typeof _0x534552[_0x1fd9fb]==='object'&&_0x534552[_0x1fd9fb]!==null&&!('@pipe'in _0x534552[_0x1fd9fb])){const _0x1103c9=[..._0xc1aadf,_0x1fd9fb];_0x3a287c(_0x534552[_0x1fd9fb],_0x1103c9);}else{const _0x24c226=[..._0xc1aadf,_0x1fd9fb]['join']('/');if(!_0x24c226['includes']('[')){const _0x56bbaf='data/'+_0x24c226;!_0x156914['includes'](_0x56bbaf)&&_0x156914['push'](_0x56bbaf);}else{const [_0x10b1d1,_0x302809]=_0x24c226['split']('['),[_0x6afe99,_0xb6ffaa]=_0x302809['split'](']');if(!isNaN(parseInt(_0x6afe99)))for(let _0x2f8c2c=0x0;_0x2f8c2c<parseInt(_0x6afe99);_0x2f8c2c++){const _0x274e52='data/'+_0x10b1d1+'/'+_0x2f8c2c;!_0x156914['includes'](_0x274e52)&&_0x156914['push'](_0x274e52);}}}}}return _0x135cc5&&_0x3a287c(_0x135cc5),_0x156914;}for(const _0x5a0c18 of this['manifest']['app']['graphs']){let _0x58721c=[];const [,_0x25b6c9]=this['findTrigger'](_0x5a0c18);for(const _0xa3ed13 in _0x5a0c18['activities']){const _0x504cb6=_0x5a0c18['activities'][_0xa3ed13];_0x58721c=_0x58721c['concat'](_0x391a16(_0x504cb6['job']?.['maps']));}_0x25b6c9['PRODUCES']=_0x58721c;}}['resolveMappingDependencies'](){const _0x581ada=[];function _0x497fab(_0x2ac7cf,_0x3455ba){for(const _0x2d6e56 in _0x2ac7cf){if(typeof _0x2ac7cf[_0x2d6e56]==='string'){const _0x3efce9=_0x2ac7cf[_0x2d6e56],_0xefceef=_0x3efce9['match'](/^\{[^@].*}$/);_0xefceef&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x3efce9)&&(_0x3efce9['split']('.')[0x1]!=='input'&&(_0x581ada['push'](_0x3efce9),_0x3455ba['push'](_0x3efce9)));}else typeof _0x2ac7cf[_0x2d6e56]==='object'&&_0x2ac7cf[_0x2d6e56]!==null&&_0x497fab(_0x2ac7cf[_0x2d6e56],_0x3455ba);}}const _0x1d89d5=this['manifest']['app']['graphs'];for(const _0x5d9202 of _0x1d89d5){const _0x4adb8e=_0x5d9202['activities'];for(const _0x3b624c in _0x4adb8e){const _0x276e33=_0x4adb8e[_0x3b624c];_0x276e33['consumes']=[],_0x497fab(_0x276e33,_0x276e33['consumes']),_0x276e33['consumes']=this['groupMappingRules'](_0x276e33['consumes']);}}const _0x49b034=this['groupMappingRules'](_0x581ada);for(const _0x570a5f of _0x1d89d5){const _0x5308a4=_0x570a5f['activities'];for(const _0x316d2e in _0x5308a4){const _0x4cda08=_0x5308a4[_0x316d2e];_0x4cda08['produces']=_0x49b034[''+_0x316d2e]||[];}}}['groupMappingRules'](_0x38b98f){_0x38b98f=Array['from'](new Set(_0x38b98f))['sort']();const _0x38229f={};for(const _0x6ea44e of _0x38b98f){const [_0x31bc27,_0x1a65d2]=this['resolveMappableValue'](_0x6ea44e);!_0x38229f[_0x31bc27]&&(_0x38229f[_0x31bc27]=[]),_0x38229f[_0x31bc27]['push'](_0x1a65d2);}return _0x38229f;}['resolveMappableValue'](_0x174052){_0x174052=_0x174052['substring'](0x1,_0x174052['length']-0x1);const _0x303fd1=_0x174052['split']('.');if(_0x303fd1[0x0]==='$job'){const [_0x46edcf,..._0x4e9a7c]=_0x303fd1;return[_0x46edcf,_0x4e9a7c['join']('/')];}else{const [_0x12c23c,_0x1b07d7,_0x1a1737,..._0x597e29]=_0x303fd1,_0x356c39={'hook':'hook/data','input':'input/data','output':_0x1a1737==='data'?'output/data':'output/metadata'}[_0x1b07d7];return[_0x12c23c,_0x356c39+'/'+_0x597e29['join']('/')];}}async['deployActivitySchemas'](){const _0xe848d0=this['manifest']['app']['graphs'],_0x1f48ea={};for(const _0x13aecd of _0xe848d0){const _0x1f481c=_0x13aecd['activities'];for(const _0x3ca1f1 in _0x1f481c){const _0x435132=_0x1f481c[_0x3ca1f1];delete _0x435132['transitions'],_0x1f48ea[_0x3ca1f1]=_0x435132;}}await this['store']['setSchemas'](_0x1f48ea,this['getVID']());}async['deploySubscriptions'](){const _0x4c1619=this['manifest']['app']['graphs'],_0xe333e5={};for(const _0x24a1c9 of _0x4c1619){const _0x4f7b17=_0x24a1c9['activities'],_0x42a332=_0x24a1c9['subscribes'];for(const _0x4efb80 in _0x4f7b17){if(_0x4f7b17[_0x4efb80]['type']==='trigger'){_0xe333e5[_0x42a332]=_0x4efb80;break;}}}await this['store']['setSubscriptions'](_0xe333e5,this['getVID']());}['findTrigger'](_0x48d1c6){for(const _0x3872bb in _0x48d1c6['activities']){const _0x4b9378=_0x48d1c6['activities'][_0x3872bb];if(_0x4b9378['type']==='trigger')return[_0x3872bb,_0x4b9378];}return null;}async['deployTransitions'](){const _0xa0128a=this['manifest']['app']['graphs'],_0x1710d2={};for(const _0x37e8f2 of _0xa0128a){if(_0x37e8f2['subscribes']&&_0x37e8f2['subscribes']['startsWith']('.')){const [_0x49d883]=this['findTrigger'](_0x37e8f2);_0x49d883&&(_0x1710d2[_0x37e8f2['subscribes']]={[_0x49d883]:!![]});}if(_0x37e8f2['transitions'])for(const _0x466098 in _0x37e8f2['transitions']){const _0x1cb37d=_0x37e8f2['transitions'][_0x466098],_0x464510={};for(const _0x118ae0 of _0x1cb37d){const _0x5e3482=_0x118ae0['to'];_0x118ae0['conditions']?_0x464510[_0x5e3482]=_0x118ae0['conditions']:_0x464510[_0x5e3482]=!![];}Object['keys'](_0x464510)['length']>0x0&&(_0x1710d2['.'+_0x466098]=_0x464510);}}await this['store']['setTransitions'](_0x1710d2,this['getVID']());}async['deployHookPatterns'](){const _0x40fd29=this['manifest']['app']['graphs'],_0x3d457d={};for(const _0x4d7a44 of _0x40fd29){if(_0x4d7a44['hooks'])for(const _0x5a2565 in _0x4d7a44['hooks']){_0x3d457d[_0x5a2565]=_0x4d7a44['hooks'][_0x5a2565];const _0x5497d8=_0x4d7a44['hooks'][_0x5a2565][0x0]['to'],_0x1e5055=_0x4d7a44['activities'][_0x5497d8];_0x1e5055&&(!_0x1e5055['hook']&&(_0x1e5055['hook']={}),_0x1e5055['hook']['topic']=_0x5a2565);}}await this['store']['setHookRules'](_0x3d457d);}async['deployConsumerGroups'](){const _0x34d4bc={'appId':this['manifest']['app']['id']},_0x4d5684=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x34d4bc);await this['deployConsumerGroup'](_0x4d5684,'ENGINE');for(const _0x298db2 of this['manifest']['app']['graphs']){const _0x4eea40=_0x298db2['activities'];for(const _0xdc4a8d in _0x4eea40){const _0x274f2e=_0x4eea40[_0xdc4a8d];if(_0x274f2e['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x274f2e['subtype'],{})===_0x274f2e['subtype']){_0x34d4bc['topic']=_0x274f2e['subtype'];const _0x3753ff=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x34d4bc);await this['deployConsumerGroup'](_0x3753ff,'WORKER');}}}}async['deployConsumerGroup'](_0x120636,_0x510d84){try{await this['stream']['createConsumerGroup'](_0x120636,_0x510d84);}catch(_0x30256e){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x120636,'group':_0x510d84});}}}exports['Deployer']=Deployer;
|
|
1
|
+
'use strict';function _0x54eb(){const _0x477d57=['2452ZmLWMl','360LCBLhR','2946474dxdxyR','316630BIwVVv','171nJpOJS','3815TlECjq','260099mpjbFb','297682SRxJID','837162fkBvqt','16054cRCaqY','26bwlCsf','8idihhA'];_0x54eb=function(){return _0x477d57;};return _0x54eb();}(function(_0xa5ab4a,_0x573cdc){const _0x31c98f=_0x480f,_0x4eb0d6=_0xa5ab4a();while(!![]){try{const _0x3410e8=parseInt(_0x31c98f(0xd8))/0x1*(parseInt(_0x31c98f(0xd9))/0x2)+-parseInt(_0x31c98f(0xd7))/0x3+-parseInt(_0x31c98f(0xdb))/0x4*(parseInt(_0x31c98f(0xd4))/0x5)+-parseInt(_0x31c98f(0xdd))/0x6+parseInt(_0x31c98f(0xd5))/0x7*(-parseInt(_0x31c98f(0xda))/0x8)+-parseInt(_0x31c98f(0xd3))/0x9*(-parseInt(_0x31c98f(0xde))/0xa)+parseInt(_0x31c98f(0xd6))/0xb*(parseInt(_0x31c98f(0xdc))/0xc);if(_0x3410e8===_0x573cdc)break;else _0x4eb0d6['push'](_0x4eb0d6['shift']());}catch(_0x48167c){_0x4eb0d6['push'](_0x4eb0d6['shift']());}}}(_0x54eb,0x54c0e));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;function _0x480f(_0x1324f9,_0x31deda){const _0x54eb0c=_0x54eb();return _0x480f=function(_0x480fa8,_0x2823c4){_0x480fa8=_0x480fa8-0xd3;let _0x10e17f=_0x54eb0c[_0x480fa8];return _0x10e17f;},_0x480f(_0x1324f9,_0x31deda);}const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),serializer_1=require('../serializer'),pipe_1=require('../pipe'),validator_1=require('./validator'),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;class Deployer{constructor(_0x5a0289){this['manifest']=null,this['manifest']=_0x5a0289;}async['deploy'](_0x411225,_0x5aa19f){this['store']=_0x411225,this['stream']=_0x5aa19f,collator_1['CollatorService']['compile'](this['manifest']['app']['graphs']),this['convertActivitiesToHooks'](),this['convertTopicsToTypes'](),this['copyJobSchemas'](),this['bindBackRefs'](),this['bindParents'](),this['bindCycleTarget'](),this['resolveMappingDependencies'](),this['resolveJobMapsPaths'](),await this['generateSymKeys'](),await this['generateSymVals'](),await this['deployHookPatterns'](),await this['deployActivitySchemas'](),await this['deploySubscriptions'](),await this['deployTransitions'](),await this['deployConsumerGroups']();}['getVID'](){return{'id':this['manifest']['app']['id'],'version':this['manifest']['app']['version']};}async['generateSymKeys'](){for(const _0x2124d2 of this['manifest']['app']['graphs']){const [,_0x24a54d]=this['findTrigger'](_0x2124d2),_0x482616=_0x24a54d['subscribes'],[_0x1f7307,_0x1a1b17,_0x12890e]=await this['store']['reserveSymbolRange']('$'+_0x482616,DEFAULT_RANGE_SIZE,'JOB'),_0x2ef338='',_0x1f523e=this['bindSymbols'](_0x1f7307,_0x1a1b17,_0x12890e,_0x2ef338,_0x24a54d['PRODUCES']);Object['keys'](_0x1f523e)['length']&&await this['store']['addSymbols']('$'+_0x482616,_0x1f523e);for(const [_0x9f926f,_0xe5e494]of Object['entries'](_0x2124d2['activities'])){const [_0x3d62d3,_0x8bba8d,_0x546736]=await this['store']['reserveSymbolRange'](_0x9f926f,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x58006d=_0x9f926f+'/';this['bindSelf'](_0xe5e494['consumes'],_0xe5e494['produces'],_0x9f926f);const _0x3f655e=this['bindSymbols'](_0x3d62d3,_0x8bba8d,_0x546736,_0x58006d,_0xe5e494['produces']);Object['keys'](_0x3f655e)['length']&&await this['store']['addSymbols'](_0x9f926f,_0x3f655e);}}}['bindSelf'](_0x5e17e4,_0x4f1781,_0x23b70c){for(const _0x512562 of[_0x23b70c,'$self']){const _0x24c90d=_0x5e17e4[_0x512562];if(_0x24c90d)for(const _0x4e2112 of _0x24c90d){!_0x4f1781['includes'](_0x4e2112)&&_0x4f1781['push'](_0x4e2112);}}}['bindSymbols'](_0x6440e9,_0x48193b,_0x362d71,_0x5a7993,_0x5e132b){const _0xebe0dd={},_0x241b78={..._0x362d71};for(const _0x23f0fb of _0x5e132b){const _0x2b657e=''+_0x5a7993+_0x23f0fb;if(!_0x241b78[_0x2b657e]){if(_0x6440e9>_0x48193b)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x30e610=(0x0,utils_1['getSymKey'])(_0x6440e9);_0x6440e9++,_0xebe0dd[_0x2b657e]=_0x30e610,_0x241b78[_0x2b657e]=_0x30e610;}}return _0xebe0dd;}['copyJobSchemas'](){const _0x477e3b=this['manifest']['app']['graphs'];for(const _0x65ad76 of _0x477e3b){const _0x286758=_0x65ad76['output']?.['schema'],_0x4fc120=_0x65ad76['input']?.['schema'];if(!_0x286758&&!_0x4fc120)continue;const _0x24cb2a=_0x65ad76['activities'];for(const _0x410d52 in _0x24cb2a){if(_0x24cb2a[_0x410d52]['type']==='trigger'){const _0xa1715e=_0x24cb2a[_0x410d52];_0x286758&&(!_0xa1715e['job']&&(_0xa1715e['job']={}),_0xa1715e['job']['schema']=_0x286758),_0x4fc120&&(_0xa1715e['output']={'schema':_0x4fc120});}}}}['bindBackRefs'](){for(const _0x5a4fae of this['manifest']['app']['graphs']){const _0x58ef67=_0x5a4fae['activities'],_0x1207f8=this['findTrigger'](_0x5a4fae)[0x0];for(const _0x1265e1 in _0x58ef67){_0x58ef67[_0x1265e1]['trigger']=_0x1207f8,_0x58ef67[_0x1265e1]['subscribes']=_0x5a4fae['subscribes'],_0x5a4fae['publishes']&&(_0x58ef67[_0x1265e1]['publishes']=_0x5a4fae['publishes']),_0x58ef67[_0x1265e1]['expire']=_0x5a4fae['expire']??undefined,_0x58ef67[_0x1265e1]['persistent']=_0x5a4fae['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x48470b of this['manifest']['app']['graphs']){const _0x4bbaa3=_0x48470b['activities'];for(const _0x277d0c in _0x4bbaa3){const _0x2cf573=_0x4bbaa3[_0x277d0c];_0x2cf573['type']==='cycle'&&(_0x4bbaa3[_0x2cf573['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x3adea8 of this['manifest']['app']['graphs']){const _0x41a2f9=_0x3adea8['activities'];for(const _0x7ca68e in _0x41a2f9){const _0x5ea2ed=_0x41a2f9[_0x7ca68e];['worker','await']['includes'](_0x5ea2ed['type'])&&_0x5ea2ed['topic']&&!_0x5ea2ed['subtype']&&(_0x5ea2ed['subtype']=_0x5ea2ed['topic']);}}}['convertActivitiesToHooks'](){for(const _0x1048ba of this['manifest']['app']['graphs']){const _0x1eb648=_0x1048ba['activities'];for(const _0x1b8d20 in _0x1eb648){const _0x35056c=_0x1eb648[_0x1b8d20];['activity']['includes'](_0x35056c['type'])&&(_0x35056c['type']='hook');}}}async['bindParents'](){const _0x231f11=this['manifest']['app']['graphs'];for(const _0x53b81c of _0x231f11){if(_0x53b81c['transitions'])for(const _0x2b9264 in _0x53b81c['transitions']){const _0x330842=_0x53b81c['transitions'][_0x2b9264];for(const _0x141c60 of _0x330842){const _0x5a1583=_0x141c60['to'];_0x53b81c['activities'][_0x5a1583]['parent']=_0x2b9264;}_0x53b81c['activities'][_0x2b9264]['transitions']=_0x330842;}}}['collectValues'](_0x2d32f4,_0x289578){for(const [_0x1f0e28,_0x5f2c0e]of Object['entries'](_0x2d32f4)){if(_0x1f0e28==='enum'||_0x1f0e28==='examples'||_0x1f0e28==='default'){if(Array['isArray'](_0x5f2c0e))for(const _0x75f15 of _0x5f2c0e){typeof _0x75f15==='string'&&_0x75f15['length']>0x5&&_0x289578['add'](_0x75f15);}else typeof _0x5f2c0e==='string'&&_0x5f2c0e['length']>0x5&&_0x289578['add'](_0x5f2c0e);}else typeof _0x5f2c0e==='object'&&this['collectValues'](_0x5f2c0e,_0x289578);}}['traverse'](_0x3781e4,_0x2e478d){for(const _0x1177fc of Object['values'](_0x3781e4)){typeof _0x1177fc==='object'&&('schema'in _0x1177fc?this['collectValues'](_0x1177fc['schema'],_0x2e478d):this['traverse'](_0x1177fc,_0x2e478d));}}async['generateSymVals'](){const _0x16f35e=new Set();for(const _0x3c767b of this['manifest']['app']['graphs']){this['traverse'](_0x3c767b,_0x16f35e);}const _0x4475a1=await this['store']['getSymbolValues'](),_0x5206e8=Object['keys'](_0x4475a1)['length'],_0x3d547d=Math['pow'](0x34,0x2)-0x1,_0x217eb6=serializer_1['SerializerService']['filterSymVals'](_0x5206e8,_0x3d547d,_0x4475a1,_0x16f35e);await this['store']['addSymbolValues'](_0x217eb6);}['resolveJobMapsPaths'](){function _0x1cf961(_0x4f579d){const _0x126c9f=[];function _0x2a19ab(_0x511ddb,_0x2a1479=[]){for(const _0x17a281 in _0x511ddb){if(typeof _0x511ddb[_0x17a281]==='object'&&_0x511ddb[_0x17a281]!==null&&!('@pipe'in _0x511ddb[_0x17a281])){const _0x1d9cd5=[..._0x2a1479,_0x17a281];_0x2a19ab(_0x511ddb[_0x17a281],_0x1d9cd5);}else{const _0x191fee=[..._0x2a1479,_0x17a281]['join']('/');if(!_0x191fee['includes']('[')){const _0x5e4cda='data/'+_0x191fee;!_0x126c9f['includes'](_0x5e4cda)&&_0x126c9f['push'](_0x5e4cda);}else{const [_0x343ac3,_0x30420e]=_0x191fee['split']('['),[_0x41abe6,_0x37e910]=_0x30420e['split'](']');if(!isNaN(parseInt(_0x41abe6)))for(let _0xec7bf9=0x0;_0xec7bf9<parseInt(_0x41abe6);_0xec7bf9++){const _0x1eb560='data/'+_0x343ac3+'/'+_0xec7bf9;!_0x126c9f['includes'](_0x1eb560)&&_0x126c9f['push'](_0x1eb560);}}}}}return _0x4f579d&&_0x2a19ab(_0x4f579d),_0x126c9f;}for(const _0x4a2b66 of this['manifest']['app']['graphs']){let _0x2aa330=[];const [,_0x3aeb58]=this['findTrigger'](_0x4a2b66);for(const _0x52e5e3 in _0x4a2b66['activities']){const _0x281ca0=_0x4a2b66['activities'][_0x52e5e3];_0x2aa330=_0x2aa330['concat'](_0x1cf961(_0x281ca0['job']?.['maps']));}_0x3aeb58['PRODUCES']=_0x2aa330;}}['resolveMappingDependencies'](){const _0x28ccd9=[];function _0x5a8336(_0x43eda,_0x29c7fb){for(const _0x492431 in _0x43eda){if(typeof _0x43eda[_0x492431]==='string'){const _0x565a44=_0x43eda[_0x492431],_0x7afc49=_0x565a44['match'](/^\{[^@].*}$/);_0x7afc49&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x565a44)&&(_0x565a44['split']('.')[0x1]!=='input'&&(_0x28ccd9['push'](_0x565a44),_0x29c7fb['push'](_0x565a44)));}else typeof _0x43eda[_0x492431]==='object'&&_0x43eda[_0x492431]!==null&&_0x5a8336(_0x43eda[_0x492431],_0x29c7fb);}}const _0x24f10c=this['manifest']['app']['graphs'];for(const _0x2f6fd6 of _0x24f10c){const _0x4a3ca0=_0x2f6fd6['activities'];for(const _0x1ea010 in _0x4a3ca0){const _0x266240=_0x4a3ca0[_0x1ea010];_0x266240['consumes']=[],_0x5a8336(_0x266240,_0x266240['consumes']),_0x266240['consumes']=this['groupMappingRules'](_0x266240['consumes']);}}const _0x118794=this['groupMappingRules'](_0x28ccd9);for(const _0x573544 of _0x24f10c){const _0x121654=_0x573544['activities'];for(const _0x37acca in _0x121654){const _0x9e1a4e=_0x121654[_0x37acca];_0x9e1a4e['produces']=_0x118794[''+_0x37acca]||[];}}}['groupMappingRules'](_0x55ab2b){_0x55ab2b=Array['from'](new Set(_0x55ab2b))['sort']();const _0x427af6={};for(const _0x321bf2 of _0x55ab2b){const [_0x595bc4,_0x2fddca]=this['resolveMappableValue'](_0x321bf2);!_0x427af6[_0x595bc4]&&(_0x427af6[_0x595bc4]=[]),_0x427af6[_0x595bc4]['push'](_0x2fddca);}return _0x427af6;}['resolveMappableValue'](_0x119bc5){_0x119bc5=_0x119bc5['substring'](0x1,_0x119bc5['length']-0x1);const _0x338e5a=_0x119bc5['split']('.');if(_0x338e5a[0x0]==='$job'){const [_0x3a3947,..._0x279038]=_0x338e5a;return[_0x3a3947,_0x279038['join']('/')];}else{const [_0x2170e1,_0x5d2cea,_0x375a0a,..._0x410fe3]=_0x338e5a,_0x109f95={'hook':'hook/data','input':'input/data','output':_0x375a0a==='data'?'output/data':'output/metadata'}[_0x5d2cea];return[_0x2170e1,_0x109f95+'/'+_0x410fe3['join']('/')];}}async['deployActivitySchemas'](){const _0x3412fe=this['manifest']['app']['graphs'],_0x452e58={};for(const _0x4d4478 of _0x3412fe){const _0x6e35ef=_0x4d4478['activities'];for(const _0x48bdda in _0x6e35ef){const _0xcecfc5=_0x6e35ef[_0x48bdda];delete _0xcecfc5['transitions'],_0x452e58[_0x48bdda]=_0xcecfc5;}}await this['store']['setSchemas'](_0x452e58,this['getVID']());}async['deploySubscriptions'](){const _0x5c08ff=this['manifest']['app']['graphs'],_0x4e380e={};for(const _0x38cdae of _0x5c08ff){const _0x196301=_0x38cdae['activities'],_0x3a5e98=_0x38cdae['subscribes'];for(const _0x25c827 in _0x196301){if(_0x196301[_0x25c827]['type']==='trigger'){_0x4e380e[_0x3a5e98]=_0x25c827;break;}}}await this['store']['setSubscriptions'](_0x4e380e,this['getVID']());}['findTrigger'](_0x39a9b4){for(const _0x111f81 in _0x39a9b4['activities']){const _0x3e77b8=_0x39a9b4['activities'][_0x111f81];if(_0x3e77b8['type']==='trigger')return[_0x111f81,_0x3e77b8];}return null;}async['deployTransitions'](){const _0x2d30ca=this['manifest']['app']['graphs'],_0x74be66={};for(const _0x467cfa of _0x2d30ca){if(_0x467cfa['subscribes']&&_0x467cfa['subscribes']['startsWith']('.')){const [_0x2fafb9]=this['findTrigger'](_0x467cfa);_0x2fafb9&&(_0x74be66[_0x467cfa['subscribes']]={[_0x2fafb9]:!![]});}if(_0x467cfa['transitions'])for(const _0x24d7a7 in _0x467cfa['transitions']){const _0x248b46=_0x467cfa['transitions'][_0x24d7a7],_0x371a40={};for(const _0x490eaa of _0x248b46){const _0x2f2146=_0x490eaa['to'];_0x490eaa['conditions']?_0x371a40[_0x2f2146]=_0x490eaa['conditions']:_0x371a40[_0x2f2146]=!![];}Object['keys'](_0x371a40)['length']>0x0&&(_0x74be66['.'+_0x24d7a7]=_0x371a40);}}await this['store']['setTransitions'](_0x74be66,this['getVID']());}async['deployHookPatterns'](){const _0x37b084=this['manifest']['app']['graphs'],_0x1c9638={};for(const _0x64a43a of _0x37b084){if(_0x64a43a['hooks'])for(const _0x3c453d in _0x64a43a['hooks']){_0x1c9638[_0x3c453d]=_0x64a43a['hooks'][_0x3c453d];const _0x56e36a=_0x64a43a['hooks'][_0x3c453d][0x0]['to'],_0x515234=_0x64a43a['activities'][_0x56e36a];_0x515234&&(!_0x515234['hook']&&(_0x515234['hook']={}),_0x515234['hook']['topic']=_0x3c453d);}}await this['store']['setHookRules'](_0x1c9638);}async['deployConsumerGroups'](){const _0xb867ec={'appId':this['manifest']['app']['id']},_0x712cc5=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0xb867ec);await this['deployConsumerGroup'](_0x712cc5,'ENGINE');for(const _0x231b10 of this['manifest']['app']['graphs']){const _0x27826a=_0x231b10['activities'];for(const _0x49df4c in _0x27826a){const _0x3e53bf=_0x27826a[_0x49df4c];if(_0x3e53bf['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x3e53bf['subtype'],{})===_0x3e53bf['subtype']){_0xb867ec['topic']=_0x3e53bf['subtype'];const _0xe81a48=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0xb867ec);await this['deployConsumerGroup'](_0xe81a48,'WORKER');}}}}async['deployConsumerGroup'](_0x5500f5,_0x4bd1dc){try{await this['stream']['createConsumerGroup'](_0x5500f5,_0x4bd1dc);}catch(_0x223f1a){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x5500f5,'group':_0x4bd1dc});}}}exports['Deployer']=Deployer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x558ffb,_0x5c915f){const _0x3ff4fb=_0x4af5,_0x323939=_0x558ffb();while(!![]){try{const _0xd56e74=-parseInt(_0x3ff4fb(0x11b))/0x1+parseInt(_0x3ff4fb(0x118))/0x2*(parseInt(_0x3ff4fb(0x119))/0x3)+parseInt(_0x3ff4fb(0x11e))/0x4+parseInt(_0x3ff4fb(0x11c))/0x5*(-parseInt(_0x3ff4fb(0x116))/0x6)+-parseInt(_0x3ff4fb(0x11d))/0x7*(parseInt(_0x3ff4fb(0x11a))/0x8)+parseInt(_0x3ff4fb(0x11f))/0x9+parseInt(_0x3ff4fb(0x117))/0xa;if(_0xd56e74===_0x5c915f)break;else _0x323939['push'](_0x323939['shift']());}catch(_0x141aab){_0x323939['push'](_0x323939['shift']());}}}(_0x5e3b,0xb002a));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0xa2f4c,_0xad5c7f,_0x38dc1d,_0x3717be){if(_0x3717be===undefined)_0x3717be=_0x38dc1d;var _0x44177f=Object['getOwnPropertyDescriptor'](_0xad5c7f,_0x38dc1d);(!_0x44177f||('get'in _0x44177f?!_0xad5c7f['__esModule']:_0x44177f['writable']||_0x44177f['configurable']))&&(_0x44177f={'enumerable':!![],'get':function(){return _0xad5c7f[_0x38dc1d];}}),Object['defineProperty'](_0xa2f4c,_0x3717be,_0x44177f);}:function(_0x481b45,_0x1fd359,_0x4535c4,_0x3cc42c){if(_0x3cc42c===undefined)_0x3cc42c=_0x4535c4;_0x481b45[_0x3cc42c]=_0x1fd359[_0x4535c4];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x543364,_0x2b95ad){Object['defineProperty'](_0x543364,'default',{'enumerable':!![],'value':_0x2b95ad});}:function(_0x34bdc2,_0x22e5f5){_0x34bdc2['default']=_0x22e5f5;}),__importStar=this&&this['__importStar']||function(_0x9d3e48){if(_0x9d3e48&&_0x9d3e48['__esModule'])return _0x9d3e48;var _0x451d13={};if(_0x9d3e48!=null){for(var _0x2f4898 in _0x9d3e48)if(_0x2f4898!=='default'&&Object['prototype']['hasOwnProperty']['call'](_0x9d3e48,_0x2f4898))__createBinding(_0x451d13,_0x9d3e48,_0x2f4898);}return __setModuleDefault(_0x451d13,_0x9d3e48),_0x451d13;},__importDefault=this&&this['__importDefault']||function(_0x17e1aa){return _0x17e1aa&&_0x17e1aa['__esModule']?_0x17e1aa:{'default':_0x17e1aa};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CompilerService']=void 0x0;const fs=__importStar(require('fs/promises')),path=__importStar(require('path')),json_schema_ref_parser_1=__importDefault(require('@apidevtools/json-schema-ref-parser')),js_yaml_1=__importDefault(require('js-yaml')),deployer_1=require('./deployer'),validator_1=require('./validator');function _0x5e3b(){const _0x575529=['64GlOivF','59784NOjuTW','1216160vvkTkx','709942DLTKos','50UxYMYz','7ncYkIo','3601420vklWFR','1382202IGiplv','439092NloDLU','6230910OmXoUW'];_0x5e3b=function(){return _0x575529;};return _0x5e3b();}function _0x4af5(_0x17d8b6,_0x2a97a6){const _0x5e3b02=_0x5e3b();return _0x4af5=function(_0x4af509,_0x31cf8c){_0x4af509=_0x4af509-0x116;let _0x23d799=_0x5e3b02[_0x4af509];return _0x23d799;},_0x4af5(_0x17d8b6,_0x2a97a6);}class CompilerService{constructor(_0x5b83e8,_0x1baab3,_0x105bfa){this['store']=_0x5b83e8,this['stream']=_0x1baab3,this['logger']=_0x105bfa;}async['plan'](_0x53f4d0){try{let _0x5477cd;this['isPath'](_0x53f4d0)?_0x5477cd=await json_schema_ref_parser_1['default']['dereference'](_0x53f4d0):_0x5477cd=js_yaml_1['default']['load'](_0x53f4d0);const _0x34eaf9=new validator_1['Validator'](_0x5477cd);return _0x34eaf9['validate'](this['store']),_0x5477cd;}catch(_0x3676b1){this['logger']['error']('compiler-plan-error',_0x3676b1);}}['isPath'](_0x5b9c3f){return!_0x5b9c3f['trim']()['startsWith']('app:');}async['deploy'](_0x1fa3f3){try{let _0x825067;this['isPath'](_0x1fa3f3)?(_0x825067=await json_schema_ref_parser_1['default']['dereference'](_0x1fa3f3),await this['saveAsJSON'](_0x1fa3f3,_0x825067)):_0x825067=js_yaml_1['default']['load'](_0x1fa3f3);const _0x56198a=new validator_1['Validator'](_0x825067);_0x56198a['validate'](this['store']);const _0x2ab125=new deployer_1['Deployer'](_0x825067);return await _0x2ab125['deploy'](this['store'],this['stream']),await this['store']['setApp'](_0x825067['app']['id'],_0x825067['app']['version']),_0x825067;}catch(_0x45dd6f){this['logger']['error']('compiler-deploy-error',_0x45dd6f);}}async['activate'](_0x1fde27,_0x46b721){return await this['store']['activateAppVersion'](_0x1fde27,_0x46b721);}async['saveAsJSON'](_0x1b3562,_0x56780c){const _0x5d3209=JSON['stringify'](_0x56780c,null,0x2),_0x1e5d79=path['join'](path['dirname'](_0x1b3562),'.hotmesh.'+_0x56780c['app']['id']+'.'+_0x56780c['app']['version']+'.json');await fs['writeFile'](_0x1e5d79,_0x5d3209,'utf8');}}exports['CompilerService']=CompilerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x5c359f,_0x4b566c){const _0x16ca42=_0x39a0,_0x50bfba=_0x5c359f();while(!![]){try{const _0x2b490f=parseInt(_0x16ca42(0x164))/0x1*(-parseInt(_0x16ca42(0x167))/0x2)+-parseInt(_0x16ca42(0x162))/0x3*(parseInt(_0x16ca42(0x161))/0x4)+parseInt(_0x16ca42(0x160))/0x5+-parseInt(_0x16ca42(0x163))/0x6*(-parseInt(_0x16ca42(0x166))/0x7)+parseInt(_0x16ca42(0x15d))/0x8+-parseInt(_0x16ca42(0x165))/0x9+-parseInt(_0x16ca42(0x15f))/0xa*(-parseInt(_0x16ca42(0x15e))/0xb);if(_0x2b490f===_0x4b566c)break;else _0x50bfba['push'](_0x50bfba['shift']());}catch(_0x5e0a20){_0x50bfba['push'](_0x50bfba['shift']());}}}(_0x6758,0xa2cc6));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Validator']=void 0x0;const pipe_1=require('../pipe');function _0x39a0(_0x652aac,_0x6bcaa7){const _0x675800=_0x6758();return _0x39a0=function(_0x39a04e,_0xc7289f){_0x39a04e=_0x39a04e-0x15d;let _0xaa3518=_0x675800[_0x39a04e];return _0xaa3518;},_0x39a0(_0x652aac,_0x6bcaa7);}class Validator{constructor(_0x2d6b43){this['manifest']=null,this['activityIds']=[],this['mappingStatements']={},this['store']=null,this['manifest']=_0x2d6b43;}async['validate'](_0x3b8b43){this['store']=_0x3b8b43,this['getMappingStatements'](),this['validateActivityIds'](),this['validateReferencedActivityIds'](),this['validateMappingStatements'](),this['validateTransitions'](),this['validateTransitionConditions'](),this['validateStats'](),this['validateSchemas'](),this['validateUniqueHandledTopics'](),this['validateGraphPublishSubscribe'](),this['validateHooks'](),this['validateConditionalStatements']();}['validateActivityIds'](){const _0x2884c9=new Set();this['manifest']['app']['graphs']['forEach'](_0x38aa48=>{const _0x18550e=Object['keys'](_0x38aa48['activities']);_0x18550e['forEach'](_0x432858=>{if(_0x2884c9['has'](_0x432858))throw new Error('Duplicate\x20activity\x20id\x20found:\x20'+_0x432858);else _0x2884c9['add'](_0x432858);});}),this['activityIds']=Array['from'](_0x2884c9);}['isMappingStatement'](_0x2fb37c){return typeof _0x2fb37c==='string'&&_0x2fb37c['startsWith']('{')&&_0x2fb37c['endsWith']('}');}['extractMappingStatements'](_0x3fe4f2,_0x4999f8,_0x3cb5ed){for(const _0x15bb49 in _0x3fe4f2){if(typeof _0x3fe4f2[_0x15bb49]==='object'&&_0x3fe4f2[_0x15bb49]!==null)this['extractMappingStatements'](_0x3fe4f2[_0x15bb49],_0x4999f8,_0x3cb5ed);else this['isMappingStatement'](_0x3fe4f2[_0x15bb49])&&(!_0x4999f8[_0x3cb5ed]&&(_0x4999f8[_0x3cb5ed]=[]),_0x4999f8[_0x3cb5ed]['push'](_0x3fe4f2[_0x15bb49]));}}['getMappingStatements'](){const _0x3cbd43={};this['manifest']['app']['graphs']['forEach'](_0x1a4b91=>{const _0x4a4889=_0x1a4b91['activities'];for(const _0x17a32e in _0x4a4889){const _0x3094e1=_0x4a4889[_0x17a32e];this['extractMappingStatements'](_0x3094e1,_0x3cbd43,_0x17a32e);}}),this['mappingStatements']=_0x3cbd43;}['validateReferencedActivityIds'](){const _0xcdb78f=this['mappingStatements'],_0x2ff9cd=this['activityIds'];for(const _0x3940cb in _0xcdb78f){const _0x156db4=_0xcdb78f[_0x3940cb];_0x156db4['forEach'](_0x174244=>{if(_0x174244['startsWith']('{')&&_0x174244['endsWith']('}')){const _0x515021=_0x174244['slice'](0x1,-0x1)['split']('.'),_0x4a8637=_0x515021[0x0];if(!(Validator['SYS_VARS']['includes'](_0x4a8637)||_0x2ff9cd['includes'](_0x4a8637)||this['isFunction'](_0x174244)||this['isContextVariable'](_0x174244)))throw new Error('Mapping\x20statement\x20references\x20non-existent\x20activity:\x20'+_0x174244);}});}}['isFunction'](_0x4ef0c6){return _0x4ef0c6['startsWith']('{@')&&pipe_1['Pipe']['resolveFunction'](_0x4ef0c6);}['isContextVariable'](_0xab61b3){return['{$input}','{$output}','{$item}','{$key}','{$index}']['includes'](_0xab61b3);}['validateMappingStatements'](){}['validateTransitions'](){}['validateTransitionConditions'](){}['validateStats'](){}['validateSchemas'](){}['validateUniqueHandledTopics'](){}['validateGraphPublishSubscribe'](){}['validateHooks'](){}['validateConditionalStatements'](){}}function _0x6758(){const _0x266427=['466549KEoAdi','5532489vydjZT','1520617fHvkRn','4eYlfzb','3106792oMQJvQ','11LVrHIT','17861860AxMlhB','1467465FRXCsb','76wuFOan','177207kLUxJZ','24pYXguw'];_0x6758=function(){return _0x266427;};return _0x6758();}exports['Validator']=Validator,Validator['SYS_VARS']=['$app','$self','$graph','$job'],Validator['CONTEXT_VARS']=['{$input}','{$output}','{$item}','{$key}','{$index}'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x3166(_0x345449,_0xb4b56c){const _0x3e169b=_0x3e16();return _0x3166=function(_0x3166eb,_0x3bbcad){_0x3166eb=_0x3166eb-0x194;let _0x2f4e42=_0x3e169b[_0x3166eb];return _0x2f4e42;},_0x3166(_0x345449,_0xb4b56c);}function _0x3e16(){const _0x28255b=['927936dLkIUR','8386KnLXgS','266958gRXUvV','1210332lnNuOB','7mojJTj','11740356kYgltH','3896BhSiRH','999010rtLTua','2707506DWPgpv'];_0x3e16=function(){return _0x28255b;};return _0x3e16();}(function(_0x53f6f7,_0x80989){const _0x586da5=_0x3166,_0xe9abcc=_0x53f6f7();while(!![]){try{const _0x2b99ac=-parseInt(_0x586da5(0x199))/0x1*(-parseInt(_0x586da5(0x197))/0x2)+parseInt(_0x586da5(0x194))/0x3+parseInt(_0x586da5(0x198))/0x4+parseInt(_0x586da5(0x19c))/0x5+parseInt(_0x586da5(0x195))/0x6+parseInt(_0x586da5(0x196))/0x7*(-parseInt(_0x586da5(0x19b))/0x8)+-parseInt(_0x586da5(0x19a))/0x9;if(_0x2b99ac===_0x80989)break;else _0xe9abcc['push'](_0xe9abcc['shift']());}catch(_0x3f0b54){_0xe9abcc['push'](_0xe9abcc['shift']());}}}(_0x3e16,0x93f22));var __importDefault=this&&this['__importDefault']||function(_0x3dde77){return _0x3dde77&&_0x3dde77['__esModule']?_0x3dde77:{'default':_0x3dde77};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['EngineService']=void 0x0;const key_1=require('../../modules/key'),enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),activities_1=__importDefault(require('../activities')),compiler_1=require('../compiler'),exporter_1=require('../exporter'),reporter_1=require('../reporter'),router_1=require('../router'),serializer_1=require('../serializer'),factory_1=require('../search/factory'),factory_2=require('../store/factory'),factory_3=require('../stream/factory'),factory_4=require('../sub/factory'),task_1=require('../task'),stream_1=require('../../types/stream');class EngineService{constructor(){this['cacheMode']='cache',this['untilVersion']=null,this['jobCallbacks']={},this['reporting']=![],this['jobId']=0x1;}static async['init'](_0x4b3277,_0x3a1676,_0x4e9826,_0x3fbb37,_0x5b4545){if(_0x3fbb37['engine']){const _0x145d72=new EngineService();_0x145d72['verifyEngineFields'](_0x3fbb37),_0x145d72['namespace']=_0x4b3277,_0x145d72['appId']=_0x3a1676,_0x145d72['guid']=_0x4e9826,_0x145d72['logger']=_0x5b4545,await _0x145d72['initSearchChannel'](_0x3fbb37['engine']['store']),await _0x145d72['initStoreChannel'](_0x3fbb37['engine']['store']),await _0x145d72['initSubChannel'](_0x3fbb37['engine']['sub'],_0x3fbb37['engine']['pub']),await _0x145d72['initStreamChannel'](_0x3fbb37['engine']['stream'],_0x3fbb37['engine']['store']),_0x145d72['router']=await _0x145d72['initRouter'](_0x3fbb37);const _0x2a87a0=_0x145d72['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x145d72['appId']});return _0x145d72['router']['consumeMessages'](_0x2a87a0,'ENGINE',_0x145d72['guid'],_0x145d72['processStreamMessage']['bind'](_0x145d72)),_0x145d72['taskService']=new task_1['TaskService'](_0x145d72['store'],_0x5b4545),_0x145d72['exporter']=new exporter_1['ExporterService'](_0x145d72['appId'],_0x145d72['store'],_0x5b4545),_0x145d72['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x145d72;}}['verifyEngineFields'](_0x51f254){if(!(0x0,utils_1['identifyProvider'])(_0x51f254['engine']['store'])||!(0x0,utils_1['identifyProvider'])(_0x51f254['engine']['stream'])||!(0x0,utils_1['identifyProvider'])(_0x51f254['engine']['sub']))throw new Error('engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.');}async['initSearchChannel'](_0x2680d2,_0x190d13){this['search']=await factory_1['SearchServiceFactory']['init'](_0x2680d2,_0x190d13,this['namespace'],this['appId'],this['logger']);}async['initStoreChannel'](_0x31571e){this['store']=await factory_2['StoreServiceFactory']['init'](_0x31571e,this['namespace'],this['appId'],this['logger']);}async['initSubChannel'](_0x33b8eb,_0x2e8385){this['subscribe']=await factory_4['SubServiceFactory']['init'](_0x33b8eb,_0x2e8385,this['namespace'],this['appId'],this['guid'],this['logger']);}async['initStreamChannel'](_0x48d776,_0x184d4b){this['stream']=await factory_3['StreamServiceFactory']['init'](_0x48d776,_0x184d4b,this['namespace'],this['appId'],this['logger']);}async['initRouter'](_0x5c2314){const _0x1948ff=await this['store']['getThrottleRate'](':');return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['ENGINE'],'reclaimDelay':_0x5c2314['engine']['reclaimDelay'],'reclaimCount':_0x5c2314['engine']['reclaimCount'],'throttle':_0x1948ff,'readonly':_0x5c2314['engine']['readonly']},this['stream'],this['logger']);}async['fetchAndVerifyVID'](_0x1b605a,_0x3a958b=0x0){if(isNaN(Number(_0x1b605a['version']))){const _0x18d1ce=await this['store']['getApp'](_0x1b605a['id'],!![]);if(!isNaN(Number(_0x18d1ce['version']))){if(!this['apps'])this['apps']={};return this['apps'][_0x1b605a['id']]=_0x18d1ce,{'id':_0x1b605a['id'],'version':_0x18d1ce['version']};}else{if(_0x3a958b<0xa)return await(0x0,utils_1['sleepFor'])(enums_1['HMSH_QUORUM_DELAY_MS']*0x2),await this['fetchAndVerifyVID'](_0x1b605a,_0x3a958b+0x1);else this['logger']['error']('engine-vid-resolution-error',{'id':_0x1b605a['id'],'guid':this['guid']});}}return _0x1b605a;}async['getVID'](_0x248137){if(this['cacheMode']==='nocache'){const _0x2d5734=await this['store']['getApp'](this['appId'],!![]);if(_0x2d5734['version']['toString']()===this['untilVersion']['toString']()){if(!this['apps'])this['apps']={};this['apps'][this['appId']]=_0x2d5734,this['setCacheMode']('cache',_0x2d5734['version']['toString']());}return{'id':this['appId'],'version':_0x2d5734['version']};}else return!this['apps']&&_0x248137?(this['apps']={},this['apps'][this['appId']]=_0x248137,_0x248137):await this['fetchAndVerifyVID']({'id':this['appId'],'version':this['apps']?.[this['appId']]['version']});}['setCacheMode'](_0x1255c4,_0x137699){this['logger']['info']('engine-executable-cache',{'mode':_0x1255c4,[_0x1255c4==='cache'?'target':'until']:_0x137699}),this['cacheMode']=_0x1255c4,this['untilVersion']=_0x137699;}async['routeToSubscribers'](_0x3bccd7,_0x530da5){const _0x45e706=this['jobCallbacks'][_0x530da5['metadata']['jid']];_0x45e706&&(this['delistJobCallback'](_0x530da5['metadata']['jid']),_0x45e706(_0x3bccd7,_0x530da5));}async['processWebHooks'](){this['taskService']['processWebHooks'](this['hook']['bind'](this));}async['processTimeHooks'](){this['taskService']['processTimeHooks'](this['hookTime']['bind'](this));}async['throttle'](_0x391728){try{this['router']?.['setThrottle'](_0x391728);}catch(_0x31b5cd){this['logger']['error']('engine-throttle-error',{'error':_0x31b5cd});}}async['initActivity'](_0x5e526c,_0x17c2f9={},_0xc94d97){const [_0x5bacac,_0x2f673e]=await this['getSchema'](_0x5e526c),_0x3ed5fa=activities_1['default'][utils_1['polyfill']['resolveActivityType'](_0x2f673e['type'])];if(_0x3ed5fa){const _0x14c281=(0x0,utils_1['formatISODate'])(new Date()),_0x485f6a={'aid':_0x5bacac,'atp':_0x2f673e['type'],'stp':_0x2f673e['subtype'],'ac':_0x14c281,'au':_0x14c281},_0x23f822=null;return new _0x3ed5fa(_0x2f673e,_0x17c2f9,_0x485f6a,_0x23f822,this,_0xc94d97);}else throw new Error('activity\x20type\x20'+_0x2f673e['type']+'\x20not\x20found');}async['getSchema'](_0x1a58ca){const _0x5c32ad=await this['store']['getApp'](this['appId']);if(!_0x5c32ad)throw new Error('no\x20app\x20found\x20for\x20id\x20'+this['appId']);if(this['isPrivate'](_0x1a58ca)){const _0x566422=_0x1a58ca['substring'](0x1),_0x10aff7=await this['store']['getSchema'](_0x566422,await this['getVID'](_0x5c32ad));return[_0x566422,_0x10aff7];}else{const _0x815bc9=await this['store']['getSubscription'](_0x1a58ca,await this['getVID'](_0x5c32ad));if(_0x815bc9){const _0x149bc7=await this['store']['getSchema'](_0x815bc9,await this['getVID'](_0x5c32ad));return[_0x815bc9,_0x149bc7];}}throw new Error('no\x20subscription\x20found\x20for\x20topic\x20'+_0x1a58ca+'\x20in\x20app\x20'+this['appId']+'\x20for\x20app\x20version\x20'+_0x5c32ad['version']);}async['getSettings'](){return await this['store']['getSettings']();}['isPrivate'](_0xae2cdb){return _0xae2cdb['startsWith']('.');}async['plan'](_0x440431){const _0x4152fa=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x4152fa['plan'](_0x440431);}async['deploy'](_0x184aa2){const _0x2c750c=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x2c750c['deploy'](_0x184aa2);}async['getStats'](_0xab4df3,_0x48e480){const {id:_0x3bb361,version:_0x4f42a3}=await this['getVID'](),_0x2f61da=new reporter_1['ReporterService']({'id':_0x3bb361,'version':_0x4f42a3},this['store'],this['logger']),_0x18aa26=await this['resolveQuery'](_0xab4df3,_0x48e480);return await _0x2f61da['getStats'](_0x18aa26);}async['getIds'](_0x4c0539,_0x286a04,_0x456d24=[]){const {id:_0x1a349b,version:_0xe78e67}=await this['getVID'](),_0x358638=new reporter_1['ReporterService']({'id':_0x1a349b,'version':_0xe78e67},this['store'],this['logger']),_0x521f03=await this['resolveQuery'](_0x4c0539,_0x286a04);return await _0x358638['getIds'](_0x521f03,_0x456d24);}async['resolveQuery'](_0xd99d8,_0x2d6356){const _0x3b1296=await this['initActivity'](_0xd99d8,_0x2d6356['data']);return await _0x3b1296['getState'](),{'end':_0x2d6356['end'],'start':_0x2d6356['start'],'range':_0x2d6356['range'],'granularity':_0x3b1296['resolveGranularity'](),'key':_0x3b1296['resolveJobKey'](_0x3b1296['createInputContext']()),'sparse':_0x2d6356['sparse']};}async['processStreamMessage'](_0x48a67b){this['logger']['debug']('engine-process',{'jid':_0x48a67b['metadata']['jid'],'gid':_0x48a67b['metadata']['gid'],'dad':_0x48a67b['metadata']['dad'],'aid':_0x48a67b['metadata']['aid'],'status':_0x48a67b['status']||stream_1['StreamStatus']['SUCCESS'],'code':_0x48a67b['code']||0xc8,'type':_0x48a67b['type']});const _0x443fc8={'metadata':{'guid':_0x48a67b['metadata']['guid'],'jid':_0x48a67b['metadata']['jid'],'gid':_0x48a67b['metadata']['gid'],'dad':_0x48a67b['metadata']['dad'],'aid':_0x48a67b['metadata']['aid']},'data':_0x48a67b['data']};if(_0x48a67b['type']===stream_1['StreamDataType']['TIMEHOOK']){const _0x16c977=await this['initActivity']('.'+_0x48a67b['metadata']['aid'],_0x443fc8['data'],_0x443fc8);await _0x16c977['processTimeHookEvent'](_0x48a67b['metadata']['jid']);}else{if(_0x48a67b['type']===stream_1['StreamDataType']['WEBHOOK']){const _0x268033=await this['initActivity']('.'+_0x48a67b['metadata']['aid'],_0x443fc8['data'],_0x443fc8);await _0x268033['processWebHookEvent'](_0x48a67b['status'],_0x48a67b['code']);}else{if(_0x48a67b['type']===stream_1['StreamDataType']['TRANSITION']){const _0x25bf76=await this['initActivity']('.'+_0x48a67b['metadata']['aid'],_0x443fc8['data'],_0x443fc8);await _0x25bf76['process']();}else{if(_0x48a67b['type']===stream_1['StreamDataType']['AWAIT']){_0x443fc8['metadata']={..._0x443fc8['metadata'],'pj':_0x48a67b['metadata']['jid'],'pg':_0x48a67b['metadata']['gid'],'pd':_0x48a67b['metadata']['dad'],'pa':_0x48a67b['metadata']['aid'],'px':_0x48a67b['metadata']['await']===![],'trc':_0x48a67b['metadata']['trc'],'spn':_0x48a67b['metadata']['spn']};const _0x411358=await this['initActivity'](_0x48a67b['metadata']['topic'],_0x48a67b['data'],_0x443fc8);await _0x411358['process']();}else{if(_0x48a67b['type']===stream_1['StreamDataType']['RESULT']){const _0x10203a=await this['initActivity']('.'+_0x443fc8['metadata']['aid'],_0x48a67b['data'],_0x443fc8);await _0x10203a['processEvent'](_0x48a67b['status'],_0x48a67b['code']);}else{const _0x41f3cd=await this['initActivity']('.'+_0x48a67b['metadata']['aid'],_0x48a67b['data'],_0x443fc8);await _0x41f3cd['processEvent'](_0x48a67b['status'],_0x48a67b['code'],'output');}}}}}this['logger']['debug']('engine-process-end',{'jid':_0x48a67b['metadata']['jid'],'gid':_0x48a67b['metadata']['gid'],'aid':_0x48a67b['metadata']['aid']});}async['execAdjacentParent'](_0x513587,_0x3fafe7,_0x20104a=![]){if(this['hasParentJob'](_0x513587)){const _0x3bec21=this['resolveError'](_0x3fafe7['metadata']),_0xb7fc68=_0x513587['$self']?.['output']?.['metadata']?.['l2s']||_0x513587['$self']?.['output']?.['metadata']?.['l1s'],_0x136495={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x513587['metadata']['pj'],'gid':_0x513587['metadata']['pg'],'dad':_0x513587['metadata']['pd'],'aid':_0x513587['metadata']['pa'],'trc':_0x513587['metadata']['trc'],'spn':_0xb7fc68},'type':stream_1['StreamDataType']['RESULT'],'data':_0x3fafe7['data']};if(_0x3bec21&&_0x3bec21['code'])_0x136495['status']=stream_1['StreamStatus']['ERROR'],_0x136495['data']=_0x3bec21,_0x136495['code']=_0x3bec21['code'],_0x136495['stack']=_0x3bec21['stack'];else _0x20104a?(_0x136495['status']=stream_1['StreamStatus']['PENDING'],_0x136495['code']=enums_1['HMSH_CODE_PENDING']):(_0x136495['status']=stream_1['StreamStatus']['SUCCESS'],_0x136495['code']=enums_1['HMSH_CODE_SUCCESS']);return await this['router']?.['publishMessage'](null,_0x136495);}}['hasParentJob'](_0x21eea8,_0x1a8ac3=![]){if(_0x1a8ac3)return Boolean(_0x21eea8['metadata']['pj']&&_0x21eea8['metadata']['pa']&&!_0x21eea8['metadata']['px']);return Boolean(_0x21eea8['metadata']['pj']&&_0x21eea8['metadata']['pa']);}['resolveError'](_0x20a54f){if(_0x20a54f&&_0x20a54f['err'])return JSON['parse'](_0x20a54f['err']);}async['interrupt'](_0xd3a496,_0xb4c0a2,_0x5ed17d={}){await this['store']['interrupt'](_0xd3a496,_0xb4c0a2,_0x5ed17d);const _0x3c9dc2=await this['getState'](_0xd3a496,_0xb4c0a2),_0x2851cf={'interrupt':_0x5ed17d['descend'],'expire':_0x5ed17d['expire']};return await this['runJobCompletionTasks'](_0x3c9dc2,_0x2851cf);}async['scrub'](_0x562d9c){await this['store']['scrub'](_0x562d9c);}async['hook'](_0x54628c,_0x33d673,_0x574044=stream_1['StreamStatus']['SUCCESS'],_0x197acb=0xc8){const _0x4e49bb=await this['taskService']['getHookRule'](_0x54628c),[_0x279be0]=await this['getSchema']('.'+_0x4e49bb['to']),_0x2db47d={'type':stream_1['StreamDataType']['WEBHOOK'],'status':_0x574044,'code':_0x197acb,'metadata':{'guid':(0x0,utils_1['guid'])(),'aid':_0x279be0,'topic':_0x54628c},'data':_0x33d673};return await this['router']?.['publishMessage'](null,_0x2db47d);}async['hookTime'](_0x2ef885,_0x3535f8,_0x4ea444,_0x17550c){if(_0x17550c==='interrupt'||_0x17550c==='expire')return await this['interrupt'](_0x4ea444,_0x2ef885,{'suppress':!![],'expire':0x1});const [_0x57c9e1,..._0x1c53aa]=_0x4ea444['split'](','),_0x1b170b=','+_0x1c53aa['join'](','),_0x5b1384={'type':stream_1['StreamDataType']['TIMEHOOK'],'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x2ef885,'gid':_0x3535f8,'dad':_0x1b170b,'aid':_0x57c9e1},'data':{'timestamp':Date['now']()}};await this['router']?.['publishMessage'](null,_0x5b1384);}async['hookAll'](_0x878961,_0x59ec30,_0x2510d6,_0x2c7ab1=[]){const _0x2718bb=await this['getVID'](),_0x4d1b9b=await this['taskService']['getHookRule'](_0x878961);if(_0x4d1b9b){const _0x59ee2b=await(0x0,utils_1['getSubscriptionTopic'])(_0x4d1b9b['to'],this['store'],_0x2718bb),_0x2105b1=await this['resolveQuery'](_0x59ee2b,_0x2510d6),_0x211137=new reporter_1['ReporterService'](_0x2718bb,this['store'],this['logger']),_0x4fac69=await _0x211137['getWorkItems'](_0x2105b1,_0x2c7ab1);if(_0x4fac69['length']){const _0x3cb704=new task_1['TaskService'](this['store'],this['logger']);await _0x3cb704['enqueueWorkItems'](_0x4fac69['map'](_0x182501=>[_0x878961,_0x182501,_0x2510d6['scrub']||![],JSON['stringify'](_0x59ec30)]['join'](key_1['VALSEP']))),this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'work','originator':this['guid']},this['appId']);}return _0x4fac69;}else throw new Error('unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20'+_0x878961);}async['pub'](_0x27f8dd,_0x1262ea,_0x2fb00d,_0x16b556){const _0x1f905e=await this['initActivity'](_0x27f8dd,_0x1262ea,_0x2fb00d);if(_0x1f905e)return await _0x1f905e['process'](_0x16b556);else throw new Error('unable\x20to\x20process\x20activity\x20for\x20topic\x20'+_0x27f8dd);}async['sub'](_0x3a0f95,_0xef16f){const _0x134fcf=async(_0x154d0a,_0x35978f)=>{_0xef16f(_0x35978f['topic'],_0x35978f['job']);};return await this['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x134fcf,this['appId'],_0x3a0f95);}async['unsub'](_0x480f81){return await this['subscribe']['unsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x480f81);}async['psub'](_0x5c7081,_0x491d82){const _0x2d0bc9=async(_0x5608fd,_0x424201)=>{_0x491d82(_0x424201['topic'],_0x424201['job']);};return await this['subscribe']['psubscribe'](key_1['KeyType']['QUORUM'],_0x2d0bc9,this['appId'],_0x5c7081);}async['punsub'](_0x3c95b3){return await this['subscribe']['punsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x3c95b3);}async['pubsub'](_0x2fef6f,_0x1de78f,_0x42f9c8,_0x445479=enums_1['HMSH_OTT_WAIT_TIME']){_0x42f9c8={'metadata':{'ngn':this['guid'],'trc':_0x42f9c8?.['metadata']?.['trc'],'spn':_0x42f9c8?.['metadata']?.['spn']}};const _0x23deff=await this['pub'](_0x2fef6f,_0x1de78f,_0x42f9c8);return new Promise((_0x4b820e,_0x548555)=>{this['registerJobCallback'](_0x23deff,(_0x18701b,_0x2b8835)=>{if(_0x2b8835['metadata']['err']){const _0x3d0f50=JSON['parse'](_0x2b8835['metadata']['err']);_0x548555({..._0x3d0f50,'job_id':_0x2b8835['metadata']['jid']});}else _0x4b820e(_0x2b8835);}),setTimeout(()=>{this['delistJobCallback'](_0x23deff),_0x548555({'code':enums_1['HMSH_CODE_TIMEOUT'],'message':'timeout','job_id':_0x23deff});},_0x445479);});}async['pubOneTimeSubs'](_0x21cec3,_0x35e2e4,_0x5abf4a=![]){if(this['hasOneTimeSubscription'](_0x21cec3)){const _0x1e514d={'type':'job','topic':_0x21cec3['metadata']['jid'],'job':(0x0,utils_1['restoreHierarchy'])(_0x35e2e4)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x1e514d,this['appId'],_0x21cec3['metadata']['ngn']);}}async['getPublishesTopic'](_0x460c35){const _0x271765=await this['getVID'](),_0x5c6933=_0x460c35['metadata']['aid']||_0x460c35['$self']?.['output']?.['metadata']?.['aid'],_0xe72cb7=await this['store']['getSchema'](_0x5c6933,_0x271765);return _0xe72cb7['publishes'];}async['pubPermSubs'](_0x3a6805,_0x4019a2,_0x4befd3=![]){const _0x38c900=await this['getPublishesTopic'](_0x3a6805);if(_0x38c900){const _0x1968af={'type':'job','topic':_0x38c900,'job':(0x0,utils_1['restoreHierarchy'])(_0x4019a2)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x1968af,this['appId'],_0x38c900+'.'+_0x3a6805['metadata']['jid']);}}async['add'](_0x4fa7d9){return await this['router']?.['publishMessage'](null,_0x4fa7d9);}['registerJobCallback'](_0x54b76e,_0x5ee3e9){this['jobCallbacks'][_0x54b76e]=_0x5ee3e9;}['delistJobCallback'](_0x21e8c4){delete this['jobCallbacks'][_0x21e8c4];}['hasOneTimeSubscription'](_0x2711aa){return Boolean(_0x2711aa['metadata']['ngn']);}async['runJobCompletionTasks'](_0x4fdf45,_0x39b28a={}){const _0x2f9625=this['hasParentJob'](_0x4fdf45,!![]),_0x273701=this['hasOneTimeSubscription'](_0x4fdf45),_0x57a99b=await this['getPublishesTopic'](_0x4fdf45);let _0x4d8ae2;if(_0x2f9625||_0x273701||_0x57a99b){const _0x25c22e=await this['getState'](_0x4fdf45['metadata']['tpc'],_0x4fdf45['metadata']['jid']);_0x4d8ae2=await this['execAdjacentParent'](_0x4fdf45,_0x25c22e,_0x39b28a['emit']),this['pubOneTimeSubs'](_0x4fdf45,_0x25c22e,_0x39b28a['emit']),this['pubPermSubs'](_0x4fdf45,_0x25c22e,_0x39b28a['emit']);}return!_0x39b28a['emit']&&this['taskService']['registerJobForCleanup'](_0x4fdf45['metadata']['jid'],this['resolveExpires'](_0x4fdf45,_0x39b28a),_0x39b28a),_0x4d8ae2;}['resolveExpires'](_0x27e211,_0x314284){return _0x314284['expire']??_0x27e211['metadata']['expire']??enums_1['HMSH_EXPIRE_JOB_SECONDS'];}async['export'](_0x2195ce){return await this['exporter']['export'](_0x2195ce);}async['getRaw'](_0x4caa5d){return await this['store']['getRaw'](_0x4caa5d);}async['getStatus'](_0x28fa59){const {id:_0x5144ef}=await this['getVID']();return await this['store']['getStatus'](_0x28fa59,_0x5144ef);}async['getState'](_0x54a2e4,_0x37938a){const _0x424cbe=await this['store']['getSymbols']('$'+_0x54a2e4),_0x2bcd6b={['$'+_0x54a2e4]:Object['keys'](_0x424cbe)},_0x2ad055={},_0x18710c=await this['store']['getState'](_0x37938a,_0x2bcd6b,_0x2ad055);if(!_0x18710c)throw new Error('not\x20found\x20'+_0x37938a);const [_0x22a475,_0x313314]=_0x18710c,_0x52b945=(0x0,utils_1['restoreHierarchy'])(_0x22a475);return _0x313314&&_0x52b945['metadata']&&(_0x52b945['metadata']['js']=_0x313314),_0x52b945;}async['getQueryState'](_0x36ec1c,_0x3d7795){return await this['store']['getQueryState'](_0x36ec1c,_0x3d7795);}async['compress'](_0x3f22da){const _0x16f524=await this['store']['getSymbolValues'](),_0x4ac20f=Object['keys'](_0x16f524)['length'],_0x397616=Math['pow'](0x34,0x2)-0x1,_0x5894d1=serializer_1['SerializerService']['filterSymVals'](_0x4ac20f,_0x397616,_0x16f524,new Set(_0x3f22da));return await this['store']['addSymbolValues'](_0x5894d1);}}exports['EngineService']=EngineService;
|
|
1
|
+
'use strict';function _0x26bd(_0x884f13,_0x47ced2){const _0x337f1c=_0x337f();return _0x26bd=function(_0x26bd81,_0x1c7409){_0x26bd81=_0x26bd81-0xf0;let _0x2df706=_0x337f1c[_0x26bd81];return _0x2df706;},_0x26bd(_0x884f13,_0x47ced2);}(function(_0x1e9709,_0x54db0e){const _0x1bc664=_0x26bd,_0x1d7142=_0x1e9709();while(!![]){try{const _0x3ebfa8=-parseInt(_0x1bc664(0xf4))/0x1*(parseInt(_0x1bc664(0xf5))/0x2)+-parseInt(_0x1bc664(0xf6))/0x3*(parseInt(_0x1bc664(0xf0))/0x4)+parseInt(_0x1bc664(0xf1))/0x5+parseInt(_0x1bc664(0xf3))/0x6+-parseInt(_0x1bc664(0xf2))/0x7+-parseInt(_0x1bc664(0xf7))/0x8+parseInt(_0x1bc664(0xf8))/0x9;if(_0x3ebfa8===_0x54db0e)break;else _0x1d7142['push'](_0x1d7142['shift']());}catch(_0x159e17){_0x1d7142['push'](_0x1d7142['shift']());}}}(_0x337f,0x9f08a));var __importDefault=this&&this['__importDefault']||function(_0x4ef2ef){return _0x4ef2ef&&_0x4ef2ef['__esModule']?_0x4ef2ef:{'default':_0x4ef2ef};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['EngineService']=void 0x0;const key_1=require('../../modules/key'),enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),activities_1=__importDefault(require('../activities')),compiler_1=require('../compiler'),exporter_1=require('../exporter'),reporter_1=require('../reporter'),router_1=require('../router'),serializer_1=require('../serializer'),factory_1=require('../search/factory'),factory_2=require('../store/factory'),factory_3=require('../stream/factory'),factory_4=require('../sub/factory'),task_1=require('../task'),stream_1=require('../../types/stream');class EngineService{constructor(){this['cacheMode']='cache',this['untilVersion']=null,this['jobCallbacks']={},this['reporting']=![],this['jobId']=0x1;}static async['init'](_0x4b62a5,_0x307cd0,_0x70ff3c,_0x501a74,_0x27edd0){if(_0x501a74['engine']){const _0x363739=new EngineService();_0x363739['verifyEngineFields'](_0x501a74),_0x363739['namespace']=_0x4b62a5,_0x363739['appId']=_0x307cd0,_0x363739['guid']=_0x70ff3c,_0x363739['logger']=_0x27edd0,await _0x363739['initSearchChannel'](_0x501a74['engine']['store']),await _0x363739['initStoreChannel'](_0x501a74['engine']['store']),await _0x363739['initSubChannel'](_0x501a74['engine']['sub'],_0x501a74['engine']['pub']),await _0x363739['initStreamChannel'](_0x501a74['engine']['stream'],_0x501a74['engine']['store']),_0x363739['router']=await _0x363739['initRouter'](_0x501a74);const _0x30e14a=_0x363739['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x363739['appId']});return _0x363739['router']['consumeMessages'](_0x30e14a,'ENGINE',_0x363739['guid'],_0x363739['processStreamMessage']['bind'](_0x363739)),_0x363739['taskService']=new task_1['TaskService'](_0x363739['store'],_0x27edd0),_0x363739['exporter']=new exporter_1['ExporterService'](_0x363739['appId'],_0x363739['store'],_0x27edd0),_0x363739['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x363739;}}['verifyEngineFields'](_0x5a219c){if(!(0x0,utils_1['identifyProvider'])(_0x5a219c['engine']['store'])||!(0x0,utils_1['identifyProvider'])(_0x5a219c['engine']['stream'])||!(0x0,utils_1['identifyProvider'])(_0x5a219c['engine']['sub']))throw new Error('engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.');}async['initSearchChannel'](_0xdf61b,_0x2cd227){this['search']=await factory_1['SearchServiceFactory']['init'](_0xdf61b,_0x2cd227,this['namespace'],this['appId'],this['logger']);}async['initStoreChannel'](_0x1a957b){this['store']=await factory_2['StoreServiceFactory']['init'](_0x1a957b,this['namespace'],this['appId'],this['logger']);}async['initSubChannel'](_0x3eec40,_0x4fd7d0){this['subscribe']=await factory_4['SubServiceFactory']['init'](_0x3eec40,_0x4fd7d0,this['namespace'],this['appId'],this['guid'],this['logger']);}async['initStreamChannel'](_0x12e8d8,_0x4f8c6e){this['stream']=await factory_3['StreamServiceFactory']['init'](_0x12e8d8,_0x4f8c6e,this['namespace'],this['appId'],this['logger']);}async['initRouter'](_0x268418){const _0x382f14=await this['store']['getThrottleRate'](':');return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['ENGINE'],'reclaimDelay':_0x268418['engine']['reclaimDelay'],'reclaimCount':_0x268418['engine']['reclaimCount'],'throttle':_0x382f14,'readonly':_0x268418['engine']['readonly']},this['stream'],this['logger']);}async['fetchAndVerifyVID'](_0x21fcba,_0x3588fa=0x0){if(isNaN(Number(_0x21fcba['version']))){const _0x21b9cd=await this['store']['getApp'](_0x21fcba['id'],!![]);if(!isNaN(Number(_0x21b9cd['version']))){if(!this['apps'])this['apps']={};return this['apps'][_0x21fcba['id']]=_0x21b9cd,{'id':_0x21fcba['id'],'version':_0x21b9cd['version']};}else{if(_0x3588fa<0xa)return await(0x0,utils_1['sleepFor'])(enums_1['HMSH_QUORUM_DELAY_MS']*0x2),await this['fetchAndVerifyVID'](_0x21fcba,_0x3588fa+0x1);else this['logger']['error']('engine-vid-resolution-error',{'id':_0x21fcba['id'],'guid':this['guid']});}}return _0x21fcba;}async['getVID'](_0x41f2f2){if(this['cacheMode']==='nocache'){const _0x48aa34=await this['store']['getApp'](this['appId'],!![]);if(_0x48aa34['version']['toString']()===this['untilVersion']['toString']()){if(!this['apps'])this['apps']={};this['apps'][this['appId']]=_0x48aa34,this['setCacheMode']('cache',_0x48aa34['version']['toString']());}return{'id':this['appId'],'version':_0x48aa34['version']};}else return!this['apps']&&_0x41f2f2?(this['apps']={},this['apps'][this['appId']]=_0x41f2f2,_0x41f2f2):await this['fetchAndVerifyVID']({'id':this['appId'],'version':this['apps']?.[this['appId']]['version']});}['setCacheMode'](_0x2ca840,_0x53eac4){this['logger']['info']('engine-executable-cache',{'mode':_0x2ca840,[_0x2ca840==='cache'?'target':'until']:_0x53eac4}),this['cacheMode']=_0x2ca840,this['untilVersion']=_0x53eac4;}async['routeToSubscribers'](_0x4147f9,_0xce1164){const _0xd177ad=this['jobCallbacks'][_0xce1164['metadata']['jid']];_0xd177ad&&(this['delistJobCallback'](_0xce1164['metadata']['jid']),_0xd177ad(_0x4147f9,_0xce1164));}async['processWebHooks'](){this['taskService']['processWebHooks'](this['hook']['bind'](this));}async['processTimeHooks'](){this['taskService']['processTimeHooks'](this['hookTime']['bind'](this));}async['throttle'](_0x199895){try{this['router']?.['setThrottle'](_0x199895);}catch(_0x5c9a83){this['logger']['error']('engine-throttle-error',{'error':_0x5c9a83});}}async['initActivity'](_0xea798,_0x15a87c={},_0x4c59b5){const [_0x4b5e1c,_0x36c9df]=await this['getSchema'](_0xea798),_0x51d423=activities_1['default'][utils_1['polyfill']['resolveActivityType'](_0x36c9df['type'])];if(_0x51d423){const _0x25170d=(0x0,utils_1['formatISODate'])(new Date()),_0x402042={'aid':_0x4b5e1c,'atp':_0x36c9df['type'],'stp':_0x36c9df['subtype'],'ac':_0x25170d,'au':_0x25170d},_0x1c5006=null;return new _0x51d423(_0x36c9df,_0x15a87c,_0x402042,_0x1c5006,this,_0x4c59b5);}else throw new Error('activity\x20type\x20'+_0x36c9df['type']+'\x20not\x20found');}async['getSchema'](_0x1c1e41){const _0x3ee821=await this['store']['getApp'](this['appId']);if(!_0x3ee821)throw new Error('no\x20app\x20found\x20for\x20id\x20'+this['appId']);if(this['isPrivate'](_0x1c1e41)){const _0x27ed8d=_0x1c1e41['substring'](0x1),_0x579d50=await this['store']['getSchema'](_0x27ed8d,await this['getVID'](_0x3ee821));return[_0x27ed8d,_0x579d50];}else{const _0x408108=await this['store']['getSubscription'](_0x1c1e41,await this['getVID'](_0x3ee821));if(_0x408108){const _0x2be0b4=await this['store']['getSchema'](_0x408108,await this['getVID'](_0x3ee821));return[_0x408108,_0x2be0b4];}}throw new Error('no\x20subscription\x20found\x20for\x20topic\x20'+_0x1c1e41+'\x20in\x20app\x20'+this['appId']+'\x20for\x20app\x20version\x20'+_0x3ee821['version']);}async['getSettings'](){return await this['store']['getSettings']();}['isPrivate'](_0x3db14b){return _0x3db14b['startsWith']('.');}async['plan'](_0x40e7c6){const _0x1658e2=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x1658e2['plan'](_0x40e7c6);}async['deploy'](_0x577ca2){const _0x948166=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x948166['deploy'](_0x577ca2);}async['getStats'](_0x2bd9e8,_0x45d7a5){const {id:_0x4f1569,version:_0x3c35bd}=await this['getVID'](),_0x1aea61=new reporter_1['ReporterService']({'id':_0x4f1569,'version':_0x3c35bd},this['store'],this['logger']),_0x322149=await this['resolveQuery'](_0x2bd9e8,_0x45d7a5);return await _0x1aea61['getStats'](_0x322149);}async['getIds'](_0x7bf2f2,_0x258e1b,_0x227a62=[]){const {id:_0x304592,version:_0x59bbd1}=await this['getVID'](),_0x1fbae5=new reporter_1['ReporterService']({'id':_0x304592,'version':_0x59bbd1},this['store'],this['logger']),_0x45966f=await this['resolveQuery'](_0x7bf2f2,_0x258e1b);return await _0x1fbae5['getIds'](_0x45966f,_0x227a62);}async['resolveQuery'](_0x1a5cf0,_0x229f03){const _0x4c9a1f=await this['initActivity'](_0x1a5cf0,_0x229f03['data']);return await _0x4c9a1f['getState'](),{'end':_0x229f03['end'],'start':_0x229f03['start'],'range':_0x229f03['range'],'granularity':_0x4c9a1f['resolveGranularity'](),'key':_0x4c9a1f['resolveJobKey'](_0x4c9a1f['createInputContext']()),'sparse':_0x229f03['sparse']};}async['processStreamMessage'](_0x3f60b9){this['logger']['debug']('engine-process',{'jid':_0x3f60b9['metadata']['jid'],'gid':_0x3f60b9['metadata']['gid'],'dad':_0x3f60b9['metadata']['dad'],'aid':_0x3f60b9['metadata']['aid'],'status':_0x3f60b9['status']||stream_1['StreamStatus']['SUCCESS'],'code':_0x3f60b9['code']||0xc8,'type':_0x3f60b9['type']});const _0x2f76b3={'metadata':{'guid':_0x3f60b9['metadata']['guid'],'jid':_0x3f60b9['metadata']['jid'],'gid':_0x3f60b9['metadata']['gid'],'dad':_0x3f60b9['metadata']['dad'],'aid':_0x3f60b9['metadata']['aid']},'data':_0x3f60b9['data']};if(_0x3f60b9['type']===stream_1['StreamDataType']['TIMEHOOK']){const _0x282403=await this['initActivity']('.'+_0x3f60b9['metadata']['aid'],_0x2f76b3['data'],_0x2f76b3);await _0x282403['processTimeHookEvent'](_0x3f60b9['metadata']['jid']);}else{if(_0x3f60b9['type']===stream_1['StreamDataType']['WEBHOOK']){const _0x16ba1d=await this['initActivity']('.'+_0x3f60b9['metadata']['aid'],_0x2f76b3['data'],_0x2f76b3);await _0x16ba1d['processWebHookEvent'](_0x3f60b9['status'],_0x3f60b9['code']);}else{if(_0x3f60b9['type']===stream_1['StreamDataType']['TRANSITION']){const _0x333c59=await this['initActivity']('.'+_0x3f60b9['metadata']['aid'],_0x2f76b3['data'],_0x2f76b3);await _0x333c59['process']();}else{if(_0x3f60b9['type']===stream_1['StreamDataType']['AWAIT']){_0x2f76b3['metadata']={..._0x2f76b3['metadata'],'pj':_0x3f60b9['metadata']['jid'],'pg':_0x3f60b9['metadata']['gid'],'pd':_0x3f60b9['metadata']['dad'],'pa':_0x3f60b9['metadata']['aid'],'px':_0x3f60b9['metadata']['await']===![],'trc':_0x3f60b9['metadata']['trc'],'spn':_0x3f60b9['metadata']['spn']};const _0x3dfc96=await this['initActivity'](_0x3f60b9['metadata']['topic'],_0x3f60b9['data'],_0x2f76b3);await _0x3dfc96['process']();}else{if(_0x3f60b9['type']===stream_1['StreamDataType']['RESULT']){const _0x37b88b=await this['initActivity']('.'+_0x2f76b3['metadata']['aid'],_0x3f60b9['data'],_0x2f76b3);await _0x37b88b['processEvent'](_0x3f60b9['status'],_0x3f60b9['code']);}else{const _0x399215=await this['initActivity']('.'+_0x3f60b9['metadata']['aid'],_0x3f60b9['data'],_0x2f76b3);await _0x399215['processEvent'](_0x3f60b9['status'],_0x3f60b9['code'],'output');}}}}}this['logger']['debug']('engine-process-end',{'jid':_0x3f60b9['metadata']['jid'],'gid':_0x3f60b9['metadata']['gid'],'aid':_0x3f60b9['metadata']['aid']});}async['execAdjacentParent'](_0x5f198e,_0x351eb8,_0x122637=![]){if(this['hasParentJob'](_0x5f198e)){const _0x571b77=this['resolveError'](_0x351eb8['metadata']),_0x4f8dd4=_0x5f198e['$self']?.['output']?.['metadata']?.['l2s']||_0x5f198e['$self']?.['output']?.['metadata']?.['l1s'],_0x547fe6={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x5f198e['metadata']['pj'],'gid':_0x5f198e['metadata']['pg'],'dad':_0x5f198e['metadata']['pd'],'aid':_0x5f198e['metadata']['pa'],'trc':_0x5f198e['metadata']['trc'],'spn':_0x4f8dd4},'type':stream_1['StreamDataType']['RESULT'],'data':_0x351eb8['data']};if(_0x571b77&&_0x571b77['code'])_0x547fe6['status']=stream_1['StreamStatus']['ERROR'],_0x547fe6['data']=_0x571b77,_0x547fe6['code']=_0x571b77['code'],_0x547fe6['stack']=_0x571b77['stack'];else _0x122637?(_0x547fe6['status']=stream_1['StreamStatus']['PENDING'],_0x547fe6['code']=enums_1['HMSH_CODE_PENDING']):(_0x547fe6['status']=stream_1['StreamStatus']['SUCCESS'],_0x547fe6['code']=enums_1['HMSH_CODE_SUCCESS']);return await this['router']?.['publishMessage'](null,_0x547fe6);}}['hasParentJob'](_0x4ecf0c,_0x131d90=![]){if(_0x131d90)return Boolean(_0x4ecf0c['metadata']['pj']&&_0x4ecf0c['metadata']['pa']&&!_0x4ecf0c['metadata']['px']);return Boolean(_0x4ecf0c['metadata']['pj']&&_0x4ecf0c['metadata']['pa']);}['resolveError'](_0x22e9b9){if(_0x22e9b9&&_0x22e9b9['err'])return JSON['parse'](_0x22e9b9['err']);}async['interrupt'](_0x20a8d3,_0x4d6621,_0x5e71f6={}){await this['store']['interrupt'](_0x20a8d3,_0x4d6621,_0x5e71f6);const _0x4ef3e5=await this['getState'](_0x20a8d3,_0x4d6621),_0x55c152={'interrupt':_0x5e71f6['descend'],'expire':_0x5e71f6['expire']};return await this['runJobCompletionTasks'](_0x4ef3e5,_0x55c152);}async['scrub'](_0x225cb0){await this['store']['scrub'](_0x225cb0);}async['hook'](_0x3cffc5,_0x42e4aa,_0x40ed2a=stream_1['StreamStatus']['SUCCESS'],_0x20b2d2=0xc8){const _0x3a8f18=await this['taskService']['getHookRule'](_0x3cffc5),[_0x5617fb]=await this['getSchema']('.'+_0x3a8f18['to']),_0x13bce8={'type':stream_1['StreamDataType']['WEBHOOK'],'status':_0x40ed2a,'code':_0x20b2d2,'metadata':{'guid':(0x0,utils_1['guid'])(),'aid':_0x5617fb,'topic':_0x3cffc5},'data':_0x42e4aa};return await this['router']?.['publishMessage'](null,_0x13bce8);}async['hookTime'](_0x3d29bc,_0x2aeae4,_0x337132,_0x2673db){if(_0x2673db==='interrupt'||_0x2673db==='expire')return await this['interrupt'](_0x337132,_0x3d29bc,{'suppress':!![],'expire':0x1});const [_0x2f0ae3,..._0x1136f0]=_0x337132['split'](','),_0x5ea0d6=','+_0x1136f0['join'](','),_0x20797b={'type':stream_1['StreamDataType']['TIMEHOOK'],'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x3d29bc,'gid':_0x2aeae4,'dad':_0x5ea0d6,'aid':_0x2f0ae3},'data':{'timestamp':Date['now']()}};await this['router']?.['publishMessage'](null,_0x20797b);}async['hookAll'](_0xd63af3,_0x16195f,_0x3fa3df,_0x548c5a=[]){const _0x97b0ce=await this['getVID'](),_0x409b28=await this['taskService']['getHookRule'](_0xd63af3);if(_0x409b28){const _0x2ea5fb=await(0x0,utils_1['getSubscriptionTopic'])(_0x409b28['to'],this['store'],_0x97b0ce),_0x31f752=await this['resolveQuery'](_0x2ea5fb,_0x3fa3df),_0x512e7e=new reporter_1['ReporterService'](_0x97b0ce,this['store'],this['logger']),_0x1cf1e0=await _0x512e7e['getWorkItems'](_0x31f752,_0x548c5a);if(_0x1cf1e0['length']){const _0x54476e=new task_1['TaskService'](this['store'],this['logger']);await _0x54476e['enqueueWorkItems'](_0x1cf1e0['map'](_0x10ed36=>[_0xd63af3,_0x10ed36,_0x3fa3df['scrub']||![],JSON['stringify'](_0x16195f)]['join'](key_1['VALSEP']))),this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'work','originator':this['guid']},this['appId']);}return _0x1cf1e0;}else throw new Error('unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20'+_0xd63af3);}async['pub'](_0x17ca0e,_0x48ded3,_0x55839f,_0x5c6515){const _0x4cf5d9=await this['initActivity'](_0x17ca0e,_0x48ded3,_0x55839f);if(_0x4cf5d9)return await _0x4cf5d9['process'](_0x5c6515);else throw new Error('unable\x20to\x20process\x20activity\x20for\x20topic\x20'+_0x17ca0e);}async['sub'](_0x3733c3,_0x41a36a){const _0x35f010=async(_0x3be920,_0x18fbbf)=>{_0x41a36a(_0x18fbbf['topic'],_0x18fbbf['job']);};return await this['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x35f010,this['appId'],_0x3733c3);}async['unsub'](_0x5e2f86){return await this['subscribe']['unsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x5e2f86);}async['psub'](_0x14a061,_0x3295a5){const _0x13a32b=async(_0xef87b9,_0x1cd741)=>{_0x3295a5(_0x1cd741['topic'],_0x1cd741['job']);};return await this['subscribe']['psubscribe'](key_1['KeyType']['QUORUM'],_0x13a32b,this['appId'],_0x14a061);}async['punsub'](_0x420aa0){return await this['subscribe']['punsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x420aa0);}async['pubsub'](_0x5f2a69,_0x3fbd2a,_0x32f254,_0x274992=enums_1['HMSH_OTT_WAIT_TIME']){_0x32f254={'metadata':{'ngn':this['guid'],'trc':_0x32f254?.['metadata']?.['trc'],'spn':_0x32f254?.['metadata']?.['spn']}};const _0x522c18=await this['pub'](_0x5f2a69,_0x3fbd2a,_0x32f254);return new Promise((_0x1d7d74,_0x491e7c)=>{this['registerJobCallback'](_0x522c18,(_0x23aae4,_0x510cd5)=>{if(_0x510cd5['metadata']['err']){const _0x1b5fa6=JSON['parse'](_0x510cd5['metadata']['err']);_0x491e7c({..._0x1b5fa6,'job_id':_0x510cd5['metadata']['jid']});}else _0x1d7d74(_0x510cd5);}),setTimeout(()=>{this['delistJobCallback'](_0x522c18),_0x491e7c({'code':enums_1['HMSH_CODE_TIMEOUT'],'message':'timeout','job_id':_0x522c18});},_0x274992);});}async['pubOneTimeSubs'](_0x339838,_0x5557bb,_0x1ca12e=![]){if(this['hasOneTimeSubscription'](_0x339838)){const _0x4fa60b={'type':'job','topic':_0x339838['metadata']['jid'],'job':(0x0,utils_1['restoreHierarchy'])(_0x5557bb)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x4fa60b,this['appId'],_0x339838['metadata']['ngn']);}}async['getPublishesTopic'](_0x5ce5ef){const _0x403260=await this['getVID'](),_0x1846fe=_0x5ce5ef['metadata']['aid']||_0x5ce5ef['$self']?.['output']?.['metadata']?.['aid'],_0x41caf9=await this['store']['getSchema'](_0x1846fe,_0x403260);return _0x41caf9['publishes'];}async['pubPermSubs'](_0x1188c3,_0x23316a,_0x16ea83=![]){const _0x314b6e=await this['getPublishesTopic'](_0x1188c3);if(_0x314b6e){const _0x28f753={'type':'job','topic':_0x314b6e,'job':(0x0,utils_1['restoreHierarchy'])(_0x23316a)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x28f753,this['appId'],_0x314b6e+'.'+_0x1188c3['metadata']['jid']);}}async['add'](_0x4c9a6f){return await this['router']?.['publishMessage'](null,_0x4c9a6f);}['registerJobCallback'](_0x59ccf2,_0x1933ea){this['jobCallbacks'][_0x59ccf2]=_0x1933ea;}['delistJobCallback'](_0x599df9){delete this['jobCallbacks'][_0x599df9];}['hasOneTimeSubscription'](_0x4658a1){return Boolean(_0x4658a1['metadata']['ngn']);}async['runJobCompletionTasks'](_0x552694,_0xe39fc7={}){const _0x36b604=this['hasParentJob'](_0x552694,!![]),_0x5c8525=this['hasOneTimeSubscription'](_0x552694),_0x12e471=await this['getPublishesTopic'](_0x552694);let _0xb97eb4;if(_0x36b604||_0x5c8525||_0x12e471){const _0x1c02ad=await this['getState'](_0x552694['metadata']['tpc'],_0x552694['metadata']['jid']);_0xb97eb4=await this['execAdjacentParent'](_0x552694,_0x1c02ad,_0xe39fc7['emit']),this['pubOneTimeSubs'](_0x552694,_0x1c02ad,_0xe39fc7['emit']),this['pubPermSubs'](_0x552694,_0x1c02ad,_0xe39fc7['emit']);}return!_0xe39fc7['emit']&&this['taskService']['registerJobForCleanup'](_0x552694['metadata']['jid'],this['resolveExpires'](_0x552694,_0xe39fc7),_0xe39fc7),_0xb97eb4;}['resolveExpires'](_0x4d7df3,_0x1a46d0){return _0x1a46d0['expire']??_0x4d7df3['metadata']['expire']??enums_1['HMSH_EXPIRE_JOB_SECONDS'];}async['export'](_0x388686){return await this['exporter']['export'](_0x388686);}async['getRaw'](_0x4fe91b){return await this['store']['getRaw'](_0x4fe91b);}async['getStatus'](_0x4484fd){const {id:_0x59f4dc}=await this['getVID']();return await this['store']['getStatus'](_0x4484fd,_0x59f4dc);}async['getState'](_0x422511,_0x37257d){const _0x375bbd=await this['store']['getSymbols']('$'+_0x422511),_0x3a47f6={['$'+_0x422511]:Object['keys'](_0x375bbd)},_0x319dbd={},_0x405138=await this['store']['getState'](_0x37257d,_0x3a47f6,_0x319dbd);if(!_0x405138)throw new Error('not\x20found\x20'+_0x37257d);const [_0x4ec0ec,_0x2deba9]=_0x405138,_0x46d68f=(0x0,utils_1['restoreHierarchy'])(_0x4ec0ec);return _0x2deba9&&_0x46d68f['metadata']&&(_0x46d68f['metadata']['js']=_0x2deba9),_0x46d68f;}async['getQueryState'](_0x15e65e,_0x2017a9){return await this['store']['getQueryState'](_0x15e65e,_0x2017a9);}async['compress'](_0x355682){const _0x4f84f6=await this['store']['getSymbolValues'](),_0x70a9b1=Object['keys'](_0x4f84f6)['length'],_0x2227cb=Math['pow'](0x34,0x2)-0x1,_0x1f632c=serializer_1['SerializerService']['filterSymVals'](_0x70a9b1,_0x2227cb,_0x4f84f6,new Set(_0x355682));return await this['store']['addSymbolValues'](_0x1f632c);}}exports['EngineService']=EngineService;function _0x337f(){const _0x1c228c=['1403285soRSrz','8655367gPwMQC','252006JNSDWb','566437JirsSU','4FgufmT','94701ayIbev','617808nbOguF','35773839MhoJgH','152gvhsWm'];_0x337f=function(){return _0x1c228c;};return _0x337f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x2b06d7,_0x2d7b5e){const _0x3fb937=_0xf7fd,_0x10a42d=_0x2b06d7();while(!![]){try{const _0x5b4650=-parseInt(_0x3fb937(0x90))/0x1*(-parseInt(_0x3fb937(0x92))/0x2)+-parseInt(_0x3fb937(0x96))/0x3+parseInt(_0x3fb937(0x8f))/0x4*(parseInt(_0x3fb937(0x94))/0x5)+-parseInt(_0x3fb937(0x91))/0x6+-parseInt(_0x3fb937(0x95))/0x7*(-parseInt(_0x3fb937(0x93))/0x8)+-parseInt(_0x3fb937(0x8e))/0x9+-parseInt(_0x3fb937(0x97))/0xa;if(_0x5b4650===_0x2d7b5e)break;else _0x10a42d['push'](_0x10a42d['shift']());}catch(_0x45f910){_0x10a42d['push'](_0x10a42d['shift']());}}}(_0x5b37,0xa4f8f));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ExporterService']=void 0x0;const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),serializer_1=require('../serializer');function _0x5b37(){const _0xd4965e=['2OazzGH','8imJPUN','69425RuzZUy','8926267ZUKDee','1651887ImpLbv','6324620xrTNkK','4375854KJEVvy','328uPcdzL','1060463fVruTV','6775140gfUGhp'];_0x5b37=function(){return _0xd4965e;};return _0x5b37();}class ExporterService{constructor(_0x16ffa2,_0x31045c,_0x1d5045){this['appId']=_0x16ffa2,this['logger']=_0x1d5045,this['store']=_0x31045c;}async['export'](_0x186517,_0x2d3b2d={}){!this['symbols']&&(this['symbols']=this['store']['getAllSymbols'](),this['symbols']=await this['symbols']);const _0x1873b9=[],_0x1f8320=await this['store']['getRaw'](_0x186517),_0x15294a=this['inflate'](_0x1f8320,_0x1873b9);return _0x15294a;}['inflateKey'](_0x1a1c4b){return _0x1a1c4b in this['symbols']?this['symbols'][_0x1a1c4b]:_0x1a1c4b;}['inflate'](_0x1e0d5f,_0x2ba7e7){const _0x19271e={'hooks':{},'main':{'cursor':-0x1,'items':[]}},_0x105641={},_0x2b2240=this['inflateDependencyData'](_0x2ba7e7,_0x19271e),_0x4ca57e=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](_0x1e0d5f)['forEach'](([_0x26c86f,_0x1615d3])=>{const _0x2c5670=_0x26c86f['match'](_0x4ca57e);if(_0x2c5670){const [_0x1d0119,_0x2f5798,_0x2fdb63]=_0x2c5670,_0x1e9cb0=this['inflateKey'](_0x2f5798),_0x438de3=''+_0x2fdb63['replace'](/,/g,'/'),_0x731634=serializer_1['SerializerService']['fromString'](_0x1615d3);_0x105641[_0x438de3+'/'+_0x1e9cb0]=_0x731634;}else _0x26c86f['length']===0x3&&(_0x105641[this['inflateKey'](_0x26c86f)]=serializer_1['SerializerService']['fromString'](_0x1615d3));}),{'dependencies':_0x2b2240,'process':(0x0,utils_1['restoreHierarchy'])(_0x105641),'status':_0x1e0d5f[':']};}['inflateDependencyData'](_0x167fc7,_0x5d04f5){const _0x33b306=/([0-9,]+)-(\d+)$/,_0xcb5d32=/-(\d+)$/;return _0x167fc7['map']((_0x2ef814,_0x4a61ef)=>{const [_0x49277d,_0xb6a4f3,_0xf83ce2,_0x3ca381,..._0x4f998e]=_0x2ef814['split'](key_1['VALSEP']),_0x599085=_0x4f998e['join'](key_1['VALSEP']),_0x193062=_0x599085['match'](_0x33b306);let _0x3ed567,_0x323c4f,_0x2415e8='';if(_0x193062){const [_0x56aef0,_0x594ace,_0x4e65b9]=_0x193062;_0x2415e8=_0x594ace['split'](',')['join']('/'),_0x3ed567=_0x2415e8+'['+_0x4e65b9+']',_0x323c4f='hook';}else{const _0x1e1709=_0x599085['match'](_0xcb5d32);if(_0x1e1709){const [_0x17f107,_0x2023db]=_0x1e1709;_0x3ed567='['+_0x2023db+']',_0x323c4f='flow';}else _0x3ed567='/',_0x323c4f='other';}return{'type':_0x49277d,'topic':_0xb6a4f3,'gid':_0xf83ce2,'jid':_0x599085};});}}function _0xf7fd(_0x21ac0e,_0x220359){const _0x5b3745=_0x5b37();return _0xf7fd=function(_0xf7fd86,_0x32d62e){_0xf7fd86=_0xf7fd86-0x8e;let _0x3366bd=_0x5b3745[_0xf7fd86];return _0x3366bd;},_0xf7fd(_0x21ac0e,_0x220359);}exports['ExporterService']=ExporterService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x31cff9,_0x250513){const _0x29f9d7=_0x3838,_0x408719=_0x31cff9();while(!![]){try{const _0x115391=parseInt(_0x29f9d7(0xdd))/0x1*(-parseInt(_0x29f9d7(0xd8))/0x2)+-parseInt(_0x29f9d7(0xdb))/0x3*(parseInt(_0x29f9d7(0xd7))/0x4)+parseInt(_0x29f9d7(0xd5))/0x5*(-parseInt(_0x29f9d7(0xd9))/0x6)+-parseInt(_0x29f9d7(0xd2))/0x7*(-parseInt(_0x29f9d7(0xda))/0x8)+parseInt(_0x29f9d7(0xdc))/0x9*(parseInt(_0x29f9d7(0xd6))/0xa)+-parseInt(_0x29f9d7(0xd1))/0xb*(-parseInt(_0x29f9d7(0xd3))/0xc)+parseInt(_0x29f9d7(0xd4))/0xd;if(_0x115391===_0x250513)break;else _0x408719['push'](_0x408719['shift']());}catch(_0x576e33){_0x408719['push'](_0x408719['shift']());}}}(_0x2958,0x5b3ed));function _0x2958(){const _0x116719=['135256gWNOJF','2JCoBGv','12KJmelD','5816YBBFrc','57hKKOXS','96417pNgOBL','266164DemwJJ','11wPXsdK','1862GRZupB','6051948GwxqmL','11032697dISBrL','1008195yWqAyb','130pShLfo'];_0x2958=function(){return _0x116719;};return _0x2958();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['MapperService']=void 0x0;function _0x3838(_0xd98788,_0x3239d2){const _0x2958e5=_0x2958();return _0x3838=function(_0x3838b3,_0x1321e3){_0x3838b3=_0x3838b3-0xd1;let _0x1a3535=_0x2958e5[_0x3838b3];return _0x1a3535;},_0x3838(_0xd98788,_0x3239d2);}const pipe_1=require('../pipe');class MapperService{constructor(_0x39261e,_0x2b031e){this['rules']=_0x39261e,this['data']=_0x2b031e;}['mapRules'](){return this['traverseRules'](this['rules']);}['traverseRules'](_0x49b023){if(typeof _0x49b023==='object'&&'@pipe'in _0x49b023)return this['pipe'](_0x49b023['@pipe']);if(typeof _0x49b023==='object'&&_0x49b023!==null){const _0x27d9a3={};for(const _0x538d72 in _0x49b023){Object['prototype']['hasOwnProperty']['call'](_0x49b023,_0x538d72)&&(_0x27d9a3[_0x538d72]=this['traverseRules'](_0x49b023[_0x538d72]));}return _0x27d9a3;}else return this['resolve'](_0x49b023);}['pipe'](_0x50657e){const _0x4e9730=new pipe_1['Pipe'](_0x50657e,this['data']);return _0x4e9730['process']();}['resolve'](_0x3acefa){const _0x5e19c1=new pipe_1['Pipe']([[_0x3acefa]],this['data']);return _0x5e19c1['process']();}static['evaluate'](_0x56d8cd,_0x506e86,_0xb7b58d){if(typeof _0x56d8cd==='boolean')return _0x56d8cd;if(Array['isArray'](_0x56d8cd['code'])&&_0x56d8cd['code']['includes'](_0xb7b58d||0xc8)||_0xb7b58d['toString']()===(_0x56d8cd['code']||0xc8)['toString']()){if(!_0x56d8cd['match'])return!![];const _0x3d5b85=_0x56d8cd['gate']==='or';let _0x3f4f3b=!![],_0x31eb0a=![];return _0x56d8cd['match']['forEach'](({expected:_0x24f003,actual:_0x5a32e9})=>{if(_0x3d5b85&&!_0x31eb0a||!_0x3d5b85&&_0x3f4f3b){const _0x30049b=pipe_1['Pipe']['resolve'](_0x5a32e9,_0x506e86)===_0x24f003;if(_0x3d5b85&&_0x30049b)_0x31eb0a=!![];else!_0x3d5b85&&!_0x30049b&&(_0x3f4f3b=![]);}}),_0x3d5b85?_0x31eb0a:_0x3f4f3b;}return![];}}exports['MapperService']=MapperService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x1b64(_0x47abe3,_0x2faa10){const _0x299705=_0x2997();return _0x1b64=function(_0x1b6463,_0x425a58){_0x1b6463=_0x1b6463-0x15c;let _0x1b3e81=_0x299705[_0x1b6463];return _0x1b3e81;},_0x1b64(_0x47abe3,_0x2faa10);}(function(_0x1ef652,_0x3e9116){const _0x108598=_0x1b64,_0x3f924b=_0x1ef652();while(!![]){try{const _0x20c438=-parseInt(_0x108598(0x15f))/0x1+parseInt(_0x108598(0x162))/0x2*(parseInt(_0x108598(0x160))/0x3)+-parseInt(_0x108598(0x15c))/0x4+-parseInt(_0x108598(0x165))/0x5*(-parseInt(_0x108598(0x15e))/0x6)+-parseInt(_0x108598(0x163))/0x7*(-parseInt(_0x108598(0x164))/0x8)+parseInt(_0x108598(0x161))/0x9+-parseInt(_0x108598(0x15d))/0xa*(-parseInt(_0x108598(0x166))/0xb);if(_0x20c438===_0x3e9116)break;else _0x3f924b['push'](_0x3f924b['shift']());}catch(_0x32474a){_0x3f924b['push'](_0x3f924b['shift']());}}}(_0x2997,0xb2bba));function _0x2997(){const _0x4bcde6=['12499137kscuYD','14fkwPKk','2341591aONeAn','8pgDOsb','10CsuPkX','187XsckNR','5080372rESlFG','247010tbWbgX','1853076yELvSW','858041LubaWu','42561SFNzgQ'];_0x2997=function(){return _0x4bcde6;};return _0x2997();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ExporterService']=void 0x0;const utils_1=require('../../modules/utils'),serializer_1=require('../serializer');class ExporterService{constructor(_0x5a0351,_0x433df2,_0x4f5948){this['appId']=_0x5a0351,this['logger']=_0x4f5948,this['store']=_0x433df2;}async['export'](_0x2a9c61,_0x3db872={}){if(!ExporterService['symbols']['has'](this['appId'])){const _0x295870=this['store']['getAllSymbols']();ExporterService['symbols']['set'](this['appId'],await _0x295870);}const _0x4bae91=await this['store']['getRaw'](_0x2a9c61),_0x81de0d=this['inflate'](_0x4bae91,_0x3db872);return _0x81de0d;}['inflate'](_0x1281e7,_0x281dc7){const _0x54ebef=[],_0x125c27={},_0x14accc={},_0x401385={},_0x16995d=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](_0x1281e7)['forEach'](([_0x479c9a,_0x12277b])=>{const _0x2d7f56=_0x479c9a['match'](_0x16995d);if(_0x2d7f56)this['inflateTransition'](_0x2d7f56,_0x12277b,_0x401385);else{if(_0x479c9a['startsWith']('_'))_0x14accc[_0x479c9a['substring'](0x1)]=_0x12277b;else{if(_0x479c9a['startsWith']('-')){const _0x4e2ce9=this['keyToObject'](_0x479c9a);_0x54ebef['push']({..._0x4e2ce9,'key':_0x479c9a,'value':this['resolveValue'](_0x12277b,_0x281dc7['values'])});}else _0x479c9a['length']===0x3&&(_0x125c27[this['inflateKey'](_0x479c9a)]=serializer_1['SerializerService']['fromString'](_0x12277b));}}}),this['filterFields']({'data':(0x0,utils_1['restoreHierarchy'])(_0x14accc),'state':Object['entries']((0x0,utils_1['restoreHierarchy'])(_0x125c27))[0x0][0x1],'status':parseInt(_0x1281e7[':'],0xa),'timeline':this['sortParts'](_0x54ebef),'transitions':this['sortEntriesByCreated'](_0x401385)},_0x281dc7['block'],_0x281dc7['allow']);}['resolveValue'](_0x45738c,_0x12cd01){const _0x5a3c78=serializer_1['SerializerService']['fromString'](_0x45738c);if(_0x12cd01!==![])return _0x5a3c78;return _0x5a3c78&&typeof _0x5a3c78==='object'&&('data'in _0x5a3c78&&(_0x5a3c78['data']={}),'$error'in _0x5a3c78&&(_0x5a3c78['$error']={})),_0x5a3c78;}['inflateKey'](_0x53f6b4){const _0x1b7562=ExporterService['symbols']['get'](this['appId']);if(_0x53f6b4 in _0x1b7562){const _0x1d835e=_0x1b7562[_0x53f6b4],_0x42cca5=_0x1d835e['split']('/');return _0x42cca5['join']('/');}return _0x53f6b4;}['filterFields'](_0x10e047,_0x197347=[],_0x1af443=[]){let _0x1b04b9={};return _0x1af443&&_0x1af443['length']>0x0?_0x1af443['forEach'](_0x5c28c7=>{_0x5c28c7 in _0x10e047&&(_0x1b04b9[_0x5c28c7]=_0x10e047[_0x5c28c7]);}):_0x1b04b9={..._0x10e047},_0x197347&&_0x197347['length']>0x0&&_0x197347['forEach'](_0x1b3839=>{_0x1b3839 in _0x1b04b9&&delete _0x1b04b9[_0x1b3839];}),_0x1b04b9;}['inflateTransition'](_0x4def79,_0x3084f0,_0x507c88){const [_0x4bdb50,_0x575b9e,_0x35d0df]=_0x4def79,_0x2764fc=this['inflateKey'](_0x575b9e),_0x2cb13f=_0x2764fc['split']('/'),_0x5d0f07=_0x2cb13f[0x0],_0x3d90e0=_0x2764fc['endsWith']('/output/metadata/ac'),_0x2518ee=_0x2764fc['endsWith']('/output/metadata/au');if(_0x3d90e0||_0x2518ee){const _0x4be75a=_0x5d0f07+','+_0x35d0df,_0x390a0f=_0x507c88[_0x4be75a];!_0x390a0f?_0x507c88[_0x4be75a]={'activity':_0x5d0f07,'dimensions':_0x35d0df,'created':_0x3d90e0?_0x3084f0:null,'updated':_0x2518ee?_0x3084f0:null}:_0x390a0f[_0x3d90e0?'created':'updated']=_0x3084f0;}}['sortEntriesByCreated'](_0x52211f){const _0x4b71c9=Object['values'](_0x52211f);return _0x4b71c9['sort']((_0x2cbf39,_0x156b6c)=>{return(_0x2cbf39['created']||_0x2cbf39['updated'])['localeCompare'](_0x156b6c['created']||_0x156b6c['updated']);}),_0x4b71c9;}['keyToObject'](_0x31898e){function _0x22ea29(_0x32a27b){const _0x5f389a=_0x32a27b['split'](',');if(_0x5f389a['length']>0x1)return _0x5f389a['shift'](),_0x5f389a['join'](',');}const _0x42a982=_0x31898e['split']('-');return _0x42a982['length']===0x4?{'index':parseInt(_0x42a982[0x2],0xa),'dimension':_0x22ea29(_0x42a982[0x1])}:{'index':parseInt(_0x42a982[0x2],0xa),'secondary':parseInt(_0x42a982[0x3],0xa),'dimension':_0x22ea29(_0x42a982[0x1])};}['sortParts'](_0x3ecd42){return _0x3ecd42['sort']((_0x55a40a,_0x111740)=>{const {dimension:_0x4b7df3,index:_0x48bb41,secondary:_0xd62df8}=_0x55a40a,{dimension:_0x2a7d89,index:_0x37a9fd,secondary:_0x5cf732}=_0x111740;if(_0x4b7df3===undefined&&_0x2a7d89!==undefined)return-0x1;if(_0x4b7df3!==undefined&&_0x2a7d89===undefined)return 0x1;if(_0x4b7df3!==undefined&&_0x2a7d89!==undefined){if(_0x4b7df3<_0x2a7d89)return-0x1;if(_0x4b7df3>_0x2a7d89)return 0x1;}if(_0x48bb41<_0x37a9fd)return-0x1;if(_0x48bb41>_0x37a9fd)return 0x1;if(_0xd62df8===undefined&&_0x5cf732!==undefined)return-0x1;if(_0xd62df8!==undefined&&_0x5cf732===undefined)return 0x1;if(_0xd62df8!==undefined&&_0x5cf732!==undefined){if(_0xd62df8<_0x5cf732)return-0x1;if(_0xd62df8>_0x5cf732)return 0x1;}return 0x0;});}}exports['ExporterService']=ExporterService,ExporterService['symbols']=new Map();
|
|
@@ -226,7 +226,7 @@ class MeshOS {
|
|
|
226
226
|
}
|
|
227
227
|
static findEntity(database, namespace, entity) {
|
|
228
228
|
if (!database || !MeshOS.profiles[database]) {
|
|
229
|
-
const activeProfiles = Object.keys(MeshOS.profiles).filter((key) => MeshOS.profiles[key]?.db
|
|
229
|
+
const activeProfiles = Object.keys(MeshOS.profiles).filter((key) => MeshOS.profiles[key]?.db);
|
|
230
230
|
throw new Error(`The database query parameter [${database}] was not found. Use one of: ${activeProfiles.join(', ')}`);
|
|
231
231
|
}
|
|
232
232
|
if (!namespace || !MeshOS.profiles[database]?.instances?.[namespace]) {
|
|
@@ -254,7 +254,7 @@ class MeshOS {
|
|
|
254
254
|
}
|
|
255
255
|
static findSchemas(database, ns) {
|
|
256
256
|
if (!database || !MeshOS.profiles[database]) {
|
|
257
|
-
const activeProfiles = Object.keys(MeshOS.profiles).filter((key) => MeshOS.profiles[key]?.db
|
|
257
|
+
const activeProfiles = Object.keys(MeshOS.profiles).filter((key) => MeshOS.profiles[key]?.db);
|
|
258
258
|
throw new Error(`The database query parameter [${database}] was not found. Use one of: ${activeProfiles.join(', ')}`);
|
|
259
259
|
}
|
|
260
260
|
const profile = MeshOS.profiles[database];
|
|
@@ -271,7 +271,7 @@ class MeshOS {
|
|
|
271
271
|
const result = {};
|
|
272
272
|
for (const key in p) {
|
|
273
273
|
const profile = p[key];
|
|
274
|
-
if (!profile.db
|
|
274
|
+
if (!profile.db) {
|
|
275
275
|
continue;
|
|
276
276
|
}
|
|
277
277
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x548d3d,_0x342df3){var _0x17a8eb=_0x4cc3,_0x5428be=_0x548d3d();while(!![]){try{var _0x5850b9=-parseInt(_0x17a8eb(0x8e))/0x1*(-parseInt(_0x17a8eb(0x8f))/0x2)+parseInt(_0x17a8eb(0x91))/0x3+-parseInt(_0x17a8eb(0x95))/0x4*(-parseInt(_0x17a8eb(0x8d))/0x5)+parseInt(_0x17a8eb(0x94))/0x6*(-parseInt(_0x17a8eb(0x93))/0x7)+-parseInt(_0x17a8eb(0x8c))/0x8+-parseInt(_0x17a8eb(0x8a))/0x9*(-parseInt(_0x17a8eb(0x92))/0xa)+parseInt(_0x17a8eb(0x8b))/0xb*(-parseInt(_0x17a8eb(0x90))/0xc);if(_0x5850b9===_0x342df3)break;else _0x5428be['push'](_0x5428be['shift']());}catch(_0x6d2c02){_0x5428be['push'](_0x5428be['shift']());}}}(_0x26d6,0xadbc9));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ArrayHandler']=void 0x0;class ArrayHandler{['get'](_0x202e56,_0x4e6d66){return _0x202e56?.[_0x4e6d66||0x0];}['length'](_0x423adb){return _0x423adb?.['length'];}['concat'](_0x24a118,_0x1e2037){return _0x24a118['concat'](_0x1e2037);}['indexOf'](_0x4ee1b3,_0x1afd7a,_0x349030){return _0x4ee1b3['indexOf'](_0x1afd7a,_0x349030);}['join'](_0x50b82a,_0x490e84){return _0x50b82a['join'](_0x490e84);}['lastIndexOf'](_0x480f64,_0x3f6c1a,_0x5496da){return _0x480f64['lastIndexOf'](_0x3f6c1a,_0x5496da);}['pop'](_0x226b41){return _0x226b41['pop']();}['push'](_0x5f4216,..._0x10308d){return _0x5f4216['push'](..._0x10308d),_0x5f4216;}['reverse'](_0x50d852){return _0x50d852['reverse']();}['shift'](_0x328ed8){return _0x328ed8['shift']();}['slice'](_0x34dd4a,_0x301226,_0x340783){return _0x34dd4a['slice'](_0x301226,_0x340783);}['sort'](_0x1c466d,_0x520695='ASCENDING'){return _0x1c466d['sort']((_0x548053,_0x2cee8f)=>{if(_0x520695==='ASCENDING'){if(_0x548053===_0x2cee8f)return 0x0;if(_0x548053===null||_0x548053===undefined)return-0x1;if(_0x2cee8f===null||_0x2cee8f===undefined)return 0x1;if(typeof _0x548053==='string'&&typeof _0x2cee8f==='string')return _0x548053['localeCompare'](_0x2cee8f);return _0x548053<_0x2cee8f?-0x1:0x1;}else{if(_0x548053===_0x2cee8f)return 0x0;if(_0x548053===null||_0x548053===undefined)return 0x1;if(_0x2cee8f===null||_0x2cee8f===undefined)return-0x1;if(typeof _0x548053==='string'&&typeof _0x2cee8f==='string')return _0x2cee8f['localeCompare'](_0x548053);return _0x548053>_0x2cee8f?-0x1:0x1;}});}['splice'](_0x52e43b,_0x1bc602,_0x232a38,..._0x1d44cf){return _0x52e43b['splice'](_0x1bc602,_0x232a38,..._0x1d44cf);}['unshift'](_0x2397f4,..._0x429780){return _0x2397f4['unshift'](..._0x429780);}}function _0x26d6(){var _0x705b9c=['15366nGzQOU','3348152CPXvNy','87003rYIwRw','4606635XpwEtu','2396112VTPhEo','5pvvznE','55619FDnduR','32VZhZzo','48IPNgaA','543843uZIhZN','1340xfnOiq','1414uTwuWz'];_0x26d6=function(){return _0x705b9c;};return _0x26d6();}function _0x4cc3(_0x33c50a,_0x426d81){var _0x26d649=_0x26d6();return _0x4cc3=function(_0x4cc3b4,_0x2874bc){_0x4cc3b4=_0x4cc3b4-0x8a;var _0x5be354=_0x26d649[_0x4cc3b4];return _0x5be354;},_0x4cc3(_0x33c50a,_0x426d81);}exports['ArrayHandler']=ArrayHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x4358c7,_0x5be42c){var _0x211855=_0x5b63,_0x516cec=_0x4358c7();while(!![]){try{var _0x2f57e0=-parseInt(_0x211855(0xba))/0x1*(parseInt(_0x211855(0xb7))/0x2)+-parseInt(_0x211855(0xbc))/0x3+-parseInt(_0x211855(0xbb))/0x4+-parseInt(_0x211855(0xb9))/0x5*(parseInt(_0x211855(0xb8))/0x6)+-parseInt(_0x211855(0xb4))/0x7+parseInt(_0x211855(0xb5))/0x8+parseInt(_0x211855(0xb6))/0x9;if(_0x2f57e0===_0x5be42c)break;else _0x516cec['push'](_0x516cec['shift']());}catch(_0x256d04){_0x516cec['push'](_0x516cec['shift']());}}}(_0x5a8d,0x58de2));function _0x5a8d(){var _0x1c76a6=['3010301hLqUwQ','4960072GXrFTj','15055029ynxLzI','244708xcdhem','4222518MKsncw','5MZJbMG','1lFEJGw','1996048yHDTUs','520878UKnuHU'];_0x5a8d=function(){return _0x1c76a6;};return _0x5a8d();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['BitwiseHandler']=void 0x0;class BitwiseHandler{['and'](_0x40346b,_0x925ede){return _0x40346b&_0x925ede;}['or'](_0x3f817d,_0x5e7a6b){return _0x3f817d|_0x5e7a6b;}['xor'](_0x20f566,_0x200064){return _0x20f566^_0x200064;}['leftShift'](_0x1704b7,_0x5f3f17){return _0x1704b7<<_0x5f3f17;}['rightShift'](_0x321c1c,_0x235057){return _0x321c1c>>_0x235057;}['unsignedRightShift'](_0x22a640,_0x2e0f2d){return _0x22a640>>>_0x2e0f2d;}}function _0x5b63(_0x388678,_0xd11a5b){var _0x5a8d16=_0x5a8d();return _0x5b63=function(_0x5b6398,_0x587693){_0x5b6398=_0x5b6398-0xb4;var _0x9da1b1=_0x5a8d16[_0x5b6398];return _0x9da1b1;},_0x5b63(_0x388678,_0xd11a5b);}exports['BitwiseHandler']=BitwiseHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x5000b5,_0x1d87bc){var _0x4e9ec6=_0x9f86,_0x489e5e=_0x5000b5();while(!![]){try{var _0x88a6d8=parseInt(_0x4e9ec6(0x109))/0x1+-parseInt(_0x4e9ec6(0x103))/0x2+-parseInt(_0x4e9ec6(0x10a))/0x3*(-parseInt(_0x4e9ec6(0x108))/0x4)+parseInt(_0x4e9ec6(0x10b))/0x5+parseInt(_0x4e9ec6(0x106))/0x6*(-parseInt(_0x4e9ec6(0x107))/0x7)+-parseInt(_0x4e9ec6(0x104))/0x8+parseInt(_0x4e9ec6(0x105))/0x9;if(_0x88a6d8===_0x1d87bc)break;else _0x489e5e['push'](_0x489e5e['shift']());}catch(_0x5a9226){_0x489e5e['push'](_0x489e5e['shift']());}}}(_0xb39b,0x6ade5));function _0xb39b(){var _0xbf543f=['632716pUKAsC','4785392JXqlUe','8818884xAnwbz','48bbksoi','376712bCaOZO','12MMDAVv','224516DDcsvw','516690udydEh','308555MlaWSm'];_0xb39b=function(){return _0xbf543f;};return _0xb39b();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ConditionalHandler']=void 0x0;class ConditionalHandler{['ternary'](_0x2d048d,_0x15686f,_0x408535){return _0x2d048d?_0x15686f:_0x408535;}['equality'](_0x947e6,_0x33fcf5){return _0x947e6==_0x33fcf5;}['strict_equality'](_0xe920ae,_0x430149){return _0xe920ae===_0x430149;}['inequality'](_0x4e9267,_0x50c3f9){return _0x4e9267!=_0x50c3f9;}['strict_inequality'](_0x1164d7,_0x26a915){return _0x1164d7!==_0x26a915;}['greater_than'](_0x33fa47,_0x21f2a6){return _0x33fa47>_0x21f2a6;}['less_than'](_0x15d4bf,_0x20f695){return _0x15d4bf<_0x20f695;}['greater_than_or_equal'](_0x32cf7e,_0x4fe50c){return _0x32cf7e>=_0x4fe50c;}['less_than_or_equal'](_0x16da31,_0x4d88a3){return _0x16da31<=_0x4d88a3;}['nullish'](_0x519c3e,_0x2840f2){return _0x519c3e??_0x2840f2;}}function _0x9f86(_0x1b38d4,_0x27f7a2){var _0xb39b10=_0xb39b();return _0x9f86=function(_0x9f86f,_0x34f5f8){_0x9f86f=_0x9f86f-0x103;var _0x13fe26=_0xb39b10[_0x9f86f];return _0x13fe26;},_0x9f86(_0x1b38d4,_0x27f7a2);}exports['ConditionalHandler']=ConditionalHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x5c3ef8,_0x35b9ba){const _0x28a1bc=_0x57b6,_0x4e1e0e=_0x5c3ef8();while(!![]){try{const _0x351436=-parseInt(_0x28a1bc(0x10f))/0x1+parseInt(_0x28a1bc(0x10d))/0x2*(parseInt(_0x28a1bc(0x10c))/0x3)+-parseInt(_0x28a1bc(0x110))/0x4*(-parseInt(_0x28a1bc(0x111))/0x5)+parseInt(_0x28a1bc(0x10b))/0x6+-parseInt(_0x28a1bc(0x112))/0x7+parseInt(_0x28a1bc(0x10e))/0x8+-parseInt(_0x28a1bc(0x10a))/0x9;if(_0x351436===_0x35b9ba)break;else _0x4e1e0e['push'](_0x4e1e0e['shift']());}catch(_0x4b6e74){_0x4e1e0e['push'](_0x4e1e0e['shift']());}}}(_0xf68f,0x1c0b7));function _0x57b6(_0x315375,_0x17f446){const _0xf68f86=_0xf68f();return _0x57b6=function(_0x57b6d4,_0xce89e3){_0x57b6d4=_0x57b6d4-0x10a;let _0xcc57ba=_0xf68f86[_0x57b6d4];return _0xcc57ba;},_0x57b6(_0x315375,_0x17f446);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CronHandler']=void 0x0;function _0xf68f(){const _0x351bf1=['314008spOQFK','1281496MlalHY','225872vPZidU','609668ZAOSxn','5hGZkjU','831726OVcJEz','657054SuTDgh','377754eRXzpv','3fLgkNP'];_0xf68f=function(){return _0x351bf1;};return _0xf68f();}const cron_parser_1=require('cron-parser'),enums_1=require('../../../modules/enums'),utils_1=require('../../../modules/utils'),logger_1=require('../../logger');class CronHandler{['nextDelay'](_0x22719f){try{if(!(0x0,utils_1['isValidCron'])(_0x22719f))return-0x1;const _0x42308c=(0x0,cron_parser_1['parseExpression'])(_0x22719f,{'utc':!![]}),_0x4e42ac=_0x42308c['next']()['toDate'](),_0xc019df=new Date(),_0x14c95b=(_0x4e42ac['getTime']()-_0xc019df['getTime']())/0x3e8;if(_0x14c95b<=0x0)return-0x1;if(_0x14c95b<enums_1['HMSH_FIDELITY_SECONDS'])return enums_1['HMSH_FIDELITY_SECONDS'];const _0x52c730=Math['round'](_0x14c95b);return _0x52c730;}catch(_0x164d76){return CronHandler['logger']['error']('Error\x20calculating\x20next\x20cron\x20job\x20execution\x20\x20delay:',{..._0x164d76}),-0x1;}}}exports['CronHandler']=CronHandler,CronHandler['logger']=new logger_1['LoggerService']('hotmesh','meshos');
|