UNPKG

lambdaorm

Version:
1 lines 6.22 kB
'use strict';const a141o=a141y;function a141s(){const e=['defineProperty','Countries.filter(p=>\x20between(p.latitude,-11,-9)\x20&&\x20p.longitude\x20==\x20-55\x20).first(p=>\x20p.name)','name','__esModule','3tJhoHa','313564DwiUSq','Countries.map(p=>{name:p.name}).filter(p=>in(p.iso3,[BRA,ARG]))','Countries.map(p=>{name:p.name}).filter(p=>(between(p.latitude,-11,-9)&&(p.longitude==-55))).sort(p=>asc(p.name)).page(1,1)','1691046lrGYIJ','918392AxdTwc','124534nujsnA','constraints','258870vYlCGk','comparison','SELECT\x20c.name\x20AS\x20name\x20FROM\x20Countries\x20c\x20\x20WHERE\x20\x20c.iso3\x20IN\x20(\x27BRA\x27,\x20\x27ARG\x27)\x20','Countries.map(p=>{name:p.name}).filter(p=>(p.iso3==BRA))','692328ZLYsWE','model','SELECT\x20c.name\x20AS\x20name\x20FROM\x20Countries\x20c\x20\x20WHERE\x20(c.latitude\x20<\x20-9\x20AND\x20(c.latitude\x20>\x20-11\x20AND\x20c.longitude\x20=\x20-55))\x20ORDER\x20BY\x20c.name\x20asc\x20\x20LIMIT\x200,1\x20','dataSource1','apply','Countries.filter(p=>\x20p.iso3\x20===\x20\x22BRA\x22).map(p=>\x20p.name)','./config/countries.yaml','parameters','orm','normalize','SELECT\x20c.name\x20AS\x20name\x20FROM\x20Countries\x20c\x20\x20WHERE\x20(c.latitude\x20BETWEEN\x20-11\x20AND\x20-9\x20AND\x20c.longitude\x20=\x20-55)\x20ORDER\x20BY\x20c.name\x20asc\x20\x20LIMIT\x200,1\x20','done','plan','Countries.filter(p=>\x20in(p.iso3,[\x22BRA\x22,\x22ARG\x22])).map(p=>\x20p.name)','8KbTDVx','init','../../..','Countries.filter(p=>\x20p.iso3\x20==\x20\x22BRA\x22).map(p=>\x20p.name)','value','./config/countries.env','Countries.filter(p=>\x20p.latitude\x20<\x20-9\x20&&\x20p.latitude\x20>\x20-11\x20&&\x20p.longitude\x20==\x20-55\x20).first(p=>\x20p.name)','MySQL','SELECT\x20c.name\x20AS\x20name\x20FROM\x20Countries\x20c\x20\x20WHERE\x20c.iso3\x20=\x20\x27BRA\x27\x20','4798089TAtzpR','parse','next','Countries','string','toStrictEqual','stage1'];a141s=function(){return e;};return a141s();}(function(s,y){const r=a141y,g=s();while(!![]){try{const x=parseInt(r(0x19e))/0x1+parseInt(r(0x199))/0x2*(parseInt(r(0x198))/0x3)+-parseInt(r(0x19d))/0x4+-parseInt(r(0x1a0))/0x5+-parseInt(r(0x19c))/0x6+-parseInt(r(0x1a4))/0x7+parseInt(r(0x184))/0x8*(parseInt(r(0x18d))/0x9);if(x===y)break;else g['push'](g['shift']());}catch(m){g['push'](g['shift']());}}}(a141s,0x25300));function a141y(s,y){const O=a141s();return a141y=function(D,g){D=D-0x179;let M=O[D];return M;},a141y(s,y);}var __awaiter=this&&this['__awaiter']||function(s,y,P,g){function x(m){return m instanceof P?m:new P(function(w){w(m);});}return new(P||(P=Promise))(function(m,w){const i=a141y;function t(c){const z=a141y;try{a(g[z(0x18f)](c));}catch(k){w(k);}}function v(c){try{a(g['throw'](c));}catch(k){w(k);}}function a(c){const d=a141y;c[d(0x181)]?m(c['value']):x(c[d(0x188)])['then'](t,v);}a((g=g[i(0x17a)](s,y||[]))[i(0x18f)]());});};Object[a141o(0x194)](exports,a141o(0x197),{'value':!![]});const __1=require(a141o(0x186));beforeAll(()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const p=a141o;require('dotenv')['config']({'path':p(0x189)}),yield __1['orm'][p(0x185)](p(0x17c));})),describe(a141o(0x1a1),()=>{const f=a141o,s=JSON[f(0x18e)]('{}');test(f(0x17f),()=>{const q=f;expect(__1[q(0x17e)]['normalize']('Countries.filter(p=>\x20p.iso3\x20==\x20\x22BRA\x22).map(p=>\x20p.name)'))['toStrictEqual']('Countries.map(p=>{name:p.name}).filter(p=>(p.iso3==BRA))'),expect(__1[q(0x17e)][q(0x17f)](q(0x17b)))[q(0x192)](q(0x1a3)),expect(__1[q(0x17e)]['normalize'](q(0x18a)))[q(0x192)]('Countries.map(p=>{name:p.name}).filter(p=>((p.latitude<-9)&&((p.latitude>-11)&&(p.longitude==-55)))).sort(p=>asc(p.name)).page(1,1)'),expect(__1[q(0x17e)][q(0x17f)](q(0x195)))[q(0x192)](q(0x19b)),expect(__1[q(0x17e)][q(0x17f)]('Countries.filter(p=>\x20in(p.iso3,[\x22BRA\x22,\x22ARG\x22])).map(p=>\x20p.name)'))['toStrictEqual'](q(0x19a));}),test(f(0x1a5),()=>{const j=f;expect(__1[j(0x17e)]['model'](j(0x187)))[j(0x192)]([{'name':j(0x196),'type':j(0x191)}]),expect(__1[j(0x17e)][j(0x1a5)]('Countries.filter(p=>\x20p.iso3\x20===\x20\x22BRA\x22).map(p=>\x20p.name)'))[j(0x192)]([{'name':j(0x196),'type':j(0x191)}]),expect(__1[j(0x17e)][j(0x1a5)](j(0x18a)))[j(0x192)]([{'name':j(0x196),'type':j(0x191)}]),expect(__1[j(0x17e)][j(0x1a5)]('Countries.filter(p=>\x20between(p.latitude,-11,-9)\x20&&\x20p.longitude\x20==\x20-55\x20).first(p=>\x20p.name)'))[j(0x192)]([{'name':'name','type':'string'}]),expect(__1[j(0x17e)][j(0x1a5)](j(0x183)))[j(0x192)]([{'name':j(0x196),'type':j(0x191)}]);}),test(f(0x17d),()=>{const b=f;expect(__1[b(0x17e)][b(0x17d)](b(0x187)))[b(0x192)]([]),expect(__1[b(0x17e)]['parameters']('Countries.filter(p=>\x20p.iso3\x20===\x20\x22BRA\x22).map(p=>\x20p.name)'))[b(0x192)]([]),expect(__1[b(0x17e)][b(0x17d)](b(0x18a)))[b(0x192)]([]),expect(__1[b(0x17e)]['parameters'](b(0x195)))[b(0x192)]([]),expect(__1['orm'][b(0x17d)](b(0x183)))['toStrictEqual']([]);}),test(f(0x19f),()=>{const l=f;expect(__1[l(0x17e)]['constraints'](l(0x187)))[l(0x192)]({'entity':l(0x190),'constraints':[]}),expect(__1['orm'][l(0x19f)](l(0x17b)))[l(0x192)]({'entity':'Countries','constraints':[]}),expect(__1['orm'][l(0x19f)](l(0x18a)))['toStrictEqual']({'entity':l(0x190),'constraints':[]}),expect(__1[l(0x17e)][l(0x19f)](l(0x195)))[l(0x192)]({'entity':'Countries','constraints':[]}),expect(__1[l(0x17e)][l(0x19f)](l(0x183)))[l(0x192)]({'entity':l(0x190),'constraints':[]});}),test('getInfo',()=>{const u=f;expect(__1['orm'][u(0x182)](u(0x187),{'stage':u(0x193)}))[u(0x192)]({'entity':u(0x190),'dialect':u(0x18b),'source':u(0x179),'sentence':u(0x18c)}),expect(__1[u(0x17e)]['plan'](u(0x17b),{'stage':u(0x193)}))['toStrictEqual']({'entity':u(0x190),'dialect':'MySQL','source':u(0x179),'sentence':'SELECT\x20c.name\x20AS\x20name\x20FROM\x20Countries\x20c\x20\x20WHERE\x20c.iso3\x20=\x20\x27BRA\x27\x20'}),expect(__1[u(0x17e)][u(0x182)](u(0x18a),{'stage':'stage1'}))[u(0x192)]({'entity':u(0x190),'dialect':'MySQL','source':u(0x179),'sentence':u(0x1a6)}),expect(__1['orm'][u(0x182)](u(0x195),{'stage':'stage1'}))[u(0x192)]({'entity':u(0x190),'dialect':u(0x18b),'source':u(0x179),'sentence':u(0x180)}),expect(__1[u(0x17e)]['plan'](u(0x183),{'stage':u(0x193)}))[u(0x192)]({'entity':u(0x190),'dialect':u(0x18b),'source':u(0x179),'sentence':u(0x1a2)});});});