UNPKG

@hotmeshio/hotmesh

Version:

Serverless Workflow

1 lines 3.61 kB
'use strict';const j=b;(function(c,d){const i=b,e=c();while(!![]){try{const f=parseInt(i(0x1f4))/0x1*(parseInt(i(0x202))/0x2)+parseInt(i(0x1d7))/0x3*(parseInt(i(0x1dc))/0x4)+parseInt(i(0x1dd))/0x5*(-parseInt(i(0x1ff))/0x6)+parseInt(i(0x1d9))/0x7*(parseInt(i(0x1ed))/0x8)+-parseInt(i(0x1e2))/0x9*(parseInt(i(0x1eb))/0xa)+-parseInt(i(0x1e5))/0xb*(-parseInt(i(0x1f9))/0xc)+-parseInt(i(0x1f5))/0xd*(parseInt(i(0x1f8))/0xe);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x967e0));function a(){const u=['Error\x20executing\x20query','IORedisSearchService','9GayifV','toString','7THiXUf','hmget','sendQuery','31308SJKrIQ','115rhhWyl','hget','__esModule','getField','incrementFieldByFloat','117nrtamV','HASH','../../index','407OxfXpM','error','sendIndexedQuery','defineProperty','Error\x20getting\x20fields\x20for\x20key:\x20','SearchService','423060luLnal','call','8947688fyOIbD','\x20for\x20key:\x20','listSearchIndexes','Error\x20setting\x20fields\x20for\x20key:\x20','FT.SEARCH','FT.CREATE','Error\x20getting\x20field\x20','10UsyyrF','184275IbGpsk','searchClient','startsWith','294OmTJUZ','30420bwQZOX','SCHEMA','logger','Error\x20incrementing\x20field\x20','FT._LIST','Error\x20deleting\x20fields\x20for\x20key:\x20','243816eXykvL','init','setFields','232592GzEBiG','info','hincrbyfloat','PREFIX'];a=function(){return u;};return a();}Object[j(0x1e8)](exports,j(0x1df),{'value':!0x0}),exports[j(0x1d6)]=void 0x0;const index_1=require(j(0x1e4));class IORedisSearchService extends index_1[j(0x1ea)]{constructor(c,d){super(c,d);}async[j(0x200)](c,d,f){this['namespace']=c,this['appId']=d,this['logger']=f;}async['createSearchIndex'](c,d,f){const k=j;try{await this[k(0x1f6)][k(0x1ec)](k(0x1f2),c,'ON',k(0x1e3),k(0x205),d['length'][k(0x1d8)](),...d,k(0x1fa),...f);}catch(g){throw this[k(0x1fb)]['info']('Error\x20creating\x20search\x20index',{'error':g}),g;}}async[j(0x1ef)](){const l=j;try{return await this[l(0x1f6)][l(0x1ec)](l(0x1fd));}catch(c){throw this[l(0x1fb)][l(0x203)]('Error\x20listing\x20search\x20indexes',{'error':c}),c;}}async[j(0x201)](c,d){const m=j;try{const f=await this[m(0x1f6)]['hset'](c,d);return Number(f);}catch(g){throw this[m(0x1fb)][m(0x1e6)](m(0x1f0)+c,{'error':g}),g;}}async[j(0x1e0)](c,d){const n=j;try{return await this[n(0x1f6)][n(0x1de)](c,d);}catch(f){throw this[n(0x1fb)][n(0x1e6)](n(0x1f3)+d+n(0x1ee)+c,{'error':f}),f;}}async['getFields'](c,d){const o=j;try{return await this['searchClient'][o(0x1da)](c,[...d]);}catch(f){throw this['logger']['error'](o(0x1e9)+c,{'error':f}),f;}}async['getAllFields'](c){const p=j;try{return await this['searchClient']['hgetall'](c);}catch(d){throw this['logger'][p(0x1e6)](p(0x1e9)+c,{'error':d}),d;}}async['deleteFields'](c,d){const q=j;try{const f=await this[q(0x1f6)]['hdel'](c,...d);return Number(f);}catch(g){throw this[q(0x1fb)][q(0x1e6)](q(0x1fe)+c,{'error':g}),g;}}async[j(0x1e1)](c,d,f){const r=j;try{const g=await this['searchClient'][r(0x204)](c,d,f);return Number(g);}catch(h){throw this[r(0x1fb)][r(0x1e6)](r(0x1fc)+d+r(0x1ee)+c,{'error':h}),h;}}async[j(0x1db)](...c){const s=j;try{return await this['searchClient'][s(0x1ec)](...c);}catch(d){throw this[s(0x1fb)][s(0x1e6)](s(0x206),{'error':d}),d;}}async[j(0x1e7)](c,d){const t=j;try{if(d[0x0]?.[t(0x1f7)]('FT.')){const [f,...g]=d;return await this[t(0x1f6)][t(0x1ec)](f,...g);}return await this[t(0x1f6)][t(0x1ec)](t(0x1f1),c,...d);}catch(h){throw this[t(0x1fb)]['error'](t(0x206),{'error':h}),h;}}}function b(c,d){const e=a();return b=function(f,g){f=f-0x1d6;let h=e[f];return h;},b(c,d);}exports['IORedisSearchService']=IORedisSearchService;