lambdaorm
Version:
1 lines • 5 kB
JavaScript
;const a147z=a147y;(function(s,y){const r=a147y,g=s();while(!![]){try{const x=parseInt(r(0x1dc))/0x1*(parseInt(r(0x1d2))/0x2)+-parseInt(r(0x1ba))/0x3*(-parseInt(r(0x1cb))/0x4)+-parseInt(r(0x1d5))/0x5+parseInt(r(0x1d8))/0x6+-parseInt(r(0x1e6))/0x7*(-parseInt(r(0x1d0))/0x8)+-parseInt(r(0x1de))/0x9+parseInt(r(0x1cf))/0xa*(-parseInt(r(0x1ca))/0xb);if(x===y)break;else g['push'](g['shift']());}catch(m){g['push'](g['shift']());}}}(a147s,0x8fa8c));var __awaiter=this&&this[a147z(0x1bd)]||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 p=a147y;function t(c){const d=a147y;try{a(g[d(0x1e2)](c));}catch(k){w(k);}}function v(c){const i=a147y;try{a(g[i(0x1c1)](c));}catch(k){w(k);}}function a(c){const o=a147y;c['done']?m(c[o(0x1cd)]):x(c[o(0x1cd)])[o(0x1bf)](t,v);}a((g=g[p(0x1d4)](s,y||[]))[p(0x1e2)]());});};Object['defineProperty'](exports,a147z(0x1c2),{'value':!![]});function a147y(s,y){const O=a147s();return a147y=function(D,g){D=D-0x1b9;let M=O[D];return M;},a147y(s,y);}const __1=require(a147z(0x1b9));beforeAll(()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const f=a147z;require(f(0x1c6))['config']({'path':f(0x1bc)}),yield __1[f(0x1c8)]['init'](f(0x1d9));})),describe(a147z(0x1c4),()=>{const j=a147z,s=JSON['parse']('{}');test('normalize',()=>{const q=a147y;expect(__1[q(0x1c8)]['normalize']('Countries.map(p=>\x20{region:p.region,countries:count(1)}).sort(p=>\x20p.countries)'))['toStrictEqual']('Countries.map(p=>{region:p.region,countries:count(1)}).sort(p=>asc(p.countries))'),expect(__1[q(0x1c8)][q(0x1ce)]('Countries.filter(p=>\x20p.subregion\x20==\x20\x22South\x20America\x22).map(p=>\x20p.iso3).sort(p=>\x20desc(iso3))'))[q(0x1e7)](q(0x1e3)),expect(__1[q(0x1c8)][q(0x1ce)](q(0x1dd)))[q(0x1e7)](q(0x1df));}),test(j(0x1e0),()=>{const b=j;expect(__1[b(0x1c8)][b(0x1e0)]('Countries.map(p=>\x20{region:p.region,countries:count(1)}).sort(p=>\x20p.countries)'))['toStrictEqual']([{'name':b(0x1c9),'type':b(0x1e1)},{'name':'countries','type':b(0x1db)}]),expect(__1['orm'][b(0x1e0)](b(0x1d6)))[b(0x1e7)]([{'name':'iso3','type':b(0x1e1)}]),expect(__1[b(0x1c8)][b(0x1e0)](b(0x1dd)))['toStrictEqual']([{'name':b(0x1c9),'type':b(0x1e1)},{'name':b(0x1c5),'type':b(0x1da)}]);}),test(j(0x1d3),()=>{const l=j;expect(__1[l(0x1c8)][l(0x1d3)](l(0x1e5)))[l(0x1e7)]([]),expect(__1['orm'][l(0x1d3)](l(0x1d6)))[l(0x1e7)]([{'name':l(0x1be),'type':l(0x1da)}]),expect(__1[l(0x1c8)]['parameters']('Countries.map(p=>\x20{region:p.region,max:max(p.latitude)}).sort(p=>\x20asc(p.max))'))[l(0x1e7)]([]);}),test(j(0x1c7),()=>{const u=j;expect(__1[u(0x1c8)][u(0x1c7)]('Countries.map(p=>\x20{region:p.region,countries:count(1)}).sort(p=>\x20p.countries)'))[u(0x1e7)]({'entity':u(0x1c0),'constraints':[]}),expect(__1[u(0x1c8)][u(0x1c7)](u(0x1d6)))[u(0x1e7)]({'entity':u(0x1c0),'constraints':[]}),expect(__1[u(0x1c8)][u(0x1c7)](u(0x1dd)))[u(0x1e7)]({'entity':'Countries','constraints':[]});}),test('getInfo',()=>{const e=j;expect(__1[e(0x1c8)][e(0x1d1)](e(0x1e5),{'stage':e(0x1d7)}))['toStrictEqual']({'entity':'Countries','dialect':'MySQL','source':'dataSource1','sentence':e(0x1e4)}),expect(__1['orm'][e(0x1d1)](e(0x1d6),{'stage':e(0x1d7)}))['toStrictEqual']({'entity':e(0x1c0),'dialect':e(0x1c3),'source':e(0x1cc),'sentence':e(0x1bb)}),expect(__1['orm'][e(0x1d1)]('Countries.map(p=>\x20{region:p.region,max:max(p.latitude)}).sort(p=>\x20asc(p.max))',{'stage':'stage1'}))[e(0x1e7)]({'entity':e(0x1c0),'dialect':'MySQL','source':e(0x1cc),'sentence':'SELECT\x20c.region\x20AS\x20region,\x20MAX(c.latitude)\x20AS\x20max\x20FROM\x20Countries\x20c\x20\x20GROUP\x20BY\x20c.region\x20ORDER\x20BY\x20max\x20asc\x20'});});});function a147s(){const n=['max','dotenv','constraints','orm','region','330fbPxIN','3113676RRjIUg','dataSource1','value','normalize','347920VqnXcU','16424crFexc','plan','6nkrODR','parameters','apply','2147985KZSrqa','Countries.filter(p=>\x20p.subregion\x20==\x20\x22South\x20America\x22).map(p=>\x20p.iso3).sort(p=>\x20desc(iso3))','stage1','815790heZQEq','./config/countries.yaml','any','integer','353869DkzNFj','Countries.map(p=>\x20{region:p.region,max:max(p.latitude)}).sort(p=>\x20asc(p.max))','8078337utDQlv','Countries.map(p=>{region:p.region,max:max(p.latitude)}).sort(p=>asc(p.max))','model','string','next','Countries.map(p=>{iso3:p.iso3}).filter(p=>(p.subregion==South\x20America)).sort(p=>desc(iso3))','SELECT\x20c.region\x20AS\x20region,\x20COUNT(1)\x20AS\x20countries\x20FROM\x20Countries\x20c\x20\x20GROUP\x20BY\x20c.region\x20ORDER\x20BY\x20countries\x20asc\x20','Countries.map(p=>\x20{region:p.region,countries:count(1)}).sort(p=>\x20p.countries)','3353KXLgJo','toStrictEqual','../../..','3yKEEap','SELECT\x20c.iso3\x20AS\x20iso3\x20FROM\x20Countries\x20c\x20\x20WHERE\x20c.subregion\x20=\x20\x27South\x20America\x27\x20ORDER\x20BY\x20?\x20desc\x20','./config/countries.env','__awaiter','iso3','then','Countries','throw','__esModule','MySQL','sort'];a147s=function(){return n;};return a147s();}