UNPKG

@hotmeshio/hotmesh

Version:

Serverless Workflow

1 lines 3.59 kB
'use strict';const j=b;(function(c,d){const i=b,e=c();while(!![]){try{const f=-parseInt(i(0x184))/0x1*(-parseInt(i(0x15e))/0x2)+-parseInt(i(0x166))/0x3*(-parseInt(i(0x173))/0x4)+parseInt(i(0x168))/0x5*(parseInt(i(0x183))/0x6)+-parseInt(i(0x180))/0x7+-parseInt(i(0x15d))/0x8+-parseInt(i(0x16e))/0x9*(-parseInt(i(0x161))/0xa)+-parseInt(i(0x189))/0xb*(parseInt(i(0x169))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xab193));function b(c,d){const e=a();return b=function(f,g){f=f-0x159;let h=e[f];return h;},b(c,d);}Object[j(0x162)](exports,j(0x177),{'value':!0x0}),exports[j(0x163)]=void 0x0;const index_1=require(j(0x165));function a(){const v=['sendCommand','145JApbBj','3467892psyClD','FT.CREATE','HDEL','init','info','639FaoPwR','Error\x20creating\x20search\x20index','HGETALL','getAllFields','HSET','8jxzHVO','Error\x20incrementing\x20field\x20','createSearchIndex','error','__esModule','setFields','incrementFieldByFloat','HASH','\x20for\x20key:\x20','FT.SEARCH','getFields','Error\x20getting\x20fields\x20for\x20key:\x20','Error\x20setting\x20fields\x20for\x20key:\x20','4119248hhJGRp','SearchService','namespace','208836rtkStq','2KeNyDD','listSearchIndexes','Error\x20executing\x20query','toString','FT._LIST','44wYdRhi','sendQuery','HGET','appId','searchClient','7652768myBdgQ','1310356MnstlD','getField','length','121190dqQySt','defineProperty','RedisSearchService','logger','../../index','332496nQkFJJ'];a=function(){return v;};return a();}class RedisSearchService extends index_1[j(0x181)]{constructor(c,d){super(c,d);}async[j(0x16c)](c,d,f){const k=j;this[k(0x182)]=c,this[k(0x15b)]=d,this[k(0x164)]=f;}async[j(0x175)](c,d,f){const l=j;try{await this[l(0x15c)][l(0x167)]([l(0x16a),c,'ON',l(0x17a),'PREFIX',d[l(0x160)][l(0x187)](),...d,'SCHEMA',...f]);}catch(g){throw this[l(0x164)][l(0x16d)](l(0x16f),{'error':g}),g;}}async[j(0x185)](){const m=j;try{return await this[m(0x15c)]['sendCommand']([m(0x188)]);}catch(c){throw this['logger'][m(0x16d)]('Error\x20listing\x20search\x20indexes',{'error':c}),c;}}async[j(0x178)](c,d){const n=j;try{const f=await this[n(0x15c)][n(0x172)](c,d);return Number(f);}catch(g){throw this[n(0x164)]['error'](n(0x17f)+c,{'error':g}),g;}}async[j(0x15f)](c,d){const o=j;try{return await this[o(0x15c)][o(0x15a)](c,d);}catch(f){throw this[o(0x164)][o(0x176)]('Error\x20getting\x20field\x20'+d+o(0x17b)+c,{'error':f}),f;}}async[j(0x17d)](c,d){const p=j;try{return await this[p(0x15c)]['HMGET'](c,[...d]);}catch(f){throw this[p(0x164)]['error']('Error\x20getting\x20fields\x20for\x20key:\x20'+c,{'error':f}),f;}}async[j(0x171)](c){const q=j;try{return await this[q(0x15c)][q(0x170)](c);}catch(d){throw this[q(0x164)][q(0x176)](q(0x17e)+c,{'error':d}),d;}}async['deleteFields'](c,d){const r=j;try{const f=await this['searchClient'][r(0x16b)](c,d);return Number(f);}catch(g){throw this[r(0x164)][r(0x176)]('Error\x20deleting\x20fields\x20for\x20key:\x20'+c,{'error':g}),g;}}async[j(0x179)](c,d,f){const s=j;try{const g=await this[s(0x15c)]['HINCRBYFLOAT'](c,d,f);return Number(g);}catch(h){throw this[s(0x164)][s(0x176)](s(0x174)+d+'\x20for\x20key:\x20'+c,{'error':h}),h;}}async[j(0x159)](...c){const t=j;try{return await this[t(0x15c)][t(0x167)](c);}catch(d){throw this[t(0x164)]['error'](t(0x186),{'error':d}),d;}}async['sendIndexedQuery'](c,d){const u=j;try{return d[0x0]?.['startsWith']('FT.')?await this[u(0x15c)]['sendCommand'](d):await this['searchClient'][u(0x167)]([u(0x17c),c,...d]);}catch(f){throw this['logger'][u(0x176)](u(0x186),{'error':f}),f;}}}exports['RedisSearchService']=RedisSearchService;