@hotmeshio/hotmesh 0.3.18 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +160 -63
- package/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +6 -4
- 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.d.ts +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/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.d.ts +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/kvtables.d.ts +1 -0
- package/build/services/store/providers/postgres/kvtables.js +1 -1
- package/build/services/store/providers/postgres/kvtransaction.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/hash.d.ts +1 -0
- package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/zset.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.d.ts +1 -0
- 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/factory.d.ts +2 -2
- package/build/services/sub/factory.js +8 -4
- package/build/services/sub/index.d.ts +3 -2
- package/build/services/sub/providers/postgres/postgres.d.ts +18 -0
- package/build/services/sub/providers/postgres/postgres.js +1 -0
- package/build/services/sub/providers/redis/ioredis.d.ts +1 -1
- package/build/services/sub/providers/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.d.ts +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.d.ts +1 -1
- package/build/services/worker/index.js +1 -1
- package/build/types/redis.d.ts +8 -8
- package/package.json +6 -4
- package/types/redis.ts +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x477239,_0x94c0a9){var _0x2fbf4e=_0x1414,_0x58930b=_0x477239();while(!![]){try{var _0x2ac124=-parseInt(_0x2fbf4e(0x116))/0x1+-parseInt(_0x2fbf4e(0x115))/0x2+-parseInt(_0x2fbf4e(0x111))/0x3+-parseInt(_0x2fbf4e(0x110))/0x4*(parseInt(_0x2fbf4e(0x114))/0x5)+parseInt(_0x2fbf4e(0x113))/0x6*(parseInt(_0x2fbf4e(0x10d))/0x7)+-parseInt(_0x2fbf4e(0x10c))/0x8*(parseInt(_0x2fbf4e(0x10e))/0x9)+-parseInt(_0x2fbf4e(0x10f))/0xa*(-parseInt(_0x2fbf4e(0x112))/0xb);if(_0x2ac124===_0x94c0a9)break;else _0x58930b['push'](_0x58930b['shift']());}catch(_0x2add7f){_0x58930b['push'](_0x58930b['shift']());}}}(_0x5226,0x83626));function _0x5226(){var _0x1043cf=['699156gzmdYz','105584imVaGE','3124597oGKSkm','306VgPmjy','29561250eTUiED','24ASFcgL','2122788WQFfjY','11AQWqli','6pySHaU','586390bwHxKc','610388VzsHGB'];_0x5226=function(){return _0x1043cf;};return _0x5226();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['JsonHandler']=void 0x0;class JsonHandler{['stringify'](_0x28c14c,_0x19e0f9,_0x19465d){return JSON['stringify'](_0x28c14c,_0x19e0f9,_0x19465d);}['parse'](_0x183f39,_0x3129e0){return JSON['parse'](_0x183f39,_0x3129e0);}}function _0x1414(_0x4e7649,_0x269c17){var _0x522687=_0x5226();return _0x1414=function(_0x141421,_0x5f23fc){_0x141421=_0x141421-0x10c;var _0x3bbca1=_0x522687[_0x141421];return _0x3bbca1;},_0x1414(_0x4e7649,_0x269c17);}exports['JsonHandler']=JsonHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x18b530,_0x384b05){var _0x2ca464=_0xf839,_0x396d62=_0x18b530();while(!![]){try{var _0x1274ba=-parseInt(_0x2ca464(0x187))/0x1*(-parseInt(_0x2ca464(0x18e))/0x2)+parseInt(_0x2ca464(0x18d))/0x3*(-parseInt(_0x2ca464(0x188))/0x4)+parseInt(_0x2ca464(0x189))/0x5+parseInt(_0x2ca464(0x186))/0x6+parseInt(_0x2ca464(0x18b))/0x7*(parseInt(_0x2ca464(0x18c))/0x8)+-parseInt(_0x2ca464(0x18a))/0x9+parseInt(_0x2ca464(0x18f))/0xa;if(_0x1274ba===_0x384b05)break;else _0x396d62['push'](_0x396d62['shift']());}catch(_0x271756){_0x396d62['push'](_0x396d62['shift']());}}}(_0x45fa,0xbd0d1));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['LogicalHandler']=void 0x0;class LogicalHandler{['and'](_0x11f52c,_0x2428e9){return _0x11f52c&&_0x2428e9;}['or'](_0x40bb08,_0x521b04){return _0x40bb08||_0x521b04;}}exports['LogicalHandler']=LogicalHandler;function _0xf839(_0x23dde1,_0x4bb8c9){var _0x45fac0=_0x45fa();return _0xf839=function(_0xf83942,_0x46e7ed){_0xf83942=_0xf83942-0x186;var _0x4c0318=_0x45fac0[_0xf83942];return _0x4c0318;},_0xf839(_0x23dde1,_0x4bb8c9);}function _0x45fa(){var _0x295604=['4351362TOdlGD','1syLSNi','33388gPRzId','336470XAWqsr','11302857bnBBtV','244685uuSchd','200iplTrP','18LwbcxW','58778jtWIes','3845230kAdOem'];_0x45fa=function(){return _0x295604;};return _0x45fa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x144691,_0x1037ef){const _0x4ac20c=_0x5758,_0x23802d=_0x144691();while(!![]){try{const _0x57ff15=parseInt(_0x4ac20c(0x12a))/0x1*(parseInt(_0x4ac20c(0x126))/0x2)+parseInt(_0x4ac20c(0x12d))/0x3*(-parseInt(_0x4ac20c(0x129))/0x4)+parseInt(_0x4ac20c(0x12b))/0x5+-parseInt(_0x4ac20c(0x12e))/0x6*(parseInt(_0x4ac20c(0x128))/0x7)+parseInt(_0x4ac20c(0x127))/0x8*(parseInt(_0x4ac20c(0x12f))/0x9)+-parseInt(_0x4ac20c(0x125))/0xa+parseInt(_0x4ac20c(0x130))/0xb*(-parseInt(_0x4ac20c(0x12c))/0xc);if(_0x57ff15===_0x1037ef)break;else _0x23802d['push'](_0x23802d['shift']());}catch(_0x4b7d2b){_0x23802d['push'](_0x23802d['shift']());}}}(_0x46b6,0xe1e7f));function _0x5758(_0x23ecdd,_0x182494){const _0x46b630=_0x46b6();return _0x5758=function(_0x575896,_0x49c35c){_0x575896=_0x575896-0x125;let _0x289773=_0x46b630[_0x575896];return _0x289773;},_0x5758(_0x23ecdd,_0x182494);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['MathHandler']=void 0x0;class MathHandler{['add'](..._0x50b1b5){return _0x50b1b5['reduce']((_0x14a4f9,_0x13ea28)=>{return Array['isArray'](_0x13ea28)?_0x14a4f9+this['add'](..._0x13ea28):_0x14a4f9+_0x13ea28;},0x0);}['subtract'](..._0x16a7ed){if(_0x16a7ed['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');let _0x273ba8=[];_0x16a7ed['forEach'](_0x27a517=>{Array['isArray'](_0x27a517)?_0x273ba8=[..._0x273ba8,..._0x27a517]:_0x273ba8['push'](_0x27a517);});if(_0x273ba8['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required\x20after\x20flattening.');const _0xa511a0=_0x273ba8['reduce']((_0xee3cc3,_0x14623d,_0x392b3c)=>{return _0x392b3c===0x0?_0xee3cc3:_0xee3cc3-_0x14623d;});return _0xa511a0;}['multiply'](..._0x39d4e){if(_0x39d4e['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');return _0x39d4e['reduce']((_0x596b61,_0x47b08b)=>{return Array['isArray'](_0x47b08b)?_0x596b61*this['multiply'](..._0x47b08b):_0x596b61*_0x47b08b;},0x1);}['divide'](..._0x4d039e){if(_0x4d039e['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');let _0x188f56=[];_0x4d039e['forEach'](_0x57e441=>{Array['isArray'](_0x57e441)?_0x188f56=[..._0x188f56,..._0x57e441]:_0x188f56['push'](_0x57e441);});if(_0x188f56['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required\x20after\x20flattening.');const _0x5a5606=_0x188f56['reduce']((_0x3594d0,_0x497f18,_0x37c33a)=>{if(_0x497f18===0x0)return NaN;return _0x37c33a===0x0?_0x3594d0:_0x3594d0/_0x497f18;});if(isNaN(_0x5a5606))return NaN;return _0x5a5606;}['abs'](_0x5f13b1){return Math['abs'](_0x5f13b1);}['acos'](_0xe9ac23){return Math['acos'](_0xe9ac23);}['acosh'](_0x18e385){return Math['acosh'](_0x18e385);}['asin'](_0xc5d3c0){return Math['asin'](_0xc5d3c0);}['asinh'](_0x3f908a){return Math['asinh'](_0x3f908a);}['atan'](_0x62c086){return Math['atan'](_0x62c086);}['atan2'](_0x22f120,_0x49b072){return Math['atan2'](_0x22f120,_0x49b072);}['atanh'](_0x5a432c){return Math['atanh'](_0x5a432c);}['cbrt'](_0xd47f7b){return Math['cbrt'](_0xd47f7b);}['ceil'](_0x4c8c92){return Math['ceil'](_0x4c8c92);}['clz32'](_0x5b9ca3){return Math['clz32'](_0x5b9ca3);}['cos'](_0x2d9a38){return Math['cos'](_0x2d9a38);}['cosh'](_0x8d6ba0){return Math['cosh'](_0x8d6ba0);}['exp'](_0x595a5f){return Math['exp'](_0x595a5f);}['expm1'](_0x2a9747){return Math['expm1'](_0x2a9747);}['floor'](_0x1dc807){return Math['floor'](_0x1dc807);}['fround'](_0xc38fb1){return Math['fround'](_0xc38fb1);}['hypot'](..._0x2094ca){return Math['hypot'](..._0x2094ca);}['imul'](_0x4fa55c,_0x24433e){return Math['imul'](_0x4fa55c,_0x24433e);}['log'](_0x1fe0e9){return Math['log'](_0x1fe0e9);}['log10'](_0x23712e){return Math['log10'](_0x23712e);}['log1p'](_0x3b9e8b){return Math['log1p'](_0x3b9e8b);}['log2'](_0x3276b0){return Math['log2'](_0x3276b0);}['max'](..._0x2f0170){return Math['max'](..._0x2f0170);}['min'](..._0x159cef){return Math['min'](..._0x159cef);}['pow'](_0x53ecba,_0x27231a){return Math['pow'](_0x53ecba,_0x27231a);}['random'](){return Math['random']();}['round'](_0x46a1e6){return Math['round'](_0x46a1e6);}['sign'](_0x410827){return Math['sign'](_0x410827);}['sin'](_0x410667){return Math['sin'](_0x410667);}['sinh'](_0x2f74d1){return Math['sinh'](_0x2f74d1);}['sqrt'](_0x2dd5dd){return Math['sqrt'](_0x2dd5dd);}['tan'](_0x88c99){return Math['tan'](_0x88c99);}['tanh'](_0x16bb04){return Math['tanh'](_0x16bb04);}['trunc'](_0x39b830){return Math['trunc'](_0x39b830);}}function _0x46b6(){const _0x3ed8bb=['4BcswGA','60312GoPiof','193991mLNubf','221864QQbQsT','150583KgUSXv','8490310YLrUOx','2550876yVGXTW','3oSXjBM','66LkqEix','1611FmUZvz','22jQLsTk','16379430mCUsIR'];_0x46b6=function(){return _0x3ed8bb;};return _0x46b6();}exports['MathHandler']=MathHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x1f04c6,_0x4ec8e3){var _0x2bf7eb=_0x4799,_0x36e741=_0x1f04c6();while(!![]){try{var _0x11743a=-parseInt(_0x2bf7eb(0x1e0))/0x1+-parseInt(_0x2bf7eb(0x1e2))/0x2*(-parseInt(_0x2bf7eb(0x1e3))/0x3)+-parseInt(_0x2bf7eb(0x1dd))/0x4+parseInt(_0x2bf7eb(0x1da))/0x5+-parseInt(_0x2bf7eb(0x1db))/0x6*(-parseInt(_0x2bf7eb(0x1e1))/0x7)+-parseInt(_0x2bf7eb(0x1de))/0x8+-parseInt(_0x2bf7eb(0x1dc))/0x9*(-parseInt(_0x2bf7eb(0x1df))/0xa);if(_0x11743a===_0x4ec8e3)break;else _0x36e741['push'](_0x36e741['shift']());}catch(_0x5f4300){_0x36e741['push'](_0x36e741['shift']());}}}(_0x3c10,0x69fc4));function _0x3c10(){var _0xbf6396=['563037ldSfyp','1885835MScDaK','1214vVisOC','2259QSNtSZ','1166130sOdjpe','18zFhreE','806931qsJMSe','441604fYLMFh','3844936UCgdXs','10DJzCFJ'];_0x3c10=function(){return _0xbf6396;};return _0x3c10();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['NumberHandler']=void 0x0;function _0x4799(_0x207d2f,_0x3fd808){var _0x3c105d=_0x3c10();return _0x4799=function(_0x4799bd,_0xf1698f){_0x4799bd=_0x4799bd-0x1da;var _0x348772=_0x3c105d[_0x4799bd];return _0x348772;},_0x4799(_0x207d2f,_0x3fd808);}class NumberHandler{['isFinite'](_0x3089cb){return Number['isFinite'](_0x3089cb);}['isEven'](_0x43561d){return!isNaN(_0x43561d)&&_0x43561d%0x2===0x0;}['isOdd'](_0x17bb51){return!isNaN(_0x17bb51)&&_0x17bb51%0x2!==0x0;}['isInteger'](_0x6c1b2e){return Number['isInteger'](_0x6c1b2e);}['isNaN'](_0x1d1759){return Number['isNaN'](_0x1d1759);}['parseFloat'](_0x345f38){return parseFloat(_0x345f38);}['parseInt'](_0x240243,_0x5c40a1){return parseInt(_0x240243,_0x5c40a1);}['toFixed'](_0x2a61e8,_0x5a7513){return _0x2a61e8['toFixed'](_0x5a7513);}['toExponential'](_0x398ee6,_0x15be02){return _0x398ee6['toExponential'](_0x15be02);}['toPrecision'](_0x324640,_0x45a250){return _0x324640['toPrecision'](_0x45a250);}['gte'](_0x3f4487,_0x10164b){return _0x3f4487>=_0x10164b;}['lte'](_0x5625c9,_0x570172){return _0x5625c9<=_0x570172;}['gt'](_0x23c75b,_0x4a36cf){return _0x23c75b>_0x4a36cf;}['lt'](_0x1f93c7,_0x158d33){return _0x1f93c7<_0x158d33;}['max'](..._0x4b1ead){return Math['max'](..._0x4b1ead);}['min'](..._0x189a3b){return Math['min'](..._0x189a3b);}['pow'](_0x37551f,_0x362aee){return Math['pow'](_0x37551f,_0x362aee);}['round'](_0x542773){return Math['round'](_0x542773);}}exports['NumberHandler']=NumberHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x4aa922,_0x53c965){const _0xe3464c=_0x5aef,_0x33c996=_0x4aa922();while(!![]){try{const _0x57dc9c=parseInt(_0xe3464c(0xc6))/0x1*(parseInt(_0xe3464c(0xc5))/0x2)+parseInt(_0xe3464c(0xc4))/0x3*(-parseInt(_0xe3464c(0xce))/0x4)+parseInt(_0xe3464c(0xc9))/0x5*(parseInt(_0xe3464c(0xc8))/0x6)+-parseInt(_0xe3464c(0xcf))/0x7+-parseInt(_0xe3464c(0xcc))/0x8*(parseInt(_0xe3464c(0xcd))/0x9)+parseInt(_0xe3464c(0xcb))/0xa*(parseInt(_0xe3464c(0xc7))/0xb)+-parseInt(_0xe3464c(0xca))/0xc;if(_0x57dc9c===_0x53c965)break;else _0x33c996['push'](_0x33c996['shift']());}catch(_0x409dbd){_0x33c996['push'](_0x33c996['shift']());}}}(_0x5793,0xec709));function _0x5aef(_0x7c575f,_0x5a5ba0){const _0x579383=_0x5793();return _0x5aef=function(_0x5aef34,_0x16fa83){_0x5aef34=_0x5aef34-0xc4;let _0x15986f=_0x579383[_0x5aef34];return _0x15986f;},_0x5aef(_0x7c575f,_0x5a5ba0);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ObjectHandler']=void 0x0;function _0x5793(){const _0x169f2b=['37116gaPkbh','72xCvKBM','36916UFkSUx','6bmWuYa','7089785dFDcHm','15443640mdeRAD','4990VZwIjX','1425688lnwrlZ','27GbdMsq','589480CAVdYV','123529qhXgDF','33rNjTpX'];_0x5793=function(){return _0x169f2b;};return _0x5793();}class ObjectHandler{['get'](_0x47806b,_0x427c58){return _0x47806b?.[_0x427c58];}['set'](_0x56caa8,_0xa8dba,_0x28db05){if(!_0x56caa8)_0x56caa8={};return _0x56caa8[_0xa8dba]=_0x28db05,_0x56caa8;}['create'](..._0xa0254b){const _0x550ae4={};if(_0xa0254b['length']===0x0)return _0x550ae4;for(let _0x567850=0x0;_0x567850<_0xa0254b['length'];_0x567850+=0x2){_0x550ae4[_0xa0254b[_0x567850]]=_0xa0254b[_0x567850+0x1];}return _0x550ae4;}['keys'](_0x54c51e){return _0x54c51e&&Object['keys'](_0x54c51e)||[];}['values'](_0x5ff66a){return _0x5ff66a&&Object['values'](_0x5ff66a)||[];}['entries'](_0x55eccb){return _0x55eccb&&Object['entries'](_0x55eccb)||[];}['fromEntries'](_0x33555e){return Object['fromEntries'](_0x33555e);}['assign'](_0x12bf09,..._0x1ebb87){return Object['assign'](_0x12bf09||{},..._0x1ebb87);}['getOwnPropertyNames'](_0x5b4898){return Object['getOwnPropertyNames'](_0x5b4898||{});}['getOwnPropertySymbols'](_0x4dd2a1){return Object['getOwnPropertySymbols'](_0x4dd2a1||{});}['getOwnPropertyDescriptor'](_0x293aaa,_0x54ca61){return Object['getOwnPropertyDescriptor'](_0x293aaa||{},_0x54ca61);}['defineProperty'](_0x165a71,_0x425a3e,_0x3c9437){return Object['defineProperty'](_0x165a71,_0x425a3e,_0x3c9437);}['defineProperties'](_0x100cf0,_0x3a5826){return Object['defineProperties'](_0x100cf0,_0x3a5826);}['freeze'](_0x3cf426){return Object['freeze'](_0x3cf426);}['isFrozen'](_0x20fe12){return Object['isFrozen'](_0x20fe12);}['seal'](_0x5d39f2){return Object['seal'](_0x5d39f2);}['isSealed'](_0x5d6292){return Object['isSealed'](_0x5d6292);}['preventExtensions'](_0x550800){return Object['preventExtensions'](_0x550800);}['isExtensible'](_0x31988f){return Object['isExtensible'](_0x31988f);}['hasOwnProperty'](_0x4a92f9,_0x1e69c5){return Object['prototype']['hasOwnProperty']['call'](_0x4a92f9,_0x1e69c5);}['isPrototypeOf'](_0x28bba8,_0x3a0bb2){return Object['prototype']['isPrototypeOf']['call'](_0x28bba8,_0x3a0bb2);}['propertyIsEnumerable'](_0xe5a9cb,_0x1894f6){return Object['prototype']['propertyIsEnumerable']['call'](_0xe5a9cb,_0x1894f6);}}exports['ObjectHandler']=ObjectHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x1ba6(_0x15057b,_0x4fb361){var _0x134fe3=_0x134f();return _0x1ba6=function(_0x1ba643,_0x113929){_0x1ba643=_0x1ba643-0xd0;var _0x3a6cce=_0x134fe3[_0x1ba643];return _0x3a6cce;},_0x1ba6(_0x15057b,_0x4fb361);}(function(_0x2707c0,_0xef1941){var _0x2217c6=_0x1ba6,_0x1426ef=_0x2707c0();while(!![]){try{var _0x2698cf=-parseInt(_0x2217c6(0xdb))/0x1*(parseInt(_0x2217c6(0xdc))/0x2)+parseInt(_0x2217c6(0xd6))/0x3*(parseInt(_0x2217c6(0xd0))/0x4)+-parseInt(_0x2217c6(0xda))/0x5*(parseInt(_0x2217c6(0xd2))/0x6)+-parseInt(_0x2217c6(0xd5))/0x7*(parseInt(_0x2217c6(0xd7))/0x8)+parseInt(_0x2217c6(0xd4))/0x9+-parseInt(_0x2217c6(0xd9))/0xa*(parseInt(_0x2217c6(0xd1))/0xb)+-parseInt(_0x2217c6(0xd3))/0xc*(-parseInt(_0x2217c6(0xd8))/0xd);if(_0x2698cf===_0xef1941)break;else _0x1426ef['push'](_0x1426ef['shift']());}catch(_0x15526f){_0x1426ef['push'](_0x1426ef['shift']());}}}(_0x134f,0xc3b18));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['StringHandler']=void 0x0;class StringHandler{['split'](_0x52fe5a,_0x4040c6){return _0x52fe5a['split'](_0x4040c6);}['charAt'](_0x1f6aef,_0x5e71a4){return _0x1f6aef['charAt'](_0x5e71a4);}['concat'](..._0x29f561){return _0x29f561['join']('');}['includes'](_0x38ebee,_0x5590f7,_0x157b18){return _0x38ebee['includes'](_0x5590f7,_0x157b18);}['indexOf'](_0x4dfeb9,_0xbd7724,_0x2d03fd){return _0x4dfeb9['indexOf'](_0xbd7724,_0x2d03fd);}['lastIndexOf'](_0x179afa,_0x477e2d,_0x3cebe2){return _0x179afa['lastIndexOf'](_0x477e2d,_0x3cebe2);}['slice'](_0x44f662,_0x2b8136,_0x3dcbd0){return _0x44f662['slice'](_0x2b8136,_0x3dcbd0);}['toLowerCase'](_0x164340){return _0x164340['toLowerCase']();}['toUpperCase'](_0x2680f0){return _0x2680f0['toUpperCase']();}['trim'](_0x519bc9){return _0x519bc9['trim']();}['trimStart'](_0xd1b3c6){return _0xd1b3c6['trimStart']();}['trimEnd'](_0x1e0432){return _0x1e0432['trimEnd']();}['padStart'](_0x4c3dce,_0x195bec,_0x5dc884){return _0x4c3dce['padStart'](_0x195bec,_0x5dc884);}['padEnd'](_0x405ea6,_0x3867ac,_0x22a3ee){return _0x405ea6['padEnd'](_0x3867ac,_0x22a3ee);}['replace'](_0x3cd4eb,_0x14a12a,_0x13e72){return _0x3cd4eb['replace'](_0x14a12a,_0x13e72);}['search'](_0x504fc6,_0x5ce75e){return _0x504fc6['search'](_0x5ce75e);}['substring'](_0x4c6349,_0x1b7d89,_0x2e3899){return _0x4c6349['substring'](_0x1b7d89,_0x2e3899);}['startsWith'](_0x6a5d0e,_0x307787,_0x559c18){return _0x6a5d0e['startsWith'](_0x307787,_0x559c18);}['endsWith'](_0x15cef6,_0x354c35,_0x215e46){return _0x15cef6['endsWith'](_0x354c35,_0x215e46);}['repeat'](_0x53b4ab,_0x3b8fc6){if(_0x3b8fc6<0x0||_0x3b8fc6===Infinity)throw new RangeError('Invalid\x20repeat\x20count.\x20Must\x20be\x20a\x20positive\x20finite\x20number.');return _0x53b4ab['repeat'](_0x3b8fc6);}}exports['StringHandler']=StringHandler;function _0x134f(){var _0xa48f30=['10oTVBWv','95705wnlprS','1jFfisg','166108MFTnVX','4oSgyiy','13203916HhjHVM','366uDkoJR','108rtusju','7369119ziEwjj','7oSNzeS','3205662gByLjj','2803408WzrUOe','2478164rmLQNN'];_0x134f=function(){return _0xa48f30;};return _0x134f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x22ea(){var _0x461ec2=['55jjfBpi','6736IGLyOr','8mCqjbK','2097578RKuhGU','158150GUejjX','348aRUATv','1110420cChWhV','171moZATy','852372kKykQL','6rRXEjg','1110594cYIEKB','13334PbnUuc'];_0x22ea=function(){return _0x461ec2;};return _0x22ea();}(function(_0x44e855,_0x34943d){var _0x3841cf=_0x4d60,_0x2a422d=_0x44e855();while(!![]){try{var _0x3910ec=-parseInt(_0x3841cf(0x145))/0x1*(parseInt(_0x3841cf(0x147))/0x2)+parseInt(_0x3841cf(0x14d))/0x3*(-parseInt(_0x3841cf(0x149))/0x4)+parseInt(_0x3841cf(0x14e))/0x5+-parseInt(_0x3841cf(0x146))/0x6+parseInt(_0x3841cf(0x14b))/0x7*(parseInt(_0x3841cf(0x14a))/0x8)+-parseInt(_0x3841cf(0x14f))/0x9*(parseInt(_0x3841cf(0x14c))/0xa)+parseInt(_0x3841cf(0x148))/0xb*(parseInt(_0x3841cf(0x150))/0xc);if(_0x3910ec===_0x34943d)break;else _0x2a422d['push'](_0x2a422d['shift']());}catch(_0x478e2c){_0x2a422d['push'](_0x2a422d['shift']());}}}(_0x22ea,0x2613b));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['SymbolHandler']=void 0x0;function _0x4d60(_0x10164e,_0xfdd3ae){var _0x22ea73=_0x22ea();return _0x4d60=function(_0x4d60a3,_0x4803c6){_0x4d60a3=_0x4d60a3-0x145;var _0x25ad97=_0x22ea73[_0x4d60a3];return _0x25ad97;},_0x4d60(_0x10164e,_0xfdd3ae);}class SymbolHandler{['null'](){return null;}['undefined'](){return undefined;}['whitespace'](){return'\x20';}['object'](){return{};}['array'](){return[];}['posInfinity'](){return Infinity;}['negInfinity'](){return-Infinity;}['NaN'](){return NaN;}['date'](){return new Date();}}exports['SymbolHandler']=SymbolHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x3801(_0xad08a,_0x558006){var _0x49bfdd=_0x49bf();return _0x3801=function(_0x3801f3,_0x3b9889){_0x3801f3=_0x3801f3-0x11c;var _0x5d96b9=_0x49bfdd[_0x3801f3];return _0x5d96b9;},_0x3801(_0xad08a,_0x558006);}(function(_0x1011fb,_0x442189){var _0x270680=_0x3801,_0x3732b6=_0x1011fb();while(!![]){try{var _0xb9a275=-parseInt(_0x270680(0x11f))/0x1*(-parseInt(_0x270680(0x123))/0x2)+parseInt(_0x270680(0x11c))/0x3+-parseInt(_0x270680(0x11d))/0x4+parseInt(_0x270680(0x120))/0x5*(parseInt(_0x270680(0x11e))/0x6)+parseInt(_0x270680(0x121))/0x7+-parseInt(_0x270680(0x124))/0x8+-parseInt(_0x270680(0x122))/0x9;if(_0xb9a275===_0x442189)break;else _0x3732b6['push'](_0x3732b6['shift']());}catch(_0xe8ae94){_0x3732b6['push'](_0x3732b6['shift']());}}}(_0x49bf,0xd7114));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['UnaryHandler']=void 0x0;class UnaryHandler{['not'](_0x2539f7){return!_0x2539f7;}['positive'](_0x17a88c){return+_0x17a88c;}['negative'](_0x2cc48b){return-_0x2cc48b;}['bitwise_not'](_0x48e54d){return~_0x48e54d;}}function _0x49bf(){var _0x2db35c=['6795530WKEhCb','13903578naqDDb','1994248eLCMDK','9778864nJNpaG','3721869sdfPZA','3993780EMgxAC','84rlwoyk','1osldhg','513580hCsFds'];_0x49bf=function(){return _0x2db35c;};return _0x49bf();}exports['UnaryHandler']=UnaryHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x21d3c0,_0x296aaf){const _0x173afe=_0x3305,_0x306300=_0x21d3c0();while(!![]){try{const _0x11528e=parseInt(_0x173afe(0x172))/0x1+parseInt(_0x173afe(0x177))/0x2+-parseInt(_0x173afe(0x178))/0x3*(parseInt(_0x173afe(0x16f))/0x4)+parseInt(_0x173afe(0x174))/0x5*(parseInt(_0x173afe(0x171))/0x6)+-parseInt(_0x173afe(0x173))/0x7*(parseInt(_0x173afe(0x176))/0x8)+parseInt(_0x173afe(0x170))/0x9*(-parseInt(_0x173afe(0x175))/0xa)+parseInt(_0x173afe(0x179))/0xb;if(_0x11528e===_0x296aaf)break;else _0x306300['push'](_0x306300['shift']());}catch(_0x523817){_0x306300['push'](_0x306300['shift']());}}}(_0xe8b4,0x408b0));function _0x3305(_0x42395b,_0x3b2be5){const _0xe8b48c=_0xe8b4();return _0x3305=function(_0x33052a,_0x56072f){_0x33052a=_0x33052a-0x16f;let _0xbce93f=_0xe8b48c[_0x33052a];return _0xbce93f;},_0x3305(_0x42395b,_0x3b2be5);}var __importDefault=this&&this['__importDefault']||function(_0x8272cc){return _0x8272cc&&_0x8272cc['__esModule']?_0x8272cc:{'default':_0x8272cc};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Pipe']=void 0x0;const functions_1=__importDefault(require('./functions'));class Pipe{constructor(_0x245888,_0x2e8686,_0x40afd1){this['rules']=_0x245888,this['jobData']=_0x2e8686,this['context']=_0x40afd1;}['isPipeType'](_0x1e96a4){return!Array['isArray'](_0x1e96a4)&&'@pipe'in _0x1e96a4;}['isreduceType'](_0x455124){return!Array['isArray'](_0x455124)&&'@reduce'in _0x455124;}static['isPipeObject'](_0x3fe7d0){return typeof _0x3fe7d0==='object'&&_0x3fe7d0!==null&&!Array['isArray'](_0x3fe7d0)&&'@pipe'in _0x3fe7d0;}static['resolve'](_0x2ee0eb,_0x4f8ca3){let _0x5cc874;return Pipe['isPipeObject'](_0x2ee0eb)?_0x5cc874=new Pipe(_0x2ee0eb['@pipe'],_0x4f8ca3):_0x5cc874=new Pipe([[_0x2ee0eb]],_0x4f8ca3),_0x5cc874['process']();}['process'](_0x12d1eb=null){let _0x9774d=0x0;!(_0x12d1eb||this['isPipeType'](this['rules'][0x0])||this['isreduceType'](this['rules'][0x0]))&&(_0x12d1eb=this['processCells'](this['rules'][0x0]),_0x9774d=0x1);const _0x228b96=this['rules']['length'],_0x440484=[];for(let _0x3c7869=_0x9774d;_0x3c7869<_0x228b96;_0x3c7869++){_0x12d1eb=this['processRow'](this['rules'][_0x3c7869],_0x12d1eb,_0x440484);}return _0x12d1eb[0x0];}['cloneUnknown'](_0x39170f){if(_0x39170f===null||typeof _0x39170f!=='object')return _0x39170f;if(_0x39170f instanceof Date)return new Date(_0x39170f['getTime']());if(_0x39170f instanceof RegExp)return new RegExp(_0x39170f);if(Array['isArray'](_0x39170f))return _0x39170f['map'](_0xc013fc=>this['cloneUnknown'](_0xc013fc));const _0x2ccf98={};for(const _0x538e0d in _0x39170f){Object['prototype']['hasOwnProperty']['call'](_0x39170f,_0x538e0d)&&(_0x2ccf98[_0x538e0d]=this['cloneUnknown'](_0x39170f[_0x538e0d]));}return _0x2ccf98;}['reduce'](_0x3c3e8d){let _0xa11e7e=this['cloneUnknown'](_0x3c3e8d[0x1]??null);if(Array['isArray'](_0x3c3e8d[0x0]))for(let _0x4145bd=0x0;_0x4145bd<_0x3c3e8d[0x0]['length'];_0x4145bd++){this['context']={'$input':_0x3c3e8d[0x0],'$output':_0xa11e7e,'$item':_0x3c3e8d[0x0][_0x4145bd],'$key':_0x4145bd['toString'](),'$index':_0x4145bd},_0xa11e7e=this['process']([_0xa11e7e]);}else{let _0x1572ff=-0x1;for(const _0x38a545 in _0x3c3e8d[0x0]){_0x1572ff++,this['context']={'$input':_0x3c3e8d[0x0],'$output':_0xa11e7e,'$item':_0x3c3e8d[0x0][_0x38a545],'$key':_0x38a545,'$index':_0x1572ff},_0xa11e7e=this['process']([_0xa11e7e]);}}return[_0xa11e7e];}['processRow'](_0x648468,_0x31d0dd,_0x364058){if(_0x31d0dd&&this['isreduceType'](_0x648468)){const _0x34084b=new Pipe(_0x648468['@reduce'],this['jobData']),_0x35c1bf=_0x34084b['reduce'](_0x31d0dd);return _0x35c1bf;}else{if(this['isPipeType'](_0x648468)){const _0x10ac7a=new Pipe(_0x648468['@pipe'],this['jobData'],this['context']);return _0x364058['push'](_0x10ac7a['process']()),_0x31d0dd;}else{_0x364058['length']>0x0&&(_0x31d0dd=[..._0x364058],_0x364058['length']=0x0);if(!_0x31d0dd)return[]['concat'](this['processCells'](Array['isArray'](_0x648468)?[..._0x648468]:[]));else{const [_0x1e0c3a,..._0x1bca6a]=_0x648468;let _0x42a7b9;return this['isContextVariable'](_0x1e0c3a)?_0x42a7b9=this['resolveContextValue'](_0x1e0c3a):_0x42a7b9=Pipe['resolveFunction'](_0x1e0c3a)(..._0x31d0dd),[_0x42a7b9]['concat'](this['processCells']([..._0x1bca6a]));}}}}static['resolveFunction'](_0x513fee){let [_0x196549,_0x969ed]=_0x513fee['split']('.');_0x196549=_0x196549['substring'](0x2),_0x969ed=_0x969ed['substring'](0x0,_0x969ed['length']-0x1);const _0x300097=functions_1['default'][_0x196549];if(!_0x300097)throw new Error('Unknown\x20domain\x20name\x20['+_0x513fee+']:\x20'+_0x196549);if(!_0x300097[_0x969ed])throw new Error('Unknown\x20domain\x20function\x20['+_0x513fee+']:\x20'+_0x196549+'.'+_0x969ed);return _0x300097[_0x969ed];}['processCells'](_0x151142){const _0x2aacac=[];if(Array['isArray'](_0x151142))for(const _0xe21281 of _0x151142){_0x2aacac['push'](this['resolveCellValue'](_0xe21281));}return _0x2aacac;}['isFunction'](_0x28a515){return typeof _0x28a515==='string'&&_0x28a515['startsWith']('{@')&&_0x28a515['endsWith']('}');}['isContextVariable'](_0x19faa9){if(typeof _0x19faa9==='string'&&_0x19faa9['endsWith']('}'))return _0x19faa9['startsWith']('{$item')||_0x19faa9['startsWith']('{$key')||_0x19faa9['startsWith']('{$index')||_0x19faa9['startsWith']('{$input')||_0x19faa9['startsWith']('{$output');}['isMappable'](_0xa72b01){return typeof _0xa72b01==='string'&&_0xa72b01['startsWith']('{')&&_0xa72b01['endsWith']('}');}['resolveCellValue'](_0x16b83b){if(this['isFunction'](_0x16b83b)){const _0x2908d1=Pipe['resolveFunction'](_0x16b83b);return _0x2908d1['call']();}else{if(this['isContextVariable'](_0x16b83b))return this['resolveContextValue'](_0x16b83b);else return this['isMappable'](_0x16b83b)?this['resolveMappableValue'](_0x16b83b):_0x16b83b;}}['getNestedProperty'](_0x20eb95,_0x2f810b){const _0x39e109=_0x2f810b['split']('.');let _0x11facf=_0x20eb95;for(const _0x1121d8 of _0x39e109){if(_0x11facf===null||typeof _0x11facf!=='object'||!_0x11facf['hasOwnProperty'](_0x1121d8))return undefined;_0x11facf=_0x11facf[_0x1121d8];}return _0x11facf;}['resolveMappableValue'](_0x587cd1){const _0x4a2a46=this['resolveMapTerm'](_0x587cd1);return this['getNestedProperty'](this['jobData'],_0x4a2a46);}['resolveContextValue'](_0x5ea018){const _0x49a6db=this['resolveContextTerm'](_0x5ea018);return this['getNestedProperty'](this['context'],_0x49a6db);}['resolveContextTerm'](_0xbe699c){return _0xbe699c['substring'](0x1,_0xbe699c['length']-0x1);}['resolveFunctionTerm'](_0x32fe38){return _0x32fe38['substring'](0x2,_0x32fe38['length']-0x1);}['resolveMapTerm'](_0x6749ff){return _0x6749ff['substring'](0x1,_0x6749ff['length']-0x1);}}exports['Pipe']=Pipe;function _0xe8b4(){const _0x3cd709=['7qzlAWF','612455mSXNWi','30ffSzoX','3388744cTkbTO','222348HaaWAG','921OTPtrM','2907377RPkxYy','1124ZhypPI','331677vJtpXx','6CDiRrm','386815TeXicl'];_0xe8b4=function(){return _0x3cd709;};return _0xe8b4();}
|
|
@@ -14,7 +14,7 @@ declare class QuorumService {
|
|
|
14
14
|
engine: EngineService;
|
|
15
15
|
profiles: QuorumProfile[];
|
|
16
16
|
store: StoreService<ProviderClient, ProviderTransaction> | null;
|
|
17
|
-
subscribe: SubService<ProviderClient
|
|
17
|
+
subscribe: SubService<ProviderClient> | null;
|
|
18
18
|
logger: ILogger;
|
|
19
19
|
cacheMode: CacheMode;
|
|
20
20
|
untilVersion: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x10cff6,_0x14479c){const _0x159890=_0x3199,_0x56262f=_0x10cff6();while(!![]){try{const _0x34d658=parseInt(_0x159890(0xd0))/0x1+-parseInt(_0x159890(0xd7))/0x2*(parseInt(_0x159890(0xce))/0x3)+-parseInt(_0x159890(0xd1))/0x4*(-parseInt(_0x159890(0xd3))/0x5)+-parseInt(_0x159890(0xd5))/0x6*(-parseInt(_0x159890(0xd2))/0x7)+parseInt(_0x159890(0xd6))/0x8+parseInt(_0x159890(0xcf))/0x9+-parseInt(_0x159890(0xd4))/0xa;if(_0x34d658===_0x14479c)break;else _0x56262f['push'](_0x56262f['shift']());}catch(_0x4b74d5){_0x56262f['push'](_0x56262f['shift']());}}}(_0x55fc,0xe7189));function _0x3199(_0x287e4d,_0x28d21c){const _0x55fc1a=_0x55fc();return _0x3199=function(_0x319935,_0x45e710){_0x319935=_0x319935-0xce;let _0x2b4564=_0x55fc1a[_0x319935];return _0x2b4564;},_0x3199(_0x287e4d,_0x28d21c);}function _0x55fc(){const _0x482ba0=['6DZZkOP','15668757xVvdzE','554758RJrRme','6967208tbpryH','3084053kdbfaC','5xhVVhx','28311750rRRIiO','6ePvbth','673520LFwRaX','784558DAsmBR'];_0x55fc=function(){return _0x482ba0;};return _0x55fc();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['QuorumService']=void 0x0;const enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),compiler_1=require('../compiler'),hotmesh_1=require('../../types/hotmesh'),factory_1=require('../sub/factory'),factory_2=require('../store/factory');class QuorumService{constructor(){this['profiles']=[],this['cacheMode']='cache',this['untilVersion']=null,this['quorum']=null,this['callbacks']=[];}static async['init'](_0x4c3a6f,_0x57ffcb,_0x10db75,_0x213765,_0x2ca7d1,_0x2a4947){if(_0x213765['engine']){const _0x2f76a5=new QuorumService();return _0x2f76a5['verifyQuorumFields'](_0x213765),_0x2f76a5['namespace']=_0x4c3a6f,_0x2f76a5['appId']=_0x57ffcb,_0x2f76a5['guid']=_0x10db75,_0x2f76a5['logger']=_0x2a4947,_0x2f76a5['engine']=_0x2ca7d1,await _0x2f76a5['initStoreChannel'](_0x213765['engine']['store']),await _0x2f76a5['initSubChannel'](_0x213765['engine']['sub'],_0x213765['engine']['pub']),await _0x2f76a5['subscribe']['subscribe'](hotmesh_1['KeyType']['QUORUM'],_0x2f76a5['subscriptionHandler'](),_0x57ffcb),await _0x2f76a5['subscribe']['subscribe'](hotmesh_1['KeyType']['QUORUM'],_0x2f76a5['subscriptionHandler'](),_0x57ffcb,_0x2f76a5['guid']),_0x2f76a5['engine']['processWebHooks'](),_0x2f76a5['engine']['processTimeHooks'](),_0x2f76a5;}}['verifyQuorumFields'](_0x357b16){if(!(0x0,utils_1['identifyProvider'])(_0x357b16['engine']['store'])||!(0x0,utils_1['identifyProvider'])(_0x357b16['engine']['sub']))throw new Error('quorum\x20config\x20must\x20include\x20`store`\x20and\x20`sub`\x20fields.');}async['initStoreChannel'](_0x4d8165){this['store']=await factory_2['StoreServiceFactory']['init'](_0x4d8165,this['namespace'],this['appId'],this['logger']);}async['initSubChannel'](_0x123229,_0xde60df){this['subscribe']=await factory_1['SubServiceFactory']['init'](_0x123229,_0xde60df,this['namespace'],this['appId'],this['guid'],this['logger']);}['subscriptionHandler'](){const _0x1bdf06=this;return async(_0x4d9f97,_0x25a8a8)=>{_0x1bdf06['logger']['debug']('quorum-event-received',{'topic':_0x4d9f97,'type':_0x25a8a8['type']});if(_0x25a8a8['type']==='activate')_0x1bdf06['engine']['setCacheMode'](_0x25a8a8['cache_mode'],_0x25a8a8['until_version']);else{if(_0x25a8a8['type']==='ping')_0x1bdf06['sayPong'](_0x1bdf06['appId'],_0x1bdf06['guid'],_0x25a8a8['originator'],_0x25a8a8['details']);else{if(_0x25a8a8['type']==='pong'&&_0x1bdf06['guid']===_0x25a8a8['originator'])_0x1bdf06['quorum']=_0x1bdf06['quorum']+0x1,_0x25a8a8['profile']&&_0x1bdf06['profiles']['push'](_0x25a8a8['profile']);else{if(_0x25a8a8['type']==='throttle')_0x1bdf06['engine']['throttle'](_0x25a8a8['throttle']);else{if(_0x25a8a8['type']==='work')_0x1bdf06['engine']['processWebHooks']();else{if(_0x25a8a8['type']==='job')_0x1bdf06['engine']['routeToSubscribers'](_0x25a8a8['topic'],_0x25a8a8['job']);else{if(_0x25a8a8['type']==='cron')_0x1bdf06['engine']['processTimeHooks']();else _0x25a8a8['type']==='rollcall'&&_0x1bdf06['doRollCall'](_0x25a8a8);}}}}}}_0x1bdf06['callbacks']['length']>0x0&&_0x1bdf06['callbacks']['forEach'](_0x497502=>_0x497502(_0x4d9f97,_0x25a8a8));};}async['sayPong'](_0x4953cb,_0x1d9ad0,_0x1be3a6,_0x4d2446=![]){let _0x5d30c2;if(_0x4d2446){const _0x5a4640=this['engine']['store']['mintKey'](hotmesh_1['KeyType']['STREAMS'],{'appId':this['appId']});_0x5d30c2={'engine_id':this['guid'],'namespace':this['namespace'],'app_id':this['appId'],'stream':_0x5a4640,'counts':this['engine']['router']['counts'],'timestamp':(0x0,utils_1['formatISODate'])(new Date()),'inited':this['engine']['inited'],'throttle':this['engine']['router']['throttle'],'reclaimDelay':this['engine']['router']['reclaimDelay'],'reclaimCount':this['engine']['router']['reclaimCount'],'system':await(0x0,utils_1['getSystemHealth'])()};}this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'pong','guid':_0x1d9ad0,'originator':_0x1be3a6,'profile':_0x5d30c2},_0x4953cb);}async['requestQuorum'](_0x103cc2=enums_1['HMSH_QUORUM_DELAY_MS'],_0x3c8be9=![]){const _0x2b6543=this['quorum'];return this['quorum']=0x0,this['profiles']['length']=0x0,await this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'ping','originator':this['guid'],'details':_0x3c8be9},this['appId']),await(0x0,utils_1['sleepFor'])(_0x103cc2),_0x2b6543;}async['doRollCall'](_0x458b9f){let _0xff3acf=0x0;const _0x352c8d=!isNaN(_0x458b9f['max'])?_0x458b9f['max']:enums_1['HMSH_QUORUM_ROLLCALL_CYCLES'];if(this['rollCallInterval'])clearTimeout(this['rollCallInterval']);const _0x354e05=_0x458b9f['interval']/0x2,_0x20eaed=_0x354e05+Math['ceil'](Math['random']()*_0x354e05);do{await(0x0,utils_1['sleepFor'])(Math['ceil'](Math['random']()*0x3e8)),await this['sayPong'](this['appId'],this['guid'],null,!![]);if(!_0x458b9f['interval'])return;const {promise:_0x1125e6,timerId:_0x125c80}=(0x0,utils_1['XSleepFor'])(_0x20eaed*0x3e8);this['rollCallInterval']=_0x125c80,await _0x1125e6;}while(this['rollCallInterval']&&_0xff3acf++<_0x352c8d-0x1);}['cancelRollCall'](){this['rollCallInterval']&&(clearTimeout(this['rollCallInterval']),delete this['rollCallInterval']);}['stop'](){this['cancelRollCall']();}async['pub'](_0x290cb4){return await this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],_0x290cb4,this['appId'],_0x290cb4['topic']||_0x290cb4['guid']);}async['sub'](_0x55184a){this['callbacks']['push'](_0x55184a);}async['unsub'](_0x111a00){this['callbacks']=this['callbacks']['filter'](_0x297ab4=>_0x297ab4!==_0x111a00);}async['rollCall'](_0x1743a4=enums_1['HMSH_QUORUM_DELAY_MS']){await this['requestQuorum'](_0x1743a4,!![]);const _0x123560=await this['engine']['stream']['getStreamDepths'](this['profiles']);return this['profiles']['forEach'](async(_0x40567a,_0x4b6473)=>{_0x40567a['stream_depth']=_0x123560?.[_0x4b6473]?.['depth']??0x0;}),this['profiles'];}async['activate'](_0x25046e,_0x41c1a0=enums_1['HMSH_QUORUM_DELAY_MS'],_0x4261e3=0x0){_0x25046e=_0x25046e['toString']();const _0x22fd6a=await this['store']['reserveScoutRole']('activate',Math['ceil'](_0x41c1a0*0x6/0x3e8)+0x1);if(!_0x22fd6a){this['logger']['debug']('quorum-activation-awaiting',{'version':_0x25046e}),await(0x0,utils_1['sleepFor'])(_0x41c1a0*0x6);const _0x5c4666=await this['store']['getApp'](this['appId'],!![]);return _0x5c4666?.['active']==!![]&&_0x5c4666?.['version']===_0x25046e;}const _0xa55b4b=await this['engine']['getVID']();await this['requestQuorum'](_0x41c1a0);const _0x433cc8=await this['requestQuorum'](_0x41c1a0),_0x369c74=await this['requestQuorum'](_0x41c1a0),_0x556736=await this['requestQuorum'](_0x41c1a0);if(_0x433cc8&&_0x433cc8===_0x369c74&&_0x369c74===_0x556736){this['logger']['info']('quorum-rollcall-succeeded',{'q1':_0x433cc8,'q2':_0x369c74,'q3':_0x556736}),this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'activate','cache_mode':'nocache','until_version':_0x25046e},this['appId']),await new Promise(_0x5051bd=>setTimeout(_0x5051bd,_0x41c1a0)),await this['store']['releaseScoutRole']('activate');if(this['engine']['untilVersion']===_0x25046e){this['logger']['info']('quorum-activation-succeeded',{'version':_0x25046e});const {id:_0x5e885f}=_0xa55b4b,_0x3d9c94=new compiler_1['CompilerService'](this['store'],this['engine']['stream'],this['logger']);return await _0x3d9c94['activate'](_0x5e885f,_0x25046e);}else{this['logger']['error']('quorum-activation-error',{'version':_0x25046e});throw new Error('UntilVersion\x20Not\x20Received.\x20Version\x20'+_0x25046e+'\x20not\x20activated');}}else{this['logger']['warn']('quorum-rollcall-error',{'q1':_0x433cc8,'q2':_0x369c74,'q3':_0x556736,'count':_0x4261e3}),this['store']['releaseScoutRole']('activate');if(_0x4261e3<enums_1['HMSH_ACTIVATION_MAX_RETRY'])return await this['activate'](_0x25046e,_0x41c1a0*0x2,_0x4261e3+0x1);throw new Error('Quorum\x20not\x20reached.\x20Version\x20'+_0x25046e+'\x20not\x20activated.');}}}exports['QuorumService']=QuorumService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(_0x9cc663,_0x2466f8){const _0x287973=_0x3006,_0x4dc5b8=_0x9cc663();while(!![]){try{const _0x24a3c0=parseInt(_0x287973(0x81))/0x1+-parseInt(_0x287973(0x83))/0x2+parseInt(_0x287973(0x7e))/0x3+-parseInt(_0x287973(0x7c))/0x4*(parseInt(_0x287973(0x7d))/0x5)+-parseInt(_0x287973(0x82))/0x6+parseInt(_0x287973(0x7f))/0x7*(-parseInt(_0x287973(0x84))/0x8)+parseInt(_0x287973(0x80))/0x9;if(_0x24a3c0===_0x2466f8)break;else _0x4dc5b8['push'](_0x4dc5b8['shift']());}catch(_0x101bfe){_0x4dc5b8['push'](_0x4dc5b8['shift']());}}}(_0x2c31,0xe14bf));function _0x3006(_0x15f6cf,_0x533e69){const _0x2c31bf=_0x2c31();return _0x3006=function(_0x300614,_0x40c196){_0x300614=_0x300614-0x7c;let _0x2f1daf=_0x2c31bf[_0x300614];return _0x2f1daf;},_0x3006(_0x15f6cf,_0x533e69);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ReporterService']=void 0x0;const pipe_1=require('../pipe');function _0x2c31(){const _0x6553c4=['2066439JrIwwQ','21eLpLbL','26275707HuoYPj','1626464nMvUUG','4197870gqeWOl','1453036eEkTpd','4811008BDxiWw','4326776wTreuZ','5VRkNoo'];_0x2c31=function(){return _0x6553c4;};return _0x2c31();}class ReporterService{constructor(_0x2f089a,_0x31ab60,_0x1ca42b){this['appVersion']=_0x2f089a,this['logger']=_0x1ca42b,this['store']=_0x31ab60;}async['getStats'](_0x1a5386){this['logger']['debug']('reporter-getstats-started',_0x1a5386);const {key:_0x43adf1,granularity:_0x2f2bed,range:_0x154ece,end:_0x3691d6,start:_0x7bf4ed}=_0x1a5386;this['validateOptions'](_0x1a5386);const _0x52e4f9=this['generateDateTimeSets'](_0x2f2bed,_0x154ece,_0x3691d6,_0x7bf4ed),_0x1c24b9=_0x52e4f9['map'](_0x16eb0a=>this['buildRedisKey'](_0x43adf1,_0x16eb0a)),_0x2ddef3=await this['store']['getJobStats'](_0x1c24b9),[_0x8cbc05,_0x54c262]=this['aggregateData'](_0x2ddef3),_0x57e0f8=this['buildStatsResponse'](_0x2ddef3,_0x1c24b9,_0x54c262,_0x8cbc05,_0x1a5386);return _0x57e0f8;}['validateOptions'](_0x1a0f38){const {start:_0x5197f0,end:_0x5e7486,range:_0x4859a2,granularity:_0x41f31b}=_0x1a0f38;if(_0x41f31b!=='infinity'&&(_0x5197f0&&_0x5e7486&&_0x4859a2||!_0x5197f0&&!_0x5e7486&&!_0x4859a2))throw new Error('Invalid\x20combination\x20of\x20start,\x20end,\x20and\x20range\x20values.\x20Provide\x20either\x20start+end,\x20end+range,\x20or\x20start+range.');}['generateDateTimeSets'](_0x52c7e3,_0x19359f,_0x50010,_0x474144){if(_0x52c7e3==='infinity')return['0'];!_0x19359f&&(_0x19359f='0m');const _0x3616d5={'5m':0x5,'10m':0xa,'15m':0xf,'30m':0x1e,'1h':0x3c},_0x1eebf6=_0x3616d5[_0x52c7e3];if(!_0x1eebf6)throw new Error('Invalid\x20granularity\x20value.');const _0x28e311=this['convertRangeToMinutes'](_0x19359f);if(_0x28e311===null)throw new Error('Invalid\x20range\x20value.');let _0x4269a6,_0x5a72d3;_0x474144?(_0x4269a6=new Date(_0x474144),_0x5a72d3=new Date(_0x4269a6['getTime']()+_0x28e311*0x3c*0x3e8)):(_0x5a72d3=_0x50010==='NOW'?new Date():new Date(_0x50010),_0x4269a6=new Date(_0x5a72d3['getTime']()-_0x28e311*0x3c*0x3e8));_0x4269a6['setUTCMinutes'](Math['floor'](_0x4269a6['getUTCMinutes']()/_0x1eebf6)*_0x1eebf6);const _0x3fddbd=[];for(let _0x1c4592=_0x4269a6;_0x1c4592<=_0x5a72d3;_0x1c4592['setUTCMinutes'](_0x1c4592['getUTCMinutes']()+_0x1eebf6)){const _0x11cd48=[_0x1c4592['getUTCFullYear'](),String(_0x1c4592['getUTCMonth']()+0x1)['padStart'](0x2,'0'),String(_0x1c4592['getUTCDate']())['padStart'](0x2,'0'),String(_0x1c4592['getUTCHours']())['padStart'](0x2,'0'),String(_0x1c4592['getUTCMinutes']())['padStart'](0x2,'0')]['join']('');_0x3fddbd['push'](_0x11cd48);}return _0x3fddbd;}['convertRangeToMinutes'](_0x3b6092){const _0x5557ea=_0x3b6092['slice'](-0x1),_0x137afe=parseInt(_0x3b6092['slice'](0x0,-0x1),0xa);if(isNaN(_0x137afe))return null;switch(_0x5557ea){case'm':return _0x137afe;case'h':return _0x137afe*0x3c;case'd':return _0x137afe*0x3c*0x18;default:return null;}}['buildRedisKey'](_0x5ac1c7,_0x54bab7,_0x35e2b2=''){return'hmsh:'+this['appVersion']['id']+':s:'+_0x5ac1c7+':'+_0x54bab7+(_0x35e2b2?':'+_0x35e2b2:'');}['aggregateData'](_0x3bc142){const _0xaf5741={};let _0x389f35=0x0;return Object['entries'](_0x3bc142)['forEach'](([_0x1f47ef,_0x62e4fc])=>{for(const _0x227c36 in _0x62e4fc){if(_0x227c36['startsWith']('count:')){const _0x439e4d=_0x227c36['slice']('count:'['length']);!_0xaf5741[_0x439e4d]&&(_0xaf5741[_0x439e4d]=0x0),_0xaf5741[_0x439e4d]+=_0x62e4fc[_0x227c36];}else _0x227c36==='count'&&(_0x389f35+=_0x62e4fc[_0x227c36]);}}),[_0x389f35,_0xaf5741];}['buildStatsResponse'](_0x24297d,_0x465a30,_0x351bd4,_0x5966f7,_0x5a031a){const _0x30a701=[],_0x296141=Object['keys'](_0x351bd4)['filter'](_0x3ec59d=>_0x3ec59d!=='count');let _0x43efbd=undefined;_0x5a031a['sparse']!==!![]&&(_0x43efbd=this['handleSegments'](_0x24297d,_0x465a30));_0x296141['forEach'](_0x22cd3a=>{const _0x1a19cf={'target':_0x22cd3a,'type':'count','value':_0x351bd4[_0x22cd3a]};_0x30a701['push'](_0x1a19cf);});const _0x227504={'key':_0x5a031a['key'],'granularity':_0x5a031a['granularity'],'range':_0x5a031a['range'],'end':_0x5a031a['end'],'count':_0x5966f7,'measures':_0x30a701};return _0x43efbd&&(_0x227504['segments']=_0x43efbd),_0x227504;}['handleSegments'](_0x537d74,_0x3be230){const _0x5ba4b8=[];return _0x3be230['forEach']((_0x15d503,_0x2f6e6c)=>{const _0x17a51a=[];_0x537d74[_0x15d503]&&Object['entries'](_0x537d74[_0x15d503])['forEach'](([_0x29ab81,_0x57903b])=>{if(_0x29ab81['startsWith']('count:')){const _0x50d69f=_0x29ab81['slice']('count:'['length']);_0x17a51a['push']({'target':_0x50d69f,'type':'count','value':_0x57903b});}});const _0x43048c=this['isoTimestampFromKeyTimestamp'](_0x15d503),_0x94ca56=_0x537d74[_0x15d503]?_0x537d74[_0x15d503]['count']:0x0;_0x5ba4b8['push']({'count':_0x94ca56,'time':_0x43048c,'measures':_0x17a51a});}),_0x5ba4b8;}['isoTimestampFromKeyTimestamp'](_0x4bb647){if(_0x4bb647['endsWith'](':'))return'0';const _0x13eb80=_0x4bb647['slice'](-0xc),_0x4fa31a=_0x13eb80['slice'](0x0,0x4),_0x40617c=_0x13eb80['slice'](0x4,0x6),_0xd7f106=_0x13eb80['slice'](0x6,0x8),_0x40b5cf=_0x13eb80['slice'](0x8,0xa),_0x28a138=_0x13eb80['slice'](0xa,0xc);return _0x4fa31a+'-'+_0x40617c+'-'+_0xd7f106+'T'+_0x40b5cf+':'+_0x28a138+'Z';}async['getIds'](_0x3eda07,_0x2d503e,_0x50bd0d=[0x0,-0x1]){if(!_0x2d503e['length']){const _0x46bbe2=await this['getStats'](_0x3eda07);_0x2d503e=this['getUniqueFacets'](_0x46bbe2);}const {key:_0x2f71c0,granularity:_0x4e5bbd,range:_0xdffee2,end:_0x30ef51,start:_0x389ab8}=_0x3eda07;this['validateOptions'](_0x3eda07);let _0x5db61f=[];_0x2d503e['forEach'](_0xa0ec35=>{const _0x4e964d=this['generateDateTimeSets'](_0x4e5bbd,_0xdffee2,_0x30ef51,_0x389ab8);_0x5db61f=_0x5db61f['concat'](_0x4e964d['map'](_0xd3efc0=>this['buildRedisKey'](_0x2f71c0,_0xd3efc0,'index:'+_0xa0ec35)));});const _0xeb6c0e=await this['store']['getJobIds'](_0x5db61f,_0x50bd0d),_0x341952=this['buildIdsResponse'](_0xeb6c0e,_0x3eda07,_0x2d503e);return _0x341952;}['buildIdsResponse'](_0x11093f,_0x406601,_0x43ab07){const _0x48e45e={},_0x552aa9=Object['keys'](_0x11093f);_0x552aa9['forEach'](_0xf93059=>{const _0x20fe7d=this['getTargetForKey'](_0xf93059),_0x3aef5e=_0x11093f[_0xf93059]['length'];_0x48e45e[_0x20fe7d]?_0x48e45e[_0x20fe7d]+=_0x3aef5e:_0x48e45e[_0x20fe7d]=_0x3aef5e;});const _0x293803=Object['entries'](_0x48e45e)['map'](([_0x9d893f,_0x211f54])=>({'facet':_0x9d893f,'count':_0x211f54})),_0x5274de={'key':_0x406601['key'],'facets':_0x43ab07,'granularity':_0x406601['granularity'],'range':_0x406601['range'],'start':_0x406601['start'],'counts':_0x293803,'segments':this['buildTimeSegments'](_0x11093f)};return _0x5274de;}['buildTimeSegments'](_0xbec24){const _0x2697f5=Object['keys'](_0xbec24),_0x408787={};_0x2697f5['forEach'](_0x2d51d6=>{const _0x38a68e={'type':'ids','target':this['getTargetForKey'](_0x2d51d6),'time':this['isoTimestampFromKeyTimestamp'](this['getTargetForTime'](_0x2d51d6)),'count':_0xbec24[_0x2d51d6]['length'],'ids':_0xbec24[_0x2d51d6]};_0x408787[_0x38a68e['time']]?_0x408787[_0x38a68e['time']]['push'](_0x38a68e):_0x408787[_0x38a68e['time']]=[_0x38a68e];});const _0x254d4a=Object['entries'](_0x408787)['map'](([_0x389fa2,_0x370499])=>({'time':_0x389fa2,'measures':_0x370499}));return _0x254d4a;}['getUniqueFacets'](_0x56703b){const _0x1bc2d9=_0x56703b['measures']['map'](_0x2ecb0f=>_0x2ecb0f['target']);return Array['from'](new Set(_0x1bc2d9));}['getTargetForKey'](_0x3fd7a0){return _0x3fd7a0['split'](':index:')[0x1];}['getTargetForTime'](_0x221051){return _0x221051['split'](':index:')[0x0];}async['getWorkItems'](_0x9e5c2b,_0x4b1592){if(!_0x4b1592['length']){const _0x44f87e=await this['getStats'](_0x9e5c2b);_0x4b1592=this['getUniqueFacets'](_0x44f87e);}const {key:_0x17bc55,granularity:_0x28321b,range:_0x2c2bc9,end:_0x5876b5,start:_0x35c031}=_0x9e5c2b;this['validateOptions'](_0x9e5c2b);let _0x282bf1=[];_0x4b1592['forEach'](_0x19af69=>{const _0x3bd47e=this['generateDateTimeSets'](_0x28321b,_0x2c2bc9,_0x5876b5,_0x35c031);_0x282bf1=_0x282bf1['concat'](_0x3bd47e['map'](_0x518ac5=>this['buildRedisKey'](_0x17bc55,_0x518ac5,'index:'+_0x19af69)));});const _0x2952e5=await this['store']['getJobIds'](_0x282bf1,[0x0,0x1]),_0x5aadfa=this['buildWorkerLists'](_0x2952e5);return _0x5aadfa;}['buildWorkerLists'](_0x91fd53){const _0x549739=[];for(const _0x1d6d26 in _0x91fd53){_0x91fd53[_0x1d6d26]['length']&&_0x549739['push'](_0x1d6d26);}return _0x549739;}['resolveTriggerStatistics']({stats:_0x32edbc},_0x3c8e51){const _0x29cd6a={'general':[],'index':[],'median':[]};_0x29cd6a['general']['push']({'metric':'count','target':'count','value':0x1});for(const _0x5071a5 of _0x32edbc['measures']){const _0xf942e9=this['resolveMetric']({'metric':_0x5071a5['measure'],'target':_0x5071a5['target']},_0x3c8e51);if(this['isGeneralMetric'](_0x5071a5['measure']))_0x29cd6a['general']['push'](_0xf942e9);else{if(this['isMedianMetric'](_0x5071a5['measure']))_0x29cd6a['median']['push'](_0xf942e9);else this['isIndexMetric'](_0x5071a5['measure'])&&_0x29cd6a['index']['push'](_0xf942e9);}}return _0x29cd6a;}['isGeneralMetric'](_0x41fce8){return ReporterService['isGeneralMetric'](_0x41fce8);}['isMedianMetric'](_0xc18f09){return ReporterService['isMedianMetric'](_0xc18f09);}['isIndexMetric'](_0x2f305d){return ReporterService['isIndexMetric'](_0x2f305d);}static['isGeneralMetric'](_0xf6febe){return _0xf6febe==='sum'||_0xf6febe==='avg'||_0xf6febe==='count';}static['isMedianMetric'](_0x28de36){return _0x28de36==='mdn';}static['isIndexMetric'](_0x41e1b6){return _0x41e1b6==='index';}['resolveMetric']({metric:_0x4ba02,target:_0x5793f0},_0x459e0f){const _0x30f248=new pipe_1['Pipe']([[_0x5793f0]],_0x459e0f),_0x1b6f9c=_0x30f248['process']()['toString'](),_0x3b9b76=this['resolveTarget'](_0x4ba02,_0x5793f0,_0x1b6f9c);if(_0x4ba02==='index')return{'metric':_0x4ba02,'target':_0x3b9b76,'value':_0x459e0f['metadata']['jid']};else{if(_0x4ba02==='count')return{'metric':_0x4ba02,'target':_0x3b9b76,'value':0x1};}return{'metric':_0x4ba02,'target':_0x3b9b76,'value':_0x1b6f9c};}['isCardinalMetric'](_0xbc56ff){return _0xbc56ff==='index'||_0xbc56ff==='count';}['resolveTarget'](_0x4f503d,_0xb5cb57,_0x1a6a51){const _0x3155b8=_0xb5cb57['substring'](0x1,_0xb5cb57['length']-0x1),_0x1feb1f=_0x3155b8['split']('.')['slice'](0x3)['join']('/');let _0x4fdb9d;return this['isCardinalMetric'](_0x4f503d)?_0x4fdb9d=_0x4f503d+':'+_0x1feb1f+':'+_0x1a6a51:_0x4fdb9d=_0x4f503d+':'+_0x1feb1f,_0x4fdb9d;}}exports['ReporterService']=ReporterService,ReporterService['DEFAULT_GRANULARITY']='5m';
|
|
1
|
+
'use strict';(function(_0x1c5db7,_0x3620d1){const _0x22b3e0=_0x306d,_0x170a24=_0x1c5db7();while(!![]){try{const _0x37f09e=parseInt(_0x22b3e0(0xa4))/0x1*(-parseInt(_0x22b3e0(0xa5))/0x2)+-parseInt(_0x22b3e0(0xa9))/0x3*(-parseInt(_0x22b3e0(0xa8))/0x4)+-parseInt(_0x22b3e0(0xa2))/0x5+-parseInt(_0x22b3e0(0xa7))/0x6+parseInt(_0x22b3e0(0xaa))/0x7*(-parseInt(_0x22b3e0(0xa3))/0x8)+-parseInt(_0x22b3e0(0xa1))/0x9*(parseInt(_0x22b3e0(0xa6))/0xa)+parseInt(_0x22b3e0(0xa0))/0xb;if(_0x37f09e===_0x3620d1)break;else _0x170a24['push'](_0x170a24['shift']());}catch(_0x31c3aa){_0x170a24['push'](_0x170a24['shift']());}}}(_0xac0a,0xa1ffa));function _0x306d(_0x1299fe,_0x17b6d8){const _0xac0a72=_0xac0a();return _0x306d=function(_0x306d16,_0x20f8a2){_0x306d16=_0x306d16-0xa0;let _0x166e83=_0xac0a72[_0x306d16];return _0x166e83;},_0x306d(_0x1299fe,_0x17b6d8);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ReporterService']=void 0x0;const pipe_1=require('../pipe');class ReporterService{constructor(_0x4273dc,_0x314f5f,_0x2d52f1){this['appVersion']=_0x4273dc,this['logger']=_0x2d52f1,this['store']=_0x314f5f;}async['getStats'](_0xb6faf){this['logger']['debug']('reporter-getstats-started',_0xb6faf);const {key:_0x5d42e7,granularity:_0x302b55,range:_0x3dfd2e,end:_0x2f1e55,start:_0x4e71b5}=_0xb6faf;this['validateOptions'](_0xb6faf);const _0x1db53c=this['generateDateTimeSets'](_0x302b55,_0x3dfd2e,_0x2f1e55,_0x4e71b5),_0xeffa66=_0x1db53c['map'](_0x237be6=>this['buildRedisKey'](_0x5d42e7,_0x237be6)),_0x445f51=await this['store']['getJobStats'](_0xeffa66),[_0x5cd6d6,_0x3f6dc5]=this['aggregateData'](_0x445f51),_0x34749c=this['buildStatsResponse'](_0x445f51,_0xeffa66,_0x3f6dc5,_0x5cd6d6,_0xb6faf);return _0x34749c;}['validateOptions'](_0x209ebf){const {start:_0x2b8bf1,end:_0x24b791,range:_0x52dff5,granularity:_0x193a67}=_0x209ebf;if(_0x193a67!=='infinity'&&(_0x2b8bf1&&_0x24b791&&_0x52dff5||!_0x2b8bf1&&!_0x24b791&&!_0x52dff5))throw new Error('Invalid\x20combination\x20of\x20start,\x20end,\x20and\x20range\x20values.\x20Provide\x20either\x20start+end,\x20end+range,\x20or\x20start+range.');}['generateDateTimeSets'](_0x2a0e04,_0x54063e,_0x4bb8ea,_0x31f87d){if(_0x2a0e04==='infinity')return['0'];!_0x54063e&&(_0x54063e='0m');const _0x595f9f={'5m':0x5,'10m':0xa,'15m':0xf,'30m':0x1e,'1h':0x3c},_0x1669c9=_0x595f9f[_0x2a0e04];if(!_0x1669c9)throw new Error('Invalid\x20granularity\x20value.');const _0x79d0b6=this['convertRangeToMinutes'](_0x54063e);if(_0x79d0b6===null)throw new Error('Invalid\x20range\x20value.');let _0x101891,_0x1dcfa5;_0x31f87d?(_0x101891=new Date(_0x31f87d),_0x1dcfa5=new Date(_0x101891['getTime']()+_0x79d0b6*0x3c*0x3e8)):(_0x1dcfa5=_0x4bb8ea==='NOW'?new Date():new Date(_0x4bb8ea),_0x101891=new Date(_0x1dcfa5['getTime']()-_0x79d0b6*0x3c*0x3e8));_0x101891['setUTCMinutes'](Math['floor'](_0x101891['getUTCMinutes']()/_0x1669c9)*_0x1669c9);const _0x129296=[];for(let _0x8909ee=_0x101891;_0x8909ee<=_0x1dcfa5;_0x8909ee['setUTCMinutes'](_0x8909ee['getUTCMinutes']()+_0x1669c9)){const _0x3440b2=[_0x8909ee['getUTCFullYear'](),String(_0x8909ee['getUTCMonth']()+0x1)['padStart'](0x2,'0'),String(_0x8909ee['getUTCDate']())['padStart'](0x2,'0'),String(_0x8909ee['getUTCHours']())['padStart'](0x2,'0'),String(_0x8909ee['getUTCMinutes']())['padStart'](0x2,'0')]['join']('');_0x129296['push'](_0x3440b2);}return _0x129296;}['convertRangeToMinutes'](_0x65c34e){const _0x951d43=_0x65c34e['slice'](-0x1),_0x90323e=parseInt(_0x65c34e['slice'](0x0,-0x1),0xa);if(isNaN(_0x90323e))return null;switch(_0x951d43){case'm':return _0x90323e;case'h':return _0x90323e*0x3c;case'd':return _0x90323e*0x3c*0x18;default:return null;}}['buildRedisKey'](_0x1bae76,_0x134cb3,_0x2915d1=''){return'hmsh:'+this['appVersion']['id']+':s:'+_0x1bae76+':'+_0x134cb3+(_0x2915d1?':'+_0x2915d1:'');}['aggregateData'](_0x35a6a6){const _0x152003={};let _0x561f32=0x0;return Object['entries'](_0x35a6a6)['forEach'](([_0x3749d5,_0x179c08])=>{for(const _0x581ab7 in _0x179c08){if(_0x581ab7['startsWith']('count:')){const _0x2462d3=_0x581ab7['slice']('count:'['length']);!_0x152003[_0x2462d3]&&(_0x152003[_0x2462d3]=0x0),_0x152003[_0x2462d3]+=_0x179c08[_0x581ab7];}else _0x581ab7==='count'&&(_0x561f32+=_0x179c08[_0x581ab7]);}}),[_0x561f32,_0x152003];}['buildStatsResponse'](_0x338441,_0x46e3e8,_0x12e3da,_0x105521,_0x2558fd){const _0x31a300=[],_0x3f7e25=Object['keys'](_0x12e3da)['filter'](_0x305713=>_0x305713!=='count');let _0x4e06e4=undefined;_0x2558fd['sparse']!==!![]&&(_0x4e06e4=this['handleSegments'](_0x338441,_0x46e3e8));_0x3f7e25['forEach'](_0x463e59=>{const _0x518a0f={'target':_0x463e59,'type':'count','value':_0x12e3da[_0x463e59]};_0x31a300['push'](_0x518a0f);});const _0x54c976={'key':_0x2558fd['key'],'granularity':_0x2558fd['granularity'],'range':_0x2558fd['range'],'end':_0x2558fd['end'],'count':_0x105521,'measures':_0x31a300};return _0x4e06e4&&(_0x54c976['segments']=_0x4e06e4),_0x54c976;}['handleSegments'](_0x28d5b9,_0x3c1314){const _0x55cb27=[];return _0x3c1314['forEach']((_0x1fe170,_0x2a7a53)=>{const _0xdfd7b7=[];_0x28d5b9[_0x1fe170]&&Object['entries'](_0x28d5b9[_0x1fe170])['forEach'](([_0xc7d0e4,_0x1a63b3])=>{if(_0xc7d0e4['startsWith']('count:')){const _0x4f9702=_0xc7d0e4['slice']('count:'['length']);_0xdfd7b7['push']({'target':_0x4f9702,'type':'count','value':_0x1a63b3});}});const _0x44f19b=this['isoTimestampFromKeyTimestamp'](_0x1fe170),_0x14a100=_0x28d5b9[_0x1fe170]?_0x28d5b9[_0x1fe170]['count']:0x0;_0x55cb27['push']({'count':_0x14a100,'time':_0x44f19b,'measures':_0xdfd7b7});}),_0x55cb27;}['isoTimestampFromKeyTimestamp'](_0x26d913){if(_0x26d913['endsWith'](':'))return'0';const _0x567c36=_0x26d913['slice'](-0xc),_0x18fbc6=_0x567c36['slice'](0x0,0x4),_0x1e6154=_0x567c36['slice'](0x4,0x6),_0x43b286=_0x567c36['slice'](0x6,0x8),_0x12ec9e=_0x567c36['slice'](0x8,0xa),_0x3ee0c0=_0x567c36['slice'](0xa,0xc);return _0x18fbc6+'-'+_0x1e6154+'-'+_0x43b286+'T'+_0x12ec9e+':'+_0x3ee0c0+'Z';}async['getIds'](_0x267c42,_0x142444,_0x160156=[0x0,-0x1]){if(!_0x142444['length']){const _0x15d72c=await this['getStats'](_0x267c42);_0x142444=this['getUniqueFacets'](_0x15d72c);}const {key:_0x462fd5,granularity:_0x3c42bc,range:_0x33b45a,end:_0x1e399d,start:_0x285cbf}=_0x267c42;this['validateOptions'](_0x267c42);let _0x4cfa32=[];_0x142444['forEach'](_0x1b03e8=>{const _0x1fb051=this['generateDateTimeSets'](_0x3c42bc,_0x33b45a,_0x1e399d,_0x285cbf);_0x4cfa32=_0x4cfa32['concat'](_0x1fb051['map'](_0x40d916=>this['buildRedisKey'](_0x462fd5,_0x40d916,'index:'+_0x1b03e8)));});const _0x4106db=await this['store']['getJobIds'](_0x4cfa32,_0x160156),_0x1c8f20=this['buildIdsResponse'](_0x4106db,_0x267c42,_0x142444);return _0x1c8f20;}['buildIdsResponse'](_0x1d4fb6,_0x192beb,_0x41e1c0){const _0x824328={},_0xdc3986=Object['keys'](_0x1d4fb6);_0xdc3986['forEach'](_0x567fe8=>{const _0x4b57f1=this['getTargetForKey'](_0x567fe8),_0x43f367=_0x1d4fb6[_0x567fe8]['length'];_0x824328[_0x4b57f1]?_0x824328[_0x4b57f1]+=_0x43f367:_0x824328[_0x4b57f1]=_0x43f367;});const _0x344344=Object['entries'](_0x824328)['map'](([_0x3a3a4b,_0x4f69aa])=>({'facet':_0x3a3a4b,'count':_0x4f69aa})),_0x2f4014={'key':_0x192beb['key'],'facets':_0x41e1c0,'granularity':_0x192beb['granularity'],'range':_0x192beb['range'],'start':_0x192beb['start'],'counts':_0x344344,'segments':this['buildTimeSegments'](_0x1d4fb6)};return _0x2f4014;}['buildTimeSegments'](_0x464d7c){const _0x266a37=Object['keys'](_0x464d7c),_0x47bbc8={};_0x266a37['forEach'](_0x5303ab=>{const _0x4c429a={'type':'ids','target':this['getTargetForKey'](_0x5303ab),'time':this['isoTimestampFromKeyTimestamp'](this['getTargetForTime'](_0x5303ab)),'count':_0x464d7c[_0x5303ab]['length'],'ids':_0x464d7c[_0x5303ab]};_0x47bbc8[_0x4c429a['time']]?_0x47bbc8[_0x4c429a['time']]['push'](_0x4c429a):_0x47bbc8[_0x4c429a['time']]=[_0x4c429a];});const _0x537601=Object['entries'](_0x47bbc8)['map'](([_0x924e9a,_0x33289b])=>({'time':_0x924e9a,'measures':_0x33289b}));return _0x537601;}['getUniqueFacets'](_0x2456b2){const _0x23ff92=_0x2456b2['measures']['map'](_0x4de743=>_0x4de743['target']);return Array['from'](new Set(_0x23ff92));}['getTargetForKey'](_0x3f4565){return _0x3f4565['split'](':index:')[0x1];}['getTargetForTime'](_0x2595bc){return _0x2595bc['split'](':index:')[0x0];}async['getWorkItems'](_0x5444c5,_0x1ea397){if(!_0x1ea397['length']){const _0x2838d6=await this['getStats'](_0x5444c5);_0x1ea397=this['getUniqueFacets'](_0x2838d6);}const {key:_0x194d4a,granularity:_0x583f47,range:_0x468395,end:_0xe00e41,start:_0x17dd0b}=_0x5444c5;this['validateOptions'](_0x5444c5);let _0x1b118c=[];_0x1ea397['forEach'](_0x4441af=>{const _0x58dca9=this['generateDateTimeSets'](_0x583f47,_0x468395,_0xe00e41,_0x17dd0b);_0x1b118c=_0x1b118c['concat'](_0x58dca9['map'](_0x282735=>this['buildRedisKey'](_0x194d4a,_0x282735,'index:'+_0x4441af)));});const _0x4843d8=await this['store']['getJobIds'](_0x1b118c,[0x0,0x1]),_0x355099=this['buildWorkerLists'](_0x4843d8);return _0x355099;}['buildWorkerLists'](_0x3ede15){const _0x1b2586=[];for(const _0x36d8d0 in _0x3ede15){_0x3ede15[_0x36d8d0]['length']&&_0x1b2586['push'](_0x36d8d0);}return _0x1b2586;}['resolveTriggerStatistics']({stats:_0x160ff4},_0x4013f9){const _0x136183={'general':[],'index':[],'median':[]};_0x136183['general']['push']({'metric':'count','target':'count','value':0x1});for(const _0x571094 of _0x160ff4['measures']){const _0x24d2a2=this['resolveMetric']({'metric':_0x571094['measure'],'target':_0x571094['target']},_0x4013f9);if(this['isGeneralMetric'](_0x571094['measure']))_0x136183['general']['push'](_0x24d2a2);else{if(this['isMedianMetric'](_0x571094['measure']))_0x136183['median']['push'](_0x24d2a2);else this['isIndexMetric'](_0x571094['measure'])&&_0x136183['index']['push'](_0x24d2a2);}}return _0x136183;}['isGeneralMetric'](_0x52a8a1){return ReporterService['isGeneralMetric'](_0x52a8a1);}['isMedianMetric'](_0xd3b3c5){return ReporterService['isMedianMetric'](_0xd3b3c5);}['isIndexMetric'](_0x2f75f9){return ReporterService['isIndexMetric'](_0x2f75f9);}static['isGeneralMetric'](_0xc15858){return _0xc15858==='sum'||_0xc15858==='avg'||_0xc15858==='count';}static['isMedianMetric'](_0x34fdcb){return _0x34fdcb==='mdn';}static['isIndexMetric'](_0x451fd4){return _0x451fd4==='index';}['resolveMetric']({metric:_0x57a81b,target:_0x15876c},_0x1f7f00){const _0x476c53=new pipe_1['Pipe']([[_0x15876c]],_0x1f7f00),_0x2f80e5=_0x476c53['process']()['toString'](),_0x255e60=this['resolveTarget'](_0x57a81b,_0x15876c,_0x2f80e5);if(_0x57a81b==='index')return{'metric':_0x57a81b,'target':_0x255e60,'value':_0x1f7f00['metadata']['jid']};else{if(_0x57a81b==='count')return{'metric':_0x57a81b,'target':_0x255e60,'value':0x1};}return{'metric':_0x57a81b,'target':_0x255e60,'value':_0x2f80e5};}['isCardinalMetric'](_0x4457b0){return _0x4457b0==='index'||_0x4457b0==='count';}['resolveTarget'](_0x21a3d7,_0x1671af,_0x1570e9){const _0x132f0f=_0x1671af['substring'](0x1,_0x1671af['length']-0x1),_0x1dcd33=_0x132f0f['split']('.')['slice'](0x3)['join']('/');let _0x5a041b;return this['isCardinalMetric'](_0x21a3d7)?_0x5a041b=_0x21a3d7+':'+_0x1dcd33+':'+_0x1570e9:_0x5a041b=_0x21a3d7+':'+_0x1dcd33,_0x5a041b;}}exports['ReporterService']=ReporterService,ReporterService['DEFAULT_GRANULARITY']='5m';function _0xac0a(){const _0x567dd7=['48181408fwPaor','1935OrrCXV','5801075QcnpYX','112YUxLkM','715129TTynvz','2MASynW','61510xJFcMH','3922344qKDjQX','3048996FpTPdq','3JCmABM','313649xbROOb'];_0xac0a=function(){return _0x567dd7;};return _0xac0a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(_0x446bf4,_0xefc701){const _0x26eefb=_0x5572,_0x48353d=_0x446bf4();while(!![]){try{const _0x4734d0=-parseInt(_0x26eefb(0x19b))/0x1+-parseInt(_0x26eefb(0x1a1))/0x2*(parseInt(_0x26eefb(0x19a))/0x3)+parseInt(_0x26eefb(0x1a3))/0x4*(parseInt(_0x26eefb(0x1a2))/0x5)+parseInt(_0x26eefb(0x19f))/0x6+-parseInt(_0x26eefb(0x19c))/0x7*(-parseInt(_0x26eefb(0x19d))/0x8)+-parseInt(_0x26eefb(0x199))/0x9+-parseInt(_0x26eefb(0x19e))/0xa*(-parseInt(_0x26eefb(0x1a0))/0xb);if(_0x4734d0===_0xefc701)break;else _0x48353d['push'](_0x48353d['shift']());}catch(_0xb19551){_0x48353d['push'](_0x48353d['shift']());}}}(_0x4c32,0x83f02));function _0x4c32(){const _0x307fa1=['7525809steWfv','9crIOZz','526051MErOAh','7iKPUiR','8126344qgXyuG','5099110wtoYHf','1390482FgeAqw','22QDnMNd','485318fZQmCb','1755qyhINS','4140bagHjr'];_0x4c32=function(){return _0x307fa1;};return _0x4c32();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Router']=void 0x0;function _0x5572(_0x46ec5d,_0x127c87){const _0x4c32bf=_0x4c32();return _0x5572=function(_0x557283,_0x80c4ad){_0x557283=_0x557283-0x199;let _0x5c381f=_0x4c32bf[_0x557283];return _0x5c381f;},_0x5572(_0x46ec5d,_0x127c87);}const enums_1=require('../../modules/enums'),key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');class Router{constructor(_0x5e6d72,_0x454f88,_0x14281b){this['throttle']=0x0,this['errorCount']=0x0,this['counts']={},this['currentTimerId']=null,this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null,this['appId']=_0x5e6d72['appId'],this['guid']=_0x5e6d72['guid'],this['role']=_0x5e6d72['role'],this['topic']=_0x5e6d72['topic'],this['stream']=_0x454f88,this['throttle']=_0x5e6d72['throttle'],this['reclaimDelay']=_0x5e6d72['reclaimDelay']||enums_1['HMSH_XCLAIM_DELAY_MS'],this['reclaimCount']=_0x5e6d72['reclaimCount']||enums_1['HMSH_XCLAIM_COUNT'],this['logger']=_0x14281b,this['readonly']=_0x5e6d72['readonly']||![],this['resetThrottleState']();}['resetThrottleState'](){this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null;}async['createGroup'](_0x33b54b,_0x4b358a){try{await this['stream']['createConsumerGroup'](_0x33b54b,_0x4b358a);}catch(_0x7050ff){this['logger']['debug']('router-stream-group-exists',{'stream':_0x33b54b,'group':_0x4b358a});}}async['publishMessage'](_0x19dfb5,_0x447b0a,_0x51c720){const _0x190532=_0x447b0a?.['code']||'200';this['counts'][_0x190532]=(this['counts'][_0x190532]||0x0)+0x1;const _0x4522e7=this['stream']['mintKey'](key_1['KeyType']['STREAMS'],{'topic':_0x19dfb5}),_0x6d4e3f=await this['stream']['publishMessages'](_0x4522e7,[JSON['stringify'](_0x447b0a)],{'transaction':_0x51c720});return _0x6d4e3f[0x0];}async['customSleep'](){if(this['throttle']===0x0)return;if(this['isSleeping'])return;this['isSleeping']=!![];const _0x649a48=Date['now']();await new Promise(async _0x47b79a=>{this['sleepPromiseResolve']=_0x47b79a;let _0x4acb25=Date['now']()-_0x649a48;while(_0x4acb25<this['throttle']){await new Promise(_0x5b6bb5=>{this['innerPromiseResolve']=_0x5b6bb5,this['sleepTimout']=setTimeout(_0x5b6bb5,this['throttle']-_0x4acb25);}),_0x4acb25=Date['now']()-_0x649a48;}this['resetThrottleState'](),_0x47b79a();});}async['consumeMessages'](_0x169173,_0x10a969,_0x2f4548,_0x3e4d61){if(this['readonly']){this['logger']['info']('router-stream-readonly',{'group':_0x10a969,'consumer':_0x2f4548,'stream':_0x169173});return;}this['logger']['info']('router-stream-starting',{'group':_0x10a969,'consumer':_0x2f4548,'stream':_0x169173}),Router['instances']['add'](this),this['shouldConsume']=!![],await this['createGroup'](_0x169173,_0x10a969);let _0x1f23cb=Date['now']();async function _0x3e1e34(){await this['customSleep']();if(this['isStopped'](_0x10a969,_0x2f4548,_0x169173))return;else{if(this['isPaused']()){setImmediate(_0x3e1e34['bind'](this));return;}}const _0x390564=enums_1['HMSH_BLOCK_TIME_MS']+Math['round'](enums_1['HMSH_BLOCK_TIME_MS']*Math['random']());try{const _0x91b179=await this['stream']['consumeMessages'](_0x169173,_0x10a969,_0x2f4548,{'blockTimeout':_0x390564});if(this['isStopped'](_0x10a969,_0x2f4548,_0x169173))return;else{if(this['isPaused']()){setImmediate(_0x3e1e34['bind'](this));return;}}for(let _0x5ca051=0x0;_0x5ca051<_0x91b179['length'];_0x5ca051++){const _0x1a1bf1=_0x91b179[_0x5ca051];await this['consumeOne'](_0x169173,_0x10a969,_0x1a1bf1['id'],_0x1a1bf1['data'],_0x3e4d61);}const _0x2d303c=Date['now']();if(this['stream']['getProviderSpecificFeatures']()['supportsRetry']&&_0x2d303c-_0x1f23cb>this['reclaimDelay']){_0x1f23cb=_0x2d303c;const _0x2cac94=await this['stream']['retryMessages'](_0x169173,_0x10a969,{'consumerName':_0x2f4548,'minIdleTime':this['reclaimDelay'],'limit':enums_1['HMSH_XPENDING_COUNT']});for(let _0x52a0a1=0x0;_0x52a0a1<_0x2cac94['length'];_0x52a0a1++){const _0x30ed6a=_0x2cac94[_0x52a0a1];await this['consumeOne'](_0x169173,_0x10a969,_0x30ed6a['id'],_0x30ed6a['data'],_0x3e4d61);}}setImmediate(_0x3e1e34['bind'](this));}catch(_0x33c778){if(this['shouldConsume']&&process['env']['NODE_ENV']!=='test'){this['logger']['error']('router-stream-error',{'err':_0x33c778,'stream':_0x169173,'group':_0x10a969,'consumer':_0x2f4548}),this['errorCount']++;const _0x1426e1=Math['min'](enums_1['HMSH_GRADUATED_INTERVAL_MS']*0x2**this['errorCount'],enums_1['HMSH_MAX_TIMEOUT_MS']);setTimeout(_0x3e1e34['bind'](this),_0x1426e1);}}}_0x3e1e34['call'](this);}['isStreamMessage'](_0x120658){return Array['isArray'](_0x120658)&&Array['isArray'](_0x120658[0x0]);}['isPaused'](){return this['throttle']===enums_1['MAX_DELAY'];}['isStopped'](_0x1d7bf4,_0x1efbd0,_0xbfbd34){return!this['shouldConsume']&&this['logger']['info']('router-stream-stopped',{'group':_0x1d7bf4,'consumer':_0x1efbd0,'stream':_0xbfbd34}),!this['shouldConsume'];}async['consumeOne'](_0x2c23fe,_0x163f23,_0x41675f,_0x991fa7,_0x4d1538){this['logger']['debug']('stream-read-one',{'group':_0x163f23,'stream':_0x2c23fe,'id':_0x41675f});let _0x323218,_0x4bc2f9;try{_0x4bc2f9=new telemetry_1['TelemetryService'](this['appId']),_0x4bc2f9['startStreamSpan'](_0x991fa7,this['role']),_0x323218=await this['execStreamLeg'](_0x991fa7,_0x2c23fe,_0x41675f,_0x4d1538['bind'](this)),_0x323218?.['status']===stream_1['StreamStatus']['ERROR']&&_0x4bc2f9['setStreamError']('Function\x20Status\x20Code\x20'+(_0x323218['code']||enums_1['HMSH_CODE_UNKNOWN'])),this['errorCount']=0x0;}catch(_0x90c4e0){this['logger']['error']('stream-read-one-error',{'group':_0x163f23,'stream':_0x2c23fe,'id':_0x41675f,'err':_0x90c4e0}),_0x4bc2f9['setStreamError'](_0x90c4e0['message']);}const _0x17c24b=await this['publishResponse'](_0x991fa7,_0x323218);_0x4bc2f9['setStreamAttributes']({'app.worker.mid':_0x17c24b}),await this['ackAndDelete'](_0x2c23fe,_0x163f23,_0x41675f),_0x4bc2f9['endStreamSpan'](),this['logger']['debug']('stream-read-one-end',{'group':_0x163f23,'stream':_0x2c23fe,'id':_0x41675f});}async['execStreamLeg'](_0x4da855,_0x211f05,_0x276e27,_0xdc0403){let _0x5ac20b;try{_0x5ac20b=await _0xdc0403(_0x4da855);}catch(_0x34037e){this['logger']['error']('stream-call-function-error',{..._0x34037e,'input':_0x4da855,'stack':_0x34037e['stack'],'message':_0x34037e['message'],'name':_0x34037e['name'],'stream':_0x211f05,'id':_0x276e27}),_0x5ac20b=this['structureUnhandledError'](_0x4da855,_0x34037e);}return _0x5ac20b;}async['ackAndDelete'](_0x4bbb8,_0xe853fa,_0x154539){await this['stream']['ackAndDelete'](_0x4bbb8,_0xe853fa,[_0x154539]);}async['publishResponse'](_0x1aaa3e,_0x419768){if(_0x419768&&typeof _0x419768==='object'){if(_0x419768['status']==='error'){const [_0x11a003,_0x592c8d]=this['shouldRetry'](_0x1aaa3e,_0x419768);if(_0x11a003)return await(0x0,utils_1['sleepFor'])(_0x592c8d),await this['publishMessage'](_0x1aaa3e['metadata']['topic'],{'data':_0x1aaa3e['data'],'metadata':{..._0x1aaa3e['metadata'],'try':(_0x1aaa3e['metadata']['try']||0x0)+0x1},'policies':_0x1aaa3e['policies']});else _0x419768=this['structureError'](_0x1aaa3e,_0x419768);}else typeof _0x419768['metadata']!=='object'?_0x419768['metadata']={..._0x1aaa3e['metadata'],'guid':(0x0,utils_1['guid'])()}:_0x419768['metadata']['guid']=(0x0,utils_1['guid'])();return _0x419768['type']=stream_1['StreamDataType']['RESPONSE'],await this['publishMessage'](null,_0x419768);}}['shouldRetry'](_0x1f7432,_0x23d367){const _0x33fad8=_0x1f7432['policies']?.['retry'],_0x69b600=_0x23d367['code']['toString'](),_0x123710=_0x33fad8?.[_0x69b600],_0x57f205=_0x123710?.[0x0],_0x4cd26e=Math['min'](_0x1f7432['metadata']['try']||0x0,enums_1['HMSH_MAX_RETRIES']);if(_0x57f205>_0x4cd26e)return[!![],Math['pow'](0xa,_0x4cd26e+0x1)];return[![],0x0];}['structureUnhandledError'](_0x517a00,_0x4948f3){const _0x3ac969={};return typeof _0x4948f3['message']==='string'?_0x3ac969['message']=_0x4948f3['message']:_0x3ac969['message']=enums_1['HMSH_STATUS_UNKNOWN'],typeof _0x4948f3['stack']==='string'&&(_0x3ac969['stack']=_0x4948f3['stack']),typeof _0x4948f3['name']==='string'&&(_0x3ac969['name']=_0x4948f3['name']),{'status':'error','code':enums_1['HMSH_CODE_UNKNOWN'],'metadata':{..._0x517a00['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x3ac969};}['structureUnacknowledgedError'](_0x5d9106){const _0x5ad926='stream\x20message\x20max\x20delivery\x20count\x20exceeded',_0xdebad2=enums_1['HMSH_CODE_UNACKED'],_0x50ce51={'message':_0x5ad926,'code':_0xdebad2},_0x523e7d={'metadata':{..._0x5d9106['metadata'],'guid':(0x0,utils_1['guid'])()},'status':stream_1['StreamStatus']['ERROR'],'code':_0xdebad2,'data':_0x50ce51};return delete _0x523e7d['metadata']['topic'],_0x523e7d;}['structureError'](_0x299f62,_0x2544e5){const _0x2f6679=_0x2544e5['data']?.['message']?_0x2544e5['data']?.['message']['toString']():enums_1['HMSH_STATUS_UNKNOWN'],_0x17845b=_0x2544e5['code']||_0x2544e5['data']?.['code'],_0x401402=isNaN(_0x17845b)?enums_1['HMSH_CODE_UNKNOWN']:parseInt(_0x17845b['toString']()),_0x181ab1=_0x2544e5['data']?.['stack']?_0x2544e5['data']?.['stack']['toString']():undefined,_0x416ae9={'message':_0x2f6679,'code':_0x401402,'stack':_0x181ab1};return typeof _0x2544e5['data']?.['error']==='object'&&(_0x416ae9['error']={..._0x2544e5['data']['error']}),{'status':stream_1['StreamStatus']['ERROR'],'code':_0x401402,'stack':_0x181ab1,'metadata':{..._0x299f62['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x416ae9};}static async['stopConsuming'](){for(const _0x2a4eea of[...Router['instances']]){_0x2a4eea['stopConsuming']();}await(0x0,utils_1['sleepFor'])(enums_1['HMSH_BLOCK_TIME_MS']*0x2);}async['stopConsuming'](){this['shouldConsume']=![],this['logger']['info']('router-stream-stopping',this['topic']?{'topic':this['topic']}:undefined),this['cancelThrottle']();}['cancelThrottle'](){this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['resetThrottleState']();}['setThrottle'](_0x5396ca){if(!Number['isInteger'](_0x5396ca)||_0x5396ca<0x0||_0x5396ca>enums_1['MAX_DELAY'])throw new Error('Throttle\x20must\x20be\x20a\x20non-negative\x20integer\x20and\x20not\x20exceed\x20'+enums_1['MAX_DELAY']+'\x20ms;\x20send\x20-1\x20to\x20throttle\x20indefinitely');const _0x24c06d=_0x5396ca<this['throttle'];this['throttle']=_0x5396ca,_0x24c06d&&(this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['innerPromiseResolve']&&this['innerPromiseResolve']());}}exports['Router']=Router,Router['instances']=new Set();
|
|
1
|
+
'use strict';(function(_0x58037e,_0x66d11b){const _0x2add12=_0x517e,_0x3fbc79=_0x58037e();while(!![]){try{const _0x50372a=parseInt(_0x2add12(0x15d))/0x1+parseInt(_0x2add12(0x15f))/0x2*(-parseInt(_0x2add12(0x15b))/0x3)+parseInt(_0x2add12(0x161))/0x4*(parseInt(_0x2add12(0x15a))/0x5)+parseInt(_0x2add12(0x160))/0x6*(parseInt(_0x2add12(0x15c))/0x7)+-parseInt(_0x2add12(0x163))/0x8*(parseInt(_0x2add12(0x164))/0x9)+-parseInt(_0x2add12(0x15e))/0xa+parseInt(_0x2add12(0x162))/0xb;if(_0x50372a===_0x66d11b)break;else _0x3fbc79['push'](_0x3fbc79['shift']());}catch(_0x4890b2){_0x3fbc79['push'](_0x3fbc79['shift']());}}}(_0x14d1,0xadac6));function _0x517e(_0x38cc30,_0x5ed1ea){const _0x14d1cc=_0x14d1();return _0x517e=function(_0x517e10,_0x1ec087){_0x517e10=_0x517e10-0x15a;let _0x2e7102=_0x14d1cc[_0x517e10];return _0x2e7102;},_0x517e(_0x38cc30,_0x5ed1ea);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Router']=void 0x0;const enums_1=require('../../modules/enums'),key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');function _0x14d1(){const _0x27e69d=['131218sDapii','1472802OtKAGw','9868vFTMhQ','14684703ceJZPV','8iBZjDU','4871187aDpXSn','1030JeUKak','39yfSphh','7qRkNnE','1216135HlgEvr','11992510hnyuhf'];_0x14d1=function(){return _0x27e69d;};return _0x14d1();}class Router{constructor(_0x14d2f8,_0x378c24,_0x3c275d){this['throttle']=0x0,this['errorCount']=0x0,this['counts']={},this['currentTimerId']=null,this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null,this['appId']=_0x14d2f8['appId'],this['guid']=_0x14d2f8['guid'],this['role']=_0x14d2f8['role'],this['topic']=_0x14d2f8['topic'],this['stream']=_0x378c24,this['throttle']=_0x14d2f8['throttle'],this['reclaimDelay']=_0x14d2f8['reclaimDelay']||enums_1['HMSH_XCLAIM_DELAY_MS'],this['reclaimCount']=_0x14d2f8['reclaimCount']||enums_1['HMSH_XCLAIM_COUNT'],this['logger']=_0x3c275d,this['readonly']=_0x14d2f8['readonly']||![],this['resetThrottleState']();}['resetThrottleState'](){this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null;}async['createGroup'](_0x33059b,_0x25e22){try{await this['stream']['createConsumerGroup'](_0x33059b,_0x25e22);}catch(_0x1d21b4){this['logger']['debug']('router-stream-group-exists',{'stream':_0x33059b,'group':_0x25e22});}}async['publishMessage'](_0x5f0578,_0x33f4b6,_0x161f9a){const _0x53fed1=_0x33f4b6?.['code']||'200';this['counts'][_0x53fed1]=(this['counts'][_0x53fed1]||0x0)+0x1;const _0x17df8c=this['stream']['mintKey'](key_1['KeyType']['STREAMS'],{'topic':_0x5f0578}),_0x26698b=await this['stream']['publishMessages'](_0x17df8c,[JSON['stringify'](_0x33f4b6)],{'transaction':_0x161f9a});return _0x26698b[0x0];}async['customSleep'](){if(this['throttle']===0x0)return;if(this['isSleeping'])return;this['isSleeping']=!![];const _0x31bc30=Date['now']();await new Promise(async _0x15e919=>{this['sleepPromiseResolve']=_0x15e919;let _0x163948=Date['now']()-_0x31bc30;while(_0x163948<this['throttle']){await new Promise(_0x4b169c=>{this['innerPromiseResolve']=_0x4b169c,this['sleepTimout']=setTimeout(_0x4b169c,this['throttle']-_0x163948);}),_0x163948=Date['now']()-_0x31bc30;}this['resetThrottleState'](),_0x15e919();});}async['consumeMessages'](_0x25f74a,_0x10b84f,_0x230b63,_0x297f28){if(this['readonly']){this['logger']['info']('router-stream-readonly',{'group':_0x10b84f,'consumer':_0x230b63,'stream':_0x25f74a});return;}this['logger']['info']('router-stream-starting',{'group':_0x10b84f,'consumer':_0x230b63,'stream':_0x25f74a}),Router['instances']['add'](this),this['shouldConsume']=!![],await this['createGroup'](_0x25f74a,_0x10b84f);let _0x24748e=Date['now']();async function _0x1b270a(){await this['customSleep']();if(this['isStopped'](_0x10b84f,_0x230b63,_0x25f74a))return;else{if(this['isPaused']()){setImmediate(_0x1b270a['bind'](this));return;}}const _0x415a0e=enums_1['HMSH_BLOCK_TIME_MS']+Math['round'](enums_1['HMSH_BLOCK_TIME_MS']*Math['random']());try{const _0x4c3ae1=await this['stream']['consumeMessages'](_0x25f74a,_0x10b84f,_0x230b63,{'blockTimeout':_0x415a0e});if(this['isStopped'](_0x10b84f,_0x230b63,_0x25f74a))return;else{if(this['isPaused']()){setImmediate(_0x1b270a['bind'](this));return;}}for(let _0x50bf40=0x0;_0x50bf40<_0x4c3ae1['length'];_0x50bf40++){const _0x343505=_0x4c3ae1[_0x50bf40];await this['consumeOne'](_0x25f74a,_0x10b84f,_0x343505['id'],_0x343505['data'],_0x297f28);}const _0x177825=Date['now']();if(this['stream']['getProviderSpecificFeatures']()['supportsRetry']&&_0x177825-_0x24748e>this['reclaimDelay']){_0x24748e=_0x177825;const _0x56497c=await this['stream']['retryMessages'](_0x25f74a,_0x10b84f,{'consumerName':_0x230b63,'minIdleTime':this['reclaimDelay'],'limit':enums_1['HMSH_XPENDING_COUNT']});for(let _0x2d784d=0x0;_0x2d784d<_0x56497c['length'];_0x2d784d++){const _0x36e75a=_0x56497c[_0x2d784d];await this['consumeOne'](_0x25f74a,_0x10b84f,_0x36e75a['id'],_0x36e75a['data'],_0x297f28);}}setImmediate(_0x1b270a['bind'](this));}catch(_0x19c5dd){if(this['shouldConsume']&&process['env']['NODE_ENV']!=='test'){this['logger']['error']('router-stream-error',{'err':_0x19c5dd,'stream':_0x25f74a,'group':_0x10b84f,'consumer':_0x230b63}),this['errorCount']++;const _0x41f6c7=Math['min'](enums_1['HMSH_GRADUATED_INTERVAL_MS']*0x2**this['errorCount'],enums_1['HMSH_MAX_TIMEOUT_MS']);setTimeout(_0x1b270a['bind'](this),_0x41f6c7);}}}_0x1b270a['call'](this);}['isStreamMessage'](_0x82e190){return Array['isArray'](_0x82e190)&&Array['isArray'](_0x82e190[0x0]);}['isPaused'](){return this['throttle']===enums_1['MAX_DELAY'];}['isStopped'](_0x305872,_0x1a37e2,_0x18a2a9){return!this['shouldConsume']&&this['logger']['info']('router-stream-stopped',{'group':_0x305872,'consumer':_0x1a37e2,'stream':_0x18a2a9}),!this['shouldConsume'];}async['consumeOne'](_0x1cf898,_0x92fc6c,_0x43b662,_0x3d57b9,_0x294bac){this['logger']['debug']('stream-read-one',{'group':_0x92fc6c,'stream':_0x1cf898,'id':_0x43b662});let _0x3b1ff9,_0x243160;try{_0x243160=new telemetry_1['TelemetryService'](this['appId']),_0x243160['startStreamSpan'](_0x3d57b9,this['role']),_0x3b1ff9=await this['execStreamLeg'](_0x3d57b9,_0x1cf898,_0x43b662,_0x294bac['bind'](this)),_0x3b1ff9?.['status']===stream_1['StreamStatus']['ERROR']&&_0x243160['setStreamError']('Function\x20Status\x20Code\x20'+(_0x3b1ff9['code']||enums_1['HMSH_CODE_UNKNOWN'])),this['errorCount']=0x0;}catch(_0x360080){this['logger']['error']('stream-read-one-error',{'group':_0x92fc6c,'stream':_0x1cf898,'id':_0x43b662,'err':_0x360080}),_0x243160['setStreamError'](_0x360080['message']);}const _0xdf73d9=await this['publishResponse'](_0x3d57b9,_0x3b1ff9);_0x243160['setStreamAttributes']({'app.worker.mid':_0xdf73d9}),await this['ackAndDelete'](_0x1cf898,_0x92fc6c,_0x43b662),_0x243160['endStreamSpan'](),this['logger']['debug']('stream-read-one-end',{'group':_0x92fc6c,'stream':_0x1cf898,'id':_0x43b662});}async['execStreamLeg'](_0xd78e57,_0xb1b656,_0x1c4960,_0x18a371){let _0x534bcd;try{_0x534bcd=await _0x18a371(_0xd78e57);}catch(_0x2f495c){this['logger']['error']('stream-call-function-error',{..._0x2f495c,'input':_0xd78e57,'stack':_0x2f495c['stack'],'message':_0x2f495c['message'],'name':_0x2f495c['name'],'stream':_0xb1b656,'id':_0x1c4960}),_0x534bcd=this['structureUnhandledError'](_0xd78e57,_0x2f495c);}return _0x534bcd;}async['ackAndDelete'](_0x50ef92,_0x2cea1e,_0x709d14){await this['stream']['ackAndDelete'](_0x50ef92,_0x2cea1e,[_0x709d14]);}async['publishResponse'](_0x4a32c5,_0x10163c){if(_0x10163c&&typeof _0x10163c==='object'){if(_0x10163c['status']==='error'){const [_0x152642,_0x52f739]=this['shouldRetry'](_0x4a32c5,_0x10163c);if(_0x152642)return await(0x0,utils_1['sleepFor'])(_0x52f739),await this['publishMessage'](_0x4a32c5['metadata']['topic'],{'data':_0x4a32c5['data'],'metadata':{..._0x4a32c5['metadata'],'try':(_0x4a32c5['metadata']['try']||0x0)+0x1},'policies':_0x4a32c5['policies']});else _0x10163c=this['structureError'](_0x4a32c5,_0x10163c);}else typeof _0x10163c['metadata']!=='object'?_0x10163c['metadata']={..._0x4a32c5['metadata'],'guid':(0x0,utils_1['guid'])()}:_0x10163c['metadata']['guid']=(0x0,utils_1['guid'])();return _0x10163c['type']=stream_1['StreamDataType']['RESPONSE'],await this['publishMessage'](null,_0x10163c);}}['shouldRetry'](_0xede35,_0x3d1dae){const _0x1dd6a0=_0xede35['policies']?.['retry'],_0x10dafa=_0x3d1dae['code']['toString'](),_0x27e87c=_0x1dd6a0?.[_0x10dafa],_0x57b6a3=_0x27e87c?.[0x0],_0x5a0e41=Math['min'](_0xede35['metadata']['try']||0x0,enums_1['HMSH_MAX_RETRIES']);if(_0x57b6a3>_0x5a0e41)return[!![],Math['pow'](0xa,_0x5a0e41+0x1)];return[![],0x0];}['structureUnhandledError'](_0x3f813f,_0x33a00c){const _0x12a200={};return typeof _0x33a00c['message']==='string'?_0x12a200['message']=_0x33a00c['message']:_0x12a200['message']=enums_1['HMSH_STATUS_UNKNOWN'],typeof _0x33a00c['stack']==='string'&&(_0x12a200['stack']=_0x33a00c['stack']),typeof _0x33a00c['name']==='string'&&(_0x12a200['name']=_0x33a00c['name']),{'status':'error','code':enums_1['HMSH_CODE_UNKNOWN'],'metadata':{..._0x3f813f['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x12a200};}['structureUnacknowledgedError'](_0x1da482){const _0x304c81='stream\x20message\x20max\x20delivery\x20count\x20exceeded',_0x262b32=enums_1['HMSH_CODE_UNACKED'],_0x2a9590={'message':_0x304c81,'code':_0x262b32},_0x329761={'metadata':{..._0x1da482['metadata'],'guid':(0x0,utils_1['guid'])()},'status':stream_1['StreamStatus']['ERROR'],'code':_0x262b32,'data':_0x2a9590};return delete _0x329761['metadata']['topic'],_0x329761;}['structureError'](_0x5eb25c,_0x5a9480){const _0xe5ff9d=_0x5a9480['data']?.['message']?_0x5a9480['data']?.['message']['toString']():enums_1['HMSH_STATUS_UNKNOWN'],_0x6e45a2=_0x5a9480['code']||_0x5a9480['data']?.['code'],_0x262a87=isNaN(_0x6e45a2)?enums_1['HMSH_CODE_UNKNOWN']:parseInt(_0x6e45a2['toString']()),_0x473dff=_0x5a9480['data']?.['stack']?_0x5a9480['data']?.['stack']['toString']():undefined,_0xc42208={'message':_0xe5ff9d,'code':_0x262a87,'stack':_0x473dff};return typeof _0x5a9480['data']?.['error']==='object'&&(_0xc42208['error']={..._0x5a9480['data']['error']}),{'status':stream_1['StreamStatus']['ERROR'],'code':_0x262a87,'stack':_0x473dff,'metadata':{..._0x5eb25c['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0xc42208};}static async['stopConsuming'](){for(const _0x3a2b4f of[...Router['instances']]){_0x3a2b4f['stopConsuming']();}await(0x0,utils_1['sleepFor'])(enums_1['HMSH_BLOCK_TIME_MS']*0x2);}async['stopConsuming'](){this['shouldConsume']=![],this['logger']['info']('router-stream-stopping',this['topic']?{'topic':this['topic']}:undefined),this['cancelThrottle']();}['cancelThrottle'](){this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['resetThrottleState']();}['setThrottle'](_0x336a05){if(!Number['isInteger'](_0x336a05)||_0x336a05<0x0||_0x336a05>enums_1['MAX_DELAY'])throw new Error('Throttle\x20must\x20be\x20a\x20non-negative\x20integer\x20and\x20not\x20exceed\x20'+enums_1['MAX_DELAY']+'\x20ms;\x20send\x20-1\x20to\x20throttle\x20indefinitely');const _0x4d1968=_0x336a05<this['throttle'];this['throttle']=_0x336a05,_0x4d1968&&(this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['innerPromiseResolve']&&this['innerPromiseResolve']());}}exports['Router']=Router,Router['instances']=new Set();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x3509a0,_0x1bd16c){const _0x17299b=_0x4dd0,_0x3c3d85=_0x3509a0();while(!![]){try{const _0x12b40b=parseInt(_0x17299b(0x7b))/0x1+parseInt(_0x17299b(0x80))/0x2*(-parseInt(_0x17299b(0x83))/0x3)+-parseInt(_0x17299b(0x82))/0x4*(-parseInt(_0x17299b(0x7a))/0x5)+parseInt(_0x17299b(0x7c))/0x6+-parseInt(_0x17299b(0x81))/0x7+-parseInt(_0x17299b(0x84))/0x8*(-parseInt(_0x17299b(0x7d))/0x9)+parseInt(_0x17299b(0x7f))/0xa*(-parseInt(_0x17299b(0x7e))/0xb);if(_0x12b40b===_0x1bd16c)break;else _0x3c3d85['push'](_0x3c3d85['shift']());}catch(_0x18d918){_0x3c3d85['push'](_0x3c3d85['shift']());}}}(_0x7d28,0x9faa0));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['PostgresSearchService']=void 0x0;const index_1=require('../../index'),kvsql_1=require('../../../store/providers/postgres/kvsql');function _0x7d28(){const _0x25d6fd=['263961sZTSaP','11rzVCGq','11659090AGanmD','2dcXFck','1494703PYbKlV','72zmVxNE','411951mAfRji','48XoGtlD','246955ZCwsui','314839CiqyNP','4745328xtxaaE'];_0x7d28=function(){return _0x25d6fd;};return _0x7d28();}class PostgresSearchService extends index_1['SearchService']{['transact'](){return this['storeClient']['transact']();}constructor(_0x419dc3,_0x2bb274){super(_0x419dc3,_0x2bb274),this['pgClient']=_0x419dc3,this['searchClient']=new kvsql_1['KVSQL'](_0x419dc3,this['namespace'],this['appId']);}async['init'](_0x513b50,_0x1d0c5b,_0x45a3a9){this['searchClient']['namespace']=this['namespace']=_0x513b50,this['searchClient']['appId']=this['appId']=_0x1d0c5b,this['namespace']=_0x513b50,this['appId']=_0x1d0c5b,this['logger']=_0x45a3a9;}async['createSearchIndex'](_0x2c89f6,_0x1bdb42,_0x12e1a3){}async['listSearchIndexes'](){return[];}async['setFields'](_0x2cf9bc,_0x52269e){try{const _0x6eeb66=await this['searchClient']['hset'](_0x2cf9bc,_0x52269e);return Number(_0x6eeb66);}catch(_0x2e9b57){this['logger']['error']('postgres-search-set-fields-error',{'key':_0x2cf9bc,..._0x2e9b57});throw _0x2e9b57;}}async['getField'](_0x48dce7,_0x85ab8d){try{return await this['searchClient']['hget'](_0x48dce7,_0x85ab8d);}catch(_0x27653c){this['logger']['error']('postgres-search-get-field-error',{'key':_0x48dce7,'field':_0x85ab8d,..._0x27653c});throw _0x27653c;}}async['getFields'](_0x461d15,_0x5ef3b4){try{return await this['searchClient']['hmget'](_0x461d15,[..._0x5ef3b4]);}catch(_0x2d7cb9){this['logger']['error']('postgres-search-get-fields-error',{'key':_0x461d15,'fields':_0x5ef3b4,..._0x2d7cb9});throw _0x2d7cb9;}}async['getAllFields'](_0x1869b4){try{return await this['searchClient']['hgetall'](_0x1869b4);}catch(_0x1c6221){this['logger']['error']('postgres-search-get-all-fields-error',{'key':_0x1869b4,..._0x1c6221});throw _0x1c6221;}}async['deleteFields'](_0x5b8431,_0xc0105a){try{const _0x358e1c=await this['searchClient']['hdel'](_0x5b8431,_0xc0105a);return Number(_0x358e1c);}catch(_0x33f345){this['logger']['error']('postgres-search-delete-fields-error',{'key':_0x5b8431,'fields':_0xc0105a,..._0x33f345});throw _0x33f345;}}async['incrementFieldByFloat'](_0x39b801,_0x5226f5,_0x51d680){try{const _0x21ebe5=await this['searchClient']['hincrbyfloat'](_0x39b801,_0x5226f5,_0x51d680);return Number(_0x21ebe5);}catch(_0xb6eb5f){this['logger']['error']('postgres-increment-field-error',{'key':_0x39b801,'field':_0x5226f5,..._0xb6eb5f});throw _0xb6eb5f;}}async['sendQuery'](_0x3bedd4){try{return await this['pgClient']['query'](_0x3bedd4);}catch(_0x2003b8){this['logger']['error']('postgres-send-query-error',{'query':_0x3bedd4,..._0x2003b8});throw _0x2003b8;}}async['sendIndexedQuery'](_0x42f080,_0x14732c=[]){const [_0x3f997c,..._0x1e81f9]=_0x14732c;try{const _0x19a685=await this['pgClient']['query'](_0x3f997c,_0x1e81f9['length']?_0x1e81f9:undefined);return _0x19a685['rows'];}catch(_0x5c2fe7){this['logger']['error']('postgres-send-indexed-query-error',{'query':_0x3f997c,..._0x5c2fe7});throw _0x5c2fe7;}}}function _0x4dd0(_0x45c027,_0xa70e0){const _0x7d2855=_0x7d28();return _0x4dd0=function(_0x4dd0d9,_0x236158){_0x4dd0d9=_0x4dd0d9-0x7a;let _0x332f00=_0x7d2855[_0x4dd0d9];return _0x332f00;},_0x4dd0(_0x45c027,_0xa70e0);}exports['PostgresSearchService']=PostgresSearchService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x494f20,_0x4a99d3){const _0x213eb6=_0x1d46,_0x2e0741=_0x494f20();while(!![]){try{const _0x37d6f9=parseInt(_0x213eb6(0x148))/0x1*(parseInt(_0x213eb6(0x14a))/0x2)+parseInt(_0x213eb6(0x147))/0x3*(parseInt(_0x213eb6(0x151))/0x4)+parseInt(_0x213eb6(0x152))/0x5*(-parseInt(_0x213eb6(0x14c))/0x6)+parseInt(_0x213eb6(0x14d))/0x7*(-parseInt(_0x213eb6(0x14b))/0x8)+-parseInt(_0x213eb6(0x14e))/0x9+parseInt(_0x213eb6(0x150))/0xa+parseInt(_0x213eb6(0x14f))/0xb*(parseInt(_0x213eb6(0x149))/0xc);if(_0x37d6f9===_0x4a99d3)break;else _0x2e0741['push'](_0x2e0741['shift']());}catch(_0x49b34e){_0x2e0741['push'](_0x2e0741['shift']());}}}(_0x3d18,0xcd701));function _0x1d46(_0x55b8f6,_0x6601ee){const _0x3d181b=_0x3d18();return _0x1d46=function(_0x1d46dd,_0x260a6d){_0x1d46dd=_0x1d46dd-0x147;let _0x39d5f9=_0x3d181b[_0x1d46dd];return _0x39d5f9;},_0x1d46(_0x55b8f6,_0x6601ee);}function _0x3d18(){const _0x4fd2a4=['12nnwQOy','283622LmdUlm','32mlxfPd','6iigSiL','2880808jjUoGB','5859927btevOw','15657037NCAdhX','6914900yhrYNX','4IUoIQI','3201295wegMcf','2014431QJUlvB','7fSmRLP'];_0x3d18=function(){return _0x4fd2a4;};return _0x3d18();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['IORedisSearchService']=void 0x0;const index_1=require('../../index');class IORedisSearchService extends index_1['SearchService']{constructor(_0x1adfd6,_0x16b1fe){super(_0x1adfd6,_0x16b1fe);}async['init'](_0x1d9cac,_0x288a09,_0x2fd836){this['namespace']=_0x1d9cac,this['appId']=_0x288a09,this['logger']=_0x2fd836;}async['createSearchIndex'](_0x368c79,_0xb26d25,_0x58f43f){try{await this['searchClient']['call']('FT.CREATE',_0x368c79,'ON','HASH','PREFIX',_0xb26d25['length']['toString'](),..._0xb26d25,'SCHEMA',..._0x58f43f);}catch(_0x30de80){this['logger']['info']('Error\x20creating\x20search\x20index',{'error':_0x30de80});throw _0x30de80;}}async['listSearchIndexes'](){try{const _0xae971=await this['searchClient']['call']('FT._LIST');return _0xae971;}catch(_0x9f6510){this['logger']['info']('Error\x20listing\x20search\x20indexes',{'error':_0x9f6510});throw _0x9f6510;}}async['setFields'](_0x7593fb,_0x38593e){try{const _0x186d6a=await this['searchClient']['hset'](_0x7593fb,_0x38593e);return Number(_0x186d6a);}catch(_0x253f83){this['logger']['error']('Error\x20setting\x20fields\x20for\x20key:\x20'+_0x7593fb,{'error':_0x253f83});throw _0x253f83;}}async['getField'](_0x4084db,_0x107911){try{return await this['searchClient']['hget'](_0x4084db,_0x107911);}catch(_0x157ff5){this['logger']['error']('Error\x20getting\x20field\x20'+_0x107911+'\x20for\x20key:\x20'+_0x4084db,{'error':_0x157ff5});throw _0x157ff5;}}async['getFields'](_0x397c64,_0x14ba09){try{return await this['searchClient']['hmget'](_0x397c64,[..._0x14ba09]);}catch(_0x21c19a){this['logger']['error']('Error\x20getting\x20fields\x20for\x20key:\x20'+_0x397c64,{'error':_0x21c19a});throw _0x21c19a;}}async['getAllFields'](_0x51e057){try{return await this['searchClient']['hgetall'](_0x51e057);}catch(_0x18ed8d){this['logger']['error']('Error\x20getting\x20fields\x20for\x20key:\x20'+_0x51e057,{'error':_0x18ed8d});throw _0x18ed8d;}}async['deleteFields'](_0x47a781,_0x474b2e){try{const _0xbfa760=await this['searchClient']['hdel'](_0x47a781,..._0x474b2e);return Number(_0xbfa760);}catch(_0x2b493f){this['logger']['error']('Error\x20deleting\x20fields\x20for\x20key:\x20'+_0x47a781,{'error':_0x2b493f});throw _0x2b493f;}}async['incrementFieldByFloat'](_0x13ecf5,_0x53d351,_0x4bcb40){try{const _0x3d1e33=await this['searchClient']['hincrbyfloat'](_0x13ecf5,_0x53d351,_0x4bcb40);return Number(_0x3d1e33);}catch(_0x4551cd){this['logger']['error']('Error\x20incrementing\x20field\x20'+_0x53d351+'\x20for\x20key:\x20'+_0x13ecf5,{'error':_0x4551cd});throw _0x4551cd;}}async['sendQuery'](..._0x23e9b7){try{return await this['searchClient']['call'](..._0x23e9b7);}catch(_0xb90ed6){this['logger']['error']('Error\x20executing\x20query',{'error':_0xb90ed6});throw _0xb90ed6;}}async['sendIndexedQuery'](_0x1ef0b,_0x1025bb){try{if(_0x1025bb[0x0]?.['startsWith']('FT.')){const [_0x545ffb,..._0x2f09e1]=_0x1025bb;return await this['searchClient']['call'](_0x545ffb,..._0x2f09e1);}return await this['searchClient']['call']('FT.SEARCH',_0x1ef0b,..._0x1025bb);}catch(_0xd57ead){this['logger']['error']('Error\x20executing\x20query',{'error':_0xd57ead});throw _0xd57ead;}}}exports['IORedisSearchService']=IORedisSearchService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x559a(_0x186e71,_0x315401){const _0x40fbca=_0x40fb();return _0x559a=function(_0x559a6e,_0x5427f2){_0x559a6e=_0x559a6e-0x74;let _0x9858e0=_0x40fbca[_0x559a6e];return _0x9858e0;},_0x559a(_0x186e71,_0x315401);}(function(_0xf07c60,_0x5935cc){const _0x2c0a21=_0x559a,_0xc179d6=_0xf07c60();while(!![]){try{const _0x55ef7b=-parseInt(_0x2c0a21(0x75))/0x1*(-parseInt(_0x2c0a21(0x7c))/0x2)+parseInt(_0x2c0a21(0x78))/0x3+parseInt(_0x2c0a21(0x7b))/0x4*(-parseInt(_0x2c0a21(0x7d))/0x5)+parseInt(_0x2c0a21(0x7a))/0x6+parseInt(_0x2c0a21(0x77))/0x7*(parseInt(_0x2c0a21(0x76))/0x8)+parseInt(_0x2c0a21(0x79))/0x9*(-parseInt(_0x2c0a21(0x7e))/0xa)+-parseInt(_0x2c0a21(0x74))/0xb;if(_0x55ef7b===_0x5935cc)break;else _0xc179d6['push'](_0xc179d6['shift']());}catch(_0x3f19b8){_0xc179d6['push'](_0xc179d6['shift']());}}}(_0x40fb,0x2e6c2));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['RedisSearchService']=void 0x0;function _0x40fb(){const _0x1629a0=['259BBhSjC','48453HlokiC','647199xuYFjl','1123884CpxZbz','2876skyOWI','26YTyiVj','530CMUWEo','30DssoWg','3430680GfrJPI','19777hSUyKg','72088ykSdwP'];_0x40fb=function(){return _0x1629a0;};return _0x40fb();}const index_1=require('../../index');class RedisSearchService extends index_1['SearchService']{constructor(_0x525b70,_0x2fb06a){super(_0x525b70,_0x2fb06a);}async['init'](_0x30a3e4,_0x32f27f,_0x499c3f){this['namespace']=_0x30a3e4,this['appId']=_0x32f27f,this['logger']=_0x499c3f;}async['createSearchIndex'](_0x104153,_0x5b8984,_0x364b5a){try{await this['searchClient']['sendCommand'](['FT.CREATE',_0x104153,'ON','HASH','PREFIX',_0x5b8984['length']['toString'](),..._0x5b8984,'SCHEMA',..._0x364b5a]);}catch(_0xd80a7d){this['logger']['info']('Error\x20creating\x20search\x20index',{'error':_0xd80a7d});throw _0xd80a7d;}}async['listSearchIndexes'](){try{const _0x34b7d3=await this['searchClient']['sendCommand'](['FT._LIST']);return _0x34b7d3;}catch(_0x5bb93a){this['logger']['info']('Error\x20listing\x20search\x20indexes',{'error':_0x5bb93a});throw _0x5bb93a;}}async['setFields'](_0x16ab35,_0x544c45){try{const _0x17624b=await this['searchClient']['HSET'](_0x16ab35,_0x544c45);return Number(_0x17624b);}catch(_0x11af83){this['logger']['error']('Error\x20setting\x20fields\x20for\x20key:\x20'+_0x16ab35,{'error':_0x11af83});throw _0x11af83;}}async['getField'](_0x2a2d28,_0x3d4179){try{return await this['searchClient']['HGET'](_0x2a2d28,_0x3d4179);}catch(_0x3ee12e){this['logger']['error']('Error\x20getting\x20field\x20'+_0x3d4179+'\x20for\x20key:\x20'+_0x2a2d28,{'error':_0x3ee12e});throw _0x3ee12e;}}async['getFields'](_0x156bdb,_0x41871e){try{return await this['searchClient']['HMGET'](_0x156bdb,[..._0x41871e]);}catch(_0x234087){this['logger']['error']('Error\x20getting\x20fields\x20for\x20key:\x20'+_0x156bdb,{'error':_0x234087});throw _0x234087;}}async['getAllFields'](_0x40aba3){try{return await this['searchClient']['HGETALL'](_0x40aba3);}catch(_0xfa9981){this['logger']['error']('Error\x20getting\x20fields\x20for\x20key:\x20'+_0x40aba3,{'error':_0xfa9981});throw _0xfa9981;}}async['deleteFields'](_0x1018b3,_0x19dec2){try{const _0x1c629d=await this['searchClient']['HDEL'](_0x1018b3,_0x19dec2);return Number(_0x1c629d);}catch(_0x45d0ee){this['logger']['error']('Error\x20deleting\x20fields\x20for\x20key:\x20'+_0x1018b3,{'error':_0x45d0ee});throw _0x45d0ee;}}async['incrementFieldByFloat'](_0x5658a8,_0x3f5bdd,_0x54a1dd){try{const _0x2dbd05=await this['searchClient']['HINCRBYFLOAT'](_0x5658a8,_0x3f5bdd,_0x54a1dd);return Number(_0x2dbd05);}catch(_0xe81b4d){this['logger']['error']('Error\x20incrementing\x20field\x20'+_0x3f5bdd+'\x20for\x20key:\x20'+_0x5658a8,{'error':_0xe81b4d});throw _0xe81b4d;}}async['sendQuery'](..._0x54d593){try{return await this['searchClient']['sendCommand'](_0x54d593);}catch(_0x239fed){this['logger']['error']('Error\x20executing\x20query',{'error':_0x239fed});throw _0x239fed;}}async['sendIndexedQuery'](_0x1c02ca,_0x579f7b){try{if(_0x579f7b[0x0]?.['startsWith']('FT.'))return await this['searchClient']['sendCommand'](_0x579f7b);return await this['searchClient']['sendCommand'](['FT.SEARCH',_0x1c02ca,..._0x579f7b]);}catch(_0x5963ba){this['logger']['error']('Error\x20executing\x20query',{'error':_0x5963ba});throw _0x5963ba;}}}exports['RedisSearchService']=RedisSearchService;
|